Small misc cleanup
This commit is contained in:
21
misc.py
21
misc.py
@@ -184,9 +184,9 @@ def eval_argument_thread(event):
|
|||||||
|
|
||||||
|
|
||||||
@simplecommand("pyeval",
|
@simplecommand("pyeval",
|
||||||
usage = "[code..]",
|
usage = "[code..]",
|
||||||
description = "Runs python [code..] and returns the result",
|
description = "Runs python [code..] and returns the result",
|
||||||
helpNoargs = True)
|
helpNoargs = True)
|
||||||
def on_pyeval_command(sender, command, label, args):
|
def on_pyeval_command(sender, command, label, args):
|
||||||
msg(sender, " ".join(args), False, "e")
|
msg(sender, " ".join(args), False, "e")
|
||||||
thread.start_new_thread(eval_thread, (sender, " ".join(args)))
|
thread.start_new_thread(eval_thread, (sender, " ".join(args)))
|
||||||
@@ -194,12 +194,12 @@ def on_pyeval_command(sender, command, label, args):
|
|||||||
|
|
||||||
|
|
||||||
@simplecommand("tempadd",
|
@simplecommand("tempadd",
|
||||||
usage = "<user> <group> [duration]",
|
usage = "<user> <group> [duration]",
|
||||||
description = "Temporarily adds <user> to <group> for \n[duration] minutes. Defaults to 1 week.",
|
description = "Temporarily adds <user> to <group> for \n[duration] minutes. Defaults to 1 week.",
|
||||||
helpNoargs = True,
|
helpNoargs = True,
|
||||||
helpSubcmd = True,
|
helpSubcmd = True,
|
||||||
amin = 2,
|
amin = 2,
|
||||||
amax = 3)
|
amax = 3)
|
||||||
def tempadd_command(sender, command, label, args):
|
def tempadd_command(sender, command, label, args):
|
||||||
if not sender.hasPermission("permissions.manage.membership." + args[1]):
|
if not sender.hasPermission("permissions.manage.membership." + args[1]):
|
||||||
return "&cYou do not have permission to manage that group!"
|
return "&cYou do not have permission to manage that group!"
|
||||||
@@ -256,9 +256,6 @@ def rs_material_broken_by_flow(material):
|
|||||||
return length > 1 and (parts[0] == "DIODE" or parts[1] in ("TORCH", "WIRE", "BUTTON", "HOOK") or (length == 3 and parts[1] == "COMPARATOR"))
|
return length > 1 and (parts[0] == "DIODE" or parts[1] in ("TORCH", "WIRE", "BUTTON", "HOOK") or (length == 3 and parts[1] == "COMPARATOR"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@hook.event("player.AsyncPlayerChatEvent", "lowest")
|
@hook.event("player.AsyncPlayerChatEvent", "lowest")
|
||||||
def on_chat(event):
|
def on_chat(event):
|
||||||
|
|||||||
Reference in New Issue
Block a user