ULX

Author Topic: Server Hook Info [v1.1]  (Read 3874 times)

0 Members and 1 Guest are viewing this topic.

Offline Buzzkill

  • Respected Community Member
  • Full Member
  • *****
  • Posts: 176
  • Karma: 59
    • The Hundred Acre Bloodbath
Server Hook Info [v1.1]
« on: April 11, 2015, 10:59:35 AM »
A small ULX addon that will print (to console) all currently registered server hooks, organized by priority.  Useful in determining hook precedence, especially with the recent changes in hook priority management in ULib.

Note that this requires a recent ULib (4/11), as it relies on the newly added GetULibTable() function.  If this function isn't present, it will be noted in the console.
Default access is superadmin.

Installation:  Install to your addons folder.
Requires:  ULib / ULX
Usage:   "ulx serverhookinfo" from console or UI.
Output (sample):

Code: [Select]
Event: PlayerNoClip
        Priority: -1
                Hook: ULibNoclipCheck    Location: addons/ulib/lua/ulib/server/player_ext.lua
Event: CheckPassword
        Priority: 0
                Hook: CAC.CheckPassword  Location: addons/cac-release-20150413/lua/cac/controllers/liveplayersessioncontroller.lua
Event: CanTool
        Priority: -1
                Hook: ULibPlayerToolCheck        Location: addons/ulib/lua/ulib/server/player_ext.lua
                Hook: ULibEntToolCheck   Location: addons/ulib/lua/ulib/server/entity_ext.lua

To do:  Add reference to source file of hook. Added in 1.1
    Send output to calling client console Added in 1.1
« Last Edit: April 16, 2015, 06:10:09 AM by Buzzkill »

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: Server Hook Info
« Reply #1 on: April 15, 2015, 08:31:48 AM »
I may end up using this myself for debugging! :)
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline Buzzkill

  • Respected Community Member
  • Full Member
  • *****
  • Posts: 176
  • Karma: 59
    • The Hundred Acre Bloodbath
Re: Server Hook Info [v1.1]
« Reply #2 on: April 16, 2015, 06:11:32 AM »
Updated to 1.1

* Added source file info
* Sends output to server or player console, depending on where called.