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)
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)
def __str__(self): return Connection.__str__(self) + ((self.registered and '[ident: %s]' % self.get_ident()) or '')
def __str__(self): return Connection.__str__(self) + ( (self.registered and '[ident: %s]' % self.get_ident()) or '')