Change TSPlayer.UserID to TSPlayer.User.ID, as well as refactoring some of UserManager.cs. Solves #916
This commit is contained in:
parent
fcda79ea4c
commit
44ad0c68b8
6 changed files with 128 additions and 109 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue