X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/7f4fa1956ee087c272dd260feb6d7e1ef34d641b..121cd4dcb66aee2094cf9e20ebcd798a35274496:/modules/m_accept.c diff --git a/modules/m_accept.c b/modules/m_accept.c index 7fbf584..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) @@ -103,7 +102,7 @@ m_accept(struct Client *client_p, struct Client *source_p, int parc, const char 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 == '-') {