[sorrows-mudlib] r209 committed - mudlib/services/net/connectionTelnet.py: Fixed handling of when player...

0 views
Skip to first unread message

sorrows...@googlecode.com

unread,
Jan 21, 2012, 8:49:35 PM1/21/12
to sorrows-mud...@googlegroups.com
Revision: 209
Author: richard.m.tew
Date: Sat Jan 21 17:48:04 2012
Log: mudlib/services/net/connectionTelnet.py: Fixed handling of when
player just hits enter, previously this would leave the processing logic
stuck in a sub-state never to pass on any further commands.
http://code.google.com/p/sorrows-mudlib/source/detail?r=209

Modified:
/trunk/mudlib/services/net/connectionTelnet.py

=======================================
--- /trunk/mudlib/services/net/connectionTelnet.py Fri Jan 20 22:48:26 2012
+++ /trunk/mudlib/services/net/connectionTelnet.py Sat Jan 21 17:48:04 2012
@@ -156,10 +156,10 @@
ret = ""
rIdx = buf.find('\r')
if rIdx == -1:
- nIdx = buf.find('\n')
- if nIdx > -1:
- ret = buf[:nIdx]
- self.readlineBuffer = buf[nIdx+1:]
+ rIdx = buf.find('\n')
+ if rIdx > -1:
+ ret = buf[:rIdx]
+ self.readlineBuffer = buf[rIdx+1:]
else:
ret = buf[:rIdx]
if len(buf) > rIdx+1 and buf[rIdx+1] == '\n':
@@ -167,7 +167,7 @@
else:
self.readlineBuffer = buf[rIdx+1:]

- if len(ret):
+ if len(ret) or rIdx == 0:
i = ret.find('\x08')
while i > -1:
if i == 0:

Reply all
Reply to author
Forward
0 new messages