Minor tweaks #37
@ -21,6 +21,8 @@ def on_chatgroup_command(sender, command, label, args):
|
|||||||
if len(args) == 1 and args[0] == "leave":
|
if len(args) == 1 and args[0] == "leave":
|
||||||
if sender_id in groups.keys():
|
if sender_id in groups.keys():
|
||||||
groupchat(sender, "left the group", True)
|
groupchat(sender, "left the group", True)
|
||||||
|
if sender in cg_toggle_list:
|
||||||
|
cg_toggle_list.remove(p)
|
||||||
group = groups[sender_id]
|
group = groups[sender_id]
|
||||||
del(groups[sender_id])
|
del(groups[sender_id])
|
||||||
save_groups()
|
save_groups()
|
||||||
|
@ -5,7 +5,11 @@ from java.util.UUID import fromString as juuid
|
|||||||
toggle_dict = {}
|
toggle_dict = {}
|
||||||
permission = "utils.pmtoggle"
|
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):
|
def on_toggle_message_command(sender, command, label, args):
|
||||||
if not sender.hasPermission(permission) or not is_player(sender):
|
if not sender.hasPermission(permission) or not is_player(sender):
|
||||||
noperm(sender)
|
noperm(sender)
|
||||||
|
Reference in New Issue
Block a user