diff --git a/main.php b/main.php index 83b2b61..6561d27 100644 --- a/main.php +++ b/main.php @@ -39,8 +39,8 @@ while(true) { $regex = '#([0-9]{1,3})#'; $callback = function ($matches) { return $matches[0]+1; - } - $newName = preg_replace($regex, $callback, $group['channel_name']); + }; + $newName = preg_replace_callback($regex, $callback, $group['channel_name']); createChannel($server, $newName, $sub, $options); } }