Bug fixes in src/ircmsgs.py

unbans did send the repr() of the ban list, and IrcMsg.__hash__ did try to hash a list.

Conflicts:

	src/version.py

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
(cherry picked from commit 998819da58)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
This commit is contained in:
James McCoy 2011-12-06 00:22:40 -05:00 committed by Daniel Folkinshteyn
parent e2f27512bc
commit faf2608c83

View File

@ -182,7 +182,7 @@ class IrcMsg(object):
return self._hash return self._hash
self._hash = hash(self.command) ^ \ self._hash = hash(self.command) ^ \
hash(self.prefix) ^ \ hash(self.prefix) ^ \
hash(self.args) hash(repr(self.args))
return self._hash return self._hash
def __repr__(self): def __repr__(self):
@ -522,7 +522,8 @@ def unbans(channel, hostmasks, prefix='', msg=None):
if msg and not prefix: if msg and not prefix:
prefix = msg.prefix prefix = msg.prefix
return IrcMsg(prefix=prefix, command='MODE', msg=msg, return IrcMsg(prefix=prefix, command='MODE', msg=msg,
args=(channel, '-' + ('b'*len(hostmasks)), hostmasks)) args=(channel, '-' + ('b'*len(hostmasks)),
' '.join(hostmasks)))
def kick(channel, nick, s='', prefix='', msg=None): def kick(channel, nick, s='', prefix='', msg=None):
"""Returns a KICK to kick nick from channel with the message msg.""" """Returns a KICK to kick nick from channel with the message msg."""