]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - extensions/m_okick.c
Add SHA256/SHA512 support to crypt.c and fix up the MD5 component (it seemed to have...
[irc/rqf/shadowircd.git] / extensions / m_okick.c
index 3c532945b93f21f5647a3b8e52c9ba25c8097775..bf1ea2cdd4448819ea15162caa755321807a35e8 100644 (file)
@@ -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"
@@ -52,7 +51,6 @@ DECLARE_MODULE_AV1(okick, NULL, NULL, okick_clist, NULL, NULL, "$Revision: 3554
 
 /*
 ** m_okick
-**      parv[0] = sender prefix
 **      parv[1] = channel
 **      parv[2] = client to kick
 **      parv[3] = kick comment
@@ -69,6 +67,7 @@ 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];
 
        if(*parv[2] == '\0')
@@ -137,5 +136,11 @@ mo_okick(struct Client *client_p, struct Client *source_p, int parc, const char
        sendto_server(&me, chptr, CAP_TS6, NOCAPS,
                      ":%s KICK %s %s :%s", me.id, chptr->chname, who->id, comment);
        remove_user_from_channel(msptr);
+
+       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(who) && chptr->mode.mode & MODE_NOREJOIN)
+               channel_metadata_time_add(chptr, text, rb_current_time(), "KICKNOREJOIN");
        return 0;
 }