示例#1
0
 def send(self, line, *args):
     type = line[ :3]
     if type in ['RPL', 'ERR']:
         reply_msg = irc_replies.dict[line][1](*args)
         id_msg = irc_replies.dict[line][0]
         to_send = ':%s %s %s %s' % (self.server_host, id_msg, self.nick, reply_msg)
     else:
         to_send = line
     Connection.sendLine(self, to_send)
示例#2
0
 def send(self, line, *args):
     type = line[:3]
     if type in ['RPL', 'ERR']:
         reply_msg = irc_replies.dict[line][1](*args)
         id_msg = irc_replies.dict[line][0]
         to_send = ':%s %s %s %s' % (self.server_host, id_msg, self.nick,
                                     reply_msg)
     else:
         to_send = line
     Connection.sendLine(self, to_send)
示例#3
0
 def __str__(self):
     return Connection.__str__(self) + ((self.registered and '[ident: %s]' % self.get_ident()) or '')
示例#4
0
 def __str__(self):
     return Connection.__str__(self) + (
         (self.registered and '[ident: %s]' % self.get_ident()) or '')