remove even more unicode()/encode() calls.
it's now to the point that i have no idea what convinced me to make them in the first damn place.
This commit is contained in:
parent
aae4dfa062
commit
1afa34554f
|
@ -52,21 +52,15 @@ class DrBotServerConnection(irclib.ServerConnection):
|
|||
splitpos = text.rfind(' ', 0, splitspace)
|
||||
splittext = text[0:splitpos] + ' ' + splitter
|
||||
text = splitter + ' ' + text[splitpos+1:]
|
||||
self.send_raw("PRIVMSG %s :%s" % (target, unicode(splittext).encode('utf-8')))
|
||||
self.send_raw("PRIVMSG %s :%s" % (target, splittext))
|
||||
|
||||
times = times + 1
|
||||
if times >= 4:
|
||||
return
|
||||
|
||||
# done splitting
|
||||
try:
|
||||
text = unicode(text).encode('utf-8')
|
||||
except UnicodeDecodeError: pass
|
||||
self.send_raw("PRIVMSG %s :%s" % (target, text))
|
||||
else:
|
||||
try:
|
||||
text = unicode(text).encode('utf-8')
|
||||
except UnicodeDecodeError: pass
|
||||
self.send_raw("PRIVMSG %s :%s" % (target, text))
|
||||
|
||||
class DrBotIRC(irclib.IRC):
|
||||
|
|
Loading…
Reference in New Issue