3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 09:19:23 +01:00

opercmds: use irc.reply() instead of irc.msg(source, ...)

This commit is contained in:
James Lu 2017-08-02 21:48:05 +08:00
parent acceb4e714
commit def1c0bfd9

View File

@ -49,7 +49,7 @@ def checkban(irc, source, args):
if args.channel: if args.channel:
args.banmask = "$and:(%s+$channel:%s)" % (args.banmask, args.channel) args.banmask = "$and:(%s+$channel:%s)" % (args.banmask, args.channel)
irc.msg(source, "Checking for hosts that match \x02%s\x02:" % args.banmask, notice=True) irc.reply("Checking for hosts that match \x02%s\x02:" % args.banmask, private=True)
for uid, userobj in irc.users.copy().items(): for uid, userobj in irc.users.copy().items():
if irc.match_host(args.banmask, uid): if irc.match_host(args.banmask, uid):
if results < args.maxresults: if results < args.maxresults:
@ -61,10 +61,10 @@ def checkban(irc, source, args):
results += 1 results += 1
else: else:
if results: if results:
irc.msg(source, "\x02%s\x02 out of \x02%s\x02 results shown." % irc.reply("\x02%s\x02 out of \x02%s\x02 results shown." %
(min([results, args.maxresults]), results), notice=True) (min([results, args.maxresults]), results), private=True)
else: else:
irc.msg(source, "No results found.", notice=True) irc.reply("No results found.", private=True)
else: else:
# Target can be both a nick (of an online user) or a hostmask. irc.match_host() handles this # Target can be both a nick (of an online user) or a hostmask. irc.match_host() handles this
# automatically. # automatically.