extensions/sno_globalnickchange: import from ircd-seven

This commit is contained in:
William Pitcock 2016-01-12 07:10:39 -06:00
parent abad2c5da6
commit 88c48be58c
5 changed files with 63 additions and 8 deletions

View file

@ -31,6 +31,7 @@
#loadmodule "extensions/no_oper_invis.la";
#loadmodule "extensions/sno_farconnect.la";
#loadmodule "extensions/sno_globalkline.la";
#loadmodule "extensions/sno_globalnickchange.la";
#loadmodule "extensions/sno_globaloper.la";
#loadmodule "extensions/sno_whois.la";
#loadmodule "extensions/override.la";

View file

@ -71,6 +71,7 @@
* Far connection notices (snomask +F) -- sno_farconnect.la
* Remote k/d/x line active notices -- sno_globalkline.la
* Remote oper up notices -- sno_globaloper.la
* Global nick-change notices -- sno_globalnickchange.la
* /whois notifications (snomask +W) -- sno_whois.la
* Oper-override (modehacking only) -- override.la
* Stop services kills -- no_kill_services.la
@ -101,6 +102,7 @@
#loadmodule "extensions/no_oper_invis.la";
#loadmodule "extensions/sno_farconnect.la";
#loadmodule "extensions/sno_globalkline.la";
#loadmodule "extensions/sno_globalnickchange.la";
#loadmodule "extensions/sno_globaloper.la";
#loadmodule "extensions/sno_whois.la";
#loadmodule "extensions/override.la";

View file

@ -37,6 +37,7 @@ extension_LTLIBRARIES = \
sno_channelcreate.la \
sno_farconnect.la \
sno_globalkline.la \
sno_globalnickchange.la \
sno_globaloper.la \
sno_whois.la \
m_42.la \

View file

@ -287,6 +287,9 @@ sno_farconnect_la_OBJECTS = sno_farconnect.lo
sno_globalkline_la_LIBADD =
sno_globalkline_la_SOURCES = sno_globalkline.c
sno_globalkline_la_OBJECTS = sno_globalkline.lo
sno_globalnickchange_la_LIBADD =
sno_globalnickchange_la_SOURCES = sno_globalnickchange.c
sno_globalnickchange_la_OBJECTS = sno_globalnickchange.lo
sno_globaloper_la_LIBADD =
sno_globaloper_la_SOURCES = sno_globaloper.c
sno_globaloper_la_OBJECTS = sno_globaloper.lo
@ -361,10 +364,10 @@ SOURCES = chm_adminonly.c chm_nonotice.c chm_operonly.c \
m_omode.c m_opme.c m_remove.c m_roleplay.c m_sendbans.c \
m_webirc.c no_kill_services.c no_locops.c no_oper_invis.c \
override.c restrict-unauthenticated.c sno_channelcreate.c \
sno_farconnect.c sno_globalkline.c sno_globaloper.c \
sno_whois.c spy_admin_notice.c spy_info_notice.c \
spy_links_notice.c spy_motd_notice.c spy_stats_notice.c \
spy_stats_p_notice.c spy_trace_notice.c
sno_farconnect.c sno_globalkline.c sno_globalnickchange.c \
sno_globaloper.c sno_whois.c spy_admin_notice.c \
spy_info_notice.c spy_links_notice.c spy_motd_notice.c \
spy_stats_notice.c spy_stats_p_notice.c spy_trace_notice.c
DIST_SOURCES = chm_adminonly.c chm_nonotice.c chm_operonly.c \
chm_operonly_compat.c chm_quietunreg_compat.c chm_sslonly.c \
chm_sslonly_compat.c createauthonly.c createoperonly.c \
@ -378,10 +381,10 @@ DIST_SOURCES = chm_adminonly.c chm_nonotice.c chm_operonly.c \
m_omode.c m_opme.c m_remove.c m_roleplay.c m_sendbans.c \
m_webirc.c no_kill_services.c no_locops.c no_oper_invis.c \
override.c restrict-unauthenticated.c sno_channelcreate.c \
sno_farconnect.c sno_globalkline.c sno_globaloper.c \
sno_whois.c spy_admin_notice.c spy_info_notice.c \
spy_links_notice.c spy_motd_notice.c spy_stats_notice.c \
spy_stats_p_notice.c spy_trace_notice.c
sno_farconnect.c sno_globalkline.c sno_globalnickchange.c \
sno_globaloper.c sno_whois.c spy_admin_notice.c \
spy_info_notice.c spy_links_notice.c spy_motd_notice.c \
spy_stats_notice.c spy_stats_p_notice.c spy_trace_notice.c
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@ -623,6 +626,7 @@ extension_LTLIBRARIES = \
sno_channelcreate.la \
sno_farconnect.la \
sno_globalkline.la \
sno_globalnickchange.la \
sno_globaloper.la \
sno_whois.la \
m_42.la \
@ -871,6 +875,9 @@ sno_farconnect.la: $(sno_farconnect_la_OBJECTS) $(sno_farconnect_la_DEPENDENCIES
sno_globalkline.la: $(sno_globalkline_la_OBJECTS) $(sno_globalkline_la_DEPENDENCIES) $(EXTRA_sno_globalkline_la_DEPENDENCIES)
$(AM_V_CCLD)$(LINK) -rpath $(extensiondir) $(sno_globalkline_la_OBJECTS) $(sno_globalkline_la_LIBADD) $(LIBS)
sno_globalnickchange.la: $(sno_globalnickchange_la_OBJECTS) $(sno_globalnickchange_la_DEPENDENCIES) $(EXTRA_sno_globalnickchange_la_DEPENDENCIES)
$(AM_V_CCLD)$(LINK) -rpath $(extensiondir) $(sno_globalnickchange_la_OBJECTS) $(sno_globalnickchange_la_LIBADD) $(LIBS)
sno_globaloper.la: $(sno_globaloper_la_OBJECTS) $(sno_globaloper_la_DEPENDENCIES) $(EXTRA_sno_globaloper_la_DEPENDENCIES)
$(AM_V_CCLD)$(LINK) -rpath $(extensiondir) $(sno_globaloper_la_OBJECTS) $(sno_globaloper_la_LIBADD) $(LIBS)
@ -954,6 +961,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sno_channelcreate.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sno_farconnect.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sno_globalkline.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sno_globalnickchange.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sno_globaloper.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sno_whois.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spy_admin_notice.Plo@am__quote@

View file

@ -0,0 +1,43 @@
/*
* Remote client nick change notices.
*/
#include "stdinc.h"
#include "modules.h"
#include "client.h"
#include "hook.h"
#include "ircd.h"
#include "send.h"
#include "s_conf.h"
#include "snomask.h"
static int _modinit(void);
static void h_gnc_nick_change(hook_data *data);
mapi_hfn_list_av1 gcn_hfnlist[] = {
{ "remote_nick_change", (hookfn) h_gnc_nick_change },
{ NULL, NULL }
};
DECLARE_MODULE_AV1(globalnickchange, _modinit, NULL, NULL, NULL, gcn_hfnlist, "$Revision: 1869 $");
static int
_modinit(void)
{
/* show the fact that we are showing user information in /version */
opers_see_all_users = 1;
return 0;
}
static void
h_gnc_nick_change(hook_data *data)
{
struct Client *source_p = data->client;
const char *oldnick = data->arg1;
const char *newnick = data->arg2;
sendto_realops_snomask_from(SNO_NCHANGE, L_ALL, source_p->servptr,
"Nick change: From %s to %s [%s@%s]",
oldnick, newnick, source_p->username, source_p->host);
}