End all 'say' messages with a 'normal' ansi character to prevent bleedage. Also, added the beginnings of an IMC2 ansi parser.

This commit is contained in:
Greg Taylor 2009-04-25 07:13:19 +00:00
parent 0ad8c88c22
commit 9abde7b60f
5 changed files with 83 additions and 4 deletions

View file

@ -9,6 +9,8 @@ from src import defines_global
from src import ansi
from src.util import functions_general
from src.cmdtable import GLOBAL_CMD_TABLE
from src.ansi import parse_ansi
from src.imc2.imc_ansi import IMCANSIParser
from src.imc2 import connection as imc2_conn
from src.imc2.packets import *
from src.imc2.trackers import IMC2_MUDLIST
@ -27,6 +29,19 @@ def cmd_imcwhois(command):
imc2_conn.IMC2_PROTOCOL_INSTANCE.send_packet(packet)
GLOBAL_CMD_TABLE.add_command("imcwhois", cmd_imcwhois)
def cmd_imcansi(command):
"""
Test IMC ANSI conversion.
"""
source_object = command.source_object
if not command.command_argument:
source_object.emit_to("You must provide a string to convert.")
return
else:
retval = parse_ansi(command.command_argument, parser=IMCANSIParser())
source_object.emit_to(retval)
GLOBAL_CMD_TABLE.add_command("imcansi", cmd_imcansi)
def cmd_imckeepalive(command):
"""
Sends an is-alive packet to the network.