def on_bannedfromchan(event, irc): s = event.raw.split(" ") channel = s[3] irc.notice("wolfy1339", "Banned from {0}".format(channel)) log.warning("Banned from %s", channel)