X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/3a8392819dc3527b74bcc91f180606e78ea7afec..78546f2b0f59b5c8fede1ce5535972716eb17041:/helpmod2/huser.c?ds=sidebyside diff --git a/helpmod2/huser.c b/helpmod2/huser.c index 2402f21c..8ce8de6f 100644 --- a/helpmod2/huser.c +++ b/helpmod2/huser.c @@ -4,14 +4,13 @@ #include #include -#include "../nick/nick.h" - #include "huser.h" #include "hchannel.h" #include "haccount.h" #include "helpmod.h" #include "hban.h" #include "hgen.h" +#include "hed.h" huser *huser_add(nick *nck) { @@ -42,6 +41,8 @@ huser *huser_add(nick *nck) tmp->flood_val = 0; tmp->spam_val = 0.0; + tmp->editor = NULL; + tmp->next = husers; husers = tmp; @@ -56,9 +57,12 @@ void huser_del(huser *husr) for (;*ptr;ptr = &(*ptr)->next) if (*ptr == husr) - { - huser *tmp = (*ptr)->next; - free(*ptr); + { + huser *tmp = (*ptr)->next; + + hed_close(husr->editor); + + free(*ptr); *ptr = tmp; return; @@ -75,12 +79,12 @@ void huser_del_all(void) huser *huser_get(nick *nck) { - huser *tmp = husers; + huser *tmp; if (nck == NULL) return NULL; - for (;tmp;tmp = tmp->next) + for (tmp = husers;tmp;tmp = tmp->next) if (tmp->real_user == nck) return tmp; return NULL;