Fix NonViolationCheck

This commit is contained in:
Bluzume 2021-11-27 19:47:02 -05:00
parent cbba3bd74a
commit 68c6cdcd51
4 changed files with 4 additions and 4 deletions

View file

@ -591,7 +591,7 @@ namespace HISP.Game.Chat
public static string NonViolationChecks(User user, string message) public static string NonViolationChecks(User user, string message)
{ {
if(ConfigReader.DoNonViolations) if(!ConfigReader.DoNonViolations)
return null; return null;
// Check if contains password. // Check if contains password.

View file

@ -51,7 +51,7 @@ enable_corrections=true
# Include non-violations # Include non-violations
# stuff like blocking you from saying your password in chat # stuff like blocking you from saying your password in chat
# and FULL CAPS messages. # and FULL CAPS messages.
non_violation=true enable_non_violation_check=true
# Limits ad and global chat # Limits ad and global chat
# to just a few messages every minute # to just a few messages every minute

View file

@ -101,7 +101,7 @@ namespace HISP.Server
case "enable_corrections": case "enable_corrections":
DoCorrections = data == "true"; DoCorrections = data == "true";
break; break;
case "non_violation": case "enable_non_violation_check":
DoNonViolations = data == "true"; DoNonViolations = data == "true";
break; break;
case "enable_spam_filter": case "enable_spam_filter":

View file

@ -444,7 +444,7 @@ namespace HISP.Server
} }
catch (FormatException) catch (FormatException)
{ {
Logger.ErrorPrint(sender.LoggedinUser.Username + " tried to trade with User ID NaN."); Logger.ErrorPrint(sender.LoggedinUser.Username + " tried to add friend with User ID NaN.");
break; break;
} }
if (IsUserOnline(playerId)) if (IsUserOnline(playerId))