core: avoid casting data to string if it is already an instance of basestring, in irc.reply.

This commit is contained in:
Daniel Folkinshteyn 2011-12-13 18:21:38 -05:00
parent ce9d04eac9
commit e0c08d3f98

View File

@ -824,7 +824,8 @@ class NestedCommandsIrcProxy(ReplyIrcProxy):
# action=True implies noLengthCheck=True and prefixNick=False # action=True implies noLengthCheck=True and prefixNick=False
self.noLengthCheck=noLengthCheck or self.noLengthCheck or self.action self.noLengthCheck=noLengthCheck or self.noLengthCheck or self.action
target = self.private and self.to or self.msg.args[0] target = self.private and self.to or self.msg.args[0]
s = str(s) # Allow non-string esses. if not isinstance(s, basestring): # avoid trying to str() unicode
s = str(s) # Allow non-string esses.
if self.finalEvaled: if self.finalEvaled:
try: try:
if isinstance(self.irc, self.__class__): if isinstance(self.irc, self.__class__):