Another year is about to end... So we have to update these damn copyright information :P
[PHP-P10.git] / Bots / PerlGod.class.php
index f992eb21597f2e4afeb256e4f650b5940c7dfb0a..0eb0a634647ce172ed10e6450cda89987a662ffd 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /******************************* PHP-P10 v2 *****************************
- * Copyright (C) 2011  Philipp Kreil (pk910)                            *
+ * Copyright (C) 2011-2012  Philipp Kreil (pk910)                       *
  *                                                                      *
  * This program is free software: you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -40,6 +40,7 @@ class {$_NAME} extends Bot {
                        if(is_a($this->bot, "P10_User")) {
                                $this->uplink->join($this->bot, "#perl", (P10_Channel::USERPRIV_OPED | P10_Channel::USERPRIV_VOICE));
                                $this->uplink->join($this->bot, "#dev", P10_Channel::USERPRIV_VOICE);
+                $this->uplink->join($this->bot, "#CoderCom", P10_Channel::USERPRIV_VOICE);
                        }
                } else {
                        $this->bot = $old;
@@ -72,13 +73,13 @@ class {$_NAME} extends Bot {
        }
        
        function recive_privmsg($user, $channel, $message) {
-               $opOnPHPChannel = false;
-               $entryChannel = P10_Channel::getChannelByName("#PHP");
+               $opOnPerlChannel = false;
+               $entryChannel = P10_Channel::getChannelByName("#Perl");
                if($entryChannel) {
                        $privs = $entryChannel->getUserPrivs($user);
-                       $opOnPHPChannel = ($privs & P10_Channel::USERPRIV_OPED);
+                       $opOnPerlChannel = ($privs & P10_Channel::USERPRIV_OPED);
                }
-               if(!$user->getModes()->hasMode('o') && !$opOnPHPChannel) return 0;
+               if(!$user->getModes()->hasMode('o') && !$opOnPerlChannel) return 0;
                $exp=explode(" ", $message, 2);
                switch (strtolower($exp[0])) {
                        case "~perl":