Because:
Config["ForbiddenWords"]= Config["ForbiddenWords"];
This is basically telling the code to set the config to what is already in the config which I don't think is what you were intending?
Such as writing this statement:
myVariable = myVariable;
Chat Guard [Replaced]
Discussion in 'Plugin Support' started by LaserHydra, Jun 24, 2015.
-
-
Can you release a update for this? I need it >.<
-
-
I am pretty sure I am missing something here. Every time the plugin is reloaded or the server resets it overwrites the word list, and I have to put all the words back.
I see a lot of code being posted on here .. and I keep looking to see what I can change to make my list stay.
I think it is part of this section of the code (please tell me if I am wrong .. still working on figuring things out)
"void Loaded()
{
LoadDefaultConfig();
}
------> protected override void LoadDefaultConfig() <---------
{
PrintWarning("Creating a new configuration file.");
Config.Clear();
List<string> forbidden = new List<string>() { "fuck", "bitch" };
Config["ForbiddenWords"] = forbidden;
SaveConfig();
}"
It looks to me like it is overwriting on load, but should that be like that? On load shouldn't it just open the forbidden file?
If I am completely wrong please let me know.
Thanks
[DOUBLEPOST=1436671462][/DOUBLEPOST]
List<string> forbidden = new List<string>() { "fuck", "bitch" };
Now if I could just figure out a work around for the whole whisper/admin/guild chat being posted to the whole server that would be nice.Last edited by a moderator: Jul 12, 2015 -
LaserHydra updated Chat Guard with a new update entry:
config fix + updater support
-
Code:
[Oxide] 5:58 PM [Error] ChatGuard plugin failed to compile![Oxide] 5:58 PM [Error] ChatGuard.cs(126,30): error CS0246: The type or namespace name `Player' could not be found. Are you missing an assembly reference?
-
-
This scripts just keeps going back to default, any update for it soon?
-
-
Yes i mean the config, just goes back to default.
-
We're still using the older version because the new one seems to be problematic. Has anyone figured a way around the broadcasting for pms etc? That part is getting to be problematic.
-
-
I just told you Laser, i move the script plugins, then a config file shows up with the two words, i add what im adding then after a while the config file goes back to it's original state with only them two words.
i would be thrilled to get this chat guard to work soon. -
-
That would mean it's broken, can you upload a working one then?
-
I tried the updated version and it seemed to do the same for me. The older one has allowed us to maintain a word list at least.
My PRIMARY concern is that it is coded to broadcast any message with a word on that list to global chat. So PMs, Guild Chat, Admin Chat etc have all become less private if someone does type something they shouldn't. Beyond that, it seems to not work at all with our OOC plugin. You can't use the words in Global, Guild, PM, or Admin Chat, but OOC is free and clear for us.
Not sure really. -
-
Any ideas on when this might be resolved?
-