aboutsummaryrefslogtreecommitdiff
path: root/server/commands.py
diff options
context:
space:
mode:
authorCerapter <cerap@protonmail.com>2018-08-12 00:32:43 +0200
committerCerapter <cerap@protonmail.com>2018-08-12 00:32:43 +0200
commitd444eb6dceb47123940baed5a255572d24567dc8 (patch)
tree7baa1ee90e221eed9da4501162ca426153e588bf /server/commands.py
parent3759131a8f0c0d65e14fdda9748de300dc23670d (diff)
Modchat for mods to chat secretly across areas.
Called with `/m [message]`.
Diffstat (limited to 'server/commands.py')
-rw-r--r--server/commands.py8
1 files changed, 8 insertions, 0 deletions
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.')