From 1add0108e8f592e471905d8391f1b8f8b5daea0c Mon Sep 17 00:00:00 2001 From: Cerapter Date: Sat, 11 Aug 2018 00:31:42 +0200 Subject: [PATCH] Added the ability to un-CM self. --- server/commands.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/commands.py b/server/commands.py index b8a21b3..701a82f 100644 --- a/server/commands.py +++ b/server/commands.py @@ -538,6 +538,16 @@ def ooc_cmd_cm(client, arg): if client.area.evidence_mod == 'HiddenCM': client.area.broadcast_evidence_list() client.area.send_host_message('{} is CM in this area now.'.format(client.get_char_name())) + +def ooc_cmd_uncm(client, arg): + if client.is_cm: + client.is_cm = False + client.area.owned = False + if client.area.is_locked: + client.area.unlock() + client.area.send_host_message('{} is no longer CM in this area.'.format(client.get_char_name())) + else: + raise ClientError('You cannot give up being the CM when you are not one') def ooc_cmd_unmod(client, arg): client.is_mod = False