function operok($user, $params) { global $debugchan, $omodes; if ($user == ircserver()) { $smsg = array(); $smsg = explode(" ", $params); if ($debug == "on") { msg($debugchan, "operation successful!"); } dump("MODE " . bnick() . " {$omodes}"); } }
function raw_002_handle($user, $params) { ircserver('set', $user); return; }
function pubcmd($user, $whom, $msg) { global $bnick, $version; $params = explode(" ", $msg); if (ereg("^#", $whom)) { // if they're calling the bot in a channel $mecalled = array_shift($params); // getting bots nick out } else { // private msg to the bot $mecalled = $bnick; $whom = get_nick($user); } $command = strtoupper(array_shift($params)); if ($mecalled == $bnick) { switch ($command) { case "SERVER": msg($whom, "I'm using " . ircserver()); break; case "PING": dump("NOTICE {$whom} :PING " . implode(" ", $params)); break; case "VERSION": dump("NOTICE " . get_nick($user) . " :VERSION {$version} "); break; default: if (is_admin($user)) { switch ($command) { case "JOIN": call_user_func_array('jchan', $params); break; case "PART": part($params[0]); break; case "ACTION": action($whom, join(" ", $params)); break; case "DO": dump(join(" ", $params)); break; case "BINDINGS": msg($whom, "BINDINGS for {$params['0']} -> (" . join(",", managebindings('list', $params[0])) . ")"); break; case "REHASH": msg($whom, "rehashing..."); //rehash(); break; case "QUIT": irclog("cmd", "ressurect requested by " . get_nick($user)); quit("requested by " . get_nick($user)); break; case "DIE": quit("requested by " . get_nick($user)); irclog("cmd", "die request by " . get_nick($user)); exit; break; case "MYSQL": $query = implode(" ", $params); jmysql($query); break; default: msg($whom, "Not implemented... yet!"); break; } } break; } } }