3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 11:42:51 +01:00

clientbot: wait for KICK acknowledgement before updating state

This commit is contained in:
James Lu 2016-07-21 18:03:32 -07:00
parent 09ce38a53d
commit 1507a87f31

View File

@ -110,7 +110,8 @@ class ClientbotWrapperProtocol(Protocol):
# TODO: handle kick failures and send rejoin hooks for the target
reason = self._formatText(source, reason)
self.irc.send('KICK %s %s :%s' % (channel, self._expandPUID(target), reason))
self.part(target, channel, reason=reason)
# Don't update our state here: wait for the IRCd to send an acknowledgement instead.
def message(self, source, target, text, notice=False):
"""Sends messages to the target."""