mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
clientbot: don't send empty MODE hooks when enumerating empty ban lists
This commit is contained in:
parent
85ac0bb80a
commit
25ec88c566
@ -1088,8 +1088,10 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
|
|||||||
channel = args[1]
|
channel = args[1]
|
||||||
# Send out the hook. We don't worry about repeats since these modes don't need to be
|
# Send out the hook. We don't worry about repeats since these modes don't need to be
|
||||||
# enumerated more than once per JOIN anyways.
|
# enumerated more than once per JOIN anyways.
|
||||||
|
modes = [('+%s' % banmode, m[1]) for m in self.channels[channel].modes if m[0] == banmode]
|
||||||
|
if modes:
|
||||||
return {'target': channel, 'parse_as': 'MODE',
|
return {'target': channel, 'parse_as': 'MODE',
|
||||||
'modes': [('+%s' % banmode, m[1]) for m in self.channels[channel].modes if m[0] == banmode]}
|
'modes': modes}
|
||||||
|
|
||||||
def handle_346(self, *args):
|
def handle_346(self, *args):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user