View Issue Details

IDProjectCategoryView StatusLast Update
0008963New Feature Requests[All Projects] Generalpublic2017-06-18 20:56
Reporterjoaosilva099Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status newResolutionopen 
PlatformNoneOSNoneOS VersionNone
Summary0008963: [Request] Ability to see command arguments when using getCommandsBoundToKey
Description

This would be usefull, for example, to draw info about the player binds.

If we have a command /useitem <item name> and the player does /bind <key> useitem <item name> we can't retrieve <item name> from getCommandsBoundToKey.

Steps To Reproduce

None

Additional Information

None

TagsNo tags attached.

Activities

joaosilva099

2015-08-01 10:56

viewer   ~~0023775

bump

JBoy

2015-08-05 02:21

viewer   ~~0023807

But servers would get my account info that's bounded :| (Yes, i do bind my login to a key... Blow me.)

qaisjp

2015-08-05 02:30

administrator   ~~0023809

JBoy, there could be an exception to not return the login command

JBoy

2015-08-05 02:33

viewer   ~~0023810

Excellent. Then I +1 this suggestion ;)

ccw

2015-08-05 03:21

administrator   ~~0023811

Paranoid me think naughty servers could use this to fish for interesting stuff

qaisjp

2015-08-05 03:25

administrator   ~~0023812

Perhaps... what kind of interesting fishies are you thinking of?

ccw

2015-08-05 03:46

administrator   ~~0023813

I used to have all sorts of dev stuff bound to the num pad keys.
I would like to know why servers want the command arguments.

Grafu

2015-08-05 10:13

viewer   ~~0023814

Probably to find the arguments, which can be used to cause bugs/halts on some slippery commands.

arranTuna

2015-08-05 12:01

manager   ~~0023815

"cause bugs/halts on some slippery commands." What... If scripters don't properly handled arguments passed to commands that's their problem that they have to fix in absolutely no way would this help with that.

"draw info about the player binds." What... They can see the arguments in the MTA settings binds tab.

qaisjp

2015-08-05 12:19

administrator   ~~0023817

The server wants to draw the info, not the client..

arranTuna

2015-08-05 13:21

manager   ~~0023819

And why does it want to?

qaisjp

2015-08-05 13:24

administrator   ~~0023820

A bind manager, for example. Whatever reason you need getCommandsBoundToKey for, you need it for more information about the command that is actually being bound.

As the description says, "useitem" on it's own is useless, but "useitem pie" gives so much more information.

ccw

2015-08-05 15:38

administrator   ~~0023822

There is less of a problem if the bind had been set by a script. Binds set by players are more liable to contain private information. In fact I would go so far as to say getCommandsBoundToKey should not reveal anything at all about player set binds.

qaisjp

2015-08-05 15:40

administrator   ~~0023823

What kind of private information could be caught by getCommandsBoundToKey that addCommandHandler could not catch?

ccw

2015-08-05 17:07

administrator   ~~0023827

Last edited: 2015-08-05 21:05

View 2 revisions

addCommandHandler would only catch keybind command arguments when the key is pressed in that server.

If a player uses a keybind in a server, then that's their problem. Our responsibility is to not reveal potentially private information without the players knowledge, unless there is a good reason.

P.S. Irrelevant comments will be removed.

Grafu

2015-08-05 19:19

viewer   ~~0023829

"If scripters don't properly handled arguments passed to commands that's their problem that they have to fix in absolutely no way would this help with that."

Sure.

joaosilva099

2015-08-09 02:52

viewer   ~~0023874

"As the description says, "useitem" on it's own is useless, but "useitem pie" gives so much more information."

That's the idea. If a player has "useitem ITEMX" bound on key "X" and "useitem ITEMY" bound on key "Y", getCommandsBoundToKey("Y") will only return "useitem" as getCommandsBoundToKey("X") will return "useitem" too. That's why I suggested this.

qaisjp

2015-11-08 12:54

administrator   ~~0024142

What is the outcome of this?

Should this be closed or should this be implemented (without returning arguments for "login")?

ccw

2015-11-08 16:25

administrator   ~~0024143

This could be implemented if it was restricted to binds set by script.

Issue History

Date Modified Username Field Change