mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-02 15:44:06 +01:00
opercmds: exempt service bots from masskill/massban
This commit is contained in:
parent
90eee9f5cb
commit
716bb6da5e
@ -130,6 +130,9 @@ def massban(irc, source, args, use_regex=False):
|
||||
if irc.is_oper(uid) and not args.include_opers:
|
||||
irc.reply('Skipping banning \x02%s\x02 because they are opered.' % irc.users[uid].nick)
|
||||
continue
|
||||
elif irc.get_service_bot(uid):
|
||||
irc.reply('Skipping banning \x02%s\x02 because it is a service client.' % irc.users[uid].nick)
|
||||
continue
|
||||
|
||||
# Remove the target's access before banning them.
|
||||
bans = [('-%s' % irc.cmodes[prefix], uid) for prefix in irc.channels[args.channel].get_prefix_modes(uid) if prefix in irc.cmodes]
|
||||
@ -228,6 +231,9 @@ def masskill(irc, source, args, use_regex=False):
|
||||
if irc.is_oper(uid) and not args.include_opers:
|
||||
irc.reply('Skipping killing \x02%s\x02 because they are opered.' % userobj.nick)
|
||||
continue
|
||||
elif irc.get_service_bot(uid):
|
||||
irc.reply('Skipping killing \x02%s\x02 because it is a service client.' % userobj.nick)
|
||||
continue
|
||||
|
||||
relay = world.plugins.get('relay')
|
||||
if relay and hasattr(userobj, 'remote'):
|
||||
|
Loading…
Reference in New Issue
Block a user