From 1fe2703868ebc0c42d4f6dc916f51b5b1426869d Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Tue, 20 Oct 2015 03:54:04 +0200 Subject: [PATCH] Commandes OP et DEOP en privmsg --- bbc.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/bbc.py b/bbc.py index 67b6101..c69123c 100755 --- a/bbc.py +++ b/bbc.py @@ -242,6 +242,26 @@ class Bbc(ircbot.SingleServerIRCBot): serv.privmsg(auteur, " ".join(self.overops)) else: notunderstood = True + elif cmd == "op": + if auteur in self.overops: + if len(message) > 2: + serv.mode(message[1], "+o %s" % message[2]) + elif len(message) > 1: + serv.mode(message[1], "+o %s" % auteur) + else: + serv.privmsg(auteur, config.helpdico["op"][2]) + else: + notunderstood = True + elif cmd == "deop": + if auteur in self.overops: + if len(message) > 2: + serv.mode(message[1], "-o %s" % message[2]) + elif len(message) > 1: + serv.mode(message[1], "-o %s" % auteur) + else: + serv.privmsg(auteur, config.helpdico["deop"][2]) + else: + notunderstood = True else: notunderstood = True if notunderstood: -- 2.39.2