Fixed a string error in the webclient that could appear on some server setups. Added URL parsing to the webclient.
This commit is contained in:
parent
e7b3916aec
commit
7e898842b9
4 changed files with 13 additions and 8 deletions
|
|
@ -22,9 +22,6 @@ class TelnetProtocol(StatefulTelnetProtocol, session.Session):
|
||||||
communication between game and player goes through here.
|
communication between game and player goes through here.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# identifier in case one needs to easily separate protocols at run-time.
|
|
||||||
protocol_key = "telnet"
|
|
||||||
|
|
||||||
# telnet-specific hooks
|
# telnet-specific hooks
|
||||||
|
|
||||||
def connectionMade(self):
|
def connectionMade(self):
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ class LazyEncoder(simplejson.JSONEncoder):
|
||||||
return force_unicode(obj)
|
return force_unicode(obj)
|
||||||
return super(LazyEncoder, self).default(obj)
|
return super(LazyEncoder, self).default(obj)
|
||||||
def jsonify(obj):
|
def jsonify(obj):
|
||||||
return simplejson.dumps(obj, ensure_ascii=False, cls=LazyEncoder)
|
return utils.to_str(simplejson.dumps(obj, ensure_ascii=False, cls=LazyEncoder))
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import re
|
||||||
import cgi
|
import cgi
|
||||||
from src.utils import ansi
|
from src.utils import ansi
|
||||||
|
|
||||||
class ANSItoHTMLparser(object):
|
class TextToHTMLparser(object):
|
||||||
"""
|
"""
|
||||||
This class describes a parser for converting from ansi to html.
|
This class describes a parser for converting from ansi to html.
|
||||||
"""
|
"""
|
||||||
|
|
@ -124,7 +124,7 @@ class ANSItoHTMLparser(object):
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
HTML_PARSER = ANSItoHTMLparser()
|
HTML_PARSER = TextToTMLparser()
|
||||||
|
|
||||||
#
|
#
|
||||||
# Access function
|
# Access function
|
||||||
|
|
@ -1,15 +1,23 @@
|
||||||
/*
|
/*
|
||||||
Style sheet for Evennia's web client.
|
Style sheet for Evennia's web client.
|
||||||
|
|
||||||
Possibly this should somehow be incoorporated with the
|
This should possibly somehow be incoorporated with the
|
||||||
overall website theme in the future?
|
overall website theme in the future?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*Overall element look */
|
||||||
body{
|
body{
|
||||||
background:#000;
|
background:#000;
|
||||||
color:#fff;
|
color:#fff;
|
||||||
font-size:.9em;
|
font-size:.9em;
|
||||||
}
|
}
|
||||||
|
a:link{
|
||||||
|
color:#fff;
|
||||||
|
}
|
||||||
|
a:visited{
|
||||||
|
color:#ccc;
|
||||||
|
}
|
||||||
|
|
||||||
/*Base style for new messages in the main message area.*/
|
/*Base style for new messages in the main message area.*/
|
||||||
.msg{
|
.msg{
|
||||||
background:#000;
|
background:#000;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue