Merge pull request #286 from darkunderdog/patch-7
Change /ip to /userinfo - this now gives the IP and the name of the user who is logged in.
This commit is contained in:
commit
72c2ccb292
1 changed files with 4 additions and 4 deletions
|
|
@ -166,7 +166,7 @@ namespace TShockAPI
|
||||||
ChatCommands.Add(new Command(PasswordUser, "password") { DoLog = false });
|
ChatCommands.Add(new Command(PasswordUser, "password") { DoLog = false });
|
||||||
ChatCommands.Add(new Command(RegisterUser, "register") { DoLog = false });
|
ChatCommands.Add(new Command(RegisterUser, "register") { DoLog = false });
|
||||||
ChatCommands.Add(new Command("root-only", ManageUsers, "user") { DoLog = false });
|
ChatCommands.Add(new Command("root-only", ManageUsers, "user") { DoLog = false });
|
||||||
ChatCommands.Add(new Command("root-only", GrabUserIP, "ip"));
|
ChatCommands.Add(new Command("root-only", GrabUserUserInfo, "userinfo", "ui"));
|
||||||
ChatCommands.Add(new Command("root-only", AuthVerify, "auth-verify"));
|
ChatCommands.Add(new Command("root-only", AuthVerify, "auth-verify"));
|
||||||
ChatCommands.Add(new Command(AttemptLogin, "login") { DoLog = false });
|
ChatCommands.Add(new Command(AttemptLogin, "login") { DoLog = false });
|
||||||
ChatCommands.Add(new Command("cfg", Broadcast, "broadcast", "bc"));
|
ChatCommands.Add(new Command("cfg", Broadcast, "broadcast", "bc"));
|
||||||
|
|
@ -579,11 +579,11 @@ namespace TShockAPI
|
||||||
|
|
||||||
#region Player Management Commands
|
#region Player Management Commands
|
||||||
|
|
||||||
private static void GrabUserIP(CommandArgs args)
|
private static void GrabUserUserInfo(CommandArgs args)
|
||||||
{
|
{
|
||||||
if (args.Parameters.Count < 1)
|
if (args.Parameters.Count < 1)
|
||||||
{
|
{
|
||||||
args.Player.SendMessage("Invalid syntax! Proper syntax: /ip <player>", Color.Red);
|
args.Player.SendMessage("Invalid syntax! Proper syntax: /userinfo <player>", Color.Red);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -595,7 +595,7 @@ namespace TShockAPI
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
args.Player.SendMessage(players[0].IP, Color.Green);
|
args.Player.SendMessage("IP Address: " + players[0].IP + " Logged In As: " + players[0].UserAccountName, Color.Green);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue