Evennia now runs on its own Twisted webserver (no need for testserver or Apache if you don't want to). Evennia now also has an ajax long-polling web client running from Twisted. The web client requires no extra dependencies beyond jQuery which is included. The src/server structure has been r

cleaned up and rewritten to make it easier to add new protocols in the future - all new protocols need to inherit from server.session.Session, whi
ch implements a set of hooks that Evennia uses to communicate. The current web client protocol is functional but does not implement any of rcaskey
's suggestions as of yet - it uses a separate data object passed through msg() to communicate between the server and the various protocols. Also the client itself could probably need cleanup and 'prettification'. The fact that the system runs a hybrid of Django and Twisted, getting the best of both worlds should allow for many possibilities in the future. /Griatch
This commit is contained in:
Griatch 2010-12-07 02:34:59 +00:00
parent ecefbfac01
commit 251f94aa7a
118 changed files with 9049 additions and 593 deletions

View file

@ -17,8 +17,8 @@ be able to delete connections on the fly).
from django.db import models
from src.utils.idmapper.models import SharedMemoryModel
from src.players.models import PlayerDB
from src.comms import managers
from src.server import sessionhandler
from src.comms import managers
from src.permissions.permissions import has_perm
from src.utils.utils import is_iter
from src.utils.utils import dbref as is_dbref
@ -81,7 +81,7 @@ class Msg(SharedMemoryModel):
permissions - perm strings
"""
from src.players.models import PlayerDB
#
# Msg database model setup
#
@ -509,7 +509,7 @@ class Channel(SharedMemoryModel):
# send message to all connected players
for conn in conns:
for session in \
sessionhandler.find_sessions_from_username(conn.player.name):
sessionhandler.SESSIONS.sessions_from_player(conn.player):
session.msg(msg)
return True
@ -539,6 +539,7 @@ class ChannelConnection(SharedMemoryModel):
The advantage of making it like this is that one can easily
break the connection just by deleting this object.
"""
from src.players.models import PlayerDB
# Player connected to a channel
db_player = models.ForeignKey(PlayerDB)
# Channel the player is connected to