Support for spaces in wordsSuggestion

I made some minor changes to my copy to be able to catch things like "a s s h o l e" without adding that explicitly to the wordlist.  Also enabled the list return but the warning doesn't work regarding the reply to chat not working.  Works in console, though.

--- UFilter.cs  2018-08-22 17:06:56.106073200 -0500
+++ UFilter_new.cs  2018-08-23 08:40:23.541029829 -0500
@@ -90,6 +90,9 @@

             [JsonProperty(PropertyName = "Allowed profanity")]
             public List<string> AllowedProfanity { get; set; } = new List<string>();
+
+            [JsonProperty(PropertyName = "Remove spaces when checking (true/false)")]
+            public bool RemoveSpaces { get; set; } = false;
         }

         protected override void LoadConfig()
@@ -235,6 +238,10 @@

         private string[] Profanities(string text)
         {
+            if (config.RemoveSpaces)
+            {
+                text = Regex.Replace(text, @"\s", "");
+            }
             return Regex.Split(text, @"\W").Where(w => storedData.Profanities.Contains(w.ToLower()) && !config.AllowedProfanity.Contains(w.ToLower())).ToArray();
         }

@@ -309,6 +316,10 @@
                     return string.Empty;

                 case "censor":
+                    if (config.RemoveSpaces)
+                    {
+                        text = Regex.Replace(text, @"\s", "");
+                    }
                     foreach (string word in list)
                     {
                         text = text.Replace(word, config.CensorText.Length == 1 ? new string(config.CensorText[0], word.Length) : config.CensorText);
@@ -472,9 +483,10 @@
                     Message(player, "WordRemoved", argList);
                     break;

-                /*case "list":
-                    Message(player, string.Join(", ", storedData.Profanities.Cast<string>().ToArray());
-                    break;*/
+                case "list":
+                    player.Reply("Word list (if none displayed, use console):");
+                    Message(player, string.Join(", ", storedData.Profanities.Cast<string>().ToArray()));
+                    break;

                 default:
                     Message(player, "CommandUsage", command);
The list is too long for the Rust client to show in chat. Pagination or something would have to be added, which is why it wasn’t “enabled” before.

the space checking method you suggested is flawed, as you will likely encounter a good bit of false positives from words that shared parts of others.
I knew it was too long which is why i was trying to send the warning/suggestion to use console instead.  The space checking is indeed flawed.  But, so is text filtering in general.  Your plugin does a great job and I was hoping to be able to improve it.  I suppose, if you wanted to add this check at all, that you would have to split words then remove spaces from each word.
In response to rfc1920 ():
I knew it was too long which is why i was trying to send the warning/suggestion to use console inste...
A better method would likely be to combine all single characters and then check.