aboutsummaryrefslogtreecommitdiff
path: root/server/aoprotocol.py
diff options
context:
space:
mode:
authorCerapter <cerap@protonmail.com>2018-08-16 20:04:19 +0200
committerCerapter <cerap@protonmail.com>2018-08-16 20:04:19 +0200
commit0368e7dc459b3057f8c7d0e6e329de0d3cd7c424 (patch)
tree20a6ba99c548899921de5bee27e23369c0f4dc20 /server/aoprotocol.py
parent331bca5f7361ba239531faca070872ee8d44addb (diff)
Guilty / Not Guilty buttons for the judge position.
Diffstat (limited to 'server/aoprotocol.py')
-rw-r--r--server/aoprotocol.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/server/aoprotocol.py b/server/aoprotocol.py
index 9c7c9ca7..211bcff5 100644
--- a/server/aoprotocol.py
+++ b/server/aoprotocol.py
@@ -533,18 +533,23 @@ class AOProtocol(asyncio.Protocol):
if not self.client.can_wtce:
self.client.send_host_message('You were blocked from using judge signs by a moderator.')
return
- if not self.validate_net_cmd(args, self.ArgType.STR):
+ if not self.validate_net_cmd(args, self.ArgType.STR) and not self.validate_net_cmd(args, self.ArgType.STR, self.ArgType.INT):
return
if args[0] == 'testimony1':
sign = 'WT'
elif args[0] == 'testimony2':
sign = 'CE'
+ elif args[0] == 'judgeruling':
+ sign = 'JR'
else:
return
if self.client.wtce_mute():
self.client.send_host_message('You used witness testimony/cross examination signs too many times. Please try again after {} seconds.'.format(int(self.client.wtce_mute())))
return
- self.client.area.send_command('RT', args[0])
+ if len(args) == 1:
+ self.client.area.send_command('RT', args[0])
+ elif len(args) == 2:
+ self.client.area.send_command('RT', args[0], args[1])
self.client.area.add_to_judgelog(self.client, 'used {}'.format(sign))
logger.log_server("[{}]{} Used WT/CE".format(self.client.area.id, self.client.get_char_name()), self.client)