diff options
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc | 4 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.HookingPoints.inc | 1 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking.Hooks.inc | 26 |
3 files changed, 31 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc index 605281654..cc234a000 100644 --- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc @@ -3983,6 +3983,8 @@ struct { struct HPMHookPoint *HP_script_reload_post; struct HPMHookPoint *HP_script_parse_pre; struct HPMHookPoint *HP_script_parse_post; + struct HPMHookPoint *HP_script_add_builtin_pre; + struct HPMHookPoint *HP_script_add_builtin_post; struct HPMHookPoint *HP_script_parse_builtin_pre; struct HPMHookPoint *HP_script_parse_builtin_post; struct HPMHookPoint *HP_script_parse_subexpr_pre; @@ -8954,6 +8956,8 @@ struct { int HP_script_reload_post; int HP_script_parse_pre; int HP_script_parse_post; + int HP_script_add_builtin_pre; + int HP_script_add_builtin_post; int HP_script_parse_builtin_pre; int HP_script_parse_builtin_post; int HP_script_parse_subexpr_pre; diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc index 6b8ed300c..91b6b15b7 100644 --- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc @@ -2025,6 +2025,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(script->final, HP_script_final) }, { HP_POP(script->reload, HP_script_reload) }, { HP_POP(script->parse, HP_script_parse) }, + { HP_POP(script->add_builtin, HP_script_add_builtin) }, { HP_POP(script->parse_builtin, HP_script_parse_builtin) }, { HP_POP(script->parse_subexpr, HP_script_parse_subexpr) }, { HP_POP(script->skip_space, HP_script_skip_space) }, diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc index bccfe226a..4ba06eba4 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc @@ -51372,6 +51372,32 @@ struct script_code* HP_script_parse(const char *src, const char *file, int line, } return retVal___; } +bool HP_script_add_builtin(const struct script_function *buildin, bool override) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_script_add_builtin_pre ) { + bool (*preHookFunc) (const struct script_function *buildin, bool *override); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_builtin_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_script_add_builtin_pre[hIndex].func; + retVal___ = preHookFunc(buildin, &override); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.add_builtin(buildin, override); + } + if( HPMHooks.count.HP_script_add_builtin_post ) { + bool (*postHookFunc) (bool retVal___, const struct script_function *buildin, bool *override); + for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_builtin_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_script_add_builtin_post[hIndex].func; + retVal___ = postHookFunc(retVal___, buildin, &override); + } + } + return retVal___; +} void HP_script_parse_builtin(void) { int hIndex = 0; if( HPMHooks.count.HP_script_parse_builtin_pre ) { |