diff --git a/cronjob.php b/cronjob.php index 65ed58d..c8904f3 100644 --- a/cronjob.php +++ b/cronjob.php @@ -1,5 +1,6 @@ channelCreate(array( - 'channel_name' => $name, - 'channel_flag_permanent' => TRUE, - 'cpid' => $parent->getId() - )); - if($options['inherit_icons']) { - $channel = $server->channelGetById($id); - $channel->modify(array('channel_icon_id' => $parent->getProperty('channel_icon_id'))); - } -} -function catchExceptions($name, $excpetions) { - foreach($excpetions as $exception) { - if($name == $exception) { - return true; - } - } - return false; -} diff --git a/functions.php b/functions.php new file mode 100644 index 0000000..fd75182 --- /dev/null +++ b/functions.php @@ -0,0 +1,21 @@ +channelCreate(array( + 'channel_name' => $name, + 'channel_flag_permanent' => TRUE, + 'cpid' => $parent->getId() + )); + if($options['inherit_icons']) { + $channel = $server->channelGetById($id); + $channel->modify(array('channel_icon_id' => $parent->getProperty('channel_icon_id'))); + } +} + +function catchExceptions($name, $excpetions) { + foreach($excpetions as $exception) { + if($name == $exception) { + return true; + } + } + return false; +}