Browse Source

Get rid of modules/snomasks directory, since the snomask module API is gone.

(IRCOps can set any snomask dynamically now)
pull/12/head
Bram Matthys 1 year ago
parent
commit
1d73db560c
No known key found for this signature in database
GPG Key ID: BF8116B163EAAE98
  1. 1
      .gitignore
  2. 3
      Makefile.in
  3. 4
      Makefile.windows
  4. 3
      configure
  5. 1
      configure.ac
  6. 4
      doc/conf/modules.default.conf
  7. 2
      src/modules/Makefile.in
  8. 12
      src/modules/dccdeny.c
  9. 53
      src/modules/snomasks/Makefile.in
  10. 69
      src/modules/snomasks/dccreject.c
  11. 1
      src/windows/unrealinst.iss

1
.gitignore vendored

@ -9,7 +9,6 @@ extras/c-ares*
config.status
extras/ircdcron/ircd.cron
extras/ircdcron/ircdchk
src/modules/snomasks/Makefile
src/modules/chanmodes/Makefile
src/modules/extbans/Makefile
src/modules/usermodes/Makefile

3
Makefile.in

@ -214,9 +214,6 @@ install: all
$(INSTALL) -m 0700 -d $(DESTDIR)@MODULESDIR@/chanmodes
@rm -f $(DESTDIR)@MODULESDIR@/chanmodes/*.so 1>/dev/null 2>&1
$(INSTALL) -m 0700 src/modules/chanmodes/*.so $(DESTDIR)@MODULESDIR@/chanmodes
$(INSTALL) -m 0700 -d $(DESTDIR)@MODULESDIR@/snomasks
@rm -f $(DESTDIR)@MODULESDIR@/snomasks/*.so 1>/dev/null 2>&1
$(INSTALL) -m 0700 src/modules/snomasks/*.so $(DESTDIR)@MODULESDIR@/snomasks
$(INSTALL) -m 0700 -d $(DESTDIR)@MODULESDIR@/extbans
@rm -f $(DESTDIR)@MODULESDIR@/extbans/*.so 1>/dev/null 2>&1
$(INSTALL) -m 0700 src/modules/extbans/*.so $(DESTDIR)@MODULESDIR@/extbans

4
Makefile.windows

@ -337,7 +337,6 @@ DLL_FILES=\
src/modules/sinfo.dll \
src/modules/sjoin.dll \
src/modules/slog.dll \
src/modules/snomasks/dccreject.dll \
src/modules/sqline.dll \
src/modules/squit.dll \
src/modules/staff.dll \
@ -1068,9 +1067,6 @@ src/modules/sjoin.dll: src/modules/sjoin.c $(INCLUDES)
src/modules/slog.dll: src/modules/slog.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/slog.c /Fesrc/modules/ /Fosrc/modules/ /Fdsrc/modules/slog.pdb $(MODLFLAGS)
src/modules/snomasks/dccreject.dll: src/modules/snomasks/dccreject.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/snomasks/dccreject.c /Fesrc/modules/snomasks/ /Fosrc/modules/snomasks/ /Fdsrc/modules/snomasks/dccreject.pdb $(MODLFLAGS)
src/modules/sqline.dll: src/modules/sqline.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/sqline.c /Fesrc/modules/ /Fosrc/modules/ /Fdsrc/modules/sqline.pdb $(MODLFLAGS)

3
configure vendored

@ -8872,7 +8872,7 @@ fi
ac_config_files="$ac_config_files Makefile src/Makefile src/modules/Makefile src/modules/chanmodes/Makefile src/modules/usermodes/Makefile src/modules/snomasks/Makefile src/modules/extbans/Makefile src/modules/third/Makefile extras/unrealircd-upgrade-script unrealircd"
ac_config_files="$ac_config_files Makefile src/Makefile src/modules/Makefile src/modules/chanmodes/Makefile src/modules/usermodes/Makefile src/modules/extbans/Makefile src/modules/third/Makefile extras/unrealircd-upgrade-script unrealircd"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@ -9570,7 +9570,6 @@ do
"src/modules/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/Makefile" ;;
"src/modules/chanmodes/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/chanmodes/Makefile" ;;
"src/modules/usermodes/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/usermodes/Makefile" ;;
"src/modules/snomasks/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/snomasks/Makefile" ;;
"src/modules/extbans/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/extbans/Makefile" ;;
"src/modules/third/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/third/Makefile" ;;
"extras/unrealircd-upgrade-script") CONFIG_FILES="$CONFIG_FILES extras/unrealircd-upgrade-script" ;;

1
configure.ac

@ -870,7 +870,6 @@ AC_CONFIG_FILES([Makefile
src/modules/Makefile
src/modules/chanmodes/Makefile
src/modules/usermodes/Makefile
src/modules/snomasks/Makefile
src/modules/extbans/Makefile
src/modules/third/Makefile
extras/unrealircd-upgrade-script

4
doc/conf/modules.default.conf

@ -192,10 +192,6 @@ loadmodule "usermodes/secureonlymsg"; /* +Z (only TLS users may private message
loadmodule "usermodes/privdeaf"; /* +D (don't let other user PM you) */
/*** Server notice masks */
loadmodule "snomasks/dccreject"; /* +D (rejected DCC's) */
/*** Extended Bans ***/
loadmodule "extbans/join"; /* +b ~j (prevent only joins) */
loadmodule "extbans/quiet"; /* +b ~q (prevent only messaging) */

