Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commands using nicknames being routed to another user. #5571

Open
UPSOKen opened this issue Nov 10, 2023 · 2 comments
Open

Commands using nicknames being routed to another user. #5571

UPSOKen opened this issue Nov 10, 2023 · 2 comments
Labels
status: open to PR Low priority enhancements that anyone is welcome to contribute. type: enhancement Features and feature requests. type: problem Problems that are not strictly bugs.

Comments

@UPSOKen
Copy link

UPSOKen commented Nov 10, 2023

Type of bug

Other unexpected behaviour

/ess dump all output

https://essentialsx.net/dump.html?id=4204f55e10c34431b0cd83451beda173

Error log (if applicable)

No response

Bug description

I use the nickname of Ken on my server. My actual username is "lecraeman". I have all the tab completion and command usage setup to respect nicknames in Essentials. It works almost all the time. However, I've run into an issue lately. Two users have gotten on that have broken the system.

One is named "MushuAwakens" and the other "DuckenEnjoyer". Whenever either is on, if anyone uses "/msg Ken" (Or any other essential commands - it routes to one of them, rather than me. I assume this has to do with the fact that "Ken" is in their actual username.

I even tried giving them nicknames that DID NOT contain "ken" and it still happens. Not entirely sure what is causing this, but I keep executing commands on these players that I intend to execute on myself. I can get around this by using my actual username, but because I have essentials commands setup to tab complete nicknames, that makes this a lot harder.

I am guessing this is some sort of breakage with how essentials tries to find an online player, even if you don't enter a fullname.

Steps to reproduce

  1. Run essentials and give short nickname (Like Ken).
  2. Have user get on with that nickname in their name (Doesn't seem to matter about capitalization at all - ex "MushuAwakens".
  3. Do /msg Ken (Or any other essentials command).
  4. Command is executed at the user with the full name, rather than the user with the actual nickname of "ken".

Expected behaviour

Commands should route to the user with the nickname "Ken" if entered exactly.

Actual behaviour

Commands route to a user with the nickname WITHIN their username. Ex, Nickname --> Ken , routes to --> MushuAwakens.

@UPSOKen UPSOKen added the bug: unconfirmed Potential bugs that need replicating to verify. label Nov 10, 2023
@mdcfe
Copy link
Member

mdcfe commented Nov 11, 2023

Nicknames take a lower priority than partial player names by design. This could be improved but would need proper config options and sensible weighting of player name matches (or some kind of "ambiguous user" prompt).

For now, I would recommend not using displaynames in tab completion and preferring actual usernames, as it is prone to tab completing nonsense when other plugins interfere with displaynames, and not all commands will even search for players by nickname.

@mdcfe mdcfe added type: enhancement Features and feature requests. type: problem Problems that are not strictly bugs. status: open to PR Low priority enhancements that anyone is welcome to contribute. and removed bug: unconfirmed Potential bugs that need replicating to verify. labels Nov 11, 2023
@UPSOKen
Copy link
Author

UPSOKen commented Nov 11, 2023

Nicknames take a lower priority than partial player names by design. This could be improved but would need proper config options and sensible weighting of player name matches (or some kind of "ambiguous user" prompt).

For now, I would recommend not using displaynames in tab completion and preferring actual usernames, as it is prone to tab completing nonsense when other plugins interfere with displaynames, and not all commands will even search for players by nickname.

I assumed that might be the case. It would definitely be ideal for some workaround - but not entirely sure how that would be implemented. Just wanted to have it down in case it was not intended behavior, or in case someone else came across the issue. I couldn't find much on it elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: open to PR Low priority enhancements that anyone is welcome to contribute. type: enhancement Features and feature requests. type: problem Problems that are not strictly bugs.
Projects
None yet
Development

No branches or pull requests

2 participants