X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/212380e3f42f585dc1ea927402252eb943f91f7b..2392eb24cd19cede27f51ffa7f3d70b29edcbe33:/modules/m_topic.c diff --git a/modules/m_topic.c b/modules/m_topic.c index 0541cad..da5a8c2 100644 --- a/modules/m_topic.c +++ b/modules/m_topic.c @@ -25,12 +25,10 @@ */ #include "stdinc.h" -#include "tools.h" #include "channel.h" #include "client.h" #include "hash.h" -#include "irc_string.h" -#include "sprintf_irc.h" +#include "match.h" #include "ircd.h" #include "numeric.h" #include "send.h" @@ -102,18 +100,14 @@ m_topic(struct Client *client_p, struct Client *source_p, int parc, const char * if((chptr->mode.mode & MODE_TOPICLIMIT) == 0 || is_chanop(msptr)) { char topic_info[USERHOST_REPLYLEN]; - ircsprintf(topic_info, "%s!%s@%s", + rb_sprintf(topic_info, "%s!%s@%s", source_p->name, source_p->username, source_p->host); - set_channel_topic(chptr, parv[2], topic_info, CurrentTime); + set_channel_topic(chptr, parv[2], topic_info, rb_current_time()); sendto_server(client_p, chptr, CAP_TS6, NOCAPS, ":%s TOPIC %s :%s", use_id(source_p), chptr->chname, chptr->topic == NULL ? "" : chptr->topic); - sendto_server(client_p, chptr, NOCAPS, CAP_TS6, - ":%s TOPIC %s :%s", - source_p->name, chptr->chname, - chptr->topic == NULL ? "" : chptr->topic); sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s TOPIC %s :%s", source_p->name, source_p->username,