mirror of
https://github.com/evennia/evennia.git
synced 2026-04-06 07:57:16 +02:00
Escaped the IRC username to avoid it being parsed for ANSI colors (keeping ansi parsing in normal text for now). Resolves #935."
This commit is contained in:
parent
187b8eb7ab
commit
04e461b1f4
1 changed files with 3 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ from twisted.application import internet
|
|||
from twisted.words.protocols import irc
|
||||
from twisted.internet import protocol, reactor
|
||||
from evennia.server.session import Session
|
||||
from evennia.utils import logger, utils
|
||||
from evennia.utils import logger, utils, ansi
|
||||
|
||||
|
||||
# IRC colors
|
||||
|
|
@ -177,6 +177,7 @@ class IRCBot(irc.IRCClient, Session):
|
|||
"""
|
||||
if not msg.startswith('***'):
|
||||
user = user.split('!', 1)[0]
|
||||
user = ansi.raw(user)
|
||||
self.data_in("bot_data_in %s@%s: %s" % (user, channel, msg))
|
||||
|
||||
def action(self, user, channel, msg):
|
||||
|
|
@ -202,6 +203,7 @@ class IRCBot(irc.IRCClient, Session):
|
|||
kwargs (any): Other data from protocol.
|
||||
|
||||
"""
|
||||
|
||||
self.sessionhandler.data_in(self, text=text, **kwargs)
|
||||
|
||||
def send_text(self, *args, **kwargs):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue