🢀︎ unrealircd :: 7da13d6


commit 7da13d6be685ee02d838238766daf009d60de4dc
Author: acidvegas <acid.vegas@acid.vegas>
Date:   Wed Dec 25 05:03:14 2019 -0500

    updated to unreal5

diff --git a/Config b/Config
index 4e290b2..0969736 100755
--- a/Config
+++ b/Config
@@ -22,10 +22,10 @@
 RUN_CONFIGURE () {
 ARG=" "
 
-if [ -z "$BINDIR" -o -z "$DATADIR" -o -z "$CONFDIR" -o -z "$MODULESDIR" -o -z "$LOGDIR" -o -z "$CACHEDIR" -o -z "$DOCDIR" -o -z "$TMPDIR" -o -z "$LIBDIR" ]; then
+if [ -z "$BINDIR" -o -z "$DATADIR" -o -z "$CONFDIR" -o -z "$MODULESDIR" -o -z "$LOGDIR" -o -z "$CACHEDIR" -o -z "$DOCDIR" -o -z "$TMPDIR" -o -z "$PRIVATELIBDIR" ]; then
 	echo "Sorry './Config -quick' cannot be used because your 'config.settings'"
 	echo "file either does not exist or is from an old UnrealIRCd version"
-	echo "(older than version 4.0.8)."
+	echo "(older than UnrealIRCd 5.0.0)."
 	echo ""
 	echo "Please run './Config' without -quick and answer all questions."
 	echo ""
@@ -34,30 +34,19 @@ fi
 
 
 mkdir -p $TMPDIR
+mkdir -p $PRIVATELIBDIR
 
 # Do this even if we're not in advanced mode
 if [ "$SHOWLISTMODES" = "1" ] ; then
 	ARG="$ARG--with-showlistmodes "
 fi
 if [ "$ADVANCED" = "1" ] ; then
-if [ "$TOPICNICKISNUH" = "1" ] ; then
-	ARG="$ARG--with-topicisnuhost "
-fi
-if [ "$SHUNNOTICES" = "1" ] ; then
-	ARG="$ARG--with-shunnotices "
-fi
 if [ "$NOOPEROVERRIDE" = "1" ] ; then
 	ARG="$ARG--with-no-operoverride "
 fi
-if [ "$DISABLEUSERMOD" = "1" ] ; then
-	ARG="$ARG--with-disableusermod "
-fi
 if [ "$OPEROVERRIDEVERIFY" = "1" ] ; then
 	ARG="$ARG--with-operoverride-verify "
 fi
-if [ "$DISABLEEXTBANSTACKING" = "1" ]; then
-	ARG="$ARG--with-disable-extendedban-stacking ";
-fi
 fi
 if test x"$SSLDIR" = "x" ; then
 ARG="$ARG--enable-ssl "
@@ -83,28 +72,27 @@ ARG="$ARG--with-logdir=$LOGDIR "
 ARG="$ARG--with-cachedir=$CACHEDIR "
 ARG="$ARG--with-docdir=$DOCDIR "
 ARG="$ARG--with-tmpdir=$TMPDIR "
-ARG="$ARG--with-privatelibdir=$LIBDIR "
+ARG="$ARG--with-privatelibdir=$PRIVATELIBDIR "
 ARG="$ARG--with-scriptdir=$BASEPATH "
 ARG="$ARG--with-nick-history=$NICKNAMEHISTORYLENGTH "
-ARG="$ARG--with-sendq=$MAXSENDQLENGTH "
 ARG="$ARG--with-permissions=$DEFPERM "
 ARG="$ARG--enable-dynamic-linking "
 ARG="$ARG $EXTRAPARA "
 CONF="./configure $ARG"
 # remove possibly old instances of curl in ~/unrealircd/lib/
-rm -f $LIBDIR/*curl* 1>/dev/null 2>&1
+rm -f $PRIVATELIBDIR/*curl* 1>/dev/null 2>&1
 # Ensure we install curl even if someone does ./Config -quick...
 if [ "x$CURLDIR" = "x$UNREALCWD/extras/curl" ]; then
 	INSTALLCURL=1
 fi
 if [ "x$INSTALLCURL" = "x1" ]; then
-	extras/curlinstall "$LIBDIR" || exit 1
+	extras/curlinstall "$PRIVATELIBDIR" || exit 1
 fi
 echo $CONF
 $CONF || exit 1
 cd "$UNREALCWD"
 if [  "$QUICK" != "1" ] ; then
-if [ ! -f $CONFDIR/ssl/server.cert.pem ]; then
+if [ ! -f $CONFDIR/tls/server.cert.pem -a ! -f $CONFDIR/ssl/server.cert.pem ]; then
 export OPENSSLPATH
 TEST=""
 while [ -z "$TEST" ] ; do
@@ -141,10 +129,10 @@ if [ "$GENCERTIFICATE" = 1 ]; then
 	sleep 1
 else
 	echo "Ok, not generating SSL certificate. Make sure that the certificate and key"
-	echo "are installed in conf/ssl/server.crt.pem and conf/ssl/server.key.pem prior to starting the IRCd."
+	echo "are installed in conf/tls/server.crt.pem and conf/tls/server.key.pem prior to starting the IRCd."
 fi
 else
-echo "SSL certificate exists in $CONFDIR/ssl/server.cert.pem, no need to regenerate."
+echo "SSL certificate already exists in configuration directory, no need to regenerate."
 fi
 fi
 
@@ -184,65 +172,6 @@ while [ -z "$TEST" ] ; do
     esac
 done
 
-TEST=""
-while [ -z "$TEST" ] ; do
-    if [ "$TOPICNICKISNUH" = "1" ] ; then
-	TEST="Yes"
-    else
-	TEST="No"
-    fi
-    echo ""
-    echo "Do you want the /topic command to show the nick!user@host of the person"
-    echo "who set the topic, rather than just the nickname?"
-    echo $n "[$TEST] -> $c"
-	read cc
-    if [ -z "$cc" ] ; then
-	cc=$TEST
-    fi
-    case "$cc" in
-	[Yy]*)
-	    TOPICNICKISNUH="1"
-	    ;;
-	[Nn]*)
-	    TOPICNICKISNUH=""
-	    ;;
-	*)
-	    echo ""
-	    echo "You must enter either Yes or No"
-	    TEST=""
-	    ;;
-    esac
-done
-
-TEST=""
-while [ -z "$TEST" ] ; do
-    if [ "$SHUNNOTICES" = "1" ] ; then
-	TEST="Yes"
-    else
-	TEST="No"
-    fi
-    echo ""
-    echo "Should UnrealIRCd notify a user when they are no longer shunned?"
-    echo $n "[$TEST] -> $c"
-	read cc
-    if [ -z "$cc" ] ; then
-	cc=$TEST
-    fi
-    case "$cc" in
-	[Yy]*)
-	    SHUNNOTICES="1"
-	    ;;
-	[Nn]*)
-	    SHUNNOTICES=""
-	    ;;
-	*)
-	    echo ""
-	    echo "You must enter either Yes or No"
-	    TEST=""
-	    ;;
-    esac
-done
-
 TEST=""
 while [ -z "$TEST" ] ; do
     if [ "$NOOPEROVERRIDE" = "1" ] ; then
@@ -272,36 +201,6 @@ while [ -z "$TEST" ] ; do
     esac
 done
 
-TEST=""
-while [ -z "$TEST" ] ; do
-    if [ "$DISABLEUSERMOD" = "1" ] ; then
-	TEST="Yes"
-    else
-	TEST="No"
-    fi
-    echo ""
-    echo "Do you want to disable /sethost, /setident, /chgname,"
-    echo "/chghost, and /chgident?"
-    echo $n "[$TEST] -> $c"
-	read cc
-    if [ -z "$cc" ] ; then
-	cc=$TEST
-    fi
-    case "$cc" in
-	[Yy]*)
-	    DISABLEUSERMOD="1"
-	    ;;
-	[Nn]*)
-	    DISABLEUSERMOD=""
-	    ;;
-	*)
-	    echo ""
-	    echo "You must enter either Yes or No"
-	    TEST=""
-	    ;;
-    esac
-done
-
 TEST=""
 while [ -z "$TEST" ] ; do
     if [ "$OPEROVERRIDEVERIFY" = "1" ] ; then
@@ -331,35 +230,6 @@ while [ -z "$TEST" ] ; do
     esac
 done
 
-TEST=""
-while [ -z "$TEST" ] ; do
-    if [ "$DISABLEEXTBANSTACKING" = "1" ] ; then
-        TEST="Yes"
-    else
-        TEST="No"
-    fi
-    echo ""
-    echo "Do you want to disable extended ban stacking (~q:~c:#test, etc) support?"
-    echo $n "[$TEST] -> $c"
-        read cc
-    if [ -z "$cc" ] ; then
-        cc=$TEST
-    fi
-    case "$cc" in
-        [Yy]*)
-            DISABLEEXTBANSTACKING="1"
-            ;;
-        [Nn]*)
-            DISABLEEXTBANSTACKING="0"
-            ;;
-        *)
-            echo ""
-            echo "You must enter either Yes or No"
-            TEST=""
-            ;;
-    esac
-done
-
 }
 c=""
 n=""
@@ -367,19 +237,14 @@ UNREALCWD="`pwd`"
 BASEPATH="$HOME/unrealircd"
 DEFPERM="0600"
 SSLDIR=""
-NICKNAMEHISTORYLENGTH="100"
-MAXSENDQLENGTH="3000000"
+NICKNAMEHISTORYLENGTH="2000"
 MAXCONNECTIONS_REQUEST="auto"
-REMOTEINC="1"
+REMOTEINC=""
 CURLDIR=""
-PREFIXAQ="0"
-SHOWLISTMODES="0"
-TOPICNICKISNUH=""
-SHUNNOTICES=""
+PREFIXAQ="1"
+SHOWLISTMODES="1"
 NOOPEROVERRIDE=""
-DISABLEUSERMOD=""
 OPEROVERRIDEVERIFY=""
-DISABLEEXTBANSTACKING=""
 GENCERTIFICATE="1"
 EXTRAPARA=""
 if [ "`eval echo -n 'a'`" = "-n a" ] ; then
@@ -388,22 +253,6 @@ else
         n="-n"
 fi
 
-date|grep 2019 1>/dev/null 2>&1
-if [ "$?" -ne 0 ]; then
-	echo "*** WARNING ***"
-	echo "UnrealIRCd 4.x will no longer be supported after December 31, 2020."
-	echo "You should upgrade to UnrealIRCd 5 before that date."
-	echo "See https://www.unrealircd.org/docs/UnrealIRCd_4_EOL"
-	echo $n . $c
-	sleep 1
-	echo $n . $c
-	sleep 1
-	echo $n . $c
-	echo ""
-	sleep 1
-	echo "Press ENTER to continue"
-	read xyz
-fi
 
 #parse arguments
 NOCACHE=""
@@ -454,28 +303,30 @@ if [ -n "$CLEAN" ] ; then
 	rm -f config.cache
 fi
 
+if [ "`id -u`" = "0" ]; then
+	echo "ERROR: You cannot build or run UnrealIRCd as root"
+	echo ""
+	echo "Please create a separate account for building and running UnrealIRCd."
+	echo "See https://www.unrealircd.org/docs/Do_not_run_as_root"
+	exit
+fi
+
 clear
 
-    if [ -f ".CHANGES.NEW" -a -z "$NOINTRO" ] ; then
-        more .CHANGES.NEW
-        echo $n "[Enter to continue]"
-        read cc
-        clear
-    fi
-    if [ -f "doc/RELEASE-NOTES" -a -z "$NOINTRO" ] ; then
-        more doc/RELEASE-NOTES
-        echo $n "[Enter to continue]"
+    if [ -f "doc/Config.header" -a -z "$NOINTRO" ] ; then
+        more doc/Config.header
+        echo ""
+        echo $n "[Press Enter to continue]"
         read cc
         clear
     fi
 
-echo "We will now ask you a number of questions."
-echo "You can just press ENTER to accept the defaults!"
+echo "We will now ask you a number of questions. You can just press ENTER to accept the defaults!"
 echo ""
 
 if [ -z "$NOCACHE" ] ; then
 	# This needs to be updated each release so auto-upgrading works for settings, modules, etc!!:
-	UNREALRELEASES="unrealircd-4.2.3-rc1 unrealircd-4.2.2 unrealircd-4.2.2-rc2 unrealircd-4.2.2-rc1 unrealircd-4.2.1.1 unrealircd-4.2.1 unrealircd-4.2.1-rc1 unrealircd-4.2.0 unrealircd-4.0.19-rc2 unrealircd-4.0.19-rc1 unrealircd-4.0.18 unrealircd-4.0.18-rc2 unrealircd-4.0.18-rc1 unrealircd-4.0.17 unrealircd-4.0.17-rc1 unrealircd-4.0.16.1 unrealircd-4.0.16 unrealircd-4.0.15 unrealircd-4.0.14 unrealircd-4.0.14-rc1 unrealircd-4.0.13 unrealircd-4.0.13-rc1 unrealircd-4.0.12.1 unrealircd-4.0.12"
+	UNREALRELEASES="unrealircd-5.0.0-rc2 unrealircd-5.0.0-rc1"
 	if [ -f "config.settings" ]; then
 		. ./config.settings
 	else
@@ -514,17 +365,25 @@ if [ -z "$NOCACHE" ] ; then
 				echo "Directory $IMPORTEDSETTINGS does not exist or does not contain a config.settings file"
 				exit
 			fi
+			COPYMODULES="1"
+			if grep -q TOPICNICKISNUH $IMPORTEDSETTINGS/config.settings; then
+				echo "Directory $IMPORTEDSETTINGS seems to be UnrealIRCd 4.x (or older)."
+				echo "I will copy the settings but not any 3rd party modules, as they are incompatible with 5.x."
+				COPYMODULES="0"
+			fi
 			# Actually load the settings
 			. $IMPORTEDSETTINGS/config.settings
-			# Copy over 3rd party modules (also deals with 0 file cases, hence the silly looking code)
-			for f in $IMPORTEDSETTINGS/src/modules/third/*.c
-			do
-				[ -e "$f" ] && cp $f src/modules/third/
-			done
+			if [ "$COPYMODULES" = "1" ]; then
+				# Copy over 3rd party modules (also deals with 0 file cases, hence the silly looking code)
+				for f in $IMPORTEDSETTINGS/src/modules/third/*.c
+				do
+					[ -e "$f" ] && cp $f src/modules/third/
+				done
+			fi
 		fi
 	fi
 	# If we just imported settings and the curl dir is set to
-	# something like /home/xxx/unrealircd-4.x.y/extras/curl/
+	# something like /home/xxx/unrealircd-5.x.y/extras/curl/
 	# (what we call 'local-curl') then remove this setting as
 	# it would refer to the old UnrealIRCd installation.
 	if [ ! -z "$IMPORTEDSETTINGS" ]; then
@@ -537,7 +396,7 @@ fi
 TEST="$BASEPATH"
 echo ""
 echo "In what directory do you want to install UnrealIRCd?"
-echo "(Note: UnrealIRCd 4 will need to be installed somewhere."
+echo "(Note: UnrealIRCd 5 will need to be installed somewhere."
 echo " If this directory does not exist it will be created.)"
 echo $n "[$TEST] -> $c"
 read cc
@@ -550,7 +409,7 @@ if [ "$BASEPATH" = "$UNREALCWD" ]; then
 	echo ""
 	echo "ERROR: The installation directory cannot be the same as the directory"
 	echo "       containing the source code ($UNREALCWD)."
-	echo " HINT: Usually the directory containing the source is $HOME/unrealircd-4.x.y"
+	echo " HINT: Usually the directory containing the source is $HOME/unrealircd-5.x.y"
 	echo "       and the installation directory you would need to enter is $HOME/unrealircd"
 	exit 1
 fi
@@ -564,7 +423,7 @@ LOGDIR="$BASEPATH/logs"
 CACHEDIR="$BASEPATH/cache"
 DOCDIR="$BASEPATH/doc"
 TMPDIR="$BASEPATH/tmp"
-LIBDIR="$BASEPATH/lib"
+PRIVATELIBDIR="$BASEPATH/lib"
 
 TEST=""
 while [ -z "$TEST" ] ; do
@@ -830,29 +689,6 @@ while [ -z "$TEST" ] ; do
     esac
 done
 
-TEST=""
-while [ -z "$TEST" ] ; do
-    TEST="$MAXSENDQLENGTH"
-    echo ""
-    echo "What is the maximum sendq length you wish to have?"
-    echo $n "[$TEST] -> $c"
-	read cc
-    if [ -z "$cc" ] ; then
-	MAXSENDQLENGTH=$TEST
-	break
-    fi
-    case "$cc" in
-	[1-9][0-9][0-9][0-9]*)
-	    MAXSENDQLENGTH="$cc"
-	    ;;
-	*)
-	    echo ""
-	    echo "You must enter a number greater than or equal to 1000"
-	    TEST=""
-	    ;;
-    esac
-done
-
 echo ""
 TEST=""
 while [ -z "$TEST" ] ; do
@@ -892,7 +728,8 @@ fi
 TEST="$EXTRAPARA"
 echo ""
 echo "Would you like to pass any custom parameters to configure?"
-echo "See  \`./configure --help' and write them here:"
+echo "Most people don't need this and can just press ENTER."
+echo "Otherwise, see \`./configure --help' and write them here:"
 echo $n "[$TEST] -> $c"
 read EXTRAPARA
 if [ -z "$EXTRAPARA" ]; then
@@ -911,9 +748,8 @@ LOGDIR="$LOGDIR"
 CACHEDIR="$CACHEDIR"
 DOCDIR="$DOCDIR"
 TMPDIR="$TMPDIR"
-LIBDIR="$LIBDIR"
+PRIVATELIBDIR="$PRIVATELIBDIR"
 PREFIXAQ="$PREFIXAQ"
-MAXSENDQLENGTH="$MAXSENDQLENGTH"
 MAXCONNECTIONS_REQUEST="$MAXCONNECTIONS_REQUEST"
 NICKNAMEHISTORYLENGTH="$NICKNAMEHISTORYLENGTH"
 DEFPERM="$DEFPERM"
@@ -921,12 +757,8 @@ SSLDIR="$SSLDIR"
 REMOTEINC="$REMOTEINC"
 CURLDIR="$CURLDIR"
 SHOWLISTMODES="$SHOWLISTMODES"
-TOPICNICKISNUH="$TOPICNICKISNUH"
-SHUNNOTICES="$SHUNNOTICES"
 NOOPEROVERRIDE="$NOOPEROVERRIDE"
-DISABLEUSERMOD="$DISABLEUSERMOD"
 OPEROVERRIDEVERIFY="$OPEROVERRIDEVERIFY"
-DISABLEEXTBANSTACKING="$DISABLEEXTBANSTACKING"
 GENCERTIFICATE="$GENCERTIFICATE"
 EXTRAPARA="$EXTRAPARA"
 ADVANCED="$ADVANCED"
@@ -949,7 +781,8 @@ cat << __EOF__
 |                        - The UnrealIRCd Team -                        |
 |                                                                       |
 | * Bram Matthys (Syzop)     syzop@unrealircd.org                       |
-| * Travis McArthur (Heero)  heero@unrealircd.org                       |
+| * Gottem                   gottem@unrealircd.org                      |
+| * i                        i@unrealircd.org                           |
 |_______________________________________________________________________|
 __EOF__
 
diff --git a/Makefile.in b/Makefile.in
index 63ccc3d..85f9799 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -34,11 +34,11 @@ FROMDOS=/home/cmunk/bin/4dos
 #
 
 #XCFLAGS=-O -g -export-dynamic
-IRCDLIBS=@IRCDLIBS@ @TRE_LIBS@ @PCRE2_LIBS@ @ARGON2_LIBS@ @CARES_LIBS@ @PTHREAD_LIBS@
+IRCDLIBS=@IRCDLIBS@ @PCRE2_LIBS@ @ARGON2_LIBS@ @CARES_LIBS@ @PTHREAD_LIBS@
 CRYPTOLIB=@CRYPTOLIB@
 OPENSSLINCLUDES=
 
-XCFLAGS=@PTHREAD_CFLAGS@ @TRE_CFLAGS@ @PCRE2_CFLAGS@ @ARGON2_CFLAGS@ @CARES_CFLAGS@ @CFLAGS@ @HARDEN_CFLAGS@ @CPPFLAGS@
+XCFLAGS=@PTHREAD_CFLAGS@ @PCRE2_CFLAGS@ @ARGON2_CFLAGS@ @CARES_CFLAGS@ @CFLAGS@ @HARDEN_CFLAGS@ @CPPFLAGS@
 #
 # use the following on MIPS:
 #CFLAGS= -systype bsd43 -DSYSTYPE_BSD43 -I$(INCLUDEDIR)
@@ -91,25 +91,12 @@ IRCDMODE = 711
 
 URL=@URL@
 
-# [CHANGEME]
-# If you get a link-time error dealing with strtoul, comment out
-# this line.
-# STRTOUL=	strtoul.o
-STRTOUL=@STRTOUL@
-
-# [CHANGEME]
-# If you get crashes around a specific number of clients, and that
-# client load comes close or a little over the system-defined value of
-# FD_SETSIZE, override it here and see what happens. You may override
-# the system FD_SETSIZE by setting the FD_SETSIZE Makefile variable to
-# -DFD_SETSIZE=<some number>.
-FD_SETSIZE=@FD_SETSIZE@
-
 # Where is your openssl binary
 OPENSSLPATH=@OPENSSLPATH@
 
-CFLAGS=-I$(INCLUDEDIR) $(XCFLAGS) $(FD_SETSIZE)
-LDFLAGS=@LDFLAGS_PRIVATELIBS@ @HARDEN_LDFLAGS@
+CFLAGS=-I$(INCLUDEDIR) $(XCFLAGS)
+XLDFLAGS=@LDFLAGS_PRIVATELIBS@ @HARDEN_LDFLAGS@ @LDFLAGS@
+LDFLAGS=$(XLDFLAGS)
 
 SHELL=/bin/sh
 SUBDIRS=src
@@ -126,7 +113,7 @@ MAKEARGS =	'CFLAGS=${CFLAGS}' 'CC=${CC}' 'IRCDLIBS=${IRCDLIBS}' \
 		'RES=${RES}' 'BINDIR=${BINDIR}' 'INSTALL=${INSTALL}' \
 		'INCLUDEDIR=${INCLUDEDIR}' \
 		'RM=${RM}' 'CP=${CP}' 'TOUCH=${TOUCH}' \
-		'SHELL=${SHELL}' 'STRTOUL=${STRTOUL}' \
+		'SHELL=${SHELL}' \
 		'CRYPTOLIB=${CRYPTOLIB}' \
 		'CRYPTOINCLUDES=${CRYPTOINCLUDES}' \
 		'URL=${URL}'
@@ -165,11 +152,11 @@ cleandir: clean
 	rm -rf include/setup.h Makefile Settings
 
 distclean: cleandir
-	rm -rf extras/*.bak extras/regexp extras/*.tar extras/c-ares
+	rm -rf extras/*.bak extras/*.tar extras/c-ares
 	rm -rf extras/c-ares-* extras/tre-*
 	rm -rf config.log config.settings *.pem ircd.* unrealircd
 	rm -rf Makefile config.status
-
+	
 depend:
 	@+for i in $(SUBDIRS); do \
 		echo "Making dependencies in $$i";\
@@ -182,40 +169,70 @@ install: all
 	$(INSTALL) -m 0700 -d @DOCDIR@
 	$(INSTALL) -m 0600 doc/Authors doc/coding-guidelines doc/tao.of.irc @DOCDIR@
 	$(INSTALL) -m 0700 -d @CONFDIR@
-	$(INSTALL) -m 0600 doc/conf/*.conf @CONFDIR@
-	$(INSTALL) -m 0600 doc/conf/*.motd @CONFDIR@
-	$(INSTALL) -m 0700 -d @CONFDIR@/ssl
-	$(INSTALL) -m 0600 doc/conf/ssl/curl-ca-bundle.crt @CONFDIR@/ssl
+	$(INSTALL) -m 0600 doc/conf/*.default.conf @CONFDIR@
+	$(INSTALL) -m 0600 doc/conf/*.optional.conf @CONFDIR@
+	-@if [ ! -f "@CONFDIR@/modules.sources.list" ] ; then \
+		$(INSTALL) -m 0600 doc/conf/modules.sources.list @CONFDIR@ ; \
+	fi
+	-@if [ ! -f "@CONFDIR@/spamfilter.conf" ] ; then \
+		$(INSTALL) -m 0600 doc/conf/spamfilter.conf @CONFDIR@ ; \
+	fi
+	-@extras/patches/patch_spamfilter_conf "@CONFDIR@"
+	-@if [ ! -f "@CONFDIR@/badwords.conf" ] ; then \
+		$(INSTALL) -m 0600 doc/conf/badwords.conf @CONFDIR@ ; \
+	fi
+	-@if [ ! -f "@CONFDIR@/dccallow.conf" ] ; then \
+		$(INSTALL) -m 0600 doc/conf/dccallow.conf @CONFDIR@ ; \
+	fi
+	$(INSTALL) -m 0700 -d @CONFDIR@/aliases
+	$(INSTALL) -m 0600 doc/conf/aliases/*.conf @CONFDIR@/aliases
+	$(INSTALL) -m 0700 -d @CONFDIR@/help
+	$(INSTALL) -m 0600 doc/conf/help/*.conf @CONFDIR@/help
+	$(INSTALL) -m 0700 -d @CONFDIR@/examples
+	$(INSTALL) -m 0600 doc/conf/examples/*.conf @CONFDIR@/examples
 	$(INSTALL) -m 0700 unrealircd @SCRIPTDIR@
 	$(INSTALL) -m 0700 -d @MODULESDIR@
+	@rm -f @MODULESDIR@/*.so 1>/dev/null 2>&1
 	$(INSTALL) -m 0700 src/modules/*.so @MODULESDIR@
 	$(INSTALL) -m 0700 -d @MODULESDIR@/usermodes
+	@rm -f @MODULESDIR@/usermodes/*.so 1>/dev/null 2>&1
 	$(INSTALL) -m 0700 src/modules/usermodes/*.so @MODULESDIR@/usermodes
 	$(INSTALL) -m 0700 -d @MODULESDIR@/chanmodes
+	@rm -f @MODULESDIR@/chanmodes/*.so 1>/dev/null 2>&1
 	$(INSTALL) -m 0700 src/modules/chanmodes/*.so @MODULESDIR@/chanmodes
 	$(INSTALL) -m 0700 -d @MODULESDIR@/snomasks
+	@rm -f @MODULESDIR@/snomasks/*.so 1>/dev/null 2>&1
 	$(INSTALL) -m 0700 src/modules/snomasks/*.so @MODULESDIR@/snomasks
 	$(INSTALL) -m 0700 -d @MODULESDIR@/extbans
+	@rm -f @MODULESDIR@/extbans/*.so 1>/dev/null 2>&1
 	$(INSTALL) -m 0700 src/modules/extbans/*.so @MODULESDIR@/extbans
-	$(INSTALL) -m 0700 -d @MODULESDIR@/cap
-	$(INSTALL) -m 0700 src/modules/cap/*.so @MODULESDIR@/cap
+	@#If the conf/ssl directory exists then rename it here to conf/tls
+	@#and add a symlink for backwards compatibility (so that f.e. certbot
+	@#doesn't randomly fail after an upgrade to U5).
+	-@if [ -d "@CONFDIR@/ssl" ] ; then \
+		mv "@CONFDIR@/ssl" "@CONFDIR@/tls" ; \
+		ln -s "@CONFDIR@/tls" "@CONFDIR@/ssl" ; \
+	fi
+	$(INSTALL) -m 0700 -d @CONFDIR@/tls
+	$(INSTALL) -m 0600 doc/conf/tls/curl-ca-bundle.crt @CONFDIR@/tls
+	@# delete modules/cap directory, to avoid confusing with U4 to U5 upgrades:
+	rm -rf @MODULESDIR@/cap
 	$(INSTALL) -m 0700 -d @MODULESDIR@/third
-	@#Ugly stuff to detect 0 files in this directory:
-	@+for f in src/modules/third/*.so; do \
-		[ -e $f ] && $(INSTALL) -m 0700 src/modules/third/*.so @MODULESDIR@/third || echo; \
-	done
+	@rm -f @MODULESDIR@/third/*.so 1>/dev/null 2>&1
+	@#This step can fail with zero files, so we ignore exit status:
+	-$(INSTALL) -m 0700 src/modules/third/*.so @MODULESDIR@/third
 	$(INSTALL) -m 0700 -d @TMPDIR@
 	$(INSTALL) -m 0700 -d @CACHEDIR@
 	$(INSTALL) -m 0700 -d @PERMDATADIR@
 	$(INSTALL) -m 0700 -d @LOGDIR@
-	-@if [ ! -f "@CONFDIR@/ssl/server.cert.pem" ] ; then \
-		$(INSTALL) -m 0600 server.req.pem @CONFDIR@/ssl ; \
-		$(INSTALL) -m 0600 server.key.pem @CONFDIR@/ssl ; \
-		$(INSTALL) -m 0600 server.cert.pem @CONFDIR@/ssl ; \
+	-@if [ ! -f "@CONFDIR@/tls/server.cert.pem" ] ; then \
+		$(INSTALL) -m 0600 server.req.pem @CONFDIR@/tls ; \
+		$(INSTALL) -m 0600 server.key.pem @CONFDIR@/tls ; \
+		$(INSTALL) -m 0600 server.cert.pem @CONFDIR@/tls ; \
 	fi
 	@echo ''
 	@echo '* UnrealIRCd is now installed.'
-
+	
 	-@if [ "@SCRIPTDIR@/bin" = "@BINDIR@" ] ; then \
 		echo '* Leave this directory and run "cd @SCRIPTDIR@" now' ; \
 	fi
@@ -238,32 +255,19 @@ install: all
 		echo 'Again, be sure to change to the @SCRIPTDIR@ directory!' ; \
 	fi
 
-### TODO: all the stuff below ;) ###
-pem:	src/ssl.cnf
-	@echo "Generating certificate request .. "
+pem:	extras/tls.cnf
+	@echo "Generating server key..."
+	$(OPENSSLPATH) ecparam -out server.key.pem -name secp384r1 -genkey
+	@echo "Generating certificate request..."
 	$(OPENSSLPATH) req -new \
-              -config src/ssl.cnf -sha256 -out server.req.pem \
-              -keyout server.key.pem -nodes
-	@echo "Generating self-signed certificate .. "
+              -config extras/tls.cnf -sha256 -out server.req.pem \
+              -key server.key.pem -nodes
+	@echo "Generating self-signed certificate..."
 	$(OPENSSLPATH) req -x509 -days 3650 -sha256 -in server.req.pem \
                -key server.key.pem -out server.cert.pem
-	@echo "Generating fingerprint .."
-	$(OPENSSLPATH) x509 -subject -dates -sha256 -fingerprint -noout \
-		-in server.cert.pem
-	@echo "Setting o-rwx & g-rwx for files... "
+	@echo "Setting permissions on server.*.pem files..."
 	chmod o-rwx server.req.pem server.key.pem server.cert.pem
 	chmod g-rwx server.req.pem server.key.pem server.cert.pem
-	@echo "Done!. If you want to encrypt the private key, run"
-	@echo "make encpem"
-
-encpem: server.key.pem
-	@echo "Encrypting server key .."
-	$(OPENSSLPATH) rsa -in server.key.pem -out server.key.c.pem -des3
-	-@if [ -f server.key.c.pem ] ; then \
-		echo "Replacing unencrypted with encrypted .." ; \
-		cp server.key.c.pem server.key.pem ; \
-		rm -f server.key.c.pem ; \
-	fi
 
 Makefile: config.status Makefile.in
 	./config.status
diff --git a/Makefile.windows b/Makefile.windows
new file mode 100644
index 0000000..e5fc1f0
--- /dev/null
+++ b/Makefile.windows
@@ -0,0 +1,1068 @@
+#
+# UnrealIRCd Makefile - codemastr
+#
+CC=cl
+LINK=link
+RC=rc
+MT=mt
+
+############################ USER CONFIGURATION ############################
+
+# You are encouraged NOT to set these values here, but instead make a batch file
+# which passes all these arguments to nmake, like:
+# nmake -f makefile.windows LIBRESSL_INC_DIR="c:\dev\libressl" etc etc...
+# Both ways will work, but if you use a batch file it's easier with
+# upgrading UnrealIRCd as you won't have to edit this makefile again.
+
+### PCRE2 ###
+#PCRE2_LIB_DIR="C:\dev\pcre2\build\release"
+#PCRE2_INC_DIR="C:\dev\pcre2"
+#PCRE2LIB="pcre2-8.lib"
+
+### ARGON2 ###
+#ARGON2_LIB_DIR="C:\dev\argon2\vs2015\build"
+#ARGON2_INC_DIR="C:\dev\argon2\include"
+#ARGON2LIB="Argon2RefDll.lib"
+
+### C-ARES ####
+#CARES_LIB_DIR="C:\dev\c-ares\vc\cares\dll-release"
+#CARES_INC_DIR="C:\dev\c-ares"
+#CARESLIB="cares.lib"
+
+##### REMOTE INCLUDES ####
+#To enable remote include support you must have libcurl installed on your
+#system and it must have ares support enabled.
+#
+#
+#To enable remote includes uncomment the next line:
+#USE_REMOTEINC=1
+#
+#If your libcurl library and include files are not in your compiler's
+#default locations, specify the locations here:
+#LIBCURL_INC_DIR="c:\dev\curl\include"
+#LIBCURL_LIB_DIR="c:\dev\curl\lib"
+#
+#
+### END REMOTE INCLUDES ##
+
+####### SSL/TLS SUPPORT (MANDATORY) ######
+#Use LibreSSL or OpenSSL. Define paths and libraries:
+#LIBRESSL_INC_DIR="c:\dev\libressl\include"
+#LIBRESSL_LIB_DIR="c:\dev\libressl\lib"
+#SSLLIB=libcrypto-38.lib libssl-39.lib libtls-11.lib
+#The version numbers of the 3 libraries in the last line change
+#every libressl release. So be sure to update after any libressl upgrade.
+######### END SSL/TLS ########
+
+###### _EXTRA_ DEBUGGING #####
+# We always build releases with debugging information, since otherwise
+# we cannot trace the source of a crash. Plus we do not mind the extra
+# performance hit caused by not enabling super-optimization, tracing
+# crashes properly is more important.
+# You can choose (at your own risk) to enable EVEN MORE debugging,
+# note that this causes /MDd to be used instead of /MD which can make
+# libraries incompatible, plus all the other side-effects such as
+# requiring a different dll we do not ship (and maybe you are not even
+# allowed to ship due to license agreements), etc...
+# In any case, this probably should not be used, unless debugging a
+# problem locally, in which case it can be useful.
+#DEBUGEXTRA=1
+#
+#
+#### END RELEASE BUILD ###
+
+############################# END CONFIGURATION ############################
+
+!IFDEF CARES_INC_DIR
+CARES_INC=/I "$(CARES_INC_DIR)"
+!ENDIF
+!IFDEF CARES_LIB_DIR
+CARES_LIB=/LIBPATH:"$(CARES_LIB_DIR)"
+!ENDIF
+
+!IFDEF PCRE2_INC_DIR
+PCRE2_INC=/I "$(PCRE2_INC_DIR)"
+!ENDIF
+!IFDEF PCRE2_LIB_DIR
+PCRE2_LIB=/LIBPATH:"$(PCRE2_LIB_DIR)"
+!ENDIF
+
+!IFDEF ARGON2_INC_DIR
+ARGON2_INC=/I "$(ARGON2_INC_DIR)"
+!ENDIF
+!IFDEF ARGON2_LIB_DIR
+ARGON2_LIB=/LIBPATH:"$(ARGON2_LIB_DIR)"
+!ENDIF
+
+!IFDEF USE_REMOTEINC
+CURLCFLAGS=/D USE_LIBCURL
+CURLOBJ=SRC/URL.OBJ
+CURLLIB=libcurl.lib
+!IFDEF LIBCURL_INC_DIR
+LIBCURL_INC=/I "$(LIBCURL_INC_DIR)"
+!ENDIF
+!IFDEF LIBCURL_LIB_DIR
+LIBCURL_LIB=/LIBPATH:"$(LIBCURL_LIB_DIR)"
+!ENDIF
+!ENDIF
+
+!IFDEF LIBRESSL_INC_DIR
+LIBRESSL_INC=/I "$(LIBRESSL_INC_DIR)"
+!ENDIF
+!IFDEF LIBRESSL_LIB_DIR
+LIBRESSL_LIB=/LIBPATH:"$(LIBRESSL_LIB_DIR)"
+!ENDIF
+
+!IFDEF DEBUGEXTRA
+DBGCFLAG=/MDd /Zi /Od
+DBGCFLAGST=/MTd /Zi /Od
+DBGLFLAG=/debug
+MODDBGCFLAG=/LDd /MDd /Zi
+!ELSE
+DBGCFLAG=/MD /Zi
+DBGCFLAGST=/MT /Zi
+DBGLFLAG=/debug
+MODDBGCFLAG=/LDd /MD /Zi
+!ENDIF 
+
+STDOPTIONS=$(PCRE2_INC) $(ARGON2_INC) $(CARES_INC) $(LIBCURL_INC) $(LIBRESSL_INC) /J /I ./INCLUDE /nologo \
+ $(CURLCFLAGS) /D FD_SETSIZE=16384 $(SSLCFLAGS) /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE \
+ /D FAKELAG_CONFIGURABLE=1 \
+ /W3 /wd4267 /wd4101 /wd4018 /wd4244 /wd4996 /WX \
+ /analyze:ruleset extras\VStudioAnalyze.ruleset
+STDLIBS=$(CARES_LIB) $(CARESLIB) $(PCRE2_LIB) $(PCRE2LIB) $(ARGON2_LIB) $(ARGON2LIB) \
+ $(LIBRESSL_LIB) $(SSLLIB) $(LIBCURL_LIB) $(CURLLIB)
+CFLAGS=$(DBGCFLAG) $(STDOPTIONS) /c /Fosrc/
+CFLAGSST=$(DBGCFLAGST) $(STDOPTIONS) /c /Fosrc/
+LFLAGS=kernel32.lib user32.lib gdi32.lib shell32.lib ws2_32.lib advapi32.lib \
+ dbghelp.lib oldnames.lib comctl32.lib comdlg32.lib $(STDLIBS) \
+ /def:UnrealIRCd.def /implib:UnrealIRCd.lib \
+ /nologo $(DBGLFLAG) /out:UnrealIRCd.exe
+MODCFLAGS=$(MODDBGCFLAG) $(STDOPTIONS) /D DYNAMIC_LINKING /D MODULE_COMPILE
+MODLFLAGS=/link /def:src/modules/module.def UnrealIRCd.lib ws2_32.lib $(STDLIBS)
+
+INCLUDES=./include/struct.h ./include/config.h ./include/sys.h \
+ ./include/common.h ./include/version.h ./include/h.h ./include/numeric.h \
+ ./include/msg.h ./include/setup.h ./include/dynconf.h
+
+EXP_OBJ_FILES=SRC/CHANNEL.OBJ SRC/SEND.OBJ SRC/SOCKET.OBJ \
+ SRC/CONF.OBJ SRC/CONF_PREPROCESSOR.OBJ \
+ SRC/FDLIST.OBJ SRC/DBUF.OBJ  \
+ SRC/HASH.OBJ SRC/PARSE.OBJ SRC/IRCD.OBJ \
+ SRC/WHOWAS.OBJ \
+ SRC/MISC.OBJ SRC/MATCH.OBJ SRC/CRULE.OBJ \
+ SRC/DEBUG.OBJ  SRC/SUPPORT.OBJ SRC/LIST.OBJ \
+ SRC/NUMERIC.OBJ \
+ SRC/SERV.OBJ SRC/USER.OBJ \
+ SRC/VERSION.OBJ SRC/IRCSPRINTF.OBJ \
+ SRC/SCACHE.OBJ SRC/DNS.OBJ SRC/MODULES.OBJ \
+ SRC/ALIASES.OBJ SRC/API-EVENT.OBJ SRC/API-USERMODE.OBJ SRC/AUTH.OBJ SRC/TLS.OBJ \
+ SRC/RANDOM.OBJ SRC/API-CHANNELMODE.OBJ SRC/API-MODDATA.OBJ SRC/MEMPOOL.OBJ \
+ SRC/DISPATCH.OBJ SRC/API-ISUPPORT.OBJ SRC/API-COMMAND.OBJ \
+ SRC/API-CLICAP.OBJ SRC/API-MESSAGETAG.OBJ SRC/API-HISTORY-BACKEND.OBJ \
+ SRC/API-EXTBAN.OBJ SRC/API-EFUNCTIONS.OBJ SRC/CRYPT_BLOWFISH.OBJ \
+ SRC/OPERCLASS.OBJ SRC/UPDCONF.OBJ SRC/CRASHREPORT.OBJ \
+ SRC/OPENSSL_HOSTNAME_VALIDATION.OBJ \
+ SRC/UTF8.OBJ $(CURLOBJ)
+
+OBJ_FILES=$(EXP_OBJ_FILES) SRC/GUI.OBJ SRC/SERVICE.OBJ SRC/WINDEBUG.OBJ SRC/RTF.OBJ \
+ SRC/EDITOR.OBJ SRC/WIN.OBJ 
+
+DLL_FILES=SRC/MODULES/CLOAK.DLL \
+ SRC/MODULES/CHGHOST.DLL SRC/MODULES/SDESC.DLL SRC/MODULES/SETIDENT.DLL \
+ SRC/MODULES/SETNAME.DLL SRC/MODULES/SETHOST.DLL SRC/MODULES/CHGIDENT.DLL \
+ SRC/MODULES/SVSMOTD.DLL SRC/MODULES/SVSNLINE.DLL SRC/MODULES/WHO_OLD.DLL \
+ SRC/MODULES/WHOX.DLL \
+ SRC/MODULES/SWHOIS.DLL SRC/MODULES/SVSMODE.DLL SRC/MODULES/AWAY.DLL \
+ SRC/MODULES/SVSNOOP.DLL SRC/MODULES/MKPASSWD.DLL \
+ SRC/MODULES/SVSNICK.DLL \
+ SRC/MODULES/CHGNAME.DLL \
+ SRC/MODULES/LAG.DLL SRC/MODULES/MESSAGE.DLL \
+ SRC/MODULES/OPER.DLL SRC/MODULES/PINGPONG.DLL SRC/MODULES/QUIT.DLL \
+ SRC/MODULES/SENDUMODE.DLL \
+ SRC/MODULES/SQLINE.DLL SRC/MODULES/KILL.DLL SRC/MODULES/TSCTL.DLL \
+ SRC/MODULES/UNSQLINE.DLL \
+ SRC/MODULES/WHOIS.DLL SRC/MODULES/TKL.DLL SRC/MODULES/VHOST.DLL \
+ SRC/MODULES/CYCLE.DLL SRC/MODULES/SVSJOIN.DLL SRC/MODULES/SVSPART.DLL \
+ SRC/MODULES/SVSLUSERS.DLL SRC/MODULES/SVSWATCH.DLL SRC/MODULES/SVSSILENCE.DLL \
+ SRC/MODULES/SENDSNO.DLL SRC/MODULES/SVSSNO.DLL SRC/MODULES/SAJOIN.DLL \
+ SRC/MODULES/SAPART.DLL SRC/MODULES/SAMODE.DLL SRC/MODULES/KICK.DLL \
+ SRC/MODULES/TOPIC.DLL SRC/MODULES/INVITE.DLL SRC/MODULES/LIST.DLL \
+ SRC/MODULES/TIME.DLL SRC/MODULES/SVSKILL.DLL SRC/MODULES/KNOCK.DLL \
+ SRC/MODULES/UMODE2.DLL SRC/MODULES/SQUIT.DLL SRC/MODULES/PROTOCTL.DLL \
+ SRC/MODULES/SJOIN.DLL SRC/MODULES/PASS.DLL SRC/MODULES/USERHOST.DLL \
+ SRC/MODULES/ISON.DLL SRC/MODULES/SILENCE.DLL \
+ SRC/MODULES/ADDMOTD.DLL SRC/MODULES/ADDOMOTD.DLL SRC/MODULES/WALLOPS.DLL \
+ SRC/MODULES/GLOBOPS.DLL SRC/MODULES/LOCOPS.DLL \
+ SRC/MODULES/ADMIN.DLL SRC/MODULES/TRACE.DLL SRC/MODULES/NETINFO.DLL \
+ SRC/MODULES/LINKS.DLL SRC/MODULES/HELP.DLL SRC/MODULES/RULES.DLL \
+ SRC/MODULES/CLOSE.DLL SRC/MODULES/MAP.DLL SRC/MODULES/EOS.DLL \
+ SRC/MODULES/SERVER.DLL SRC/MODULES/STATS.DLL \
+ SRC/MODULES/DCCDENY.DLL SRC/MODULES/WHOWAS.DLL \
+ SRC/MODULES/CONNECT.DLL SRC/MODULES/DCCALLOW.DLL SRC/MODULES/USERIP.DLL \
+ SRC/MODULES/NICK.DLL SRC/MODULES/USER.DLL SRC/MODULES/MODE.DLL \
+ SRC/MODULES/WATCH.DLL SRC/MODULES/PART.DLL SRC/MODULES/JOIN.DLL \
+ SRC/MODULES/MOTD.DLL SRC/MODULES/OPERMOTD.DLL SRC/MODULES/BOTMOTD.DLL \
+ SRC/MODULES/LUSERS.DLL SRC/MODULES/NAMES.DLL SRC/MODULES/SVSNOLAG.DLL \
+ SRC/MODULES/STARTTLS.DLL \
+ SRC/MODULES/WEBREDIR.DLL \
+ SRC/MODULES/CAP.DLL \
+ SRC/MODULES/SASL.DLL \
+ SRC/MODULES/TLS_ANTIDOS.DLL \
+ SRC/MODULES/MD.DLL \
+ SRC/MODULES/CERTFP.DLL \
+ SRC/MODULES/WEBIRC.DLL \
+ SRC/MODULES/WEBSOCKET.DLL \
+ SRC/MODULES/BLACKLIST.DLL \
+ SRC/MODULES/JOINTHROTTLE.DLL \
+ SRC/MODULES/ANTIRANDOM.DLL \
+ SRC/MODULES/HIDESERVER.DLL \
+ SRC/MODULES/JUMPSERVER.DLL \
+ SRC/MODULES/IRCOPS.DLL \
+ SRC/MODULES/STAFF.DLL \
+ SRC/MODULES/NOCODES.DLL \
+ SRC/MODULES/CHARSYS.DLL \
+ SRC/MODULES/ANTIMIXEDUTF8.DLL \
+ SRC/MODULES/AUTHPROMPT.DLL \
+ SRC/MODULES/SINFO.DLL \
+ SRC/MODULES/REPUTATION.DLL \
+ SRC/MODULES/CONNTHROTTLE.DLL \
+ SRC/MODULES/CHANMODES/CENSOR.DLL \
+ SRC/MODULES/CHANMODES/DELAYJOIN.DLL \
+ SRC/MODULES/CHANMODES/FLOODPROT.DLL \
+ SRC/MODULES/CHANMODES/ISSECURE.DLL \
+ SRC/MODULES/CHANMODES/LINK.DLL \
+ SRC/MODULES/CHANMODES/NOCOLOR.DLL \
+ SRC/MODULES/CHANMODES/NOCTCP.DLL \
+ SRC/MODULES/CHANMODES/NOINVITE.DLL \
+ SRC/MODULES/CHANMODES/NOKICK.DLL \
+ SRC/MODULES/CHANMODES/NOKNOCK.DLL \
+ SRC/MODULES/CHANMODES/NONICKCHANGE.DLL \
+ SRC/MODULES/CHANMODES/NONOTICE.DLL \
+ SRC/MODULES/CHANMODES/OPERONLY.DLL \
+ SRC/MODULES/CHANMODES/PERMANENT.DLL \
+ SRC/MODULES/CHANMODES/REGONLY.DLL \
+ SRC/MODULES/CHANMODES/REGONLYSPEAK.DLL \
+ SRC/MODULES/CHANMODES/SECUREONLY.DLL \
+ SRC/MODULES/CHANMODES/STRIPCOLOR.DLL \
+ SRC/MODULES/CHANMODES/HISTORY.DLL \
+ SRC/MODULES/USERMODES/CENSOR.DLL \
+ SRC/MODULES/USERMODES/NOCTCP.DLL \
+ SRC/MODULES/USERMODES/BOT.DLL \
+ SRC/MODULES/USERMODES/SERVICEBOT.DLL \
+ SRC/MODULES/USERMODES/SHOWWHOIS.DLL \
+ SRC/MODULES/USERMODES/PRIVACY.DLL \
+ SRC/MODULES/USERMODES/NOKICK.DLL \
+ SRC/MODULES/USERMODES/REGONLYMSG.DLL \
+ SRC/MODULES/USERMODES/PRIVDEAF.DLL \
+ SRC/MODULES/USERMODES/SECUREONLYMSG.DLL \
+ SRC/MODULES/SNOMASKS/DCCREJECT.DLL \
+ SRC/MODULES/EXTBANS/ACCOUNT.DLL \
+ SRC/MODULES/EXTBANS/INCHANNEL.DLL \
+ SRC/MODULES/EXTBANS/JOIN.DLL \
+ SRC/MODULES/EXTBANS/NICKCHANGE.DLL \
+ SRC/MODULES/EXTBANS/QUIET.DLL \
+ SRC/MODULES/EXTBANS/REALNAME.DLL \
+ SRC/MODULES/EXTBANS/OPERCLASS.DLL \
+ SRC/MODULES/EXTBANS/CERTFP.DLL \
+ SRC/MODULES/EXTBANS/TEXTBAN.DLL \
+ SRC/MODULES/EXTBANS/MSGBYPASS.DLL \
+ SRC/MODULES/EXTBANS/TIMEDBAN.DLL \
+ SRC/MODULES/EXTBANS/PARTMSG.DLL \
+ SRC/MODULES/MESSAGE-TAGS.DLL \
+ SRC/MODULES/BATCH.DLL \
+ SRC/MODULES/ACCOUNT-TAG.DLL \
+ SRC/MODULES/LABELED-RESPONSE.DLL \
+ SRC/MODULES/LINK-SECURITY.DLL \
+ SRC/MODULES/MESSAGE-IDS.DLL \
+ SRC/MODULES/PLAINTEXT-POLICY.DLL \
+ SRC/MODULES/SERVER-TIME.DLL \
+ SRC/MODULES/STS.DLL \
+ SRC/MODULES/TKLDB.DLL \
+ SRC/MODULES/CHANNELDB.DLL \
+ SRC/MODULES/HISTORY_BACKEND_MEM.DLL \
+ SRC/MODULES/HISTORY_BACKEND_NULL.DLL \
+ SRC/MODULES/RESTRICT-COMMANDS.DLL \
+ SRC/MODULES/RMTKL.DLL \
+ SRC/MODULES/ECHO-MESSAGE.DLL \
+ SRC/MODULES/REQUIRE-MODULE.DLL \
+ SRC/MODULES/IDENT_LOOKUP.DLL
+
+
+ALL: CONF UNREALSVC.EXE UnrealIRCd.exe MODULES 
+
+CLEAN:
+        -@erase *.obj >NUL
+        -@erase src\*.obj >NUL
+        -@erase src\win.res >NUL
+        -@erase src\version.c >NUL
+        -@erase src\windows\*.obj >NUL
+	-@erase src\modules\*.obj >NUL
+	-@erase src\modules\*.lib >NUL
+	-@erase src\modules\*.pdb >NUL
+	-@erase src\modules\*.dll >NUL
+	-@erase src\modules\*.exp >NUL
+	-@erase src\modules\*.ilk >NUL
+	-@erase src\modules\chanmodes\*.obj >NUL
+	-@erase src\modules\chanmodes\*.lib >NUL
+	-@erase src\modules\chanmodes\*.pdb >NUL
+	-@erase src\modules\chanmodes\*.dll >NUL
+	-@erase src\modules\chanmodes\*.exp >NUL
+	-@erase src\modules\chanmodes\*.ilk >NUL
+	-@erase src\modules\usermodes\*.obj >NUL
+	-@erase src\modules\usermodes\*.lib >NUL
+	-@erase src\modules\usermodes\*.pdb >NUL
+	-@erase src\modules\usermodes\*.dll >NUL
+	-@erase src\modules\usermodes\*.exp >NUL
+	-@erase src\modules\usermodes\*.ilk >NUL
+	-@erase src\modules\snomasks\*.obj >NUL
+	-@erase src\modules\snomasks\*.lib >NUL
+	-@erase src\modules\snomasks\*.pdb >NUL
+	-@erase src\modules\snomasks\*.dll >NUL
+	-@erase src\modules\snomasks\*.exp >NUL
+	-@erase src\modules\snomasks\*.ilk >NUL
+	-@erase src\modules\extbans\*.obj >NUL
+	-@erase src\modules\extbans\*.lib >NUL
+	-@erase src\modules\extbans\*.pdb >NUL
+	-@erase src\modules\extbans\*.dll >NUL
+	-@erase src\modules\extbans\*.exp >NUL
+	-@erase src\modules\extbans\*.ilk >NUL
+        -@erase .\*.exe >NUL
+	-@erase UnrealIRCd.lib >NUL
+
+./UNREALSVC.EXE: SRC/UNREALSVC.OBJ SRC/WINDOWS/UNREALSVC.RES