Python IRC bot using Twisted

ddtm dr.death.tm at gmail.com
Tue Jul 3 05:46:59 EDT 2007


I'm using an example of IRC bot (_ttp://twistedmatrix.com/projects/
words/documentation/examples/ircLogBot.py) to create my own bot. But I
have a problem. I'm trying to make my bot send messages periodically.
But I can't find a way of adding Timer or something similar to my code
so that it could work. Could somebody modify an example to make IRC
bot send anything to chat every 20 seconds?

P.S. Timer should not lock the main program (I think it should work in
other thread or so)
P.P.S. Could somebody write a code of delay between messages too? In
pseudocode it looks like this:
  sleep(20)
  sendMessage(channel,'lopata')
This delay should be non-locking too.
P.P.P.S. Sorry for my bad English (and for a noob question too)




More information about the Python-list mailing list