From 5008bb34125144fcb0182f5782b5a8fc2428679e Mon Sep 17 00:00:00 2001 From: jcao219 Date: Wed, 20 Jul 2011 15:39:38 -0500 Subject: [PATCH] fixed a small bug in !chankick --- oyoyo/client.py | 5 +++-- wolfgame.py | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/oyoyo/client.py b/oyoyo/client.py index 3c13b17..7c34c4b 100644 --- a/oyoyo/client.py +++ b/oyoyo/client.py @@ -73,7 +73,6 @@ def add_commands(d): "mode", "nick", "part", - "kick", "who")) class IRCClient(object): """ IRC Client class. This handles one connection to a server. @@ -234,8 +233,10 @@ class IRCClient(object): def notice(self, user, msg): for line in msg.split('\n'): self.send("NOTICE", user, ":{0}".format(line)) - def quit(self, msg): + def quit(self, chan, msg): self.send("QUIT :{0}".format(msg)) + def kick(self, chan, nick, msg): + self.send("KICK", chan, nick, ":"+msg) def ns_identify(self, passwd): self.msg("NickServ", "IDENTIFY {0} {1}".format(self.nickname, passwd)) def ns_ghost(self): diff --git a/wolfgame.py b/wolfgame.py index cff81ea..67fd7f6 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -350,6 +350,9 @@ def fstart(cli, nick, chan, rest): @cmd("chankick", admin_only=True) def chankick(cli, nick, chan, rest): rest = rest.split(" ", 1) + if not rest[0]: + cli.notice(nick, "Invalid syntax for this command.") + return if rest[0] != botconfig.NICK: cli.kick(chan, *rest) else: