mirror of
https://github.com/evennia/evennia.git
synced 2026-03-28 10:37:16 +01:00
This fixes issue #569
This commit is contained in:
parent
46781d3ee1
commit
dbbacb4bb3
6 changed files with 82 additions and 13 deletions
|
|
@ -364,7 +364,7 @@ class AMPProtocol(amp.AMP):
|
|||
"""
|
||||
#print "msg portal->server (portal side):", sessid, msg, data
|
||||
return self.safe_send(MsgPortal2Server, sessid,
|
||||
msg=to_str(msg) if msg is not None else "",
|
||||
msg=msg if msg is not None else "",
|
||||
data=dumps(data))
|
||||
|
||||
# Server -> Portal message
|
||||
|
|
@ -389,7 +389,7 @@ class AMPProtocol(amp.AMP):
|
|||
"""
|
||||
#print "msg server->portal (server side):", sessid, msg, data
|
||||
return self.safe_send(MsgServer2Portal, sessid,
|
||||
msg=to_str(msg) if msg is not None else "",
|
||||
msg=msg if msg is not None else "",
|
||||
data=dumps(data))
|
||||
|
||||
# Server administration from the Portal side
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ from django.conf import settings
|
|||
#from src.scripts.models import ScriptDB
|
||||
from src.comms.models import ChannelDB
|
||||
from src.utils import logger, utils
|
||||
from src.utils.utils import make_iter, to_unicode, escape_control_sequences
|
||||
from src.utils.utils import make_iter, to_unicode, to_str, escape_control_sequences
|
||||
from src.commands.cmdhandler import cmdhandler
|
||||
from src.commands.cmdsethandler import CmdSetHandler
|
||||
from src.server.session import Session
|
||||
|
|
@ -198,7 +198,7 @@ class ServerSession(Session):
|
|||
"""
|
||||
if text:
|
||||
# this is treated as a command input
|
||||
text = to_unicode(escape_control_sequences(text))
|
||||
text = to_unicode(escape_control_sequences(text), encoding=self.encoding)
|
||||
# handle the 'idle' command
|
||||
if text.strip() == IDLE_COMMAND:
|
||||
self.update_session_counters(idle=True)
|
||||
|
|
@ -231,6 +231,12 @@ class ServerSession(Session):
|
|||
"""
|
||||
Send Evennia -> User
|
||||
"""
|
||||
if text is None:
|
||||
text = ""
|
||||
else:
|
||||
text = to_unicode(text)
|
||||
text = to_str(text, self.encoding)
|
||||
|
||||
self.sessionhandler.data_out(self, text=text, **kwargs)
|
||||
|
||||
def __eq__(self, other):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue