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

Add lua_findhooks #880

Merged
merged 1 commit into from Mar 1, 2016
Merged

Add lua_findhooks #880

merged 1 commit into from Mar 1, 2016

Conversation

TheFreeman193
Copy link
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
Copy link
Contributor

neico commented Mar 1, 2015

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

@thegrb93
Copy link
Contributor

thegrb93 commented Mar 1, 2015

-Snup- Doesn't matter

@TheFreeman193
Copy link
Contributor Author

(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.

* 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
@DrVrej
Copy link
Contributor

DrVrej commented Mar 8, 2015

Support

@TheFreeman193
Copy link
Contributor Author

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

robotboy655 added a commit that referenced this pull request Mar 1, 2016
@robotboy655 robotboy655 merged commit 524070b into Facepunch:master Mar 1, 2016
@TheFreeman193 TheFreeman193 deleted the lua_findhooks branch March 1, 2016 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants