Remove more obsolete code; fix tab/space screwup in TSPlayer
This commit is contained in:
parent
78c6f4db84
commit
cbce64f1eb
13 changed files with 329 additions and 340 deletions
|
|
@ -72,7 +72,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
@ -96,7 +96,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
Console.WriteLine(ex.StackTrace);
|
||||
}
|
||||
return null;
|
||||
|
|
@ -123,7 +123,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
@ -145,7 +145,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
@ -167,7 +167,7 @@ namespace TShockAPI.DB
|
|||
{
|
||||
if (exceptions)
|
||||
throw ex;
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -193,7 +193,7 @@ namespace TShockAPI.DB
|
|||
{
|
||||
if (exceptions)
|
||||
throw ex;
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -206,7 +206,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
|
||||
return playerData;
|
||||
|
|
@ -137,7 +137,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
@ -162,7 +162,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -176,7 +176,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
@ -191,7 +191,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ namespace TShockAPI.DB
|
|||
var error = "Invalid parent {0} for group {1}".SFormat(parentname, group.Name);
|
||||
if (exceptions)
|
||||
throw new GroupManagerException(error);
|
||||
Log.ConsoleError(error);
|
||||
TShock.Log.ConsoleError(error);
|
||||
return error;
|
||||
}
|
||||
group.Parent = parent;
|
||||
|
|
@ -298,7 +298,7 @@ namespace TShockAPI.DB
|
|||
string groupName = reader.Get<string>("GroupName");
|
||||
if (groupName == "superadmin")
|
||||
{
|
||||
Log.ConsoleInfo("WARNING: Group \"superadmin\" is defined in the database even though it's a reserved group name.");
|
||||
TShock.Log.ConsoleInfo("WARNING: Group \"superadmin\" is defined in the database even though it's a reserved group name.");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -314,7 +314,7 @@ namespace TShockAPI.DB
|
|||
catch (ArgumentException)
|
||||
{
|
||||
// Just in case somebody messed with the unique primary key.
|
||||
Log.ConsoleError("ERROR: Group name \"{0}\" occurs more than once. Keeping current group settings.");
|
||||
TShock.Log.ConsoleError("ERROR: Group name \"{0}\" occurs more than once. Keeping current group settings.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -349,14 +349,14 @@ namespace TShockAPI.DB
|
|||
group.Parent = groups.FirstOrDefault(g => g.Name == parentGroupName);
|
||||
if (group.Parent == null)
|
||||
{
|
||||
Log.ConsoleError(
|
||||
TShock.Log.ConsoleError(
|
||||
"ERROR: Group \"{0}\" is referencing non existent parent group \"{1}\", parent reference was removed.",
|
||||
group.Name, parentGroupName);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (group.Parent == group)
|
||||
Log.ConsoleInfo(
|
||||
TShock.Log.ConsoleInfo(
|
||||
"WARNING: Group \"{0}\" is referencing itself as parent group, parent reference was removed.", group.Name);
|
||||
|
||||
List<Group> groupChain = new List<Group> { group };
|
||||
|
|
@ -365,7 +365,7 @@ namespace TShockAPI.DB
|
|||
{
|
||||
if (groupChain.Contains(checkingGroup.Parent))
|
||||
{
|
||||
Log.ConsoleError(
|
||||
TShock.Log.ConsoleError(
|
||||
"ERROR: Group \"{0}\" is referencing parent group \"{1}\" which is already part of the parent chain. Parent reference removed.",
|
||||
checkingGroup.Name, checkingGroup.Parent.Name);
|
||||
|
||||
|
|
@ -386,7 +386,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.ConsoleError("Error on reloading groups: " + ex);
|
||||
TShock.Log.ConsoleError("Error on reloading groups: " + ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -94,15 +94,15 @@ namespace TShockAPI.DB
|
|||
if (Int32.TryParse(splitids[i], out id)) // if unparsable, it's not an int, so silently skip
|
||||
r.AllowedIDs.Add(id);
|
||||
else
|
||||
Log.Warn("One of your UserIDs is not a usable integer: " + splitids[i]);
|
||||
TShock.Log.Warn("One of your UserIDs is not a usable integer: " + splitids[i]);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("Your database contains invalid UserIDs (they should be ints).");
|
||||
Log.Error("A lot of things will fail because of this. You must manually delete and re-create the allowed field.");
|
||||
Log.Error(e.ToString());
|
||||
Log.Error(e.StackTrace);
|
||||
TShock.Log.Error("Your database contains invalid UserIDs (they should be ints).");
|
||||
TShock.Log.Error("A lot of things will fail because of this. You must manually delete and re-create the allowed field.");
|
||||
TShock.Log.Error(e.ToString());
|
||||
TShock.Log.Error(e.StackTrace);
|
||||
}
|
||||
|
||||
Regions.Add(r);
|
||||
|
|
@ -111,7 +111,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -147,7 +147,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -165,7 +165,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -182,7 +182,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -308,7 +308,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -363,7 +363,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -390,7 +390,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -413,7 +413,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
return regions;
|
||||
}
|
||||
|
|
@ -518,7 +518,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -584,7 +584,7 @@ namespace TShockAPI.DB
|
|||
{
|
||||
if (!ply.HasBeenNaggedAboutLoggingIn)
|
||||
{
|
||||
ply.SendMessage("You must be logged in to take advantage of protected regions.", Color.Red);
|
||||
ply.SendMessage("You must be TShock.Logged in to take advantage of protected regions.", Color.Red);
|
||||
ply.HasBeenNaggedAboutLoggingIn = true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -117,7 +117,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -162,7 +162,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -186,7 +186,7 @@ namespace TShockAPI.DB
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
TShock.Log.Error(ex.ToString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue