From 9ce44024c2fcda74dbea3985979fd723996a9551 Mon Sep 17 00:00:00 2001 From: neersighted Date: Sat, 24 Mar 2012 19:15:11 -0700 Subject: [PATCH] fixes --- plugins/admin.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/plugins/admin.py b/plugins/admin.py index 4b65124..38487e1 100755 --- a/plugins/admin.py +++ b/plugins/admin.py @@ -49,15 +49,15 @@ def clearlogs(inp, input=None): @hook.command(adminonly=True) -def join(inp, input=None, notice=None): - ".join -- joins ." +def join(inp, conn=None, notice=None): + ".join -- Joins ." notice("Attempting to join " + inp + "...") conn.cmd("JOIN", [inp]) @hook.command(adminonly=True) def cycle(inp, conn=None, notice=None): - ".cycle -- cycles ." + ".cycle -- Cycles ." notice("Attempting to cycle " + inp + "...") conn.cmd("PART", [inp]) conn.cmd("JOIN", [inp]) @@ -65,7 +65,7 @@ def cycle(inp, conn=None, notice=None): @hook.command(adminonly=True) def part(inp, conn=None, notice=None): - ".part -- parts ." + ".part -- Parts from ." notice("Attempting to part from " + inp + "...") conn.cmd("PART", [inp]) @@ -88,8 +88,10 @@ def raw(inp, conn=None, notice=None): @hook.command(adminonly=True) -def kick(inp, chan=None, notice=None): - ".kick [channel] [reason] -- kicks a user." +def kick(inp, input=None, chan=None, conn=None, notice=None): + ".kick [channel] [reason] -- Makes the bot kick in [channel] "\ + "If [channel] is blank the bot will kick the in "\ + "the channel the command was used in." split = inp.split(" ") if split[0][0] == "#": chan = split[0] @@ -113,11 +115,11 @@ def kick(inp, chan=None, notice=None): out = out + " :" + reason notice("Attempting to kick %s from %s..." % (user, chan)) - input.conn.send(out) + conn.send(out) @hook.command(adminonly=True) -def say(inp, input=None, notice=None): +def say(inp, conn=None, notice=None): ".say [channel] -- Makes the bot say in [channel]. "\ "If [channel] is blank the bot will say the in "\ "the channel the command was used in." @@ -134,12 +136,12 @@ def say(inp, input=None, notice=None): message = message + x + " " message = message[:-1] out = "PRIVMSG %s :%s" % (input.chan, message) - input.conn.send(out) + conn.send(out) @hook.command("me", adminonly=True) @hook.command(adminonly=True) -def act(inp, input=None, notice=None): +def act(inp, conn=None, notice=None): ".act [channel] -- Makes the bot act out in [channel] "\ "If [channel] is blank the bot will act the in "\ "the channel the command was used in." @@ -156,7 +158,7 @@ def act(inp, input=None, notice=None): message = message + x + " " message = message[:-1] out = "PRIVMSG %s :\x01ACTION %s\x01" % (input.chan, message) - input.conn.send(out) + conn.send(out) @hook.command(adminonly=True)