put foreach in a while(true) loop

master
lub 5 years ago
parent 08fca8d441
commit d0565ba96d

@ -7,7 +7,8 @@ $server = TeamSpeak3::factory('serverquery://'.$user.':'.$passwd.'@'.$host.':'.$
$exceptions = array_unique(array_merge($exceptions, $roots));
foreach($roots as $root) {
while(true) {
foreach($roots as $root) {
$root = $server->channelGetByName($root);
$subs = $root->subChannelList();
foreach($subs as $sub) {
@ -43,4 +44,6 @@ foreach($roots as $root) {
createChannel($server, $default, $sub, $options, array('channel_flag_permanent' => TRUE));
}
}
}
sleep(1);
}
Loading…
Cancel
Save