Patrick M. Nielsen
thirsteh at gmail.com
Wed May 24 00:48:08 CEST 2006
I have begun playing with the Simple MUD server example from the Stackless
( http://www.stackless.com/Members/rmtew/code/mud.py )
and it's all good so far, however, I've come to notice something that I
remember from back
in the days (some old mud code), but I don't remember what I did to fix it.
While the MUD reads lines from Telnet clients just fine, clients such as
Gmud are practically ignored,
probably because Gmud doesn't send Telnet-valid data ('\x08'?).
However, a MUD that is not accessible to one such client or others isn't
much good, so I'd appreciate
some help in pinpointing the problem.
These are the code blocks that need modification (I believe)
def read(self): # TELNET
ret = self.readChannel.receive()
if ret == '\x08':
def readline(self): # TELNET
buf = self.readBuffer
if buf.find('\r\n') > -1: # MUD clients that aren't using the
i = buf.index('\r\n') # need to be able to do stuff.
ret = buf[:i+2]
self.readBuffer = buf[i+2:]
while '\x08' in ret:
i = ret.index('\x08')
if i == 0:
ret = ret[1:]
ret = ret[:i-1]+ret[i+1:]
buf += self.read()
I'm suspecting that Gmud doesn't send '\x08', since from looking at some old
I see that the if '\n' || '\r' are there as well, but there is no check for
'\x08'. If this is indeed
the cause of my problem, how would I go about doing it?
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list