X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/581fa5c4999f82a176e39e4edad2990759c94f56..3e6a6891a1f6c2eee8390b1663bfdf7cf1c5f441:/modules/m_accept.c diff --git a/modules/m_accept.c b/modules/m_accept.c index a26de88..3af9c9e 100644 --- a/modules/m_accept.c +++ b/modules/m_accept.c @@ -34,7 +34,6 @@ #include "send.h" #include "msg.h" #include "parse.h" -#include "sprintf_irc.h" #include "modules.h" static int m_accept(struct Client *, struct Client *, int, const char **); @@ -77,7 +76,7 @@ m_accept(struct Client *client_p, struct Client *source_p, int parc, const char build_nicklist(source_p, addbuf, delbuf, parv[1]); /* parse the delete list */ - for (nick = strtoken(&p, delbuf, ","); nick != NULL; nick = strtoken(&p, NULL, ",")) + for (nick = rb_strtok_r(delbuf, ",", &p); nick != NULL; nick = rb_strtok_r(NULL, ",", &p)) { /* shouldnt happen, but lets be paranoid */ if((target_p = find_named_person(nick)) == NULL) @@ -95,15 +94,15 @@ m_accept(struct Client *client_p, struct Client *source_p, int parc, const char continue; } - dlinkFindDestroy(target_p, &source_p->localClient->allow_list); - dlinkFindDestroy(source_p, &target_p->on_allow_list); + rb_dlinkFindDestroy(target_p, &source_p->localClient->allow_list); + rb_dlinkFindDestroy(source_p, &target_p->on_allow_list); } /* get the number of accepts they have */ accept_num = rb_dlink_list_length(&source_p->localClient->allow_list); /* parse the add list */ - for (nick = strtoken(&p, addbuf, ","); nick; nick = strtoken(&p, NULL, ",")) + for (nick = rb_strtok_r(addbuf, ",", &p); nick; nick = rb_strtok_r(NULL, ",", &p), accept_num++) { /* shouldnt happen, but lets be paranoid */ if((target_p = find_named_person(nick)) == NULL) @@ -130,7 +129,6 @@ m_accept(struct Client *client_p, struct Client *source_p, int parc, const char /* why is this here? */ /* del_from accept(target_p, source_p); */ add_accept(source_p, target_p); - accept_num++; } return 0; @@ -161,7 +159,7 @@ build_nicklist(struct Client *source_p, char *addbuf, char *delbuf, const char * del = lenadd = lendel = 0; /* build list of clients to add into addbuf, clients to remove in delbuf */ - for (name = strtoken(&p, n, ","); name; name = strtoken(&p, NULL, ","), del = 0) + for (name = rb_strtok_r(n, ",", &p); name; name = rb_strtok_r(NULL, ",", &p), del = 0) { if(*name == '-') { @@ -208,8 +206,8 @@ build_nicklist(struct Client *source_p, char *addbuf, char *delbuf, const char * static void add_accept(struct Client *source_p, struct Client *target_p) { - dlinkAddAlloc(target_p, &source_p->localClient->allow_list); - dlinkAddAlloc(source_p, &target_p->on_allow_list); + rb_dlinkAddAlloc(target_p, &source_p->localClient->allow_list); + rb_dlinkAddAlloc(source_p, &target_p->on_allow_list); }