Changed all src/ and ev references to evennia

This commit is contained in:
Griatch 2015-01-07 15:36:32 +01:00
parent 3ff937a6fd
commit ad3f19896c
118 changed files with 565 additions and 661 deletions

View file

@ -8,10 +8,10 @@ from twisted.application import internet
from twisted.internet import protocol
from twisted.conch import telnet
from src.server.session import Session
from src.utils import logger, utils
from src.server.portal.imc2lib import imc2_ansi
from src.server.portal.imc2lib import imc2_packets as pck
from evennia.server.session import Session
from evennia.utils import logger, utils
from evennia.server.portal.imc2lib import imc2_ansi
from evennia.server.portal.imc2lib import imc2_packets as pck
from django.utils.translation import ugettext as _
@ -337,7 +337,7 @@ class IMC2Bot(telnet.StatefulTelnetProtocol, Session):
class IMC2BotFactory(protocol.ReconnectingClientFactory):
"""
Creates instances of the IMC2Protocol. Should really only ever
need to create one connection. Tied in via src/server.py.
need to create one connection. Tied in via evennia/server.py.
"""
initialDelay = 1
factor = 1.5

View file

@ -6,7 +6,7 @@ This is a IMC2 complacent version.
"""
import re
from src.utils import ansi
from evennia.utils import ansi
class IMCANSIParser(ansi.ANSIParser):

View file

@ -7,8 +7,8 @@ more Evennia channels.
from twisted.application import internet
from twisted.words.protocols import irc
from twisted.internet import protocol
from src.server.session import Session
from src.utils import logger
from evennia.server.session import Session
from evennia.utils import logger
# IRC bot

View file

@ -9,7 +9,7 @@ etc.
"""
import re
from src.utils.utils import to_str
from evennia.utils.utils import to_str
# MSDP-relevant telnet cmd/opt-codes
MSDP = chr(69)

View file

@ -11,7 +11,7 @@ active players and so on.
"""
from django.conf import settings
from src.utils import utils
from evennia.utils import utils
MSSP = chr(70)
MSSP_VAR = chr(1)

View file

@ -11,7 +11,6 @@ it when the size changes
"""
from django.conf import settings
from src.utils import utils
NAWS = chr(31)
IS = chr(0)

View file

@ -14,7 +14,7 @@ if os.name == 'nt':
# For Windows batchfile we need an extra path insertion here.
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(
os.path.dirname(os.path.abspath(__file__))))))
from src.server.webserver import EvenniaReverseProxyResource
from evennia.server.webserver import EvenniaReverseProxyResource
from twisted.application import internet, service
from twisted.internet import protocol, reactor
from twisted.web import server
@ -23,8 +23,8 @@ import django
django.setup()
from django.conf import settings
from src.utils.utils import get_evennia_version, mod_import, make_iter
from src.server.portal.portalsessionhandler import PORTAL_SESSIONS
from evennia.utils.utils import get_evennia_version, mod_import, make_iter
from evennia.server.portal.portalsessionhandler import PORTAL_SESSIONS
PORTAL_SERVICES_PLUGIN_MODULES = [mod_import(module) for module in make_iter(settings.PORTAL_SERVICES_PLUGIN_MODULES)]
@ -164,7 +164,7 @@ if AMP_ENABLED:
# the portal and the mud server. Only reason to ever deactivate
# it would be during testing and debugging.
from src.server import amp
from evennia.server import amp
print ' amp (to Server): %s' % AMP_PORT
@ -181,7 +181,7 @@ if TELNET_ENABLED:
# Start telnet game connections
from src.server.portal import telnet
from evennia.server.portal import telnet
for interface in TELNET_INTERFACES:
ifacestr = ""
@ -203,7 +203,7 @@ if SSL_ENABLED:
# Start SSL game connection (requires PyOpenSSL).
from src.server.portal import ssl
from evennia.server.portal import ssl
for interface in SSL_INTERFACES:
ifacestr = ""
@ -229,7 +229,7 @@ if SSH_ENABLED:
# Start SSH game connections. Will create a keypair in
# evennia/game if necessary.
from src.server.portal import ssh
from evennia.server.portal import ssh
for interface in SSH_INTERFACES:
ifacestr = ""
@ -262,7 +262,7 @@ if WEBSERVER_ENABLED:
webclientstr = ""
if WEBCLIENT_ENABLED:
# create ajax client processes at /webclientdata
from src.server.portal.webclient import WebClient
from evennia.server.portal.webclient import WebClient
webclient = WebClient()
webclient.sessionhandler = PORTAL_SESSIONS
@ -272,8 +272,8 @@ if WEBSERVER_ENABLED:
if WEBSOCKET_CLIENT_ENABLED and not websocket_started:
# start websocket client port for the webclient
# we only support one websocket client
from src.server.portal import websocket_client
from src.utils.txws import WebSocketFactory
from evennia.server.portal import websocket_client
from evennia.utils.txws import WebSocketFactory
interface = WEBSOCKET_CLIENT_INTERFACE
port = WEBSOCKET_CLIENT_PORT

