Hi Folks
This module is a good addition to the Help system placed on some networks. Unfortunately, I seem to have a small error with this.
The module can be found
here and my comment below that.
Just in case the comment isn't obvious, I'll add it here too.
Anope Version: 1.8.6
Module Version: 1.0.1
Comments:
Works fine for me, except for 1 error. Every time a nickname is changed, doesn't matter if the nickname is NOT on the helpchannel or not, it will trigger the error.
Warning: [he_queue] Invalid event count in he_hook_nick (Count is 2, expected 1. Event will not be processed.
If this could be fixed it would make me very happy, stop all the nick changes from driving me nucking futs.
Here is the offending int block.
int he_hook_nick(int count, char **av) {
User *u = NULL;
char *data = NULL;
Helpqueue *p = hqueue;
User *helper = NULL;
User *ticket_u = NULL;
if(count != 1) {
alog("Warning: [he_queue] Invalid event count in he_hook_nick (Count is %d, expected 1. Event will not be processed.", count);
return MOD_CONT;
}
if(hqueue == NULL) {
return MOD_CONT;
}
u = finduser(av[0]);
if(u != NULL) {
data = moduleGetData(&u->moduleData, "c_id");
if(data != NULL) {
while(p != NULL) {
if(strcmp(data,p->c_id) == 0) {
if(strlen(p->helper) > 0) {
helper = finduser(p->helper);
if(helper != NULL) {
moduleNoticeLang(s_HelpServ, helper, LANG_HELPME_CHANGE_NICK, p->c_id, p->nick, av[0]);
}
}
strcpy(p->nick, av[0]);
break;
}
else {
if(strlen(p->helper) > 0) {
if(strcmp(data,p->helper_c_id) == 0) {
ticket_u = finduser(p->nick);
if(ticket_u != NULL) {
moduleNoticeLang(s_HelpServ, ticket_u, LANG_HELPME_CHANGE_HELPERNICK, p->helper, av[0]);
}
}
strcpy(p->helper, av[0]);
}
}
p = p->next;
}
free(data);
}
}
return MOD_CONT;
}
I don't want to have to just comment out this alog, since it's there for a purpose, but if I'm unable to find any other fix then I'll simply remove the output. Thanks in advance.