mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Finally found the underlying cause of the relaynames bug.
This commit is contained in:
parent
82bb295b20
commit
f2ae4b5f34
@ -296,7 +296,7 @@ class IrcState(IrcCommandDispatcher):
|
||||
chan.topic = msg.args[2]
|
||||
|
||||
def doNick(self, irc, msg):
|
||||
newNick = msg.args[0]
|
||||
newNick = nick(msg.args[0])
|
||||
oldNick = msg.nick
|
||||
try:
|
||||
if msg.user and msg.host:
|
||||
|
@ -79,8 +79,11 @@ class IrcMsg(object):
|
||||
self._user = user
|
||||
self._host = host
|
||||
self._command = command
|
||||
if self.command == 'NICK':
|
||||
self._args[0] = ircutils.nick(self._args[0])
|
||||
self._args = tuple(args)
|
||||
|
||||
|
||||
prefix = property(lambda self: self._prefix)
|
||||
nick = property(lambda self: self._nick)
|
||||
user = property(lambda self: self._user)
|
||||
|
@ -235,8 +235,15 @@ def shrinkList(L, sep='', limit=425):
|
||||
class nick(str):
|
||||
"""This class does case-insensitive comparisons of nicks."""
|
||||
def __init__(self, s):
|
||||
self.original = s
|
||||
self.lowered = toLower(s)
|
||||
|
||||
def __repr__(self):
|
||||
return repr(self.original)
|
||||
|
||||
def __str__(self):
|
||||
return str(self.original)
|
||||
|
||||
def __eq__(self, s):
|
||||
try:
|
||||
return toLower(s) == self.lowered
|
||||
|
Loading…
Reference in New Issue
Block a user