Minor tweaks #37

Merged
Pepich merged 3 commits from tweaks into dev 2016-02-15 16:48:22 +00:00
2 changed files with 7 additions and 1 deletions

View File

@ -21,6 +21,8 @@ def on_chatgroup_command(sender, command, label, args):
if len(args) == 1 and args[0] == "leave":
if sender_id in groups.keys():
groupchat(sender, "left the group", True)
if sender in cg_toggle_list:
cg_toggle_list.remove(p)
group = groups[sender_id]
del(groups[sender_id])
save_groups()

View File

@ -5,7 +5,11 @@ from java.util.UUID import fromString as juuid
toggle_dict = {}
permission = "utils.pmtoggle"
@hook.command("tm")
@hook.command("pmtoggle",
aliases = ["tm", "mt", "tmsg", "msgt", "pmt", "tpm"],
usage = "/<command> [player]",
description = "Toggle automatic sending of messages"
)
def on_toggle_message_command(sender, command, label, args):
if not sender.hasPermission(permission) or not is_player(sender):
noperm(sender)