mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
fix: don't accept empty arguments for chat muting
This commit is contained in:
parent
5a049383f1
commit
eeab6a7135
2 changed files with 6 additions and 1 deletions
|
|
@ -502,6 +502,11 @@ namespace Dalamud {
|
|||
if (this.Configuration.BadWords == null)
|
||||
this.Configuration.BadWords = new List<string>();
|
||||
|
||||
if (string.IsNullOrEmpty(arguments)) {
|
||||
Framework.Gui.Chat.Print(Loc.Localize("DalamudMuteNoArgs", "Please provide a word to mute."));
|
||||
return;
|
||||
}
|
||||
|
||||
this.Configuration.BadWords.Add(arguments);
|
||||
|
||||
this.Configuration.Save();
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ namespace Dalamud.Game {
|
|||
|
||||
|
||||
if (this.dalamud.Configuration.BadWords != null &&
|
||||
this.dalamud.Configuration.BadWords.Any(x => textVal.Contains(x)))
|
||||
this.dalamud.Configuration.BadWords.Any(x => !string.IsNullOrEmpty(x) && textVal.Contains(x)))
|
||||
{
|
||||
// This seems to be in the user block list - let's not show it
|
||||
Log.Debug("Blocklist triggered");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue