From 9dd55616ee0ee369357553daa3254d97a5684a66 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Thu, 30 Jun 2016 13:38:25 +1000 Subject: [PATCH] Boolean for whether world changes are shown on IRC. (Thanks venom983) --- IRC/ForgeBot.cs | 7 +++---- Server/Server.cs | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/IRC/ForgeBot.cs b/IRC/ForgeBot.cs index 02036b026..5fc93f964 100644 --- a/IRC/ForgeBot.cs +++ b/IRC/ForgeBot.cs @@ -185,15 +185,14 @@ namespace MCGalaxy { msg = p.ColoredName + " %Sis now a &aJ&bo&ck&5e&9r%S"; else if (action == PlayerAction.Unjoker) msg = p.ColoredName + " %Sis no longer a &aJ&bo&ck&5e&9r%S"; - else if (action == PlayerAction.JoinWorld) - msg = p.ColoredName + " %Swent to &8" + message; else if (action == PlayerAction.Me) msg = "*" + p.DisplayName + " " + message; else if (action == PlayerAction.Review) msg = p.ColoredName + " %Sis requesting a review."; + else if (action == PlayerAction.JoinWorld && Server.ircShowWorldChanges) + msg = p.ColoredName + " %Swent to &8" + message; - if (msg != null) - Say(msg, stealth); + if (msg != null) Say(msg, stealth); } void Player_PlayerDisconnect(Player p, string reason) { diff --git a/Server/Server.cs b/Server/Server.cs index 933217f3b..dfa0353a2 100644 --- a/Server/Server.cs +++ b/Server/Server.cs @@ -218,6 +218,8 @@ namespace MCGalaxy public static bool irc = false; [ConfigBool("irc-player-titles", "IRC bot", null, true)] public static bool ircPlayerTitles = true; + [ConfigBool("irc-show-world-changes", "IRC bot", null, true)] + public static bool ircShowWorldChanges = true; [ConfigBool("irc-colorsenable", "IRC bot", null, true)] public static bool ircColorsEnable = true; [ConfigInt("irc-port", "IRC bot", null, 6667, 0, 65535)]