Python IRC bot using Twisted

ddtm at
Wed Jul 11 12:51:27 CEST 2007

I have another problem with my IRC bot. There is privmsg(self, user,
channel, msg) function (this function handles the incoming IRC data)
in the code that was mentioned above. I have a special condition in
this function that if a user sends to bot a private message (in other
words: if channel == self.nickname) bot sends it to the main channel.
Everything works fine except sending message to the main channel (for
example #www). I write something like this:
if channel == self.nickname:
  self.msg('www', msg)
This code doesn't work. But if try to send private message back to
if channel == self.nickname:
  self.msg(user, msg)
everything works fine. I really don't know what to do.

More information about the Python-list mailing list