mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-09 13:28:39 +00:00
Make filter log arguments optional
This commit is contained in:
parent
78b0f587ae
commit
0415299b31
1 changed files with 4 additions and 4 deletions
|
@ -19,7 +19,7 @@ public static class CensorHelper
|
|||
"UwU", "OwO", "uwu", "owo", "o3o", ">.>", "*pounces on you*", "*boops*", "*baps*", ":P", "x3", "O_O", "xD", ":3", ";3", "^w^",
|
||||
};
|
||||
|
||||
public static string FilterMessage(string message, string filterLocation, string username)
|
||||
public static string FilterMessage(string message, string filterLocation = null, string username = null)
|
||||
{
|
||||
if (CensorConfiguration.Instance.UserInputFilterMode == FilterMode.None) return message;
|
||||
StringBuilder stringBuilder = new(message);
|
||||
|
@ -50,9 +50,9 @@ public static class CensorHelper
|
|||
|
||||
if (ServerConfiguration.Instance.LogChatFiltering && filteredMessage != message)
|
||||
Logger.Info(
|
||||
$"Censored profane word(s) from {filterLocation} "
|
||||
+ $"sent by {username}"
|
||||
+ $": \"{message}\" => \"{filteredMessage}\"",
|
||||
$"Comment sent {(username != null ? $"by {username} " : "")}" +
|
||||
$"{(filterLocation != null ? $"from {filterLocation}" : "")}" +
|
||||
$"\"{message}\" => \"{filteredMessage}\"",
|
||||
LogArea.Filter);
|
||||
|
||||
return filteredMessage;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue