$irc->message(SMARTIRC_TYPE_CHANNEL, GAMECHANNEL, CTRL_B . $data->nick . CTRL_B . ": An internal error occured trying to send your Dogecoins.. Unfortunately, you win nothing.. :("); $this->game = false; return; } // aaand kill the game finally $this->game = false; $irc->message(SMARTIRC_TYPE_CHANNEL, GAMECHANNEL, CTRL_B . $data->nick . CTRL_B . ": You won " . DOGE . $amount . "!"); file_put_contents("/tmp/moon.info", ""); } } $bot = new monopoly(); $irc = new Net_SmartIRC(); $irc->setDebug(SMARTIRC_DEBUG_NONE); //$irc->setUseSockets(true); $irc->setChannelSyncing(true); $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!taketurn$/', $bot, "takeTurn"); $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!endturn$/', $bot, "endTurn"); $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!payfine$/', $bot, "payFine"); $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!usecard$/', $bot, "useCard"); $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!buy$/', $bot, "buyProperty"); $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!auction$/', $bot, "auctionProperty"); $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!bid\\s/', $bot, "bidProperty"); $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!buildhouse/', $bot, "buildHouse"); $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!sellhouse/', $bot, "sellHouse"); $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!mortgage/', $bot, "mortgageProperty"); $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!unmortgage/', $bot, "unmortgageProperty"); $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!starttrade/', $bot, "startTrade"); $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!stoptrade$/', $bot, "stopTrade"); $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!addprop.*/', $bot, "addProp"); $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!delprop.*/', $bot, "delProp"); $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!addcash.*/', $bot, "addCash");
if (substr($admsg, 0, 16) == ">Global Notice< ") { $admsg = substr($admsg, 16); } // to avoid any exploits by that way ;> $this->lastadmsg = $admsg; $irc->message(SMARTIRC_TYPE_NOTICE, "#dogec0in", $admsg); return; } } date_default_timezone_set("Europe/Berlin"); $bot = new wowsuchdoge(); $irc = new Net_SmartIRC(); $irc->setDebug(0); //$irc->setUseSockets(true); $irc->setChannelSyncing(true); $irc->registerActionHandler(SMARTIRC_TYPE_QUERY, '/^identify\\s/', $bot, "msgIdent"); $irc->registerActionHandler(SMARTIRC_TYPE_QUERY, '/^query(2)?\\s.*/', $bot, "msgQuery"); $irc->registerActionHandler(SMARTIRC_TYPE_QUERY, '/^ad\\s/', $bot, "msgAd"); $irc->registerActionHandler(SMARTIRC_TYPE_QUERY, '/^ban\\s/', $bot, "msgBan"); $irc->registerActionHandler(SMARTIRC_TYPE_QUERY, '/^voice\\s/', $bot, "msgVoice"); $irc->registerActionHandler(SMARTIRC_TYPE_QUERY, '/^exit\\s/', $bot, "msgExit"); $irc->registerActionHandler(SMARTIRC_TYPE_QUERY, '/^global\\s/', $bot, "msgGlobal"); $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '.*', $bot, "timedChanMsg"); $irc->registerActionHandler(SMARTIRC_TYPE_ACTION, '.*', $bot, "timedChanMsg"); $irc->registerActionHandler(SMARTIRC_TYPE_JOIN, '/\\#dogec0in$/', $bot, "onJoin"); $irc->registerActionHandler(SMARTIRC_TYPE_JOIN, '/\\#dogec0in-vip$/', $bot, "onJoinVip"); $irc->registerActionHandler(SMARTIRC_TYPE_PART, '.*', $bot, "onPart"); $irc->registerActionHandler(SMARTIRC_TYPE_KICK, '.*', $bot, "onKick"); $irc->registerActionHandler(SMARTIRC_TYPE_QUIT, '.*', $bot, "onQuit"); $irc->registerActionHandler(SMARTIRC_TYPE_NICKCHANGE, '.*', $bot, "onNickChange"); $irc->registerTimeHandler(600000, $bot, "adTick");
} $irc->message(SMARTIRC_TYPE_CHANNEL, $data->channel, CTRL_B . base64_decode("w7jCsA==") . "wow such verification" . base64_decode("wrDDuA==") . CTRL_B . ": " . $data->nick . " -> " . $msg[1] . " " . CTRL_B . base64_decode("w5A=") . $msg[2] . CTRL_B . " [ " . CTRL_B . "/msg wowsuchtips info" . CTRL_B . " ]"); return; } } } } } } } $bot = new wowsuchdoge(); $irc = new Net_SmartIRC(); $irc->setDebug(SMARTIRC_DEBUG_NONE); //$irc->setUseSockets(true); $irc->setChannelSyncing(true); $irc->registerActionHandler(SMARTIRC_TYPE_QUERY, '/^exit\\s/', $bot, "msgExit"); $irc->registerActionHandler(SMARTIRC_TYPE_QUERY, '/^info$/', $bot, "msgInfo"); $irc->registerActionHandler(SMARTIRC_TYPE_QUERY, '/^tipcreate$/', $bot, "msgTipcreate"); $irc->registerActionHandler(SMARTIRC_TYPE_QUERY, '/^withdraw\\s/', $bot, "msgWithdraw"); $irc->registerActionHandler(SMARTIRC_TYPE_QUERY, '/^getvip\\s/', $bot, "msgGetvip"); $irc->registerActionHandler(SMARTIRC_TYPE_QUERY, '/^getad\\s/', $bot, "msgGetad"); $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/!/', $bot, "chanMsg"); $irc->registerActionHandler(SMARTIRC_TYPE_ACTION, '/!/', $bot, "chanMsg"); $irc->registerActionHandler(SMARTIRC_TYPE_JOIN, '/\\#dogec0in$/', $bot, "onJoin"); $irc->registerActionHandler(SMARTIRC_TYPE_NICKCHANGE, '.*', $bot, "onNickChange"); while (1) { $irc->connect("localhost", 7000, true); $irc->login("wowsuchtips", "much tipping", 8, "manydoge", ''); $irc->send("oper username password"); // oline $irc->send("part #services :");
$bot = new bot(); $doc_bot = new DocBot(); $irc = new Net_SmartIRC(); /** * Set connection-wide configurations */ $irc->setDebugLevel(SMARTIRC_DEBUG_ALL); // Set debug mode $irc->setUseSockets(true); // We want to use actual sockets, if this is false fsock will be used, which is not as ideal $irc->setChannelSyncing(true); // Channel sync allows us to get user details which we use in our logs, this is how we can check if users are in the channel or not /** * Set up hooks for events to trigger on */ $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/./', $bot, 'channel_query'); $irc->registerActionHandler(SMARTIRC_TYPE_ACTION, '/./', $bot, 'channel_query'); $irc->registerActionHandler(SMARTIRC_TYPE_KICK, '/(.*)/', $bot, 'log_kick'); $irc->registerActionHandler(SMARTIRC_TYPE_PART, '/(.*)/', $bot, 'log_part'); $irc->registerActionHandler(SMARTIRC_TYPE_QUIT, '/(.*)/', $bot, 'log_quit'); $irc->registerActionHandler(SMARTIRC_TYPE_JOIN, '/(.*)/', $bot, 'log_join'); $irc->registerActionHandler(SMARTIRC_TYPE_NICKCHANGE, '/(.*)/', $bot, 'log_nickchange'); /** * Generic commands associated purely with ContriBot */ $irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '^(!|\\.)h(elp)?\\b', $bot, 'help_cmd'); /** * DocBot class hooks */ $irc->registerActionHandler(SMARTIRC_TYPE_JOIN, '/(.*)/', $doc_bot, 'joined'); $irc->registerActionHandler(SMARTIRC_TYPE_NICKCHANGE, '/(.*)/', $doc_bot, 'nickchange');