home · contact · privacy
Ignore lowercase-starting (= player) commands when world is inactive.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 11 Mar 2015 13:44:26 +0000 (14:44 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 11 Mar 2015 13:44:26 +0000 (14:44 +0100)
roguelike-server

index 64ae1188a2265dff3f58f82b15adefb34a37982f..741046a015e679447721f58b4d1ab924d4f48e9d 100755 (executable)
@@ -124,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:])
+        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()