fix small errors
This commit is contained in:
@@ -57,13 +57,16 @@ def reload():
|
||||
|
||||
return render_index("Commands in cmds.cfg reloaded")
|
||||
|
||||
@app.route("/<string:cmd>")
|
||||
def cm(cmd):
|
||||
if cmd in keys:
|
||||
@app.route("/<string:k>")
|
||||
def cm(k):
|
||||
if k in keys:
|
||||
if "vers" in cfg and cfg.vers == 2:
|
||||
c=cmds[cmd].cmd
|
||||
if "cmd" in cmds[k] and cmds[k]:
|
||||
c=cmds[k]["cmd"]
|
||||
else:
|
||||
c=cmds[k]
|
||||
else:
|
||||
c=cmds[cmd]
|
||||
c=cmds[k]
|
||||
return run_cmd(c)
|
||||
else:
|
||||
return render_template("index.html", out="Command not found", cmds=cmds, keys=keys, title=cfg.title.decode("utf8"), vers=cfg.vers), 404
|
||||
return render_index("Command not found", 404)
|
||||
|
||||
Reference in New Issue
Block a user