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 (parent:
595eda3
)
Server/py: Fix variable naming bug.
author
Christian Heller
<c.heller@plomlompom.de>
Mon, 23 Feb 2015 11:08:52 +0000
(12:08 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Mon, 23 Feb 2015 11:08:52 +0000
(12:08 +0100)
plomrogue-server.py
patch
|
blob
|
history
diff --git
a/plomrogue-server.py
b/plomrogue-server.py
index 064f87283e960eb47c427ef981bb9439525f99ee..8f44015f1979c69811b140e1cef86f5d1e3b9bfc 100755
(executable)
--- a/
plomrogue-server.py
+++ b/
plomrogue-server.py
@@
-82,10
+82,10
@@
def obey(command, prefix, replay=False, do_record=False):
except ValueError as err:
print("Can't tokenize command string: " + str(err) + ".")
return
except ValueError as err:
print("Can't tokenize command string: " + str(err) + ".")
return
- if len(tokens) > 0 and tokens[0] in commands \
- and len(tokens) >= commands[tokens[0]][0] + 1:
- if commands[tokens[0]][1]:
- commands[tokens[0]][2]()
+ if len(tokens) > 0 and tokens[0] in commands
_db
\
+ and len(tokens) >= commands
_db
[tokens[0]][0] + 1:
+ if commands
_db
[tokens[0]][1]:
+ commands
_db
[tokens[0]][2]()
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()
@@
-96,7
+96,7
@@
def obey(command, prefix, replay=False, do_record=False):
else:
print("Reached end of record file.")
else:
else:
print("Reached end of record file.")
else:
- commands[tokens[0]][2]()
+ commands
_db
[tokens[0]][2]()
if do_record:
record(command)
else:
if do_record:
record(command)
else: