Skip to content

Commit

Permalink
= to repeat sentence during the testimony (#113)
Browse files Browse the repository at this point in the history
* Update aoprotocol.py

* Update casing.py
  • Loading branch information
EstatoDeviato authored Nov 26, 2023
1 parent f386864 commit 8d1c7b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/commands/casing.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ def ooc_cmd_testimony(client, arg):
raise
return

msg = "Use > IC to progress, < to backtrack, >3 or <3 to go to specific statements."
msg = "Use > IC to progress, < to backtrack, = to repeat, >3 or <3 to go to specific statements."
msg += f"\n-- {client.area.testimony_title} --"
for i, statement in enumerate(client.area.testimony):
# [15] SHOWNAME
Expand Down
5 changes: 4 additions & 1 deletion server/network/aoprotocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ def net_cmd_ms(self, args):
len(re.sub(r"[{}\\`|(~~)]", "", text).replace(" ", "")) < 3
and not text.startswith("<")
and not text.startswith(">")
and not text.startswith("=")
):
self.client.send_ooc(
"Blankposting is forbidden in this area!"
Expand Down Expand Up @@ -692,7 +693,7 @@ def net_cmd_ms(self, args):
"That does not look like a valid area ID!")
return
if len(self.client.area.testimony) > 0 and (
text.lstrip().startswith(">") or text.lstrip().startswith("<")
text.lstrip().startswith(">") or text.lstrip().startswith("<") or text.lstrip().startswith("=")
):
if self.client.area.recording is True:
self.client.send_ooc("It is not cross-examination yet!")
Expand All @@ -712,6 +713,8 @@ def net_cmd_ms(self, args):
idx += 1
if cmd == "<":
idx -= 1
if cmd == "=":
idx = idx
idx = idx % len(self.client.area.testimony)
try:
self.client.area.testimony_send(idx)
Expand Down

0 comments on commit 8d1c7b6

Please sign in to comment.