X-Git-Url: http://git.pk910.de/?p=PHP-P10.git;a=blobdiff_plain;f=Bots%2FModManager.class.php;h=0077f1c0bf5d0de6a89a2baba419a37ac9c9fc7a;hp=a83e0a8b1e2ac2837e7e8bac9322ef832c3302b7;hb=811bc0c7a1f583fb624a0f8c3601146e063c5a25;hpb=3927f0cb5827f9da038702bb0f7a8efd69b34aa7 diff --git a/Bots/ModManager.class.php b/Bots/ModManager.class.php index a83e0a8..0077f1c 100644 --- a/Bots/ModManager.class.php +++ b/Bots/ModManager.class.php @@ -1,22 +1,19 @@ . * * * ************************************************************************ * @@ -50,6 +47,7 @@ class {$_NAME} extends Bot { ModCMD::bind($this, BIND_CHANMSG, "recive_privmsg"); ModCMD::bind($this, BIND_QUIT, "recive_quit"); + ModCMD::bind($this, BIND_CTCP, "recive_ctcp"); } public function unload($rehash = false) { @@ -60,7 +58,7 @@ class {$_NAME} extends Bot { } } - function recive_privmsg($user, $channel, $message) { + public function recive_privmsg($user, $channel, $message) { if(!$user->getModes()->hasMode('o')) return 0; $exp=explode(" ",$message); switch (strtolower($exp[0])) { @@ -112,11 +110,30 @@ class {$_NAME} extends Bot { } } - function recive_quit($user, $reason) { + public function recive_quit($user, $reason) { if($user === $this->modman) { $this->load($this->uplink); } } + + public function recive_ctcp($user, $target, $command, $text, $publicCtcp) { + if(!$publicCtcp) { + switch($command) { + case"PING": + $this->uplink->ctcp_reply($target, $user, "PING", ($text - (60*60*1337 + 42*60))); //1337 42 ftw! + break; + case"VERSION": + $this->uplink->ctcp_reply($target, $user, "VERSION", "PHP-P10 Pack by pk910. Source: http://devserv.pk910.de/git/?p=PHP-P10.git"); + break; + case"TIME": + $this->uplink->ctcp_reply($target, $user, "TIME", date('r')); + break; + case"FINGER": + $this->uplink->ctcp_reply($target, $user, "FINGER", "PHP-P10 Pack (C) ".date('Y')." pk910. Visit us on irc://irc.webgamesnet.net/PHP"); + break; + } + } + } } ?> \ No newline at end of file