Skip to content

Commit

Permalink
Update RecordHelper.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
GardenHamster committed Dec 20, 2023
1 parent 78a1470 commit ab962ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Theresa3rd-Bot/TheresaBot.Main/Helper/RecordHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@ private static List<string> FilterMessage(this List<string> messages)

private static string FilterMessage(this string message)
{
string msgLower = message.ToLower().Replace(" ", string.Empty);
string msgLower = message.ToLower();
if (msgLower.Contains("ftp:")) return string.Empty;
if (msgLower.Contains("http:")) return string.Empty;
if (msgLower.Contains("https:")) return string.Empty;
if (msgLower.Contains("<?xml")) return string.Empty;
if (msgLower.Contains("<xml")) return string.Empty;
message = Regex.Replace(message, @"\[.*\]", string.Empty);
message = Regex.Replace(message, @"\{.*\}", string.Empty);
message = Regex.Replace(message, @"\<.*\>", string.Empty);
message = message.Replace("\r\n", " ").Replace("\r", " ").Replace("\n", " ");
return message;
}

Expand Down

0 comments on commit ab962ec

Please sign in to comment.