예제 #1
0
 public function command_id($user, $channel, $args)
 {
     require_once "Blocks.php";
     if ($args[1]) {
         $block = implode('', $args);
     } else {
         $block = $args[0];
     }
     $result = Blocks::GetID($block);
     echo $result;
     if ($result) {
         $this->bot->privmsg($channel, "The ID for " . $block . " is " . $result . ".");
     } else {
         $this->bot->privmsg($channel, "Either you typed it wrong, or it doesn't exist (Or we haven't added that name yet)");
     }
 }