]> gitweb.pimeys.fr Git - bots/basile.git/commitdiff
Commande KICK
authorVincent Le Gallic <legallic@crans.org>
Fri, 11 May 2012 16:26:08 +0000 (18:26 +0200)
committerVincent Le Gallic <legallic@crans.org>
Fri, 11 May 2012 16:26:08 +0000 (18:26 +0200)
basile.py

index a98396461e38c5cb422d4fb04de17e90725204bd..58b7173a72abf04b8a4295ecdceaf1c3fd2bd56c 100755 (executable)
--- a/basile.py
+++ b/basile.py
@@ -599,6 +599,14 @@ class Basile(ircbot.SingleServerIRCBot):
                 serv.privmsg(auteur,"Syntaxe : DO <channel> <action>")
             else:
                 notunderstood=True
+        elif cmd=="kick":
+            if auteur in self.overops and len(message)>3:
+                serv.kick(message[1],message[2],raison=" ".join(message[3:]))
+                log(self.serveur,"priv",auteur," ".join(message))
+            elif len(message)<=3:
+                serv.privmsg(auteur,"Syntaxe : KICK <channel> <pseudo>")
+            else:
+                notunderstood=True
         elif cmd=="lost":
             if auteur in self.ops and len(message)>1:
                 serv.privmsg(message[1],"J'ai perdu !")