예제 #1
0
파일: Dog.php 프로젝트: sinfocol/gwf3
 /**
  * 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;
 }
예제 #2
0
파일: CTCP.php 프로젝트: sinfocol/gwf3
<?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));
예제 #3
0
 public static function executeDogHook($hook, $args)
 {
     return Dog_Module::map("trigger_{$hook}", $args);
 }