mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-30 14:49:28 +01:00
opercmds: show failed kills in 'masskill' due to claim
This commit is contained in:
parent
6dc41ca15a
commit
8b4e73e0ed
@ -185,7 +185,7 @@ def masskill(irc, source, args, use_regex=False):
|
||||
args = masskill_parser.parse_args(args)
|
||||
reason = ' '.join(args.reason)
|
||||
|
||||
results = 0
|
||||
results = killed = 0
|
||||
|
||||
userlist_func = irc.match_all_re if use_regex else irc.match_all
|
||||
for uid in userlist_func(args.banmask):
|
||||
@ -211,6 +211,10 @@ def masskill(irc, source, args, use_regex=False):
|
||||
except:
|
||||
log.exception('(%s) Failed to send process massban hook; some kickbans may have not '
|
||||
'been sent to plugins / relay networks!', irc.name)
|
||||
killed += 1
|
||||
else:
|
||||
irc.reply("Not kicking \x02%s\x02 from \x02%s\x02 because you don't have CLAIM access. If this is "
|
||||
"another network's channel, ask them to op you first!" % (userobj.nick, channel))
|
||||
else:
|
||||
if args.akill: # TODO: configurable length via strings such as "2w3d5h6m3s" - though month and minute clash this way?
|
||||
if not (userobj.realhost or userobj.ip):
|
||||
@ -225,10 +229,10 @@ def masskill(irc, source, args, use_regex=False):
|
||||
except:
|
||||
log.exception('(%s) Failed to send process massban hook; some kickbans may have not '
|
||||
'been sent to plugins / relay networks!', irc.name)
|
||||
|
||||
killed += 1
|
||||
results += 1
|
||||
else:
|
||||
irc.reply('Masskilled %s users.' % results)
|
||||
irc.reply('Masskilled %s/%s users.' % (killed, results))
|
||||
utils.add_cmd(masskill, aliases=('mkill',))
|
||||
|
||||
@utils.add_cmd
|
||||
|
Loading…
Reference in New Issue
Block a user