Moved unhandled exception logging to before saving the world. In case the world saving crashes.

Tidied some code.
New day, new version
This commit is contained in:
high 2011-06-28 10:56:47 -04:00
parent 923aa66694
commit dcf67248f7
4 changed files with 20 additions and 23 deletions

View file

@ -71,9 +71,11 @@ namespace TShockAPI
{
foreach(Region region in Regions)
{
if (X >= region.RegionArea.Left && X <= region.RegionArea.Right && Y >= region.RegionArea.Top && Y <= region.RegionArea.Bottom && region.DisableBuild && Main.worldName == region.WorldRegionName && (!AllowedUser(region.RegionName, IP.ToLower()) || region.RegionAllowedIPs.Count == 0))
if (X >= region.RegionArea.Left && X <= region.RegionArea.Right &&
Y >= region.RegionArea.Top && Y <= region.RegionArea.Bottom &&
region.DisableBuild && Main.worldName == region.WorldRegionName &&
(!AllowedUser(region.RegionName, IP.ToLower()) || region.RegionAllowedIPs.Count == 0))
{
Console.WriteLine(region.RegionName);
return true;
}
}