From d971db165c34f45795dcc64becead8c7907fabe9 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sat, 28 Feb 2015 20:15:56 -0700 Subject: [PATCH] Remove several obsolete shims No need to keep obsolete shims in for several versions of TShock --- TShockAPI/DB/BanManager.cs | 14 -------------- TShockAPI/DB/GroupManager.cs | 20 -------------------- TShockAPI/Group.cs | 7 ------- TShockAPI/TSPlayer.cs | 6 ------ TShockAPI/Utils.cs | 31 ------------------------------- 5 files changed, 78 deletions(-) diff --git a/TShockAPI/DB/BanManager.cs b/TShockAPI/DB/BanManager.cs index 7a1015cd..0f1e2507 100755 --- a/TShockAPI/DB/BanManager.cs +++ b/TShockAPI/DB/BanManager.cs @@ -150,13 +150,6 @@ namespace TShockAPI.DB return null; } -#if COMPAT_SIGS - [Obsolete("This method is for signature compatibility for external code only")] - public bool AddBan(string ip, string name, string reason) - { - return AddBan(ip, name, "", reason, false, "", ""); - } -#endif public bool AddBan(string ip, string name = "", string uuid = "", string reason = "", bool exceptions = false, string banner = "", string expiration = "") { try @@ -172,13 +165,6 @@ namespace TShockAPI.DB return false; } -#if COMPAT_SIGS - [Obsolete("This method is for signature compatibility for external code only")] - public bool RemoveBan(string ip) - { - return RemoveBan(ip, false, true, false); - } -#endif public bool RemoveBan(string match, bool byName = false, bool casesensitive = true, bool exceptions = false) { try diff --git a/TShockAPI/DB/GroupManager.cs b/TShockAPI/DB/GroupManager.cs index 2d7861ed..b8d0c4a2 100755 --- a/TShockAPI/DB/GroupManager.cs +++ b/TShockAPI/DB/GroupManager.cs @@ -162,19 +162,6 @@ namespace TShockAPI.DB return AddGroup(name, null, permissions, Group.defaultChatColor, false); } -#if COMPAT_SIGS - [Obsolete("This method is for signature compatibility for external code only")] - public String AddGroup(String name, string parentname, String permissions) - { - return AddGroup(name, parentname, permissions, Group.defaultChatColor, false); - } - - [Obsolete("This method is for signature compatibility for external code only")] - public String AddGroup(String name, string parentname, String permissions, String chatcolor) - { - return AddGroup(name, parentname, permissions, chatcolor, false); - } -#endif /// /// Updates a group including permissions /// @@ -224,13 +211,6 @@ namespace TShockAPI.DB group.Suffix = suffix; } -#if COMPAT_SIGS - [Obsolete("This method is for signature compatibility for external code only")] - public String DeleteGroup(String name) - { - return DeleteGroup(name, false); - } -#endif public String DeleteGroup(String name, bool exceptions = false) { if (!GroupExists(name)) diff --git a/TShockAPI/Group.cs b/TShockAPI/Group.cs index 7efcb07a..1f953dff 100644 --- a/TShockAPI/Group.cs +++ b/TShockAPI/Group.cs @@ -153,13 +153,6 @@ namespace TShockAPI public byte B = 255; public static Group DefaultGroup = null; -#if COMPAT_SIGS - [Obsolete("This constructor is for signature compatibility for external code only")] - public Group(string groupname, Group parentgroup, string chatcolor) - : this(groupname, parentgroup, chatcolor, null) - { - } -#endif public Group(string groupname, Group parentgroup = null, string chatcolor = "255,255,255", string permissions = null) { diff --git a/TShockAPI/TSPlayer.cs b/TShockAPI/TSPlayer.cs index 9ce38fef..54824a6c 100755 --- a/TShockAPI/TSPlayer.cs +++ b/TShockAPI/TSPlayer.cs @@ -779,12 +779,6 @@ namespace TShockAPI SendErrorMessage(string.Format(format, args)); } - [Obsolete("Use SendErrorMessage, SendInfoMessage, or SendWarningMessage, or a custom color instead.")] - public virtual void SendMessage(string msg) - { - SendMessage(msg, 0, 255, 0); - } - public virtual void SendMessage(string msg, Color color) { SendMessage(msg, color.R, color.G, color.B); diff --git a/TShockAPI/Utils.cs b/TShockAPI/Utils.cs index 31eab7fa..a4884856 100644 --- a/TShockAPI/Utils.cs +++ b/TShockAPI/Utils.cs @@ -182,16 +182,6 @@ namespace TShockAPI SaveManager.Instance.SaveWorld(); } - /// - /// Broadcasts a message to all players - /// - /// string message - [Obsolete("Use TSPlayer.All and send a message via that method rather than using Broadcast.")] - public void Broadcast(string msg) - { - Broadcast(msg, Color.Green); - } - public void Broadcast(string msg, byte red, byte green, byte blue) { TSPlayer.All.SendMessage(msg, red, green, blue); @@ -593,13 +583,6 @@ namespace TShockAPI Hooks.GeneralHooks.OnReloadEvent(player); } -#if COMPAT_SIGS - [Obsolete("This method is for signature compatibility for external code only")] - public void ForceKick(TSPlayer player, string reason) - { - Kick(player, reason, true, false, string.Empty); - } -#endif /// /// Kicks a player from the server without checking for immunetokick permission. /// @@ -611,13 +594,6 @@ namespace TShockAPI Kick(player, reason, true, silent, null, saveSSI); } -#if COMPAT_SIGS - [Obsolete("This method is for signature compatibility for external code only")] - public bool Kick(TSPlayer player, string reason, string adminUserName) - { - return Kick(player, reason, false, false, adminUserName); - } -#endif /// /// Kicks a player from the server.. /// @@ -652,13 +628,6 @@ namespace TShockAPI return false; } -#if COMPAT_SIGS - [Obsolete("This method is for signature compatibility for external code only")] - public bool Ban(TSPlayer player, string reason, string adminUserName) - { - return Ban(player, reason, false, adminUserName); - } -#endif /// /// Bans and kicks a player from the server. ///