summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
diff options
context:
space:
mode:
authorHercules.ws <Hercules@efficiently.awesome>2016-04-25 01:38:38 +0200
committerHerculesWSAPI <Hercules@efficiently.awesome>2016-04-25 01:38:38 +0200
commit6fbd119b63d166f3ab3435fb275259882e3ee2e8 (patch)
tree5d60ae32956582830b1663a686ffe79b301d78a8 /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
parent9fbce660453b952e49beb5f6c29fa245060f757e (diff)
downloadhercules-6fbd119b63d166f3ab3435fb275259882e3ee2e8.tar.gz
hercules-6fbd119b63d166f3ab3435fb275259882e3ee2e8.tar.bz2
hercules-6fbd119b63d166f3ab3435fb275259882e3ee2e8.tar.xz
hercules-6fbd119b63d166f3ab3435fb275259882e3ee2e8.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc91
1 files changed, 85 insertions, 6 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 1526dd3f1..bd9be84bd 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -34383,14 +34383,67 @@ int HP_ircbot_join_timer(int tid, int64 tick, int id, intptr_t data) {
}
return retVal___;
}
-void HP_ircbot_send(char *str) {
+int HP_ircbot_queue_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
- if( HPMHooks.count.HP_ircbot_send_pre ) {
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_ircbot_queue_timer_pre ) {
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_queue_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_ircbot_queue_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.ircbot.queue_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_ircbot_queue_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_queue_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_ircbot_queue_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_ircbot_queue(char *str) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_ircbot_queue_pre ) {
void (*preHookFunc) (char *str);
*HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_queue_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_ircbot_queue_pre[hIndex].func;
+ preHookFunc(str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.ircbot.queue(str);
+ }
+ if( HPMHooks.count.HP_ircbot_queue_post ) {
+ void (*postHookFunc) (char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_queue_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_ircbot_queue_post[hIndex].func;
+ postHookFunc(str);
+ }
+ }
+ return;
+}
+void HP_ircbot_send(char *str, bool force) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_ircbot_send_pre ) {
+ void (*preHookFunc) (char *str, bool *force);
+ *HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_send_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_ircbot_send_pre[hIndex].func;
- preHookFunc(str);
+ preHookFunc(str, &force);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -34398,13 +34451,13 @@ void HP_ircbot_send(char *str) {
}
}
{
- HPMHooks.source.ircbot.send(str);
+ HPMHooks.source.ircbot.send(str, force);
}
if( HPMHooks.count.HP_ircbot_send_post ) {
- void (*postHookFunc) (char *str);
+ void (*postHookFunc) (char *str, bool *force);
for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_send_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_ircbot_send_post[hIndex].func;
- postHookFunc(str);
+ postHookFunc(str, &force);
}
}
return;
@@ -34487,6 +34540,32 @@ void HP_ircbot_privmsg(int fd, char *cmd, char *source, char *target, char *msg)
}
return;
}
+void HP_ircbot_privmsg_ctcp(int fd, char *cmd, char *source, char *target, char *msg) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_ircbot_privmsg_ctcp_pre ) {
+ void (*preHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_privmsg_ctcp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_ircbot_privmsg_ctcp_pre[hIndex].func;
+ preHookFunc(&fd, cmd, source, target, msg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.ircbot.privmsg_ctcp(fd, cmd, source, target, msg);
+ }
+ if( HPMHooks.count.HP_ircbot_privmsg_ctcp_post ) {
+ void (*postHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_privmsg_ctcp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_ircbot_privmsg_ctcp_post[hIndex].func;
+ postHookFunc(&fd, cmd, source, target, msg);
+ }
+ }
+ return;
+}
void HP_ircbot_userjoin(int fd, char *cmd, char *source, char *target, char *msg) {
int hIndex = 0;
if( HPMHooks.count.HP_ircbot_userjoin_pre ) {