- def privmsg_channel(self, msg):
- return self.ircServer.privmsg(
- self.config.get('irc', 'channel'), msg.encode('utf-8'))
+ def handle_umode(self, conn, evt):
+ """
+ QuakeNet ignores all your commands until after the MOTD. This
+ handler defers joining until after it sees a magic line. It
+ also tries to join right after connect, but this will just
+ make it join again which should be safe.
+ """
+ args = evt.arguments()
+ if (args and args[0] == '+i'):
+ channels = self.config.get('irc', 'channel').split(',')
+ for channel in channels:
+ self.ircServer.join(channel)