Adds style cop (#109)
This commit is contained in:
parent
3e715bcb60
commit
556a17aba8
1725 changed files with 33831 additions and 38046 deletions
|
|
@ -12,20 +12,21 @@ namespace Server.Misc
|
|||
|
||||
public static class ProfanityProtection
|
||||
{
|
||||
private static bool Enabled = false;
|
||||
// TODO: Move this to configuration
|
||||
private static readonly bool Enabled = false;
|
||||
|
||||
private static ProfanityAction
|
||||
private static readonly ProfanityAction
|
||||
Action = ProfanityAction.Disallow; // change here what to do when profanity is detected
|
||||
|
||||
public static char[] Exceptions{ get; } =
|
||||
public static char[] Exceptions { get; } =
|
||||
{
|
||||
' ', '-', '.', '\'', '"', ',', '_', '+', '=', '~', '`', '!', '^', '*', '\\', '/', ';', ':', '<', '>', '[', ']',
|
||||
'{', '}', '?', '|', '(', ')', '%', '$', '&', '#', '@'
|
||||
};
|
||||
|
||||
public static string[] StartDisallowed{ get; } = { };
|
||||
public static string[] StartDisallowed { get; } = { };
|
||||
|
||||
public static string[] Disallowed{ get; } =
|
||||
public static string[] Disallowed { get; } =
|
||||
{
|
||||
"jigaboo",
|
||||
"chigaboo",
|
||||
|
|
@ -93,16 +94,16 @@ namespace Server.Misc
|
|||
from.CriminalAction(false);
|
||||
return true;
|
||||
case ProfanityAction.Disconnect:
|
||||
{
|
||||
from.NetState?.Dispose();
|
||||
{
|
||||
from.NetState?.Dispose();
|
||||
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
default:
|
||||
case ProfanityAction.Other: // TODO: Provide custom implementation if this is chosen
|
||||
{
|
||||
return true;
|
||||
}
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue