Change TSPlayer.UserID to TSPlayer.User.ID, as well as refactoring some of UserManager.cs. Solves #916

This commit is contained in:
White 2015-05-01 11:18:37 +09:30
parent fcda79ea4c
commit 44ad0c68b8
6 changed files with 128 additions and 109 deletions

View file

@ -334,6 +334,12 @@ namespace TShockAPI.DB
return false;
}
/// <summary>
/// Removes an allowed user from a region
/// </summary>
/// <param name="regionName">Name of the region to modify</param>
/// <param name="userName">Username to remove</param>
/// <returns>true if removed successfully</returns>
public bool RemoveUser(string regionName, string userName)
{
Region r = GetRegionByName(regionName);
@ -349,6 +355,12 @@ namespace TShockAPI.DB
return false;
}
/// <summary>
/// Adds a user to a region's allowed user list
/// </summary>
/// <param name="regionName">Name of the region to modify</param>
/// <param name="userName">Username to add</param>
/// <returns>true if added successfully</returns>
public bool AddNewUser(string regionName, string userName)
{
try