]> jfr.im git - solanum.git/blobdiff - extensions/m_okick.c
msg: remove last vestiges of the fakelag system. charybdis has never supported fakelag.
[solanum.git] / extensions / m_okick.c
index e5367c3e5dc04d9b5de551d2c9227ae54289ec6b..fd4eba51756450d3237532f0f28d76d1e9019b30 100644 (file)
 #include "packet.h"
 #include "s_conf.h"
 #include "s_serv.h"
+#include "messages.h"
+#include "logger.h"
 
-static int mo_okick(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
+static int mo_okick(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
 
 
 struct Message okick_msgtab = {
-       "OKICK", 0, 0, 0, MFLG_SLOW,
+       "OKICK", 0, 0, 0, 0,
        {mg_unreg, mg_not_oper, mg_ignore, mg_ignore, mg_ignore, {mo_okick, 4}}
 };
 
@@ -52,13 +54,12 @@ 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
 */
 static int
-mo_okick(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+mo_okick(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        struct Client *who;
        struct Client *target_p;
@@ -73,7 +74,7 @@ mo_okick(struct Client *client_p, struct Client *source_p, int parc, const char
 
        if(*parv[2] == '\0')
        {
-               sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, parv[0], "KICK");
+               sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, source_p->name, "KICK");
                return 0;
        }
 
@@ -100,7 +101,7 @@ mo_okick(struct Client *client_p, struct Client *source_p, int parc, const char
 
        if((p = strchr(parv[2], ',')))
                *p = '\0';
-       user = LOCAL_COPY(parv[2]);     // strtoken(&p2, parv[2], ","); 
+       user = LOCAL_COPY(parv[2]);     // strtoken(&p2, parv[2], ",");
        if(!(who = find_chasing(source_p, user, &chasing)))
        {
                return 0;
@@ -108,14 +109,13 @@ mo_okick(struct Client *client_p, struct Client *source_p, int parc, const char
 
        if((target_p = find_client(user)) == NULL)
        {
-               sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, parv[0], user);
+               sendto_one(source_p, form_str(ERR_NOSUCHNICK), user);
                return 0;
        }
 
        if((msptr = find_channel_membership(chptr, target_p)) == NULL)
        {
-               sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL),
-                          me.name, parv[0], parv[1], parv[2]);
+               sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL), parv[1], parv[2]);
                return 0;
        }