def join_channel(self,user,chan): if chan in user.chans: return chan = chan.lower() if chan[0] in ['&','#']: if not self._has_channel(chan): self._add_channel(chan) user.send_notice('chanserv!service@%s'%self.name,'new channel %s'%chan) self.chans[chan].joined(user) user.chans.append(chan) else: user.send_notice('chanserv!service@%s'%self.name,'bad channel name: %s'%chan)
def send_global(self,msg): for user in self.users.values(): user.send_notice('globalserv!service@nameless',msg)