apply OtakuMegane code changes to irc channel chat so some characters are not lost

avinationmerge
UbitUmarov 2015-11-02 02:23:35 +00:00
parent baf5649b70
commit 89655b0baa
1 changed files with 4 additions and 1 deletions

View File

@ -48,7 +48,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
private static readonly ILog m_log = private static readonly ILog m_log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static Regex arg = new Regex(@"\[[^\[\]]*\]"); private static Regex arg = new Regex(@"(?<!\\)\[[^\[\]]*(?<!\\)\]");
private static int _idk_ = 0; private static int _idk_ = 0;
private static int DEBUG_CHANNEL = 2147483647; private static int DEBUG_CHANNEL = 2147483647;
@ -499,6 +499,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
// m_log.DebugFormat("[IRC-Channel] Parse[2]: {0}", result); // m_log.DebugFormat("[IRC-Channel] Parse[2]: {0}", result);
} }
// Now we unescape the literal brackets
result = result.Replace(@"\[","[").Replace(@"\]","]");
// m_log.DebugFormat("[IRC-Channel] Parse[3]: {0}", result); // m_log.DebugFormat("[IRC-Channel] Parse[3]: {0}", result);
return result; return result;