mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
automode: don't send empty mode lines if no users match the ACL
This commit is contained in:
parent
0eb605219b
commit
f4c51cde00
@ -106,18 +106,19 @@ def match(irc, channel, uids=None):
|
|||||||
log.debug("(%s) automode: Filtered mode list of %s to %s (protocol:%s)",
|
log.debug("(%s) automode: Filtered mode list of %s to %s (protocol:%s)",
|
||||||
irc.name, modes, outgoing_modes, irc.protoname)
|
irc.name, modes, outgoing_modes, irc.protoname)
|
||||||
|
|
||||||
# If the Automode bot is missing, send the mode through the PyLink server.
|
if outgoing_modes:
|
||||||
if modebot_uid not in irc.users:
|
# If the Automode bot is missing, send the mode through the PyLink server.
|
||||||
modebot_uid = irc.sid
|
if modebot_uid not in irc.users:
|
||||||
|
modebot_uid = irc.sid
|
||||||
|
|
||||||
log.debug("(%s) automode: sending modes from modebot_uid %s",
|
log.debug("(%s) automode: sending modes from modebot_uid %s",
|
||||||
irc.name, modebot_uid)
|
irc.name, modebot_uid)
|
||||||
|
|
||||||
irc.proto.mode(modebot_uid, channel, outgoing_modes)
|
irc.proto.mode(modebot_uid, channel, outgoing_modes)
|
||||||
|
|
||||||
# Create a hook payload to support plugins like relay.
|
# Create a hook payload to support plugins like relay.
|
||||||
irc.callHooks([modebot_uid, 'AUTOMODE_MODE',
|
irc.callHooks([modebot_uid, 'AUTOMODE_MODE',
|
||||||
{'target': channel, 'modes': outgoing_modes, 'parse_as': 'MODE'}])
|
{'target': channel, 'modes': outgoing_modes, 'parse_as': 'MODE'}])
|
||||||
|
|
||||||
def handle_join(irc, source, command, args):
|
def handle_join(irc, source, command, args):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user