BaseEvent: Deal with all sorts of special characters sent by the engine (#298)
* BaseEvent: Deal with all sorts of special characters sent by the engine
This commit is contained in:
parent
ed3f9f750f
commit
6ae15261c9
@ -578,11 +578,15 @@ namespace IW4MAdmin.Application.EventParsers
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var message = matchResult.Values[Configuration.Say.GroupMapping[ParserRegex.GroupType.Message]]
|
var message = new string(matchResult.Values[Configuration.Say.GroupMapping[ParserRegex.GroupType.Message]]
|
||||||
.Replace(Configuration.LocalizeText, "")
|
.Where(c => !char.IsControl(c)).ToArray());
|
||||||
.Trim();
|
|
||||||
|
|
||||||
if (message.Length <= 0)
|
if (message.StartsWith("/"))
|
||||||
|
{
|
||||||
|
message = message[1..];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (String.IsNullOrEmpty(message))
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user