Fixed an infinite loop bug.

This commit is contained in:
Jeremy Fincher 2004-10-26 19:59:45 +00:00
parent f11e7d19d3
commit 4539f388bf

View File

@ -119,10 +119,14 @@ def addressed(nick, msg, prefixChars=None, nicks=None,
if lowered.startswith(nick): if lowered.startswith(nick):
try: try:
(maybeNick, rest) = payload.split(None, 1) (maybeNick, rest) = payload.split(None, 1)
toContinue = False
while not ircutils.isNick(maybeNick, strictRfc=True): while not ircutils.isNick(maybeNick, strictRfc=True):
if maybeNick[-1].isalnum(): if maybeNick[-1].isalnum():
continue toContinue = True
break
maybeNick = maybeNick[:-1] maybeNick = maybeNick[:-1]
if toContinue:
continue
if ircutils.nickEqual(maybeNick, nick): if ircutils.nickEqual(maybeNick, nick):
return rest return rest
else: else: