3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-30 14:49:28 +01:00

clientbot: poll WHO once every pingfreq

This commit is contained in:
James Lu 2016-07-23 00:06:11 -07:00
parent 91310164be
commit 7eaf074019

View File

@ -176,6 +176,10 @@ class ClientbotWrapperProtocol(Protocol):
if self.irc.uplink:
self.irc.send('PING %s' % self.irc.getFriendlyName(self.irc.uplink))
# Poll WHO periodically to figure out any ident/host/away status changes.
for channel in self.irc.pseudoclient.channels:
self.irc.send('WHO %s' % channel)
def part(self, source, channel, reason=''):
"""STUB: Parts a user from a channel."""
self.irc.channels[channel].removeuser(source)