fix !faftergame frestart
was calling the pmcmd version with the arguments inside chan instead of *rest
This commit is contained in:
parent
61e41a5776
commit
3a7c7f777b
@ -383,9 +383,8 @@ def forced_exit(cli, nick, chan, *rest): # Admin Only
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
@pmcmd("frestart", admin_only=True)
|
|
||||||
@cmd("frestart", admin_only=True)
|
@cmd("frestart", admin_only=True)
|
||||||
def restart_program(cli, nick, chan, *rest):
|
def restart_program(cli, nick, chan, rest):
|
||||||
"""Restarts the bot."""
|
"""Restarts the bot."""
|
||||||
try:
|
try:
|
||||||
if var.PHASE in ("day", "night"):
|
if var.PHASE in ("day", "night"):
|
||||||
@ -405,15 +404,19 @@ def restart_program(cli, nick, chan, *rest):
|
|||||||
finally:
|
finally:
|
||||||
print("RESTARTING")
|
print("RESTARTING")
|
||||||
python = sys.executable
|
python = sys.executable
|
||||||
if rest[-1].strip().lower() == "debugmode":
|
if rest.strip().lower() == "debugmode":
|
||||||
os.execl(python, python, sys.argv[0], "--debug")
|
os.execl(python, python, sys.argv[0], "--debug")
|
||||||
elif rest[-1].strip().lower() == "normalmode":
|
elif rest.strip().lower() == "normalmode":
|
||||||
os.execl(python, python, sys.argv[0])
|
os.execl(python, python, sys.argv[0])
|
||||||
elif rest[-1].strip().lower() == "verbosemode":
|
elif rest.strip().lower() == "verbosemode":
|
||||||
os.execl(python, python, sys.argv[0], "--verbose")
|
os.execl(python, python, sys.argv[0], "--verbose")
|
||||||
else:
|
else:
|
||||||
os.execl(python, python, *sys.argv)
|
os.execl(python, python, *sys.argv)
|
||||||
|
|
||||||
|
@pmcmd("frestart", admin_only=True)
|
||||||
|
def pm_restart_program(cli, nick, rest):
|
||||||
|
restart_program(cli, nick, nick, rest)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@pmcmd("ping")
|
@pmcmd("ping")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user