def join(self, channel, password=None): """ join a channel .. use optional password. """ result = Irc.join(self, channel, password) if result != 1: return result chan = ChannelBase(channel, self.botname) got = False if password: chan.setkey('IRC',password) got = True if not chan.data.cc: chan.data.cc = self.cfg.defaultcc or '!' got = True if not chan.data.perms: chan.data.perms = [] got = True if not chan.data.mode: chan.data.mode = "" got = True if got: chan.save() self.getchannelmode(channel) return 1