def msg(self, vars, mc, data, caller = None): print_psyc(vars, mc, data, caller) parsedtext = parsetext(vars, mc,data) #parsedtext = parsedtext.encode('iso-8859-15') if mc == '_message_public': self.display.append1(parsedtext) else: self.display.append1(parsedtext)
def msg(self, vars, mc, data, caller = None): print_psyc(vars, mc, data, 'server') parsedtext = parsetext(vars, mc,data) #parsedtext = parsedtext.encode('iso-8859-15') #self.center.Yield() if mc == '_notice_circuit_established': mc = '_request_link' vars = {} data ='' vars['_target'] = self.center.config['uni'] self.sendmsg(vars, mc, data) self.display.append1(parsedtext) else: self.display.append1(parsedtext)
def msg(self, vars, mc, data, caller = None): print_psyc(vars, mc, data, 'place') #print 'ddd' + str(type(data)) parsedtext = parsetext(vars, mc, data) #print dir(parsedtext) , type(parsedtext) #parsedtext = parsedtext.encode('iso-8859-15') #print type(parsedtext) if mc == '_message_public': line = u'' line += vars['_nick'] if vars['_action']: line += ' ' + vars['_action'] + '>' else: line += '>' try: line += ' ' + parsedtext.decode('iso-8859-15') except: line += ' ' + parsedtext self.display.append1(line) elif mc.startswith('_status_place_topic'): self.display.append1('TOPIC: ' + parsedtext) else: self.display.append1(parsedtext)
def msg(self, vars, mc, data, caller = None): print_psyc(vars, mc, data, 'client') parsedtext = parsetext(vars, mc,data) #parsedtext = parsedtext.encode('iso-8859-15') if mc == '_query_password': if self.center.config['password'] != '': mc = '_set_password' vars = {'_password' : self.center.config['password']} vars['_target'] = self.netname data ='' self.sendmsg(vars, mc, data) else: self.extra_display['server'].append1("Please enter your password or choose a different nick if you don't know the password") self.extra_display['server'].entry_box.SetValue('/password ') elif mc == '_status_friends': self.extra_display['server'].append1(parsedtext) elif mc == '_error_invalid_password': self.extra_display['server'].append1(parsedtext) self.extra_display['server'].append1("Please enter your password or choose a different nick if you don't know the password") self.extra_display['server'].entry_box.SetValue('/password ') else: self.extra_display['server'].append1(parsedtext)