Skip to content

Instantly share code, notes, and snippets.

@jk0
Created February 19, 2011 19:45
Show Gist options
  • Save jk0/835309 to your computer and use it in GitHub Desktop.
Save jk0/835309 to your computer and use it in GitHub Desktop.
def on_pubmsg(self, connection, event):
"""Handle public messages"""
print event.source()
self.source = event.source().split("@", 1)[0]
self.target = event.target()
nick = irclib.nm_to_n(event.source())
msg = event.arguments()[0]
self.log.info("%s <%s> %s" % (self.target, nick, msg))
self.poll_messages(msg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment