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:
parent
0ad8c88c22
commit
9abde7b60f
5 changed files with 83 additions and 4 deletions
|
|
@ -415,7 +415,8 @@ def cmd_say(command):
|
|||
speech = command.command_argument
|
||||
|
||||
# Feedback for the object doing the talking.
|
||||
source_object.emit_to("You say, '%s'" % (speech,))
|
||||
source_object.emit_to("You say, '%s%s'" % (speech,
|
||||
ANSITable.ansi['normal']))
|
||||
|
||||
# Build the string to emit to neighbors.
|
||||
emit_string = "%s says, '%s'" % (source_object.get_name(show_dbref=False),
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue