|
|
@ -34,9 +34,11 @@ while(true) {
|
|
|
|
$delete = true;
|
|
|
|
$delete = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if($i == $groupCount AND $delete == false) {
|
|
|
|
if($i == $groupCount AND $delete == false) {
|
|
|
|
$regex = '#([0-9]{1,3})#e';
|
|
|
|
$regex = '#([0-9]{1,3})#';
|
|
|
|
$replacement = '("$1" + 1)';
|
|
|
|
$callback = function ($matches) {
|
|
|
|
$newName = preg_replace($regex, $replacement, $group['channel_name']);
|
|
|
|
return $matches[0]+1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$newName = preg_replace($regex, $callback, $group['channel_name']);
|
|
|
|
createChannel($server, $newName, $sub, $options);
|
|
|
|
createChannel($server, $newName, $sub, $options);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -46,4 +48,4 @@ while(true) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sleep(1);
|
|
|
|
sleep(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|