View file

@ -2,7 +2,7 @@
Sessionhandler for portal sessions
"""
import time
from src.server.sessionhandler import SessionHandler, PCONN, PDISCONN, PSYNC, PCONNSYNC
from evennia.server.sessionhandler import SessionHandler, PCONN, PDISCONN, PSYNC, PCONNSYNC
_MOD_IMPORT = None
@ -100,7 +100,7 @@ class PortalSessionHandler(SessionHandler):
protocol_path - full python path to the class factory
for the protocol used, eg
'src.server.portal.irc.IRCClientFactory'
'evennia.server.portal.irc.IRCClientFactory'
config - dictionary of configuration options, fed as **kwarg
to protocol class' __init__ method.
@ -109,7 +109,7 @@ class PortalSessionHandler(SessionHandler):
"""
global _MOD_IMPORT
if not _MOD_IMPORT:
from src.utils.utils import variable_from_module as _MOD_IMPORT
from evennia.utils.utils import variable_from_module as _MOD_IMPORT
path, clsname = protocol_path.rsplit(".", 1)
cls = _MOD_IMPORT(path, clsname)
if not cls:

View file

@ -8,8 +8,8 @@ to the channel whenever the feed updates.
from twisted.internet import task, threads
from django.conf import settings
from src.server.session import Session
from src.utils import logger
from evennia.server.session import Session
from evennia.utils import logger
RSS_ENABLED = settings.RSS_ENABLED
#RETAG = re.compile(r'<[^>]*?>')

View file

@ -24,9 +24,9 @@ from twisted.internet import defer
from twisted.conch import interfaces as iconch
from twisted.python import components
from django.conf import settings
from src.server import session
from src.players.models import PlayerDB
from src.utils import ansi, utils
from evennia.server import session
from evennia.players.models import PlayerDB
from evennia.utils import ansi, utils
ENCODINGS = settings.ENCODINGS
@ -343,4 +343,4 @@ def makeFactory(configdict):
factory.portal.registerChecker(PlayerDBPasswordChecker(factory))
return factory
return factory

View file

@ -12,7 +12,7 @@ except ImportError:
print " SSL_ENABLED requires PyOpenSSL."
sys.exit(5)
from src.server.portal.telnet import TelnetProtocol
from evennia.server.portal.telnet import TelnetProtocol
class SSLProtocol(TelnetProtocol):

View file

@ -9,11 +9,11 @@ sessions etc.
import re
from twisted.conch.telnet import Telnet, StatefulTelnetProtocol, IAC, LINEMODE, GA, WILL, WONT, ECHO
from src.server.session import Session
from src.server.portal import ttype, mssp, msdp, naws
from src.server.portal.mccp import Mccp, mccp_compress, MCCP
from src.server.portal.mxp import Mxp, mxp_parse
from src.utils import utils, ansi, logger
from evennia.server.session import Session
from evennia.server.portal import ttype, mssp, msdp, naws
from evennia.server.portal.mccp import Mccp, mccp_compress, MCCP
from evennia.server.portal.mxp import Mxp, mxp_parse
from evennia.utils import utils, ansi, logger
_RE_N = re.compile(r"\{n$")
_RE_LEND = re.compile(r"\n$|\r$", re.MULTILINE)
@ -58,7 +58,7 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
self.sessionhandler.connect(self)
# timeout the handshakes in case the client doesn't reply at all
from src.utils.utils import delay
from evennia.utils.utils import delay
delay(2, callback=self.handshake_done, retval=True)
def handshake_done(self, force=False):

View file

@ -26,9 +26,9 @@ from twisted.web import server, resource
from django.utils.functional import Promise
from django.utils.encoding import force_unicode
from django.conf import settings
from src.utils import utils, logger
from src.utils.text2html import parse_html
from src.server import session
from evennia.utils import utils, logger
from evennia.utils.text2html import parse_html
from evennia.server import session
SERVERNAME = settings.SERVERNAME
ENCODINGS = settings.ENCODINGS

View file

@ -3,7 +3,7 @@ Websocket-webclient
This implements a webclient with WebSockets (http://en.wikipedia.org/wiki/WebSocket)
by use of the txws implementation (https://github.com/MostAwesomeDude/txWS). It is
used together with src/web/media/javascript/evennia_websocket_webclient.js.
used together with evennia/web/media/javascript/evennia_websocket_webclient.js.
Thanks to Ricard Pillosu whose Evennia plugin inspired this module.
@ -29,10 +29,10 @@ Example of call from a javascript client:
"""
import json
from twisted.internet.protocol import Protocol
from src.server.session import Session
from src.utils.logger import log_trace
from src.utils.utils import to_str, make_iter
from src.utils.text2html import parse_html
from evennia.server.session import Session
from evennia.utils.logger import log_trace
from evennia.utils.utils import to_str, make_iter
from evennia.utils.text2html import parse_html
class WebSocketClient(Protocol, Session):