Made GMCP/MSDP work for tintin++. Mudlet seems to send the handshake differently.
This commit is contained in:
parent
49c1254de7
commit
006e367330
6 changed files with 206 additions and 138 deletions
|
|
@ -300,7 +300,7 @@ class PortalSessionHandler(SessionHandler):
|
|||
|
||||
"""
|
||||
for session in self.values():
|
||||
self.data_out(session, text=message)
|
||||
self.data_out(session, text=[[message],{}])
|
||||
|
||||
def data_in(self, session, **kwargs):
|
||||
"""
|
||||
|
|
@ -334,9 +334,7 @@ class PortalSessionHandler(SessionHandler):
|
|||
self.data_out(session, text=_ERROR_COMMAND_OVERFLOW)
|
||||
return
|
||||
# scrub data
|
||||
print ("portalsessionhandler before clean:", session, kwargs)
|
||||
kwargs = self.clean_senddata(session, kwargs)
|
||||
print ("portalsessionhandler after clean:", session, kwargs)
|
||||
|
||||
# relay data to Server
|
||||
self.command_counter += 1
|
||||
|
|
@ -370,7 +368,7 @@ class PortalSessionHandler(SessionHandler):
|
|||
# distribute outgoing data to the correct session methods.
|
||||
if session:
|
||||
for cmdname, (cmdargs, cmdkwargs) in kwargs.iteritems():
|
||||
funcname = "send_%s" % cmdname
|
||||
funcname = "send_%s" % cmdname.strip().lower()
|
||||
if hasattr(session, funcname):
|
||||
# better to use hassattr here over try..except
|
||||
# - avoids hiding AttributeErrors in the call.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue