mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-07 21:58:06 -05:00
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
7570749aa5
commit
210ffa5d83
@ -578,11 +578,15 @@ namespace IW4MAdmin.Application.EventParsers
|
||||
return null;
|
||||
}
|
||||
|
||||
var message = matchResult.Values[Configuration.Say.GroupMapping[ParserRegex.GroupType.Message]]
|
||||
.Replace(Configuration.LocalizeText, "")
|
||||
.Trim();
|
||||
var message = new string(matchResult.Values[Configuration.Say.GroupMapping[ParserRegex.GroupType.Message]]
|
||||
.Where(c => !char.IsControl(c)).ToArray());
|
||||
|
||||
if (message.Length <= 0)
|
||||
if (message.StartsWith("/"))
|
||||
{
|
||||
message = message[1..];
|
||||
}
|
||||
|
||||
if (String.IsNullOrEmpty(message))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user