From cdf2dc676018f52aa9c093258502b0b0c42f722f Mon Sep 17 00:00:00 2001 From: Jerom van der Sar Date: Sun, 6 Sep 2015 16:42:02 +0200 Subject: [PATCH] Limit host console commands even more. Resolves #811 --- src/config.yml | 6 +++++- .../TotalFreedomMod/Commands/Command_deopall.java | 2 +- .../StevenLawson/TotalFreedomMod/Commands/Command_doom.java | 2 +- .../TotalFreedomMod/Commands/Command_gadmin.java | 2 +- .../StevenLawson/TotalFreedomMod/Commands/Command_gcmd.java | 2 +- .../TotalFreedomMod/Commands/Command_glist.java | 4 ++-- .../StevenLawson/TotalFreedomMod/Commands/Command_gtfo.java | 2 +- .../TotalFreedomMod/Commands/Command_wildcard.java | 2 +- .../TotalFreedomMod/Commands/Command_wipeuserdata.java | 2 +- 9 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/config.yml b/src/config.yml index 6f2e58f0..17fb2bee 100644 --- a/src/config.yml +++ b/src/config.yml @@ -317,5 +317,9 @@ autokick: # Players with access to the overlord command overlord_ips: - - 141.101.105.161 + - 176.56.237.227 + - 192.184.86.138 + - 107.191.101.27 + - 178.62.117.94 + - 141.101.104.243 diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_deopall.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_deopall.java index cd588229..7a76cedb 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_deopall.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_deopall.java @@ -5,7 +5,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH) +@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH, blockHostConsole = true) @CommandParameters(description = "Deop everyone on the server.", usage = "/") public class Command_deopall extends TFM_Command { diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_doom.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_doom.java index 5d8eb1fe..1412478e 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_doom.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_doom.java @@ -13,7 +13,7 @@ import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.util.Vector; -@CommandPermissions(level = AdminLevel.SENIOR, source = SourceType.ONLY_CONSOLE) +@CommandPermissions(level = AdminLevel.SENIOR, source = SourceType.ONLY_CONSOLE, blockHostConsole = true) @CommandParameters(description = "For the bad Superadmins", usage = "/ ") public class Command_doom extends TFM_Command { diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gadmin.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gadmin.java index 765573ba..af83696c 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gadmin.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gadmin.java @@ -10,7 +10,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH) +@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH, blockHostConsole = true) @CommandParameters( description = "Use admin commands on someone by hash. Use mode 'list' to get a player's hash. Other modes are kick, nameban, ipban, ban, op, deop, ci, fr, smite.", usage = "/ [list | [ ] ]") diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gcmd.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gcmd.java index 055d7837..3d9e064b 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gcmd.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gcmd.java @@ -6,7 +6,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH) +@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH, blockHostConsole = true) @CommandParameters(description = "Send a command as someone else.", usage = "/ ") public class Command_gcmd extends TFM_Command { diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_glist.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_glist.java index edaf19f4..28d5d1bc 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_glist.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_glist.java @@ -15,8 +15,8 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH) -@CommandParameters(description = "Ban/Unban any player, even those who are not logged in anymore.", usage = "/ >") +@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH, blockHostConsole = true) +@CommandParameters(description = "Bans or unbans any player, even those who are not logged in anymore.", usage = "/ >") public class Command_glist extends TFM_Command { @Override diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gtfo.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gtfo.java index e35f543b..194189b8 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gtfo.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gtfo.java @@ -15,7 +15,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH) +@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH, blockHostConsole = true) @CommandParameters(description = "Makes someone GTFO (deop and ip ban by username).", usage = "/ ") public class Command_gtfo extends TFM_Command { diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_wildcard.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_wildcard.java index 8a49f336..75cd2105 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_wildcard.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_wildcard.java @@ -7,7 +7,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH) +@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH, blockHostConsole = true) @CommandParameters(description = "Run any command on all users, username placeholder = ?.", usage = "/ [fluff] ? [fluff] ?") public class Command_wildcard extends TFM_Command { diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_wipeuserdata.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_wipeuserdata.java index 43e4d4f7..b5175ae9 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_wipeuserdata.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_wipeuserdata.java @@ -6,7 +6,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = AdminLevel.SENIOR, source = SourceType.ONLY_CONSOLE) +@CommandPermissions(level = AdminLevel.SENIOR, source = SourceType.ONLY_CONSOLE, blockHostConsole = true) @CommandParameters(description = "Removes essentials playerdata", usage = "/") public class Command_wipeuserdata extends TFM_Command {