Actually add the user when /user add is run
This commit is contained in:
parent
080ba6ca2b
commit
2469e293ab
1 changed files with 3 additions and 0 deletions
|
|
@ -362,16 +362,19 @@ namespace TShockAPI
|
|||
{
|
||||
user.Address = namepass[0];
|
||||
user.Group = args.Parameters[2];
|
||||
user.Name = user.Address;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(user.Address))
|
||||
{
|
||||
args.Player.SendMessage("IP address admin added. If they're logged in, tell them to rejoin.", Color.Green);
|
||||
args.Player.SendMessage("WARNING: This is insecure! It would be better to use a user account instead.", Color.Red);
|
||||
TShock.Users.AddUser(user);
|
||||
Log.ConsoleInfo(args.Player.Name + " added IP " + user.Address + " to group " + user.Group);
|
||||
}
|
||||
else
|
||||
{
|
||||
args.Player.SendMessage("Account " + user.Name + " has been added to group " + user.Group + "!", Color.Green);
|
||||
TShock.Users.AddUser(user);
|
||||
Log.ConsoleInfo(args.Player.Name + " added Account " + user.Name + " to group " + user.Group);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue