X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/8e8f4ffc19fc8f3c00d20375e0d455d5d67d91d1..bd0d352f12ee12bbe14b43c4eed9fbc74c51ac00:/extensions/m_okick.c diff --git a/extensions/m_okick.c b/extensions/m_okick.c index 07c5800d..34f426bb 100644 --- a/extensions/m_okick.c +++ b/extensions/m_okick.c @@ -24,10 +24,9 @@ */ #include "stdinc.h" -#include "tools.h" #include "channel.h" #include "client.h" -#include "irc_string.h" +#include "match.h" #include "ircd.h" #include "numeric.h" #include "send.h" @@ -38,6 +37,7 @@ #include "packet.h" #include "s_conf.h" #include "s_serv.h" +#include "messages.h" static int mo_okick(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); @@ -53,7 +53,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 @@ -74,7 +73,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; } @@ -109,14 +108,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; } @@ -137,8 +135,6 @@ mo_okick(struct Client *client_p, struct Client *source_p, int parc, const char me.name, chptr->chname, who->name, comment); sendto_server(&me, chptr, CAP_TS6, NOCAPS, ":%s KICK %s %s :%s", me.id, chptr->chname, who->id, comment); - sendto_server(&me, chptr, NOCAPS, CAP_TS6, - ":%s KICK %s %s :%s", me.name, chptr->chname, who->name, comment); remove_user_from_channel(msptr); return 0; }