Changed some code around
This commit is contained in:
parent
70b7539861
commit
59aa505fcb
1 changed files with 6 additions and 7 deletions
|
@ -28,24 +28,23 @@ def stop(inp, nick=None, conn=None):
|
||||||
else:
|
else:
|
||||||
conn.cmd("QUIT", ["Killed by %s." % nick])
|
conn.cmd("QUIT", ["Killed by %s." % nick])
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
subprocess.call("./cloudbot stop", shell=True)
|
subprocess.call(["./cloudbot", "stop"])
|
||||||
|
|
||||||
@hook.command("reboot", autohelp=False, adminonly=True)
|
|
||||||
@hook.command(autohelp=False, adminonly=True)
|
@hook.command(autohelp=False, adminonly=True)
|
||||||
def restart(inp, input=None):
|
def restart(inp, nick=None, conn=None):
|
||||||
".restart [reason] -- Restarts the bot with [reason] as its quit message."
|
".restart [reason] -- Restarts the bot with [reason] as its quit message."
|
||||||
if inp:
|
if inp:
|
||||||
input.conn.send("QUIT :Restarted by " + input.nick + " (" + inp + ")")
|
conn.cmd("QUIT", ["Restarted by %s (%s)" % (nick, inp)])
|
||||||
else:
|
else:
|
||||||
input.conn.send("QUIT :Restarted by " + input.nick + " (no reason)")
|
conn.cmd("QUIT", ["Restarted by %s." % nick])
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
os.execl("./cloudbot", "restart")
|
subprocess.call(["./cloudbot", "restart"])
|
||||||
|
|
||||||
|
|
||||||
@hook.command(autohelp=False, adminonly=True)
|
@hook.command(autohelp=False, adminonly=True)
|
||||||
def clearlogs(inp, input=None):
|
def clearlogs(inp, input=None):
|
||||||
".clearlogs -- Clears the bots log(s)."
|
".clearlogs -- Clears the bots log(s)."
|
||||||
subprocess.call("./cloudbot clear", shell=True)
|
subprocess.call(["./cloudbot", "clear"])
|
||||||
|
|
||||||
|
|
||||||
@hook.command(adminonly=True)
|
@hook.command(adminonly=True)
|
||||||
|
|
Reference in a new issue