mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-12 05:02:33 +01:00
inspircd.nickClient: allow nick 0 to equal the target user's UID
This commit is contained in:
parent
049b7f5049
commit
20772e5429
@ -123,8 +123,10 @@ def nickClient(irc, numeric, newnick):
|
|||||||
Changes the nick of a PyLink PseudoClient."""
|
Changes the nick of a PyLink PseudoClient."""
|
||||||
if not utils.isInternalClient(irc, numeric):
|
if not utils.isInternalClient(irc, numeric):
|
||||||
raise LookupError('No such PyLink PseudoClient exists.')
|
raise LookupError('No such PyLink PseudoClient exists.')
|
||||||
if not utils.isNick(newnick):
|
if newnick == '0':
|
||||||
raise ValueError('Invalid nickname %r.' % nick)
|
newnick = numeric
|
||||||
|
elif not utils.isNick(newnick):
|
||||||
|
raise ValueError('Invalid nickname %r.' % newnick)
|
||||||
_sendFromUser(irc, numeric, 'NICK %s %s' % (newnick, int(time.time())))
|
_sendFromUser(irc, numeric, 'NICK %s %s' % (newnick, int(time.time())))
|
||||||
irc.users[numeric].nick = newnick
|
irc.users[numeric].nick = newnick
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user