From 48d2d610906c63096d4d7bf2319b109fa1244a7f Mon Sep 17 00:00:00 2001 From: jcao219 Date: Tue, 26 Jul 2011 19:39:08 -0500 Subject: [PATCH] you can now !op/!deop multiple people --- wolfgame.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/wolfgame.py b/wolfgame.py index 8101421..180acda 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -194,7 +194,15 @@ def give_op(cli, nick, chan, rest): """OP [(person)] Makes someone or yourself a channel operator""" if not rest.strip(): rest = nick - cli.msg("ChanServ", " ".join(("op",chan,rest.strip()))) + + for a in re.split(" +",rest): + a = a.strip() + if not a: + continue + cli.msg("ChanServ", " ".join(("op",chan,a))) + + + @pmcmd("op", admin_only=True) def give_op_pm(cli, nick, rest): give_op(cli, nick, botconfig.CHANNEL, rest) @@ -206,7 +214,12 @@ def take_op(cli, nick, chan, rest): """Takes operator rights from someone or yourself.""" if not rest.strip(): rest = nick - cli.msg("ChanServ", " ".join(("deop",chan,rest.strip()))) + + for a in re.split(" +",rest): + a = a.strip() + if not a: + continue + cli.msg("ChanServ", " ".join(("deop",chan,a)))