Removed ip address from users, as well as changed /user add syntax to be '/user add username password group' instead of colon bullshit.

This commit is contained in:
Zack Piispanen 2013-09-21 17:11:22 -04:00
parent d7da68a262
commit ba42fb08df
7 changed files with 34 additions and 166 deletions

View file

@ -129,9 +129,8 @@ namespace Rests
private RestObject NewTokenInternal(string username, string password)
{
User userAccount = TShock.Users.GetUserByName(username);
if (userAccount == null || !string.IsNullOrWhiteSpace(userAccount.Address))
return new RestObject("401")
{ Error = "Invalid username/password combination provided. Please re-submit your query with a correct pair." };
if (userAccount == null)
return new RestObject("401") { Error = "Invalid username/password combination provided. Please re-submit your query with a correct pair." };
if (!TShock.Utils.HashPassword(password).Equals(userAccount.Password, StringComparison.InvariantCultureIgnoreCase))
return new RestObject("401")