From daf3a8611307676586f7f8757b4a605a0c79fa18 Mon Sep 17 00:00:00 2001 From: neersighted Date: Thu, 1 Mar 2012 12:53:22 -0800 Subject: [PATCH] .stop works, as well as .clear. now just have to fix .restart --- plugins/admin.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/plugins/admin.py b/plugins/admin.py index ea4e205..a821284 100755 --- a/plugins/admin.py +++ b/plugins/admin.py @@ -9,8 +9,8 @@ import time @hook.command(autohelp=False) -def quit(inp, input=None, db=None, notice=None): - ".quit [reason] -- Kills the bot, with [reason] as its quit message." +def stop(inp, input=None, db=None, notice=None): + ".stop [reason] -- Kills the bot, with [reason] as its quit message." if not input.nick in input.bot.config["admins"]: notice("Only bot admins can use this command!") return @@ -19,8 +19,7 @@ def quit(inp, input=None, db=None, notice=None): else: input.conn.send("QUIT :Killed by " + input.nick + " (no reason)") time.sleep(3) - subprocess.call(['./cloudbot stop']) - sys.exit() + subprocess.call("./cloudbot stop", shell=True) @hook.command(autohelp=False) @@ -34,8 +33,7 @@ def restart(inp, input=None, db=None, notice=None): else: input.conn.send("QUIT :Restarted by " + input.nick + " (no reason)") time.sleep(3) - subprocess.call(['./cloudbot restart']) - sys.exit() + subprocess.call("./cloudbot restart", shell=True) @hook.command(autohelp=False) @@ -45,8 +43,7 @@ def clear(inp, input=None, db=None, notice=None): notice("Only bot admins can use this command!") return time.sleep(3) - subprocess.call(['./cloudbot clear']) - sys.exit() + subprocess.call("./cloudbot clear", shell=True) @hook.command