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

@ -22,11 +22,8 @@ Models covered:
from django.conf import settings
from django.contrib.auth.models import User
from django.db import IntegrityError
from src.players.models import PlayerDB
from src.help.models import HelpEntry
from src.comms.models import Msg, Channel
from src.comms import channelhandler
from src.comms.managers import to_object
from src.permissions.permissions import set_perm
from src.permissions.models import PermissionGroup
from src.utils import logger
@ -212,6 +209,8 @@ def create_help_entry(key, entrytext, category="General", permissions=None):
general help on the game, more extensive info, in-game setting information
and so on.
"""
from src.help.models import HelpEntry
try:
new_help = HelpEntry()
new_help.key = key
@ -293,7 +292,9 @@ def create_message(senderobj, message, channels=None,
at the same time, it's up to the command definitions to limit this as
desired.
"""
from src.comms.models import Msg
from src.comms.managers import to_object
def to_player(obj):
"Make sure the object is a player object"
if hasattr(obj, 'user'):
@ -345,6 +346,9 @@ def create_channel(key, aliases=None, description=None,
listen/send/admin permissions are strings if permissions separated
by commas.
"""
from src.comms.models import Channel
from src.comms import channelhandler
try:
new_channel = Channel()
new_channel.key = key
@ -408,6 +412,8 @@ def create_player(name, email, password,
# isn't already registered, and that the password is ok before
# getting here.
from src.players.models import PlayerDB
if user:
new_user = user
else: