From 97b6f08523bd81b4fa682f17b651a2e3c50b7478 Mon Sep 17 00:00:00 2001 From: Enerdy Date: Sat, 15 Oct 2016 00:31:57 +0100 Subject: [PATCH] 'auth' no longer kicks superadmins when disabled --- TShockAPI/Commands.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index a00c5900..db3ff9ab 100755 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -4618,10 +4618,15 @@ namespace TShockAPI { if (TShock.AuthToken == 0) { - args.Player.SendWarningMessage("Auth is disabled. This incident has been logged."); - TShock.Utils.ForceKick(args.Player, "Auth system is disabled.", true, true); - TShock.Log.Warn("{0} attempted to use {1}auth even though it's disabled.", args.Player.IP, Specifier); - return; + if (args.Player.Group.Name == new SuperAdminGroup().Name) + args.Player.SendInfoMessage("The auth system is already disabled."); + else + { + args.Player.SendWarningMessage("The auth system is disabled. This incident has been logged."); + TShock.Utils.ForceKick(args.Player, "Auth system is disabled.", true, true); + TShock.Log.Warn("{0} attempted to use {1}auth even though it's disabled.", args.Player.IP, Specifier); + return; + } } // If the user account is already a superadmin (permanent), disable the system