summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-02-15 13:14:49 -0500
committergumi <git@gumi.ca>2018-02-15 14:01:15 -0500
commitfdaa7d2568d03cd6bb7507e5cedbf597f847f178 (patch)
treefe84cd81e231f10d8b339b2b1cfac66f1bd8bad3 /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
parent59f02f1d406a1238f90d072949ac07279a90e9ea (diff)
downloadhercules-fdaa7d2568d03cd6bb7507e5cedbf597f847f178.tar.gz
hercules-fdaa7d2568d03cd6bb7507e5cedbf597f847f178.tar.bz2
hercules-fdaa7d2568d03cd6bb7507e5cedbf597f847f178.tar.xz
hercules-fdaa7d2568d03cd6bb7507e5cedbf597f847f178.zip
expose script_sprintf to plugins
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 467c57dd9..7e4b7c293 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -67480,6 +67480,33 @@ int HP_script_run_func(struct script_state *st) {
}
return retVal___;
}
+bool HP_script_sprintf(struct script_state *st, int start, struct StringBuf *out) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_script_sprintf_pre > 0) {
+ bool (*preHookFunc) (struct script_state **st, int *start, struct StringBuf **out);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_script_sprintf_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_script_sprintf_pre[hIndex].func;
+ retVal___ = preHookFunc(&st, &start, &out);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.sprintf(st, start, out);
+ }
+ if (HPMHooks.count.HP_script_sprintf_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct script_state *st, int start, struct StringBuf *out);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_script_sprintf_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_script_sprintf_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, st, start, out);
+ }
+ }
+ return retVal___;
+}
const char* HP_script_getfuncname(struct script_state *st) {
int hIndex = 0;
const char* retVal___ = NULL;