mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-28 13:42:37 +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,10 +180,11 @@ class ClientbotWrapperProtocol(Protocol):
|
||||
def nick(self, source, newnick):
|
||||
"""STUB: Sends NICK changes."""
|
||||
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:
|
||||
self.irc.callHooks([source, 'CLIENTBOT_NICK', {'newnick': newnick}])
|
||||
self.irc.users[source].nick = newnick
|
||||
self.irc.users[source].nick = newnick
|
||||
|
||||
def notice(self, source, target, text):
|
||||
"""Sends notices to the target."""
|
||||
|
Loading…
Reference in New Issue
Block a user