From f8a54c48722e89643b72dfe3b30960372f8eb7b6 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Mon, 16 Jun 2003 04:56:06 +0000 Subject: [PATCH] Fixed irclib.Channel to use ircutils.nick on its stuff. --- src/irclib.py | 5 ++++- test/test_irclib.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/irclib.py b/src/irclib.py index 7c9e66fe1..c0a72188b 100644 --- a/src/irclib.py +++ b/src/irclib.py @@ -156,7 +156,7 @@ class Channel(object): self.voices = set() def addUser(self, user): - nick = user.lstrip('@%+') + nick = ircutils.nick(user.lstrip('@%+')) while user and user[0] in '@%+': (marker, user) = (user[0], user[1:]) if marker == '@': @@ -171,12 +171,15 @@ class Channel(object): # Note that this doesn't have to have the sigil (@%+) that users # have to have for addUser; it just changes the name of the user # without changing any of his categories. + oldNick = ircutils.nick(oldNick) + newNick = ircutils.nick(newNick) for s in (self.users, self.ops, self.halfops, self.voices): if oldNick in s: s.discard(oldNick) s.add(newNick) def removeUser(self, user): + user = ircutils.nick(user) self.users.discard(user) self.ops.discard(user) self.halfops.discard(user) diff --git a/test/test_irclib.py b/test/test_irclib.py index 9e29f497f..e6b354d9b 100644 --- a/test/test_irclib.py +++ b/test/test_irclib.py @@ -203,7 +203,7 @@ class IrcTestCase(unittest.TestCase): self.failIf(self.irc.fastqueue) self.failIf(self.irc.state.history) self.failIf(self.irc.state.channels) - self.failIf(self.irc.outstandingPongs) + self.failIf(self.irc.outstandingPing) self.assertEqual(self.irc._nickmods, conf.nickmods) def testHistory(self):