Adding the beginnings of IMC2 support. We are now able to connect and authenticate with an IMC2 network, theoretically without blocking our server thread. We can't actually do anything useful just yet, but stay tuned.

This commit is contained in:
Greg Taylor 2009-04-11 05:55:26 +00:00
parent 65d8ac8bdc
commit a7e89c1e54
6 changed files with 272 additions and 1 deletions

24
src/commands/imc2.py Normal file
View file

@ -0,0 +1,24 @@
"""
IMC2 user and administrative commands.
"""
import time
from django.conf import settings
from src.config.models import ConfigValue
from src.objects.models import Object
from src import defines_global
from src import ansi
from src.util import functions_general
from src.cmdtable import GLOBAL_CMD_TABLE
from src.imc2 import connection as imc2_conn
from src.imc2.packets import *
def cmd_imctest(command):
"""
Shows a player's inventory.
"""
source_object = command.source_object
source_object.emit_to("Sending")
packet = IMC2PacketWhois(source_object, 'Cratylus')
imc2_conn.IMC2_PROTOCOL_INSTANCE.send_packet(packet)
source_object.emit_to("Sent")
GLOBAL_CMD_TABLE.add_command("imctest", cmd_imctest)