Delete extensions/spy_*,sno_whois

This commit is contained in:
Ed Kellett 2020-10-28 21:07:15 +00:00
parent 6ec9c49fc3
commit 26c3681f7c
9 changed files with 0 additions and 441 deletions

View file

@ -48,7 +48,6 @@ extension_LTLIBRARIES = \
sno_globalkline.la \
sno_globalnickchange.la \
sno_globaloper.la \
sno_whois.la \
umode_noctcp.la \
m_adminwall.la \
m_echotags.la \
@ -70,13 +69,6 @@ extension_LTLIBRARIES = \
no_locops.la \
no_oper_invis.la \
sasl_usercloak.la \
spy_admin_notice.la \
spy_info_notice.la \
spy_links_notice.la \
spy_motd_notice.la \
spy_stats_notice.la \
spy_stats_p_notice.la \
spy_trace_notice.la \
drain.la \
identify_msg.la \
cap_realhost.la \

View file

@ -1,72 +0,0 @@
/*
* +W snomask: Displays if a local user has done a WHOIS request on you.
* derived from spy_whois_notice.c.
*
* If #define OPERONLY is removed, then any user can use this snomask
* (you need to put ~servnotice in oper_only_umodes for this to work).
*/
#include "stdinc.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
#include "s_newconf.h"
/* undefine this to allow anyone to receive whois notifications */
#define OPERONLY
static const char sno_desc[] =
"Adds server notice mask +W that allows "
#ifdef OPERONLY
"operators"
#else
"users"
#endif
" to receive notices for when a WHOIS has been done on them";
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}
};
static int
init(void)
{
snomask_modes['W'] = find_snomask_slot();
return 0;
}
static void
fini(void)
{
snomask_modes['W'] = 0;
}
DECLARE_MODULE_AV2(sno_whois, init, fini, NULL, NULL, whois_hfnlist, NULL, NULL, sno_desc);
void
show_whois(hook_data_client *data)
{
struct Client *source_p = data->client;
struct Client *target_p = data->target;
if(MyClient(target_p) &&
#ifdef OPERONLY
IsOperGeneral(target_p) &&
#endif
(source_p != target_p) &&
(target_p->snomask & snomask_modes['W']))
{
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->servptr->name);
}
}

View file

@ -1,47 +0,0 @@
/*
* ircd-ratbox: A slightly useful ircd.
* spy_admin_notice.c: Sends a notice when someone uses ADMIN.
*
* 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
*/
#include "stdinc.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
static const char spy_desc[] = "Sends a notice when someone uses ADMIN";
void show_admin(hook_data *);
mapi_hfn_list_av1 admin_hfnlist[] = {
{"doing_admin", (hookfn) show_admin},
{NULL, NULL}
};
DECLARE_MODULE_AV2(admin_spy, NULL, NULL, NULL, NULL, admin_hfnlist, NULL, NULL, spy_desc);
void
show_admin(hook_data *data)
{
sendto_realops_snomask(SNO_SPY, L_ALL,
"admin requested by %s (%s@%s) [%s]",
data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
}

View file

@ -1,47 +0,0 @@
/*
* ircd-ratbox: A slightly useful ircd.
* spy_info_notice.c: Sends a notice when someone uses INFO.
*
* 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
*/
#include "stdinc.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
static const char spy_desc[] = "Sends a notice when someone uses INFO";
void show_info(hook_data *);
mapi_hfn_list_av1 info_hfnlist[] = {
{"doing_info", (hookfn) show_info},
{NULL, NULL}
};
DECLARE_MODULE_AV2(info_spy, NULL, NULL, NULL, NULL, info_hfnlist, NULL, NULL, spy_desc);
void
show_info(hook_data *data)
{
sendto_realops_snomask(SNO_SPY, L_ALL,
"info requested by %s (%s@%s) [%s]",
data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
}

View file

@ -1,49 +0,0 @@
/*
* ircd-ratbox: A slightly useful ircd.
* spy_links_notice.c: Sends a notice when someone uses LINKS.
*
* 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
*/
#include "stdinc.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
static const char spy_desc[] = "Sends a notice when someone uses LINKS";
void show_links(hook_data *);
mapi_hfn_list_av1 links_hfnlist[] = {
{"doing_links", (hookfn) show_links},
{NULL, NULL}
};
DECLARE_MODULE_AV2(links_spy, NULL, NULL, NULL, NULL, links_hfnlist, NULL, NULL, spy_desc);
void
show_links(hook_data *data)
{
const char *mask = data->arg1;
sendto_realops_snomask(SNO_SPY, L_ALL,
"LINKS '%s' requested by %s (%s@%s) [%s]",
mask, data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
}

View file

@ -1,47 +0,0 @@
/*
* ircd-ratbox: A slightly useful ircd.
* spy_motd_notice.c: Sends a notice when someone uses MOTD.
*
* 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
*/
#include "stdinc.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
static const char spy_desc[] = "Sends a notice when someone looks at the MOTD";
void show_motd(hook_data *);
mapi_hfn_list_av1 motd_hfnlist[] = {
{"doing_motd", (hookfn) show_motd},
{NULL, NULL}
};
DECLARE_MODULE_AV2(motd_spy, NULL, NULL, NULL, NULL, motd_hfnlist, NULL, NULL, spy_desc);
void
show_motd(hook_data *data)
{
sendto_realops_snomask(SNO_SPY, L_ALL,
"motd requested by %s (%s@%s) [%s]",
data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
}

View file

@ -1,70 +0,0 @@
/*
* ircd-ratbox: A slightly useful ircd.
* spy_stats_notice.c: Sends a notice when someone uses STATS.
*
* 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
*/
#include "stdinc.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
static const char spy_desc[] = "Sends a notice when someone uses STATS";
void show_stats(hook_data_int *);
mapi_hfn_list_av1 stats_hfnlist[] = {
{"doing_stats", (hookfn) show_stats},
{NULL, NULL}
};
DECLARE_MODULE_AV2(stats_spy, NULL, NULL, NULL, NULL, stats_hfnlist, NULL, NULL, spy_desc);
void
show_stats(hook_data_int *data)
{
char statchar = (char) data->arg2;
if(statchar == 'L' || statchar == 'l')
{
const char *name = data->arg1;
if(!EmptyString(name))
sendto_realops_snomask(SNO_SPY, L_ALL,
"STATS %c requested by %s (%s@%s) [%s] on %s",
statchar, data->client->name,
data->client->username,
data->client->host,
data->client->servptr->name, name);
else
sendto_realops_snomask(SNO_SPY, L_ALL,
"STATS %c requested by %s (%s@%s) [%s]",
statchar, data->client->name,
data->client->username,
data->client->host, data->client->servptr->name);
}
else
{
sendto_realops_snomask(SNO_SPY, L_ALL,
"STATS %c requested by %s (%s@%s) [%s]",
statchar, data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
}
}

View file

@ -1,47 +0,0 @@
/*
* ircd-ratbox: A slightly useful ircd.
* spy_stats_p_notice.c: Sends a notice when someone uses STATS p.
*
* 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
*/
#include "stdinc.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
static const char spy_desc[] = "Sends a notice when someone looks at the operator list";
void show_stats_p(hook_data *);
mapi_hfn_list_av1 stats_p_hfnlist[] = {
{"doing_stats_p", (hookfn) show_stats_p},
{NULL, NULL}
};
DECLARE_MODULE_AV2(stats_p_spy, NULL, NULL, NULL, NULL, stats_p_hfnlist, NULL, NULL, spy_desc);
void
show_stats_p(hook_data *data)
{
sendto_realops_snomask(SNO_SPY, L_ALL,
"STATS p requested by %s (%s@%s) [%s]",
data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
}

View file

@ -1,54 +0,0 @@
/*
* ircd-ratbox: A slightly useful ircd.
* spy_trace_notice.c: Sends a notice when someone uses TRACE or LTRACE
*
* Copyright (C) 2002 Hybrid Development Team
*
* 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
*/
#include "stdinc.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
static const char spy_desc[] = "Sends a notice when someone uses TRACE or LTRACE";
void show_trace(hook_data_client *);
mapi_hfn_list_av1 trace_hfnlist[] = {
{"doing_trace", (hookfn) show_trace},
{NULL, NULL}
};
DECLARE_MODULE_AV2(trace_spy, NULL, NULL, NULL, NULL, trace_hfnlist, NULL, NULL, spy_desc);
void
show_trace(hook_data_client *data)
{
if(data->target)
sendto_realops_snomask(SNO_SPY, L_ALL,
"trace requested by %s (%s@%s) [%s] on %s",
data->client->name, data->client->username,
data->client->host, data->client->servptr->name,
data->target->name);
else
sendto_realops_snomask(SNO_SPY, L_ALL,
"trace requested by %s (%s@%s) [%s]",
data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
}