gm_bindkey - Hook to key bindings

-snip-

What does this do, does it call this hook when a player changes their bindings, or does it add a mechanism for lua to change a player’s binds if it gives the password?

Can you please write a decent description with all your recent modules.

This module calls the BindKey hook when a key binding event is attempted.

Return anything other than nil to prevent it.

(I think)

Returning nil allows the event to go as normal - binding your key. Returning anything else will stop the event.

Exactly what I said. Thanks for reinforcing my argument.

That being my point.

Same here.

They’re all fairly simple, the examples should make things clear enough.

And the practical use of this being…?

Preventing malicious LUA from rebinding your keys?

Pretty much. There are still ways around Garry’s ‘fix’.

Thanks for providing this. I’ll make a module for luaconsole (by stoned) to use this in console to ask if you wish to rebind your key(s). Another great release.

<3
Put it on your svn or gobby and I’ll grab it tomorrow.

I wasn’t asking it for me. I would have thought you provide a description regardless of the example.

Never mind.

I’ve added another comment to the example that will hopefully clear up any confusion. Thanks.