'auth' no longer kicks superadmins when disabled

This commit is contained in:
Enerdy 2016-10-15 00:31:57 +01:00
parent 2320a913b4
commit 97b6f08523

View file

@ -4618,10 +4618,15 @@ namespace TShockAPI
{ {
if (TShock.AuthToken == 0) if (TShock.AuthToken == 0)
{ {
args.Player.SendWarningMessage("Auth is disabled. This incident has been logged."); if (args.Player.Group.Name == new SuperAdminGroup().Name)
TShock.Utils.ForceKick(args.Player, "Auth system is disabled.", true, true); args.Player.SendInfoMessage("The auth system is already disabled.");
TShock.Log.Warn("{0} attempted to use {1}auth even though it's disabled.", args.Player.IP, Specifier); else
return; {
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 // If the user account is already a superadmin (permanent), disable the system