From: pk910 Date: Sun, 27 Nov 2011 02:58:41 +0000 (+0100) Subject: check op on #C not on #PHP for CGod.class.php X-Git-Url: http://git.pk910.de/?p=PHP-P10.git;a=commitdiff_plain;h=f4def99bf1ba4368932dbf6b90ee091285b49fb7 check op on #C not on #PHP for CGod.class.php --- diff --git a/Bots/CGod.class.php b/Bots/CGod.class.php index 40a466f..4871694 100644 --- a/Bots/CGod.class.php +++ b/Bots/CGod.class.php @@ -74,13 +74,13 @@ class {$_NAME} extends Bot { } function recive_privmsg($user, $channel, $message) { - $opOnPHPChannel = false; - $PHPChannel = P10_Channel::getChannelByName("#PHP"); - if($PHPChannel) { - $privs = $PHPChannel->getUserPrivs($user); - $opOnPHPChannel = ($privs & P10_Channel::USERPRIV_OPED); + $opOnCChannel = false; + $CChannel = P10_Channel::getChannelByName("#C"); + if($CChannel) { + $privs = $CChannel->getUserPrivs($user); + $opOnCChannel = ($privs & P10_Channel::USERPRIV_OPED); } - if(!$user->getModes()->hasMode('o') && !$opOnPHPChannel) return 0; + if(!$user->getModes()->hasMode('o') && !$opOnCChannel) return 0; $exp=explode(" ", $message, 2); switch (strtolower($exp[0])) { case "~c":