X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/212380e3f42f585dc1ea927402252eb943f91f7b..cea2bc8499f1d250587228330ab4336452bf1a6f:/modules/core/m_part.c diff --git a/modules/core/m_part.c b/modules/core/m_part.c index d31da2f..64e9b35 100644 --- a/modules/core/m_part.c +++ b/modules/core/m_part.c @@ -25,12 +25,11 @@ */ #include "stdinc.h" -#include "tools.h" #include "channel.h" #include "client.h" #include "common.h" #include "hash.h" -#include "irc_string.h" +#include "match.h" #include "ircd.h" #include "numeric.h" #include "send.h" @@ -40,6 +39,7 @@ #include "modules.h" #include "s_conf.h" #include "packet.h" +#include "inline/stringops.h" static int m_part(struct Client *, struct Client *, int, const char **); @@ -72,9 +72,9 @@ m_part(struct Client *client_p, struct Client *source_p, int parc, const char *p reason[0] = '\0'; if(parc > 2) - strlcpy(reason, parv[2], sizeof(reason)); + rb_strlcpy(reason, parv[2], sizeof(reason)); - name = strtoken(&p, s, ","); + name = rb_strtok_r(s, ",", &p); /* Finish the flood grace period... */ if(MyClient(source_p) && !IsFloodDone(source_p)) @@ -85,7 +85,7 @@ m_part(struct Client *client_p, struct Client *source_p, int parc, const char *p while(name) { part_one_client(client_p, source_p, name, reason); - name = strtoken(&p, NULL, ","); + name = rb_strtok_r(NULL, ",", &p); } return 0; } @@ -128,7 +128,7 @@ part_one_client(struct Client *client_p, struct Client *source_p, char *name, ch if(reason[0] && (is_chanop(msptr) || !MyConnect(source_p) || ((can_send(chptr, source_p, msptr) > 0 && (source_p->localClient->firsttime + - ConfigFileEntry.anti_spam_exit_message_time) < CurrentTime)))) + ConfigFileEntry.anti_spam_exit_message_time) < rb_current_time())))) { sendto_server(client_p, chptr, CAP_TS6, NOCAPS, ":%s PART %s :%s", use_id(source_p), chptr->chname, reason);