Trunk: Merged the Devel-branch (branches/griatch) into /trunk. This constitutes a major refactoring of Evennia. Development will now continue in trunk. See the wiki and the past posts to the mailing list for info. /Griatch
This commit is contained in:
parent
df29defbcd
commit
f83c2bddf8
222 changed files with 22304 additions and 14371 deletions
|
|
@ -8,13 +8,14 @@ from twisted.protocols.basic import LineReceiver
|
|||
from twisted.internet import reactor, task
|
||||
from twisted.conch.telnet import StatefulTelnetProtocol
|
||||
from django.conf import settings
|
||||
from src import logger
|
||||
from src import session_mgr
|
||||
|
||||
from src.utils import logger
|
||||
from src.server import sessionhandler
|
||||
from src.imc2.packets import *
|
||||
from src.imc2.trackers import *
|
||||
from src.imc2 import reply_listener
|
||||
from src.imc2.models import IMC2ChannelMapping
|
||||
from src import comsys
|
||||
#from src import comsys
|
||||
|
||||
# The active instance of IMC2Protocol. Set at server startup.
|
||||
IMC2_PROTOCOL_INSTANCE = None
|
||||
|
|
@ -174,7 +175,7 @@ class IMC2Protocol(StatefulTelnetProtocol):
|
|||
elif packet.packet_type == 'ice-destroy':
|
||||
IMC2_CHANLIST.remove_channel_from_packet(packet)
|
||||
elif packet.packet_type == 'tell':
|
||||
sessions = session_mgr.find_sessions_from_username(packet.target)
|
||||
sessions = sessionhandler.find_sessions_from_username(packet.target)
|
||||
for session in sessions:
|
||||
session.msg("%s@%s IMC tells: %s" %
|
||||
(packet.sender,
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@ This module contains all IMC2 events that are triggered periodically.
|
|||
Most of these are used to maintain the existing connection and keep various
|
||||
lists/caches up to date.
|
||||
"""
|
||||
# TODO: This is deprecated!
|
||||
|
||||
from time import time
|
||||
from src import events
|
||||
from src import scheduler
|
||||
#from src import events
|
||||
#from src import scheduler
|
||||
from src.imc2 import connection as imc2_conn
|
||||
from src.imc2.packets import *
|
||||
from src.imc2.trackers import IMC2_MUDLIST
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
from src import ansi
|
||||
from src.ansi import BaseParser, ANSITable
|
||||
"""
|
||||
ANSI parser - this adds colour to text according to
|
||||
special markup strings.
|
||||
"""
|
||||
|
||||
from src.utils import ansi
|
||||
from ansi import BaseParser, ANSITable
|
||||
|
||||
class IMCANSIParser(BaseParser):
|
||||
"""
|
||||
|
|
@ -57,4 +62,4 @@ def parse_ansi(*args, **kwargs):
|
|||
"""
|
||||
Shortcut to use the IMC2 ANSI parser.
|
||||
"""
|
||||
return ansi.parse_ansi(parser=IMCANSIParser(), *args, **kwargs)
|
||||
return ansi.parse_ansi(parser=IMCANSIParser(), *args, **kwargs)
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
from django.db import models
|
||||
from django.conf import settings
|
||||
from src.channels.models import CommChannel
|
||||
from src.comms.models import Channel
|
||||
|
||||
class IMC2ChannelMapping(models.Model):
|
||||
"""
|
||||
Each IMC2ChannelMapping object determines which in-game channel incoming
|
||||
IMC2 messages are routed to.
|
||||
"""
|
||||
channel = models.ForeignKey(CommChannel)
|
||||
channel = models.ForeignKey(Channel)
|
||||
imc2_server_name = models.CharField(max_length=78)
|
||||
imc2_channel_name = models.CharField(max_length=78)
|
||||
is_enabled = models.BooleanField(default=True)
|
||||
|
|
@ -15,7 +15,7 @@ class IMC2ChannelMapping(models.Model):
|
|||
class Meta:
|
||||
verbose_name = "IMC2 Channel mapping"
|
||||
verbose_name_plural = "IMC2 Channel mappings"
|
||||
permissions = settings.PERM_IMC2
|
||||
#permissions = settings.PERM_IMC2
|
||||
|
||||
def __str__(self):
|
||||
return "%s <-> %s" % (self.channel, self.imc2_channel_name)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"""
|
||||
This module handles some of the -reply packets like whois-reply.
|
||||
"""
|
||||
#TODO: This is deprecated!
|
||||
from src.objects.models import Object
|
||||
from src.imc2 import imc_ansi
|
||||
|
||||
|
|
@ -13,4 +14,4 @@ def handle_whois_reply(packet):
|
|||
response_text))
|
||||
except Object.DoesNotExist:
|
||||
# No match found for whois sender. Ignore it.
|
||||
pass
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue