From 65e735f0782a5afceaf6a8318761f3d4a17a2515 Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Sun, 1 Jul 2012 00:48:14 +0200 Subject: [PATCH] =?utf8?q?Possibilit=C3=A9=20de=20reload=20la=20config=20s?= =?utf8?q?ur=20demande?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- basile.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/basile.py b/basile.py index 011dc56..92dcbcc 100755 --- a/basile.py +++ b/basile.py @@ -290,6 +290,8 @@ class Basile(ircbot.SingleServerIRCBot): Me fait perdre sur le channel.""",None], "reconnect": [None,"""RECONNECT Établit à nouveau la connexion avec le serveur NK2015""",None], + "reload": [None,"""RELOAD + Recharge la configuration.""",None], "say": [None,None,"""SAY Me fait parler sur le channel."""], "do": [None,None,"""DO @@ -308,7 +310,7 @@ class Basile(ircbot.SingleServerIRCBot): Me déconnecte du serveur IRC."""] } helpmsg_default="Liste des commandes disponibles :\nHELP IDENTIFY DROP SOLDE" - helpmsg_ops=" JOIN LEAVE QUIET NOQUIET LOST RECONNECT" + helpmsg_ops=" JOIN LEAVE QUIET NOQUIET LOST RECONNECT RELOAD" helpmsg_overops=" SAY DO STAY NOSTAY OPS OVEROPS KICK DIE" op,overop=auteur in self.ops, auteur in self.overops if len(message)==1: @@ -430,6 +432,12 @@ class Basile(ircbot.SingleServerIRCBot): self.mourir() else: notunderstood=True + elif cmd=="reload": + if auteur in self.ops: + reload(config) + serv.privmsg(auteur,"done") + else: + notunderstood=True elif cmd=="reconnect": if auteur in self.ops: try: -- 2.39.2