Exemplo n.º 1
0
def main():
   if "--daemon" in sys.argv:
      ircbot.setDebug(False)
      ircbot.doubleFork()
      debug = False
   else:
      ircbot.setDebug(True)
   
   while 1:
	   bitbot(server_host, server_port, [channel])
Exemplo n.º 2
0
server = ("localhost", 6667)
nick = "urlbot"
channels = ["#jauterourls"]

bot = ircbot.Bot(nick=nick, channels=channels)
bot.restart = 0


def invite(m, origin, args, text, bot=bot):
    chan = text
    if chan in bot.channels:
        bot.todo(['JOIN', chan])


def leave(m, origin, args, text, bot=bot):
    if text == "restart":
        bot.restart = 1
    bot.todo(['QUIT'], "bye bye!")


bot.rule(invite, 'invite', cmd="INVITE")
bot.rule(leave, 'leave', cmd="KICK")

urlbot2.init_bot(bot)
ircbot.doubleFork()

bot.run(server[0], server[1])

urlbot2.uninit_bot(bot)
Exemplo n.º 3
0
    bot.todo(['QUIT'], "bye bye!")

bot.rule(invite,'invite',cmd="INVITE")
bot.rule(leave,'leave',cmd="KICK")

urlstore=urlbot3.DummyStore(False)


urlbot3.init_bot(bot,urlstore)
pingbot.init_bot(bot)
reminderbot.init_bot(bot)
#pinky.init_bot(bot)
replybot.init_bot(bot)
#quotebot.init_bot(bot)
#evalbot.init_bot(bot)

ircbot.doubleFork()

bot.run(server[0],server[1])

#evalbot.uninit_bot(bot)
#quotebot.uninit_bot(bot)
urlbot3.uninit_bot(bot)
pingbot.uninit_bot(bot)
reminderbot.uninit_bot(bot)
replybot.uninit_bot(bot)
#pinky.uninit_bot(bot)

#if bot.restart:
#    os.execlp(sys.argv[0],sys.argv)