2
src/modules/Makefile.in

@ -92,7 +92,6 @@ all: build
build: $(MODULES)
cd chanmodes; $(MAKE) all
cd usermodes; $(MAKE) all
cd snomasks; $(MAKE) all
cd extbans; $(MAKE) all
cd third; $(MAKE) all
@ -100,7 +99,6 @@ clean:
$(RM) -f *.o *.so *~ core
cd chanmodes; $(MAKE) clean
cd usermodes; $(MAKE) clean
cd snomasks; $(MAKE) clean
cd extbans; $(MAKE) clean
cd third; $(MAKE) clean

12
src/modules/dccdeny.c

@ -41,6 +41,7 @@ int dccdeny_configtest_allow_dcc(ConfigFile *cf, ConfigEntry *ce, int type, int
int dccdeny_configrun_deny_dcc(ConfigFile *cf, ConfigEntry *ce, int type);
int dccdeny_configrun_allow_dcc(ConfigFile *cf, ConfigEntry *ce, int type);
int dccdeny_stats(Client *client, const char *para);
int dccdeny_dcc_denied(Client *client, const char *target, const char *realfile, const char *displayfile, ConfigItem_deny_dcc *dccdeny);
CMD_FUNC(cmd_dccdeny);
CMD_FUNC(cmd_undccdeny);
CMD_FUNC(cmd_svsfline);
@ -81,6 +82,7 @@ MOD_INIT()
HookAdd(modinfo->handle, HOOKTYPE_CAN_SEND_TO_USER, 0, dccdeny_can_send_to_user);
HookAdd(modinfo->handle, HOOKTYPE_CAN_SEND_TO_CHANNEL, 0, dccdeny_can_send_to_channel);
HookAdd(modinfo->handle, HOOKTYPE_SERVER_SYNC, 0, dccdeny_server_sync);
HookAdd(modinfo->handle, HOOKTYPE_DCC_DENIED, 0, dccdeny_dcc_denied);
return MOD_SUCCESS;
}
@ -867,3 +869,13 @@ int dccdeny_stats(Client *client, const char *para)
}
return 1;
}
int dccdeny_dcc_denied(Client *client, const char *target, const char *realfile, const char *displayfile, ConfigItem_deny_dcc *dccdeny)
{
unreal_log(ULOG_INFO, "dcc", "DCC_REJECTED", client,
"$client.details tried to send forbidden file $filename ($ban_reason) to $target (is blocked now)",
log_data_string("filename", displayfile),
log_data_string("ban_reason", dccdeny->reason),
log_data_string("target", target));
return 0;
}

53
src/modules/snomasks/Makefile.in

@ -1,53 +0,0 @@
#************************************************************************
#* IRC - Internet Relay Chat, src/modules/snomasks/Makefile
#* Copyright (C) The UnrealIRCd 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 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.
#*/
CC = "==== DO NOT RUN MAKE FROM THIS DIRECTORY ===="
INCLUDES = ../../include/channel.h \
../../include/common.h ../../include/config.h ../../include/dbuf.h \
../../include/dynconf.h ../../include/fdlist.h ../../include/h.h \
../../include/ircsprintf.h \
../../include/license.h \
../../include/modules.h ../../include/modversion.h ../../include/msg.h \
../../include/numeric.h ../../include/dns.h \
../../include/resource.h ../../include/setup.h \
../../include/struct.h ../../include/sys.h \
../../include/types.h \
../../include/version.h ../../include/whowas.h
R_MODULES=\
dccreject.so
MODULES=$(R_MODULES)
MODULEFLAGS=@MODULEFLAGS@
RM=@RM@
.SUFFIXES:
.SUFFIXES: .c .h .so
all: build
build: $(MODULES)
clean:
$(RM) -f *.o *.so *~ core
%.so: %.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
-o $@ $<

69
src/modules/snomasks/dccreject.c

@ -1,69 +0,0 @@
/*
* Show DCC SEND rejection notices (Snomask +D)
* (C) Copyright 2000-.. Bram Matthys (Syzop) and the UnrealIRCd 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 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 "unrealircd.h"
/* Module header */
ModuleHeader MOD_HEADER
= {
"snomasks/dccreject",
"4.2",
"Snomask +D",
"UnrealIRCd Team",
"unrealircd-6",
};
/* Global variables */
long SNO_DCCREJECT = 0L;
/* Forward declarations */
int dccreject_dcc_denied(Client *client, const char *target, const char *realfile, const char *displayfile, ConfigItem_deny_dcc *dccdeny);
MOD_TEST()
{
return MOD_SUCCESS;
}
MOD_INIT()
{
HookAdd(modinfo->handle, HOOKTYPE_DCC_DENIED, 0, dccreject_dcc_denied);
MARK_AS_OFFICIAL_MODULE(modinfo);
return MOD_SUCCESS;
}
MOD_LOAD()
{
return MOD_SUCCESS;
}
MOD_UNLOAD()
{
return MOD_SUCCESS;
}
int dccreject_dcc_denied(Client *client, const char *target, const char *realfile, const char *displayfile, ConfigItem_deny_dcc *dccdeny)
{
unreal_log(ULOG_INFO, "dcc", "DCC_REJECTED", client,
"$client.details tried to send forbidden file $filename ($ban_reason) to $target (is blocked now)",
log_data_string("filename", displayfile),
log_data_string("ban_reason", dccdeny->reason),
log_data_string("target", target));
return 0;
}

1
src/windows/unrealinst.iss

@ -66,7 +66,6 @@ Source: "extras\tls.cnf"; DestDir: "{app}\bin"; Flags: ignoreversion
Source: "src\modules\*.dll"; DestDir: "{app}\modules"; Flags: ignoreversion
Source: "src\modules\chanmodes\*.dll"; DestDir: "{app}\modules\chanmodes"; Flags: ignoreversion
Source: "src\modules\usermodes\*.dll"; DestDir: "{app}\modules\usermodes"; Flags: ignoreversion
Source: "src\modules\snomasks\*.dll"; DestDir: "{app}\modules\snomasks"; Flags: ignoreversion
Source: "src\modules\extbans\*.dll"; DestDir: "{app}\modules\extbans"; Flags: ignoreversion
Source: "src\modules\third\*.dll"; DestDir: "{app}\modules\third"; Flags: ignoreversion skipifsourcedoesntexist

Loading…
Cancel
Save