on_welcome.py 611 B

1234567891011
  1. from common import log, do_everything_to
  2. def process_event(self, connection, event):
  3. log.info(event) # Handy for debugging. Keep this.
  4. if self.password: # Id with NickServ
  5. connection.privmsg("NickServ", "identify " + self.password) # Identify with NickServ.
  6. channels = self.db.all("SELECT name FROM channels WHERE network='" + self.network + "' AND autojoin=True")
  7. connection.mode(connection.get_nickname(), "+x")
  8. do_everything_to.join(self, connection, self.homechannel)
  9. for channel in channels: # Join channels with autojoin function.
  10. connection.join(channel)