Obs:Migrate. Made Comm system more generic, including the ability to connect arbitrary protocols to channels. Re-worked the IRC connectivity system - you can now again communicate between IRC and in-game evennia channels.

This commit is contained in:
Griatch 2011-04-10 12:39:07 +00:00
parent c81d238b0c
commit 52785e8f3e
20 changed files with 960 additions and 258 deletions

View file

@ -112,10 +112,10 @@ def create_channels():
# connect the god user to all these channels by default.
goduser = get_god_user()
from src.comms.models import ChannelConnection
ChannelConnection.objects.create_connection(goduser, pchan)
ChannelConnection.objects.create_connection(goduser, ichan)
ChannelConnection.objects.create_connection(goduser, cchan)
from src.comms.models import PlayerChannelConnection
PlayerChannelConnection.objects.create_connection(goduser, pchan)
PlayerChannelConnection.objects.create_connection(goduser, ichan)
PlayerChannelConnection.objects.create_connection(goduser, cchan)
def import_MUX_help_files():
"""
@ -237,11 +237,11 @@ def handle_setup(last_step):
for profile in PlayerDB.objects.all():
profile.delete()
elif last_step + num == 3:
from src.comms.models import Channel, ChannelConnection
from src.comms.models import Channel, PlayerChannelConnection
for chan in Channel.objects.all():
chan.delete()
for conn in ChannelConnection.objects.all():
for conn in PlayerChannelConnection.objects.all():
conn.delete()

View file

@ -195,7 +195,7 @@ if TELNET_ENABLED:
factory = protocol.ServerFactory()
factory.protocol = telnet.TelnetProtocol
telnet_service = internet.TCPServer(port, factory)
telnet_service.setName('Evennia%s' % port)
telnet_service.setName('EvenniaTelnet%s' % port)
EVENNIA.services.addService(telnet_service)
if WEBSERVER_ENABLED:
@ -244,11 +244,5 @@ if IRC_ENABLED:
# IRC channel connections
from src.irc.connection import IRC_BotFactory
irc = internet.TCPClient(settings.IRC_NETWORK,
settings.IRC_PORT,
IRC_BotFactory(settings.IRC_CHANNEL,
settings.IRC_NETWORK,
settings.IRC_NICKNAME))
irc.setName("%s:%s" % ("IRC", settings.IRC_CHANNEL))
EVENNIA.services.addService(irc)
from src.comms import irc
irc.connect_all()