X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/f865a3619ddd7086ae3ef78e5c7a38955ef5cc1a..fc579e36e7201b9fcedf1f44f6d8746aa7fe1918:/extensions/m_okick.c diff --git a/extensions/m_okick.c b/extensions/m_okick.c index 1e28976..780e1ed 100644 --- a/extensions/m_okick.c +++ b/extensions/m_okick.c @@ -20,7 +20,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: m_okick.c 3554 2007-08-10 22:31:14Z jilles $ */ #include "stdinc.h" @@ -38,6 +37,8 @@ #include "s_conf.h" #include "s_serv.h" +struct module_modes ModuleModes; + static int mo_okick(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); @@ -68,8 +69,8 @@ mo_okick(struct Client *client_p, struct Client *source_p, int parc, const char char *name; char *p = NULL; char *user; + char text[10]; static char buf[BUFSIZE]; - char *text; if(*parv[2] == '\0') { @@ -138,10 +139,10 @@ mo_okick(struct Client *client_p, struct Client *source_p, int parc, const char ":%s KICK %s %s :%s", me.id, chptr->chname, who->id, comment); remove_user_from_channel(msptr); - rb_sprintf(text, "K%s",who->name); + rb_snprintf(text, sizeof(text), "K%s", who->id); /* we don't need to track NOREJOIN stuff unless it's our client being kicked */ - if(MyClient(target_p) && chptr->mode.mode & MODE_NOREJOIN) - channel_metadata_time_add(chptr, text, rb_current_time()); + if(MyClient(who) && chptr->mode.mode & ModuleModes.MODE_NOREJOIN) + channel_metadata_time_add(chptr, text, rb_current_time(), "KICKNOREJOIN"); return 0; }