From fda8377a0210536417345229c7b34ea4d5d2aeec Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Mon, 20 May 2013 07:41:51 +0000 Subject: [PATCH] - Remove AKILL/RAKILL commands. (#3662) --- help.conf | 16 ----- modules.conf | 2 - src/modules/Makefile.in | 16 ++--- src/modules/m_akill.c | 142 ---------------------------------------- src/modules/m_rakill.c | 128 ------------------------------------ 5 files changed, 4 insertions(+), 300 deletions(-) delete mode 100644 src/modules/m_akill.c delete mode 100644 src/modules/m_rakill.c diff --git a/help.conf b/help.conf index 1c36b3f87..d42387a02 100644 --- a/help.conf +++ b/help.conf @@ -904,22 +904,6 @@ help Gzline { " NOTE: requires the can_gzline oper flag"; }; -help Akill { - " Adds an Autokill for the specific host mask. This prevents"; - " any user from that hostmask from connecting to the network."; - " THIS IS A DEPRICATED COMMAND AND ONLY ACCEPTED FROM SERVERS"; - " -"; - " Syntax: AKILL :"; - " Example: AKILL foo@aol.com :Spammers!"; -}; - -help Rakill { - " Removes an AKILL that was previously set."; - " THIS IS A DEPRICATED COMMAND AND ONLY ACCEPTED FROM SERVERS"; - " -"; - " Syntax: RAKILL "; -}; - help Rehash { " Prompts the server to reread the configuration files."; " IRC Operator only command."; diff --git a/modules.conf b/modules.conf index c59de58b7..367bbaa93 100644 --- a/modules.conf +++ b/modules.conf @@ -20,7 +20,6 @@ loadmodule "modules/m_svsnoop"; loadmodule "modules/m_svso"; loadmodule "modules/m_svsnick"; loadmodule "modules/m_adminchat"; -loadmodule "modules/m_akill"; loadmodule "modules/m_chgname"; loadmodule "modules/m_guest"; loadmodule "modules/m_kill"; @@ -30,7 +29,6 @@ loadmodule "modules/m_nachat"; loadmodule "modules/m_oper"; loadmodule "modules/m_pingpong"; loadmodule "modules/m_quit"; -loadmodule "modules/m_rakill"; loadmodule "modules/m_rping"; loadmodule "modules/m_sendumode"; loadmodule "modules/m_sqline"; diff --git a/src/modules/Makefile.in b/src/modules/Makefile.in index a0810c0b9..76f0a0dd9 100644 --- a/src/modules/Makefile.in +++ b/src/modules/Makefile.in @@ -37,9 +37,9 @@ R_MODULES= \ m_setident.so m_sdesc.so m_svsmode.so m_swhois.so\ m_svsmotd.so m_svsnline.so m_who.so m_mkpasswd.so \ m_away.so m_svsnoop.so m_svso.so m_svsnick.so \ - m_adminchat.so m_akill.so m_chgname.so m_guest.so m_kill.so \ + m_adminchat.so m_chgname.so m_guest.so m_kill.so \ m_lag.so m_message.so m_nachat.so m_oper.so m_pingpong.so \ - m_quit.so m_rakill.so m_rping.so m_sendumode.so m_sqline.so \ + m_quit.so m_rping.so m_sendumode.so m_sqline.so \ m_tsctl.so m_unkline.so m_unsqline.so m_unzline.so m_whois.so \ m_tkl.so m_vhost.so m_cycle.so m_svsjoin.so m_svspart.so \ m_svswatch.so m_svssilence.so m_sendsno.so m_svssno.so \ @@ -61,9 +61,9 @@ R_MODULES= \ COMMANDS=m_sethost.o m_chghost.o m_chgident.o m_setname.o m_setident.o \ m_sdesc.o m_svsmode.o m_swhois.o m_svsmotd.o m_svsnline.o \ m_who.o m_mkpasswd.o m_away.o m_svsnoop.o m_svso.o m_svsnick.o \ - m_adminchat.o m_akill.o m_chgname.o m_guest.o m_kill.o \ + m_adminchat.o m_chgname.o m_guest.o m_kill.o \ m_lag.o m_message.o m_nachat.o m_oper.o m_pingpong.o \ - m_quit.o m_rakill.o m_rping.o m_sendumode.o m_sqline.o \ + m_quit.o m_rping.o m_sendumode.o m_sqline.o \ m_tsctl.o m_unkline.o m_unsqline.o m_unzline.o m_whois.o \ m_tkl.o m_vhost.o m_cycle.o m_svsjoin.o m_svspart.o \ m_svslusers.o m_svswatch.o m_svssilence.o m_sendsno.o \ @@ -102,10 +102,6 @@ m_adminchat.so: m_adminchat.c $(INCLUDES) $(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \ -o m_adminchat.so m_adminchat.c -m_akill.so: m_akill.c $(INCLUDES) - $(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \ - -o m_akill.so m_akill.c - m_chgname.so: m_chgname.c $(INCLUDES) $(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \ -o m_chgname.so m_chgname.c @@ -142,10 +138,6 @@ m_quit.so: m_quit.c $(INCLUDES) $(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \ -o m_quit.so m_quit.c -m_rakill.so: m_rakill.c $(INCLUDES) - $(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \ - -o m_rakill.so m_rakill.c - m_rping.so: m_rping.c $(INCLUDES) $(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \ -o m_rping.so m_rping.c diff --git a/src/modules/m_akill.c b/src/modules/m_akill.c deleted file mode 100644 index 659362fb1..000000000 --- a/src/modules/m_akill.c +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Unreal Internet Relay Chat Daemon, src/modules/m_akill.c - * (C) 2000-2001 Carsten V. Munk and the UnrealIRCd Team - * Moved to modules by Fish (Justin Hammond) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 1, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "config.h" -#include "struct.h" -#include "common.h" -#include "sys.h" -#include "numeric.h" -#include "msg.h" -#include "channel.h" -#include -#include -#include -#include -#include -#ifdef _WIN32 -#include -#endif -#include -#include "h.h" -#include "proto.h" -#ifdef STRIPBADWORDS -#include "badwords.h" -#endif -#ifdef _WIN32 -#include "version.h" -#endif - -DLLFUNC int m_akill(aClient *cptr, aClient *sptr, int parc, char *parv[]); - -/* Place includes here */ -#define MSG_AKILL "AKILL" /* AKILL */ - -ModuleHeader MOD_HEADER(m_akill) - = { - "akill", /* Name of module */ - "$Id$", /* Version */ - "command /akill", /* Short description of module */ - "3.2-b8-1", - NULL - }; - -/* This is called on module init, before Server Ready */ -DLLFUNC int MOD_INIT(m_akill)(ModuleInfo *modinfo) -{ - CommandAdd(modinfo->handle, MSG_AKILL, m_akill, MAXPARA, 0); - MARK_AS_OFFICIAL_MODULE(modinfo); - return MOD_SUCCESS; -} - -/* Is first run when server is 100% ready */ -DLLFUNC int MOD_LOAD(m_akill)(int module_load) -{ - return MOD_SUCCESS; -} - - -/* Called when module is unloaded */ -DLLFUNC int MOD_UNLOAD(m_akill)(int module_unload) -{ - return MOD_SUCCESS; -} - - -/* ** m_akill; -** parv[0] = sender prefix -** parv[1] = hostmask -** parv[2] = username -** parv[3] = comment -*/ -DLLFUNC int m_akill(aClient *cptr, aClient *sptr, int parc, char *parv[]) -{ - char *hostmask, *usermask, *comment; - char mo[1024]; - char *tkllayer[9] = { - me.name, /*0 server.name */ - "+", /*1 +|- */ - "G", /*2 G */ - NULL, /*3 user */ - NULL, /*4 host */ - NULL, /*5 setby */ - "0", /*6 expire_at */ - NULL, /*7 set_at */ - "no reason" /*8 reason */ - }; - - if (parc < 2 && IsPerson(sptr)) - { - sendto_one(sptr, err_str(ERR_NEEDMOREPARAMS), - me.name, parv[0], "AKILL"); - return 0; - } - - if (IsServer(sptr) && parc < 3) - return 0; - - if (!IsServer(cptr)) - { - if (IsOper(sptr)) - { - sendto_one(sptr, ":%s NOTICE %s :*** AKILL is depreciated and should not be used. Please use /gline instead", - me.name, sptr->name); - } - else - { - sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, - sptr->name); - - } - return 0; - } - hostmask = parv[1]; - usermask = parv[2]; - comment = parc < 4 ? NULL : parv[3]; - tkllayer[1] = "+"; - tkllayer[2] = "G"; - tkllayer[3] = usermask; - tkllayer[4] = hostmask; - tkllayer[5] = sptr->name; - ircsprintf(mo, "%li", TStime()); - tkllayer[7] = mo; - tkllayer[8] = comment ? comment : "no reason"; - m_tkl(&me, &me, 9, tkllayer); - return 0; -} diff --git a/src/modules/m_rakill.c b/src/modules/m_rakill.c deleted file mode 100644 index abf8310aa..000000000 --- a/src/modules/m_rakill.c +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Unreal Internet Relay Chat Daemon, src/modules/m_rakill.c - * (C) 2000-2001 Carsten V. Munk and the UnrealIRCd Team - * Moved to modules by Fish (Justin Hammond) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 1, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "config.h" -#include "struct.h" -#include "common.h" -#include "sys.h" -#include "numeric.h" -#include "msg.h" -#include "channel.h" -#include -#include -#include -#include -#include -#ifdef _WIN32 -#include -#endif -#include -#include "h.h" -#include "proto.h" -#ifdef STRIPBADWORDS -#include "badwords.h" -#endif -#ifdef _WIN32 -#include "version.h" -#endif - -DLLFUNC int m_rakill(aClient *cptr, aClient *sptr, int parc, char *parv[]); - -/* Place includes here */ -#define MSG_RAKILL "RAKILL" /* RAKILL */ - -ModuleHeader MOD_HEADER(m_rakill) - = { - "rakill", /* Name of module */ - "$Id$", /* Version */ - "command /rakill", /* Short description of module */ - "3.2-b8-1", - NULL - }; - -/* This is called on module init, before Server Ready */ -DLLFUNC int MOD_INIT(m_rakill)(ModuleInfo *modinfo) -{ - CommandAdd(modinfo->handle, MSG_RAKILL, m_rakill, MAXPARA, 0); - MARK_AS_OFFICIAL_MODULE(modinfo); - return MOD_SUCCESS; -} - -/* Is first run when server is 100% ready */ -DLLFUNC int MOD_LOAD(m_rakill)(int module_load) -{ - return MOD_SUCCESS; -} - -/* Called when module is unloaded */ -DLLFUNC int MOD_UNLOAD(m_rakill)(int module_unload) -{ - return MOD_SUCCESS; -} - -/* -** m_rakill; -** parv[0] = sender prefix -** parv[1] = hostmask -** parv[2] = username -** parv[3] = comment -*/ -DLLFUNC int m_rakill(aClient *cptr, aClient *sptr, int parc, char *parv[]) -{ - char *tkllayer[6] = { - me.name, /*0 server.name */ - "-", /*1 - */ - "G", /*2 G */ - NULL, /*3 user */ - NULL, /*4 host */ - NULL /*5 whoremoved */ - }; - - if (parc < 2 && IsPerson(sptr)) - { - sendto_one(sptr, err_str(ERR_NEEDMOREPARAMS), - me.name, parv[0], "RAKILL"); - return 0; - } - - if (IsServer(sptr) && parc < 3) - return 0; - - if (!IsServer(cptr)) - { - if (!IsOper(sptr)) - { - sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, - sptr->name); - } - else - { - sendto_one(sptr, ":%s NOTICE %s :*** RAKILL is depreciated and should not be used. Please use /gline -user@host instead", - me.name, sptr->name); - } - return 0; - } - - tkllayer[3] = parv[2]; - tkllayer[4] = parv[1]; - tkllayer[5] = sptr->name; - m_tkl(&me, &me, 6, tkllayer); - return 0; -}