From 3868ef9a7c8ade868a1aecf2305283dafea79fdc Mon Sep 17 00:00:00 2001 From: nenolod Date: Wed, 23 May 2007 21:01:12 -0700 Subject: [PATCH] [svn] - fold in whois_notice_global functionality. --- ChangeLog | 11 ++++++ extensions/Makefile.in | 3 +- extensions/sno_whois.c | 5 ++- extensions/spy_whois_notice_global.c | 56 ---------------------------- include/serno.h | 2 +- 5 files changed, 16 insertions(+), 61 deletions(-) delete mode 100644 extensions/spy_whois_notice_global.c diff --git a/ChangeLog b/ChangeLog index ade7a49f..fd3d188f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +nenolod 2007/05/24 03:58:27 UTC (20070524-3468) + Log: + - rework spy_whois_notice as a snomask-implementing module, snomask +W. + + + Changes: Modified: + +64 -57 trunk/extensions/Makefile.in (File Modified) + + - trunk/extensions/sno_whois.c (File Added) + + - trunk/extensions/spy_whois_notice.c (File Deleted) + + jilles 2007/05/19 23:36:51 UTC (20070519-3466) Log: Prevent too wide klines with CIDR masks. diff --git a/extensions/Makefile.in b/extensions/Makefile.in index 01f32bf1..90ca1f55 100644 --- a/extensions/Makefile.in +++ b/extensions/Makefile.in @@ -1,7 +1,7 @@ # # Makefile.in for ircd/contrib # -# $Id: Makefile.in 3468 2007-05-24 03:58:27Z nenolod $ +# $Id: Makefile.in 3470 2007-05-24 04:01:12Z nenolod $ # CC = @CC@ RM = @RM@ @@ -59,7 +59,6 @@ SRCS = \ spy_stats_notice.c \ spy_stats_p_notice.c \ spy_trace_notice.c \ - spy_whois_notice_global.c \ example_module.c OBJS = ${SRCS:.c=.so} diff --git a/extensions/sno_whois.c b/extensions/sno_whois.c index 6fed63ca..1b9c4108 100644 --- a/extensions/sno_whois.c +++ b/extensions/sno_whois.c @@ -4,7 +4,7 @@ * * If #define OPERONLY is removed, then any user can use this snomask. * - * $Id: sno_whois.c 3468 2007-05-24 03:58:27Z nenolod $ + * $Id: sno_whois.c 3470 2007-05-24 04:01:12Z nenolod $ */ #include "stdinc.h" @@ -21,6 +21,7 @@ void show_whois(hook_data_client *); mapi_hfn_list_av1 whois_hfnlist[] = { {"doing_whois", (hookfn) show_whois}, + {"doing_whois_global", (hookfn) show_whois}, {NULL, NULL} }; @@ -38,7 +39,7 @@ fini(void) snomask_modes['W'] = find_snomask_slot(); } -DECLARE_MODULE_AV1(sno_whois, init, fini, NULL, NULL, whois_hfnlist, "$Revision: 3468 $"); +DECLARE_MODULE_AV1(sno_whois, init, fini, NULL, NULL, whois_hfnlist, "$Revision: 3470 $"); void show_whois(hook_data_client *data) diff --git a/extensions/spy_whois_notice_global.c b/extensions/spy_whois_notice_global.c deleted file mode 100644 index 0d16e3a8..00000000 --- a/extensions/spy_whois_notice_global.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - * ircd-ratbox: A slightly useful ircd. - * spy_whois_notice.c: Sends a notice when someone uses WHOIS. - * - * Copyright (C) 2002 by the past and present ircd coders, and others. - * - * 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 2 of the License, 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * $Id: spy_whois_notice_global.c 3161 2007-01-25 07:23:01Z nenolod $ - */ -#include "stdinc.h" -#include "modules.h" -#include "hook.h" -#include "client.h" -#include "ircd.h" -#include "send.h" - -void show_whois_global(hook_data_client *); - -mapi_hfn_list_av1 whois_global_hfnlist[] = { - {"doing_whois_global", (hookfn) show_whois_global}, - {NULL, NULL} -}; - -DECLARE_MODULE_AV1(whois_global_spy, NULL, NULL, NULL, NULL, whois_global_hfnlist, - "$Revision: 3161 $"); - -void -show_whois_global(hook_data_client *data) -{ - struct Client *source_p = data->client; - struct Client *target_p = data->target; - - if(MyClient(target_p) && IsOper(target_p) && (source_p != target_p) && - (target_p->snomask & SNO_SPY)) - { - sendto_one_notice(target_p, - ":*** Notice -- %s (%s@%s) is doing a whois on you [%s]", - source_p->name, - source_p->username, source_p->host, - source_p->user->server); - } -} diff --git a/include/serno.h b/include/serno.h index 91aca319..8a919aba 100644 --- a/include/serno.h +++ b/include/serno.h @@ -1 +1 @@ -#define SERNO "20070519-3466" +#define SERNO "20070524-3468"