Pryaxis / TShock

☕️⚡️TShock provides Terraria servers with server-side characters, anti-cheat, and community management tools.
GNU General Public License v3.0
2.41k stars 377 forks source link

Rename /userinfo, add an actual /userinfo command #901

Closed AxisKriel closed 7 years ago

AxisKriel commented 9 years ago

Currently, the userinfo command displays an online player's IP Address, the user they're logged in as, and that user's group. The command alias can be quite missleading akin to the command's current functionality IMO.

What I suggest is that we rename/move the current userinfo functionality somewhere else (perhaps name it playerinfo instead?), and since we're at it, include a new userinfo command that actually retrieves information regarding an user, and therefore requires the full username to be given and doesn't care if the user is online or not. This should probably either receive the userinfo alias, or we could look into adding it to the user command.

Right now, the only way to check an user's group is in the database (user group <username> does not retrieve the current group...), and this new command could include additional information such as registration date and the WIP user-based permissions. Basically, we'll be killing two birds with one stone.

hakusaro commented 9 years ago

To be honest, the information should just be added to userinfo rather than making a new command or anything else. Again, however, it really makes you wonder how many people use userinfo at all.

For the sake of complexity, the whole idea of a "user" versus a "player" is annoying. I think the verbiage should change somewhere, but I'm not sure a better term to use.

AxisKriel commented 9 years ago

The main concern here is that userinfo will only search for online players, so there is currently no way of quick checking an user's group outside of a database query or REST.

hakusaro commented 9 years ago

Hmm, good point. I agree with the rename, then, and adding a new command.

hakusaro commented 9 years ago

From slack: "A good compromise would be to get the player info too if they’re logged in, or else just find the offline user’s info and only return that."

QuiCM commented 9 years ago

PlayerInfo is misleading as the command is always working with the user object. Functionality for off line users while keeping the current name would be best imo.

Ijwu commented 9 years ago

:+1: to the compromise.

bippity commented 9 years ago

:+1:

Simon311 commented 9 years ago

Currently, this functionality is available in my UserExists plugin, as well as the functionality to view info regarding bans. Feel free to put that in TShock.

hakusaro commented 7 years ago

@Simon311 feel free to send pr

hakusaro commented 7 years ago

(Was closed by #1312). Thanks for pointing this out @DogooFalchion.