3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-01-23 18:54:05 +01:00

clientbot: format kick reasons with the sender prefix

This commit is contained in:
James Lu 2016-07-17 23:09:41 -07:00
parent e7ae6ddbff
commit dd0c5c7e63

View File

@ -109,6 +109,7 @@ class ClientbotWrapperProtocol(Protocol):
def kick(self, source, channel, target, reason=''): def kick(self, source, channel, target, reason=''):
"""Sends channel kicks.""" """Sends channel kicks."""
# TODO: handle kick failures and send rejoin hooks for the target # 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.irc.send('KICK %s %s :%s' % (channel, self._expandPUID(target), reason))
self.part(target, channel, reason=reason) self.part(target, channel, reason=reason)