Ejemplo n.º 1
0
$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 :");
    $irc->message(SMARTIRC_TYPE_QUERY, "nickserv", "identify password");
    $irc->join(array("#dogec0in", "#dogec0in-vip", "#dogec0in-gamble", "#dogec0in-tip", "#dogec0in-trade"));
    $irc->send("samode #dogec0in +Y wowsuchtips");
    $irc->send("samode #dogec0in-vip +Y wowsuchtips");
    $irc->send("samode #dogec0in-tip +Y wowsuchtips");
    $irc->send("samode #dogec0in-gamble +Y wowsuchtips");
    $irc->send("samode #dogec0in-trade +Y wowsuchtips");
    $irc->setModulepath(".");
    $irc->loadModule("PingFix");
    $irc->listen();
    $irc->disconnect();
}
Ejemplo n.º 2
0
$irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!delcash.*/', $bot, "delCash");
$irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!addcard.*/', $bot, "addCard");
$irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!delcard.*/', $bot, "delCard");
$irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!dotrade$/', $bot, "doTrade");
$irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!denytrade$/', $bot, "denyTrade");
$irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!accepttrade$/', $bot, "acceptTrade");
$irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!tradeinfo$/', $bot, "tradeInfo");
$irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!gameinfo$/', $bot, "gameInfo");
$irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!startgame$/', $bot, "startGame");
$irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!stopgame\\s/', $bot, "stopGame");
$irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!joingame$/', $bot, "joinGame");
$irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!bankrupt$/', $bot, "bankrupt");
$irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!help$/', $bot, "help");
$irc->registerActionHandler(SMARTIRC_TYPE_CHANNEL, '/^!winneraddress/', $bot, "winnerAddress");
$irc->registerActionHandler(SMARTIRC_TYPE_JOIN, '.*', $bot, "onJoin");
$irc->registerActionHandler(SMARTIRC_TYPE_PART, '.*', $bot, "onQuit");
$irc->registerActionHandler(SMARTIRC_TYPE_KICK, '.*', $bot, "onKick");
$irc->registerActionHandler(SMARTIRC_TYPE_QUIT, '.*', $bot, "onQuit");
$irc->registerActionHandler(SMARTIRC_TYPE_NICKCHANGE, '.*', $bot, "onNickChange");
while (1) {
    $irc->connect("localhost", 7000, true);
    $irc->login("moonopoly", "The Dogecoin Property Trading Game", 8, "tothemoon", '');
    $irc->send("oper username password");
    // oline
    $irc->send("part #services :");
    $irc->message(SMARTIRC_TYPE_QUERY, "nickserv", "identify password");
    $irc->join(array(GAMECHANNEL));
    $irc->send("samode " . GAMECHANNEL . " +Y moonopoly");
    $irc->listen();
    $irc->disconnect();
}
Ejemplo n.º 3
0
$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");
while (1) {
    $irc->connect("localhost", 7000, true);
    $irc->login("wowsuchdoge", "much coins", 8, "manyshibe", '');
    $irc->send("oper username password");
    // oline
    $irc->send("part #services :");
    $irc->message(SMARTIRC_TYPE_QUERY, "nickserv", "identify password");
    $irc->join(array("#dogec0in", "#dogec0in-vip"));
    $irc->send("samode #dogec0in +Y wowsuchdoge");
    $irc->send("samode #dogec0in-vip +Y wowsuchdoge");
    $irc->setModulepath(".");
    $irc->loadModule("PingFix");
    $irc->listen();
    $irc->disconnect();
}