X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=roguelike-server;h=187835d1ce11bc04d47071fd298d5b4256635d12;hb=701258936cd27bc93649c4074532d4b1d40542df;hp=64ae1188a2265dff3f58f82b15adefb34a37982f;hpb=90fff7c06542e4c878d4ebc06821daa0b62012f2;p=plomrogue diff --git a/roguelike-server b/roguelike-server index 64ae118..187835d 100755 --- a/roguelike-server +++ b/roguelike-server @@ -110,7 +110,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 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"]: @@ -124,6 +125,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()