summaryrefslogtreecommitdiff
path: root/misc.py
diff options
context:
space:
mode:
authorNEMESIS13cz <seke94@seznam.cz>2015-08-12 20:22:41 +0200
committerNEMESIS13cz <seke94@seznam.cz>2015-08-12 20:22:41 +0200
commit11cbd0848068e5b0081d29f80ed9486a4eb8766d (patch)
treec3490f699d85931fd2c5b7ebd20627d2d92d8e52 /misc.py
parentc05e56d307755f3824462a91a8175fac5187ab15 (diff)
Changed /pyeval to only work for certain people
Diffstat (limited to 'misc.py')
-rw-r--r--misc.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/misc.py b/misc.py
index caa612d..bbdf4ad 100644
--- a/misc.py
+++ b/misc.py
@@ -116,7 +116,6 @@ def rs_material_broken_by_flow(material):
-
@simplecommand("sudo",
usage = "<player> [cmd..]",
description = "Makes <player> write [cmd..] in chat",
@@ -196,11 +195,19 @@ def eval_thread(sender, code):
msg(sender, ">>> %s: %s" % (eclass.__name__, e) + "\n ", False, "c")
thread.exit()
+pythoners = [
+"e452e012-2c82-456d-853b-3ac8e6b581f5", # Nemes
+"ae795aa8-6327-408e-92ab-25c8a59f3ba1", # jomo
+"305ccbd7-0589-403e-a45b-d791dcfdee7d" # PanFritz
+]
+
@simplecommand("pyeval",
usage = "[code..]",
description = "Runs python [code..] and returns the result",
helpNoargs = True)
def on_pyeval_command(sender, command, label, args):
+ if uid(sender) not in pythoners and is_player(sender):
+ return noperm(sender)
msg(sender, " ".join(args), False, "e")
thread.start_new_thread(eval_thread, (sender, " ".join(args)))
return None