From 2469e293abc713746e46dfe7fc1c67a9603a91f5 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Thu, 14 Jul 2011 13:52:44 -0600 Subject: [PATCH] Actually add the user when /user add is run --- TShockAPI/Commands.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 32469c81..2810df5f 100755 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -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); } }