mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-20 07:20:59 +01:00
clientbot: fix nick() using the wrong arguments
I should learn to proofread... Also, outgoing NICK changes should not implicitly update the state; we should wait for the IRCd's acknowledgement instead.
This commit is contained in:
parent
a04bf6119e
commit
814c714145
@ -180,7 +180,8 @@ class ClientbotWrapperProtocol(Protocol):
|
|||||||
def nick(self, source, newnick):
|
def nick(self, source, newnick):
|
||||||
"""STUB: Sends NICK changes."""
|
"""STUB: Sends NICK changes."""
|
||||||
if source == self.irc.pseudoclient.uid:
|
if source == self.irc.pseudoclient.uid:
|
||||||
self.irc.send('NICK :%s' % (channel, self._expandPUID(target), reason))
|
self.irc.send('NICK :%s' % newnick)
|
||||||
|
# No state update here: the IRCd will respond with a NICK acknowledgement if the change succeeds.
|
||||||
else:
|
else:
|
||||||
self.irc.callHooks([source, 'CLIENTBOT_NICK', {'newnick': newnick}])
|
self.irc.callHooks([source, 'CLIENTBOT_NICK', {'newnick': newnick}])
|
||||||
self.irc.users[source].nick = newnick
|
self.irc.users[source].nick = newnick
|
||||||
|
Loading…
x
Reference in New Issue
Block a user