Add lua_findhooks #880

Merged
merged 1 commit into from Mar 1, 2016

Projects

None yet

5 participants

@TheFreeman193
Contributor

Adds new ccmds lua_findhooks and lua_findhooks_cl to behave similarly to lua_find.

  • Allows quick searching of all registered hooks by hook name & identifier
  • Integrated into current ccmd callback
  • Usage is: _lua_findhooks(cl)

Additional changes:

  • Changes use of type() to isstring()
  • Dev funcs now work in SP regardless of usergroup NWString

Examples
lua_findhooks render frame - Finds all hooks with render in the hook name and frame in the identifier.
lua_findhooks_cl "" player - Finds all clientside hooks of any name with player in the identifier.
lua_findhooks think - Finds all think hooks.

@neico
Contributor
neico commented Mar 1, 2015

looking good imo,
saves some time with crawling trough the hook table via PrintTable

@thegrb93
Contributor
thegrb93 commented Mar 1, 2015

-Snup- Doesn't matter

@TheFreeman193
Contributor

(Leaving here for reference)
This works in the same way as lua_find; it works only for admins in MP and always in SP. Both are independent of sv_allowcslua.

@TheFreeman193 TheFreeman193 Add lua_findhooks
* Adds new ccmds lua_findhooks and lua_findhooks_cl to behave similarly to lua_find
 * Allows quick searching of all registered hooks by hook name & identifier
 * Integrated into current ccmd callback
* Changes use of type() to isstring()
* Dev funcs now work in SP regardless of access to usergroup NWString
4f4aa27
@DrVrej
DrVrej commented Mar 8, 2015

Support

@TheFreeman193
Contributor

@robotboy655 Do you think it's worth merging this now?

@robotboy655 robotboy655 merged commit 524070b into garrynewman:master Mar 1, 2016
@TheFreeman193 TheFreeman193 deleted the TheFreeman193:lua_findhooks branch Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment