/** * Fired when all servers _should_ be connected, but some are probably down. */ public static function botReady() { echo "Bot is ready!\n"; Dog_Module::map('botReady'); self::$IN_STARTUP = false; }
<?php $user = Dog::getUser(); $server = Dog::getServer(); $message = Dog::getIRCMsg()->getArg(1); $cmd = strtolower(Common::substrUntil($message, ' ', $message)); $msg = Common::substrFrom($message, ' ', $message); switch ($cmd) { case "ping": case "time": case "action": case "finger": break; case 'version': $user->sendCTCP(sprintf('VERSION Dog v%s. Http://dog.gizmore.org', DOG_VERSION)); break; } Dog_Module::map('trigger_ctcp', array($cmd, $msg));
public static function executeDogHook($hook, $args) { return Dog_Module::map("trigger_{$hook}", $args); }