def send_list(self,user): ''' send server channel list to user ''' user.send_num(321,'Channel Users :Name') for chan in self.chans: chan = self.chans[chan] if chan.is_invisible: continue user.send_raw({'src':self,'cmd':322,'target':'%s %s %d'%(user,chan,len(chan)),'param':chan.topic or ''}) user.send_num(323 ,'End of LIST')
def _send_user(self,user,data): data['src'] = self.name user.send_raw(data)