From d444eb6dceb47123940baed5a255572d24567dc8 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Sun, 12 Aug 2018 00:32:43 +0200 Subject: Modchat for mods to chat secretly across areas. Called with `/m [message]`. --- server/commands.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'server/commands.py') diff --git a/server/commands.py b/server/commands.py index f58dbea2..b8748eda 100644 --- a/server/commands.py +++ b/server/commands.py @@ -343,6 +343,14 @@ def ooc_cmd_gm(client, arg): client.server.broadcast_global(client, arg, True) logger.log_server('[{}][{}][GLOBAL-MOD]{}.'.format(client.area.id, client.get_char_name(), arg), client) +def ooc_cmd_m(client, arg): + if not client.is_mod: + raise ClientError('You must be authorized to do that.') + if len(arg) == 0: + raise ArgumentError("You can't send an empty message.") + client.server.send_modchat(client, arg) + logger.log_server('[{}][{}][MODCHAT]{}.'.format(client.area.id, client.get_char_name(), arg), client) + def ooc_cmd_lm(client, arg): if not client.is_mod: raise ClientError('You must be authorized to do that.') -- cgit