Skip to content

Commit

Permalink
Document /ignore list and give feedback if ignoring nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
Goodlyay committed Jul 23, 2024
1 parent b0d1565 commit a509d65
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions MCGalaxy/Commands/Chat/CmdIgnore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public override void Help(Player p) {
p.Message("&HSee &T/Help ignore special &Hfor special names when ignoring.");
p.Message("&HOtherwise, all chat from the player with [name] is ignored.");
p.Message("&HUsing the same [name] again will unignore.");
p.Message("&T/Ignore list &H- display what you're currently ignoring.");
}

public override void Help(Player p, string message) {
Expand Down
21 changes: 12 additions & 9 deletions MCGalaxy/Player/PlayerIgnores.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,27 @@ public void Save(Player p) {
}

public void Output(Player p) {
bool any = false;
if (Names.Count > 0) {
any = true;
p.Message("&cCurrently ignoring the following players:");
p.Message(Names.Join(n => p.FormatNick(n)));
}
if (IRCNicks.Count > 0) {
any = true;
p.Message("&cCurrently ignoring the following IRC nicks:");
p.Message(IRCNicks.Join());
}

if (All) p.Message("&cIgnoring all chat");
if (IRC) p.Message("&cIgnoring IRC chat");

if (Titles) p.Message("&cPlayer titles do not show before names in chat");
if (Nicks) p.Message("&cCustom player nicks do not show in chat");

if (EightBall) p.Message("&cIgnoring &T/8ball");
if (DrawOutput) p.Message("&cIgnoring draw command output");
if (WorldChanges) p.Message("&cIgnoring world change messages");
if (All) { any = true; p.Message("&cIgnoring all chat"); }
if (IRC) { any = true; p.Message("&cIgnoring IRC chat"); }
if (Titles) { any = true; p.Message("&cPlayer titles do not show before names in chat"); }
if (Nicks) { any = true; p.Message("&cCustom player nicks do not show in chat"); }
if (EightBall) { any = true; p.Message("&cIgnoring &T/8ball"); }
if (DrawOutput) { any = true; p.Message("&cIgnoring draw command output"); }
if (WorldChanges) { any = true; p.Message("&cIgnoring world change messages"); }

if (!any) p.Message("You are not ignoring anything.");
}
}
}

0 comments on commit a509d65

Please sign in to comment.