home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
6e92d2b
)
Ignore lowercase-starting (= player) commands when world is inactive.
author
Christian Heller
<c.heller@plomlompom.de>
Mon, 31 Aug 2015 23:45:17 +0000
(
01:45
+0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Mon, 31 Aug 2015 23:45:17 +0000
(
01:45
+0200)
roguelike-server
patch
|
blob
|
history
diff --git
a/roguelike-server
b/roguelike-server
index e723339a46bdad1e0c121cdb1b41e69537c9f77d..d807447bd46cc968bd462da2fd68bfde3a6125d6 100755
(executable)
--- a/
roguelike-server
+++ b/
roguelike-server
@@
-109,7
+109,8
@@
def obey(command, prefix, replay=False, do_record=False):
is called (and io_db["record_chunk"] written) if 15 seconds have passed
since the last time it was called. The prefix string is inserted into the
server's input message between its beginning 'input ' and ':'. All activity
is called (and io_db["record_chunk"] written) if 15 seconds have passed
since the last time it was called. The prefix string is inserted into the
server's input message between its beginning 'input ' and ':'. All activity
- is preceded by a server_test() call.
+ is preceded by a server_test() call. Commands that start with a lowercase
+ letter are ignored when world_db["WORLD_ACTIVE"] is False/0.
"""
server_test()
if io_db["verbose"]:
"""
server_test()
if io_db["verbose"]:
@@
-123,6
+124,8
@@
def obey(command, prefix, replay=False, do_record=False):
and len(tokens) == commands_db[tokens[0]][0] + 1:
if commands_db[tokens[0]][1]:
commands_db[tokens[0]][2](*tokens[1:])
and len(tokens) == commands_db[tokens[0]][0] + 1:
if commands_db[tokens[0]][1]:
commands_db[tokens[0]][2](*tokens[1:])
+ elif tokens[0][0].islower() and not world_db["WORLD_ACTIVE"]:
+ print("Ignoring lowercase-starting commands when world inactive.")
elif replay:
print("Due to replay mode, reading command as 'go on in record'.")
line = io_db["file_record"].readline()
elif replay:
print("Due to replay mode, reading command as 'go on in record'.")
line = io_db["file_record"].readline()