[svn] - fold in whois_notice_global functionality.
This commit is contained in:
parent
9e6feafe29
commit
3868ef9a7c
5 changed files with 16 additions and 61 deletions
11
ChangeLog
11
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.
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
#define SERNO "20070519-3466"
|
||||
#define SERNO "20070524-3468"
|
||||
|
|
Loading…
Reference in a new issue