mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-11 20:52:42 +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."""
|
||||
if not utils.isInternalClient(irc, numeric):
|
||||
raise LookupError('No such PyLink PseudoClient exists.')
|
||||
if not utils.isNick(newnick):
|
||||
raise ValueError('Invalid nickname %r.' % nick)
|
||||
if newnick == '0':
|
||||
newnick = numeric
|
||||
elif not utils.isNick(newnick):
|
||||
raise ValueError('Invalid nickname %r.' % newnick)
|
||||
_sendFromUser(irc, numeric, 'NICK %s %s' % (newnick, int(time.time())))
|
||||
irc.users[numeric].nick = newnick
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user