mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-06 07:53:14 +02:00
Move to new directory structure, require 'make install'. (Not complete. Work in progress!)
This commit is contained in:
@@ -59,8 +59,16 @@ fi
|
||||
if [ "$PREFIXAQ" != "1" ]; then
|
||||
ARG="$ARG--disable-prefixaq "
|
||||
fi
|
||||
ARG="$ARG--with-dpath=$DPATH "
|
||||
ARG="$ARG--with-spath=$SPATH "
|
||||
|
||||
ARG="$ARG--with-bindir=$BINDIR "
|
||||
ARG="$ARG--with-datadir=$DATADIR "
|
||||
ARG="$ARG--with-confdir=$CONFDIR "
|
||||
ARG="$ARG--with-modulesdir=$MODULESDIR "
|
||||
ARG="$ARG--with-logdir=$LOGDIR "
|
||||
ARG="$ARG--with-cachedir=$CACHEDIR "
|
||||
ARG="$ARG--with-docdir=$DOCDIR "
|
||||
ARG="$ARG--with-tmpdir=$TMPDIR "
|
||||
|
||||
ARG="$ARG--with-nick-history=$NICKNAMEHISTORYLENGTH "
|
||||
ARG="$ARG--with-sendq=$MAXSENDQLENGTH "
|
||||
ARG="$ARG--with-permissions=$DEFPERM "
|
||||
@@ -330,8 +338,7 @@ done
|
||||
c=""
|
||||
n=""
|
||||
UNREALCWD="`pwd`"
|
||||
DPATH="`pwd`"
|
||||
SPATH="`pwd`/src/ircd"
|
||||
BASEPATH="$HOME/unrealircd"
|
||||
DEFPERM="0600"
|
||||
CRYPTOIRCD="1"
|
||||
SSLDIR=""
|
||||
@@ -423,38 +430,30 @@ clear
|
||||
clear
|
||||
fi
|
||||
|
||||
TEST="$DPATH"
|
||||
echo "We will now ask you a number of questions."
|
||||
echo "You can just press ENTER to accept the defaults!"
|
||||
|
||||
TEST="$BASEPATH"
|
||||
echo ""
|
||||
echo "What directory are all the server configuration files in?"
|
||||
echo "In what directory do you want to install UnrealIRCd?"
|
||||
echo "(Note: in Unreal3.4.x you should always install somewhere)"
|
||||
echo $n "[$TEST] -> $c"
|
||||
read cc
|
||||
if [ -z "$cc" ] ; then
|
||||
DPATH=$TEST
|
||||
BASEPATH=$TEST
|
||||
else
|
||||
DPATH=`eval echo $cc` # modified
|
||||
BASEPATH=`eval echo $cc` # modified
|
||||
fi
|
||||
|
||||
TEST=""
|
||||
SAVEME="$SPATH"
|
||||
while [ -z "$TEST" ] ; do
|
||||
TEST="$SAVEME"
|
||||
echo ""
|
||||
echo "What is the path to the ircd binary including the name of the binary?"
|
||||
echo $n "[$TEST] -> $c"
|
||||
read cc
|
||||
if [ -z "$cc" ] ; then
|
||||
SPATH=$TEST
|
||||
else
|
||||
SPATH=`eval echo $cc` # modified
|
||||
fi
|
||||
if [ "$SPATH" = "$DPATH" ]; then
|
||||
echo ""
|
||||
echo "You need to specify the path to the BINARY, not to a directory."
|
||||
echo "The answer to this question can never be identical to the previous one."
|
||||
echo "HINT: perhaps you want $DPATH/ircd ?"
|
||||
TEST=""
|
||||
fi
|
||||
done
|
||||
# TODO: For -advanced we could prompt the user.
|
||||
BINDIR="$BASEPATH/bin"
|
||||
DATADIR="$BASEPATH/data"
|
||||
CONFDIR="$BASEPATH/conf"
|
||||
MODULESDIR="$BASEPATH/modules"
|
||||
LOGDIR="$BASEPATH/logs"
|
||||
CACHEDIR="$BASEPATH/cache"
|
||||
DOCDIR="$BASEPATH/doc"
|
||||
TMPDIR="$BASEPATH/tmp"
|
||||
|
||||
TEST=""
|
||||
while [ -z "$TEST" ] ; do
|
||||
|
||||
+55
-35
@@ -151,19 +151,10 @@ build: Makefile
|
||||
echo "Building $$i";\
|
||||
( cd $$i; ${MAKE} ${MAKEARGS} build; ) \
|
||||
done
|
||||
@echo ' __________________________________________________ '
|
||||
@echo '| Compile is now complete. |'
|
||||
@echo '| You should now read the documentation and learn |'
|
||||
@echo '| how to configure your IRCd. |'
|
||||
@echo '| |'
|
||||
@echo '| If you really like UnrealIRCd, and would like to |'
|
||||
@echo '| make a donation, please read the Donation file in|'
|
||||
@echo '| this archive. :) |'
|
||||
@echo '| |'
|
||||
@echo '| Thanks for using Unreal IRCd! If you are in need |'
|
||||
@echo '| for any kind of help regarding the IRCd please |'
|
||||
@echo '| read the Unreal.nfo file. |'
|
||||
@echo '|__________________________________________________|'
|
||||
@echo ''
|
||||
@echo '* UnrealIRCd compiled succesfully'
|
||||
@echo '* YOU ARE NOT DONE YET! Run "make install" to install UnrealIRCd !'
|
||||
@echo ''
|
||||
|
||||
clean:
|
||||
$(RM) -f *~ \#* core *.orig include/*.orig
|
||||
@@ -181,7 +172,7 @@ cleandir: clean
|
||||
distclean: cleandir
|
||||
rm -rf extras/*.bak extras/regexp extras/*.tar extras/c-ares
|
||||
rm -rf extras/c-ares-* extras/tre-*
|
||||
rm -rf config.log config.settings *.pem ircd.* unreal
|
||||
rm -rf config.log config.settings *.pem ircd.* unrealircd
|
||||
rm -rf Makefile config.status
|
||||
|
||||
makex:
|
||||
@@ -210,30 +201,59 @@ depend:
|
||||
done
|
||||
|
||||
install: all
|
||||
$(INSTALL) -m 0700 -d $(IRCDDIR)
|
||||
$(INSTALL) -m 0700 src/ircd $(BINDIR) 2>/dev/null || { $(INSTALL) -m 0700 -d "$$(dirname '$(BINDIR)')"; $(INSTALL) -m 0700 src/ircd $(BINDIR); }
|
||||
$(INSTALL) -m 0700 -d $(IRCDDIR)/doc
|
||||
$(INSTALL) -m 0600 doc/Authors doc/example.conf doc/coding-guidelines doc/tao.of.irc doc/unreal32docs.html $(IRCDDIR)/doc
|
||||
$(INSTALL) -m 0700 -d $(IRCDDIR)/aliases
|
||||
$(INSTALL) -m 0600 aliases/*.conf $(IRCDDIR)/aliases
|
||||
$(INSTALL) -m 0600 doc/example.conf $(IRCDDIR)/unrealircd.conf
|
||||
$(INSTALL) -m 0600 spamfilter.conf dccallow.conf modules.conf $(IRCDDIR)
|
||||
$(INSTALL) -m 0600 badwords.*.conf help.conf LICENSE Donation $(IRCDDIR)
|
||||
$(INSTALL) -m 0700 unreal $(IRCDDIR)
|
||||
$(INSTALL) -m 0700 -d $(IRCDDIR)/modules
|
||||
$(INSTALL) -m 0700 src/modules/*.so $(IRCDDIR)/modules
|
||||
$(INSTALL) -m 0700 -d $(IRCDDIR)/ircdcron
|
||||
$(INSTALL) -m 0600 ircdcron/ircd.cron $(IRCDDIR)/ircdcron
|
||||
$(INSTALL) -m 0700 ircdcron/ircdchk $(IRCDDIR)/ircdcron
|
||||
-@if [ ! -f "$(IRCDDIR)/curl-ca-bundle.crt" ] ; then \
|
||||
$(INSTALL) -m 0700 curl-ca-bundle.crt $(IRCDDIR) ; \
|
||||
$(INSTALL) -m 0700 -d @BINDIR@
|
||||
$(INSTALL) -m 0700 src/ircd @BINDIR@/unrealircd
|
||||
$(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 0700 -d @CONFDIR@/aliases
|
||||
$(INSTALL) -m 0600 doc/conf/aliases/*.conf @CONFDIR@/aliases
|
||||
$(INSTALL) -m 0700 -d @CONFDIR@/ssl
|
||||
$(INSTALL) -m 0600 doc/conf/ssl/curl-ca-bundle.crt @CONFDIR@/ssl
|
||||
$(INSTALL) -m 0700 unrealircd @SCRIPTDIR@
|
||||
$(INSTALL) -m 0700 -d @MODULESDIR@
|
||||
$(INSTALL) -m 0700 src/modules/*.so @MODULESDIR@
|
||||
$(INSTALL) -m 0700 -d @MODULESDIR@/usermodes
|
||||
$(INSTALL) -m 0700 src/modules/usermodes/*.so @MODULESDIR@/usermodes
|
||||
$(INSTALL) -m 0700 -d @MODULESDIR@/chanmodes
|
||||
$(INSTALL) -m 0700 src/modules/chanmodes/*.so @MODULESDIR@/chanmodes
|
||||
$(INSTALL) -m 0700 -d @MODULESDIR@/extbans
|
||||
$(INSTALL) -m 0700 src/modules/extbans/*.so @MODULESDIR@/extbans
|
||||
$(INSTALL) -m 0700 -d @TMPDIR@
|
||||
$(INSTALL) -m 0700 -d @CACHEDIR@
|
||||
$(INSTALL) -m 0700 -d @DATADIR@
|
||||
$(INSTALL) -m 0700 -d @LOGDIR@
|
||||
# TODO: ircdcron.. where?
|
||||
-@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 ; \
|
||||
fi
|
||||
-@if [ server.cert.pem -nt "$(IRCDDIR)/server.cert.pem" ] ; then \
|
||||
$(INSTALL) -m 0600 server.req.pem $(IRCDDIR) ; \
|
||||
$(INSTALL) -m 0600 server.key.pem $(IRCDDIR) ; \
|
||||
$(INSTALL) -m 0600 server.cert.pem $(IRCDDIR) ; \
|
||||
@echo ''
|
||||
@echo '* UnrealIRCd is now installed.'
|
||||
|
||||
-@if [ "@SCRIPTDIR@/bin" = "@BINDIR@" ] ; then \
|
||||
echo '* Leave this directory and run "cd @SCRIPTDIR@" now' ; \
|
||||
fi
|
||||
@echo '* Directory layout:'
|
||||
-@if [ "@SCRIPTDIR@/bin" = "@BINDIR@" ] ; then \
|
||||
echo ' * Base directory: @SCRIPTDIR@' ; \
|
||||
fi
|
||||
@echo ' * Configuration files: @CONFDIR@'
|
||||
@echo ' * Log files: @LOGDIR@'
|
||||
@echo ' * Modules: @MODULESDIR@'
|
||||
@echo '* To start/stop UnrealIRCd run: @SCRIPTDIR@/unrealircd"'
|
||||
@echo ''
|
||||
@echo '* Consult the documentation online at:'
|
||||
@echo ' * https://www.unrealircd.org/docs/UnrealIRCd_3.4.x_documentation'
|
||||
@echo ' * https://www.unrealircd.org/docs/FAQ'
|
||||
@echo ''
|
||||
-@if [ "@SCRIPTDIR@/bin" = "@BINDIR@" ] ; then \
|
||||
echo 'Again, be sure to change to the @SCRIPTDIR@ directory!' ; \
|
||||
fi
|
||||
|
||||
### TODO: all the stuff below ;) ###
|
||||
pem: src/ssl.cnf
|
||||
@echo "Generating certificate request .. "
|
||||
$(OPENSSLPATH) req -new \
|
||||
|
||||
@@ -648,8 +648,16 @@ PKG_CONFIG
|
||||
TRE_LIBS
|
||||
TRE_CFLAGS
|
||||
FD_SETSIZE
|
||||
PIDFILE
|
||||
DOCDIR
|
||||
DATADIR
|
||||
TMPDIR
|
||||
CACHEDIR
|
||||
LOGDIR
|
||||
MODULESDIR
|
||||
CONFDIR
|
||||
SCRIPTDIR
|
||||
BINDIR
|
||||
IRCDDIR
|
||||
MODULEFLAGS
|
||||
CRYPTOLIB
|
||||
STRTOUL
|
||||
@@ -719,9 +727,17 @@ enable_option_checking
|
||||
with_nick_history
|
||||
with_sendq
|
||||
with_permissions
|
||||
with_dpath
|
||||
with_bindir
|
||||
with_scriptdir
|
||||
with_confdir
|
||||
with_modulesdir
|
||||
with_logdir
|
||||
with_cachedir
|
||||
with_tmpdir
|
||||
with_datadir
|
||||
with_docdir
|
||||
with_pidfile
|
||||
with_fd_setsize
|
||||
with_spath
|
||||
enable_prefixaq
|
||||
with_showlistmodes
|
||||
with_topicisnuhost
|
||||
@@ -1388,10 +1404,21 @@ Optional Packages:
|
||||
--with-permissions=permissions
|
||||
Specify the default permissions for configuration
|
||||
files
|
||||
--with-dpath=path Specify the path where configuration files are
|
||||
--with-bindir=path Specify the directory for the unrealircd binary
|
||||
--with-scriptdir=path Specify the directory for the unrealircd start-stop
|
||||
script
|
||||
--with-confdir=path Specify the directory where configuration files are
|
||||
stored
|
||||
--with-modulesdir=path Specify the directory for loadable modules
|
||||
--with-logdir=path Specify the directory where log files are stored
|
||||
--with-cachedir=path Specify the directory where cached files are stored
|
||||
--with-tmpdir=path Specify the directory where private temporary files
|
||||
are stored. Should not be readable or writable by
|
||||
others, so not /tmp!!
|
||||
--with-datadir=path Specify the directory where permanent data is stored
|
||||
--with-docdir=path Specify the directory where documentation is stored
|
||||
--with-pidfile=path Specify the path of the pid file
|
||||
--with-fd-setsize=size Specify the max file descriptors to use
|
||||
--with-spath Specify the location of the executable
|
||||
--with-showlistmodes Specify whether modes are shown in /list
|
||||
--with-topicisnuhost Display nick!user@host as the topic setter
|
||||
--with-shunnotices Notify a user when he/she is no longer shunned
|
||||
@@ -6064,25 +6091,208 @@ $as_echo "#define DEFAULT_PERMISSIONS 0600" >>confdefs.h
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --with-dpath was given.
|
||||
if test "${with_dpath+set}" = set; then :
|
||||
withval=$with_dpath;
|
||||
|
||||
# Check whether --with-bindir was given.
|
||||
if test "${with_bindir+set}" = set; then :
|
||||
withval=$with_bindir;
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define DPATH "$withval"
|
||||
#define BINDIR "$withval"
|
||||
_ACEOF
|
||||
|
||||
IRCDDIR="$withval"
|
||||
BINDIR="$withval"
|
||||
else
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define DPATH "`pwd`"
|
||||
#define BINDIR "$HOME/unrealircd/bin"
|
||||
_ACEOF
|
||||
|
||||
IRCDDIR="`pwd`"
|
||||
BINDIR="$HOME/unrealircd/bin"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-scriptdir was given.
|
||||
if test "${with_scriptdir+set}" = set; then :
|
||||
withval=$with_scriptdir;
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define SCRIPTDIR "$withval"
|
||||
_ACEOF
|
||||
|
||||
SCRIPTDIR="$withval"
|
||||
else
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define SCRIPTDIR "$HOME/unrealircd"
|
||||
_ACEOF
|
||||
|
||||
SCRIPTDIR="$HOME/unrealircd"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-confdir was given.
|
||||
if test "${with_confdir+set}" = set; then :
|
||||
withval=$with_confdir;
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define CONFDIR "$withval"
|
||||
_ACEOF
|
||||
|
||||
CONFDIR="$withval"
|
||||
else
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define CONFDIR "$HOME/unrealircd/conf"
|
||||
_ACEOF
|
||||
|
||||
CONFDIR="$HOME/unrealircd/conf"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-modulesdir was given.
|
||||
if test "${with_modulesdir+set}" = set; then :
|
||||
withval=$with_modulesdir;
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define MODULESDIR "$withval"
|
||||
_ACEOF
|
||||
|
||||
MODULESDIR="$withval"
|
||||
else
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define MODULESDIR "$HOME/unrealircd/modules"
|
||||
_ACEOF
|
||||
|
||||
MODULESDIR="$HOME/unrealircd/modules"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-logdir was given.
|
||||
if test "${with_logdir+set}" = set; then :
|
||||
withval=$with_logdir;
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define LOGDIR "$withval"
|
||||
_ACEOF
|
||||
|
||||
LOGDIR="$withval"
|
||||
else
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define LOGDIR "$HOME/unrealircd/logs"
|
||||
_ACEOF
|
||||
|
||||
LOGDIR="$HOME/unrealircd/logs"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-cachedir was given.
|
||||
if test "${with_cachedir+set}" = set; then :
|
||||
withval=$with_cachedir;
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define CACHEDIR "$withval"
|
||||
_ACEOF
|
||||
|
||||
CACHEDIR="$withval"
|
||||
else
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define CACHEDIR "$HOME/unrealircd/cache"
|
||||
_ACEOF
|
||||
|
||||
CACHEDIR="$HOME/unrealircd/cache"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-tmpdir was given.
|
||||
if test "${with_tmpdir+set}" = set; then :
|
||||
withval=$with_tmpdir;
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define TMPDIR "$withval"
|
||||
_ACEOF
|
||||
|
||||
TMPDIR="$withval"
|
||||
else
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define TMPDIR "$HOME/unrealircd/tmp"
|
||||
_ACEOF
|
||||
|
||||
TMPDIR="$HOME/unrealircd/tmp"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-datadir was given.
|
||||
if test "${with_datadir+set}" = set; then :
|
||||
withval=$with_datadir;
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define DATADIR "$withval"
|
||||
_ACEOF
|
||||
|
||||
DATADIR="$withval"
|
||||
else
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define DATADIR "$HOME/unrealircd/data"
|
||||
_ACEOF
|
||||
|
||||
DATADIR="$HOME/unrealircd/data"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-docdir was given.
|
||||
if test "${with_docdir+set}" = set; then :
|
||||
withval=$with_docdir;
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define DOCDIR "$withval"
|
||||
_ACEOF
|
||||
|
||||
DOCDIR="$withval"
|
||||
else
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define DOCDIR "$HOME/unrealircd/doc"
|
||||
_ACEOF
|
||||
|
||||
DOCDIR="$HOME/unrealircd/doc"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-pidfile was given.
|
||||
if test "${with_pidfile+set}" = set; then :
|
||||
withval=$with_pidfile;
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define PIDFILE "$withval"
|
||||
_ACEOF
|
||||
|
||||
PIDFILE="$withval"
|
||||
else
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define PIDFILE "$HOME/unrealircd/data/ircd.pid"
|
||||
_ACEOF
|
||||
|
||||
PIDFILE="$HOME/unrealircd/data/ircd.pid"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --with-fd-setsize was given.
|
||||
if test "${with_fd_setsize+set}" = set; then :
|
||||
withval=$with_fd_setsize; ac_fd=$withval
|
||||
@@ -6096,25 +6306,6 @@ cat >>confdefs.h <<_ACEOF
|
||||
_ACEOF
|
||||
|
||||
|
||||
|
||||
# Check whether --with-spath was given.
|
||||
if test "${with_spath+set}" = set; then :
|
||||
withval=$with_spath;
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define SPATH "$withval"
|
||||
_ACEOF
|
||||
|
||||
BINDIR="$withval"
|
||||
else
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define SPATH "`pwd`/src/ircd"
|
||||
_ACEOF
|
||||
|
||||
BINDIR="`pwd`/src/ircd"
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-prefixaq was given.
|
||||
if test "${enable_prefixaq+set}" = set; then :
|
||||
enableval=$enable_prefixaq;
|
||||
@@ -6518,8 +6709,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if FD_SETSIZE is large enough to allow $ac_fd file descriptors" >&5
|
||||
$as_echo_n "checking if FD_SETSIZE is large enough to allow $ac_fd file descriptors... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
@@ -7798,7 +7987,7 @@ fi
|
||||
UNRLINCDIR="`pwd`/include"
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makefile src/modules/Makefile src/modules/chanmodes/Makefile src/modules/usermodes/Makefile src/modules/extbans/Makefile unreal ircdcron/ircdchk ircdcron/ircd.cron"
|
||||
ac_config_files="$ac_config_files Makefile src/modules/Makefile src/modules/chanmodes/Makefile src/modules/usermodes/Makefile src/modules/extbans/Makefile unrealircd ircdcron/ircdchk ircdcron/ircd.cron"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@@ -8496,7 +8685,7 @@ do
|
||||
"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/extbans/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/extbans/Makefile" ;;
|
||||
"unreal") CONFIG_FILES="$CONFIG_FILES unreal" ;;
|
||||
"unrealircd") CONFIG_FILES="$CONFIG_FILES unrealircd" ;;
|
||||
"ircdcron/ircdchk") CONFIG_FILES="$CONFIG_FILES ircdcron/ircdchk" ;;
|
||||
"ircdcron/ircd.cron") CONFIG_FILES="$CONFIG_FILES ircdcron/ircd.cron" ;;
|
||||
|
||||
@@ -9080,5 +9269,5 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
|
||||
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
|
||||
fi
|
||||
|
||||
chmod 0700 unreal
|
||||
chmod 0700 unrealircd
|
||||
chmod 0700 ircdcron/ircdchk
|
||||
|
||||
+73
-17
@@ -466,25 +466,83 @@ configuration files])],
|
||||
dnl (#3189)
|
||||
[AC_DEFINE_UNQUOTED([DEFAULT_PERMISSIONS], [0$withval], [The default permissions for configuration files. Set to 0 to prevent unrealircd from calling chmod() on the files.])],
|
||||
[AC_DEFINE([DEFAULT_PERMISSIONS], [0600], [The default permissions for configuration files. Set to 0 to prevent unrealircd from calling chmod() on the files.])])
|
||||
AC_ARG_WITH(dpath, [AS_HELP_STRING([--with-dpath=path],[Specify the path where configuration files are stored])],
|
||||
[AC_DEFINE_UNQUOTED([DPATH], ["$withval"], [Define the location of the configuration files])
|
||||
IRCDDIR="$withval"],
|
||||
[AC_DEFINE_UNQUOTED([DPATH], ["`pwd`"], [Define the location of the configuration files])
|
||||
IRCDDIR="`pwd`"])
|
||||
|
||||
AC_ARG_WITH(bindir, [AS_HELP_STRING([--with-bindir=path],[Specify the directory for the unrealircd binary])],
|
||||
[AC_DEFINE_UNQUOTED([BINDIR], ["$withval"], [Define the directory where the unrealircd binary is located])
|
||||
BINDIR="$withval"],
|
||||
[AC_DEFINE_UNQUOTED([BINDIR], ["$HOME/unrealircd/bin"], [Define the directory where the unrealircd binary is located])
|
||||
BINDIR="$HOME/unrealircd/bin"])
|
||||
|
||||
AC_ARG_WITH(scriptdir, [AS_HELP_STRING([--with-scriptdir=path],[Specify the directory for the unrealircd start-stop script])],
|
||||
[AC_DEFINE_UNQUOTED([SCRIPTDIR], ["$withval"], [Define the directory where the unrealircd start stop scripts is located])
|
||||
SCRIPTDIR="$withval"],
|
||||
[AC_DEFINE_UNQUOTED([SCRIPTDIR], ["$HOME/unrealircd"], [Define the directory where the unrealircd start stop scripts is located])
|
||||
SCRIPTDIR="$HOME/unrealircd"])
|
||||
|
||||
AC_ARG_WITH(confdir, [AS_HELP_STRING([--with-confdir=path],[Specify the directory where configuration files are stored])],
|
||||
[AC_DEFINE_UNQUOTED([CONFDIR], ["$withval"], [Define the location of the configuration files])
|
||||
CONFDIR="$withval"],
|
||||
[AC_DEFINE_UNQUOTED([CONFDIR], ["$HOME/unrealircd/conf"], [Define the location of the configuration files])
|
||||
CONFDIR="$HOME/unrealircd/conf"])
|
||||
|
||||
AC_ARG_WITH(modulesdir, [AS_HELP_STRING([--with-modulesdir=path],[Specify the directory for loadable modules])],
|
||||
[AC_DEFINE_UNQUOTED([MODULESDIR], ["$withval"], [Define the location of the modules])
|
||||
MODULESDIR="$withval"],
|
||||
[AC_DEFINE_UNQUOTED([MODULESDIR], ["$HOME/unrealircd/modules"], [Define the location of the modules])
|
||||
MODULESDIR="$HOME/unrealircd/modules"])
|
||||
|
||||
AC_ARG_WITH(logdir, [AS_HELP_STRING([--with-logdir=path],[Specify the directory where log files are stored])],
|
||||
[AC_DEFINE_UNQUOTED([LOGDIR], ["$withval"], [Define the location of the log files])
|
||||
LOGDIR="$withval"],
|
||||
[AC_DEFINE_UNQUOTED([LOGDIR], ["$HOME/unrealircd/logs"], [Define the location of the log files])
|
||||
LOGDIR="$HOME/unrealircd/logs"])
|
||||
|
||||
AC_ARG_WITH(cachedir, [AS_HELP_STRING([--with-cachedir=path],[Specify the directory where cached files are stored])],
|
||||
[AC_DEFINE_UNQUOTED([CACHEDIR], ["$withval"], [Define the location of the cached remote include files])
|
||||
CACHEDIR="$withval"],
|
||||
[AC_DEFINE_UNQUOTED([CACHEDIR], ["$HOME/unrealircd/cache"], [Define the location of the cached remote include files])
|
||||
CACHEDIR="$HOME/unrealircd/cache"])
|
||||
|
||||
AC_ARG_WITH(tmpdir, [AS_HELP_STRING([--with-tmpdir=path],[Specify the directory where private temporary files are stored. Should not be readable or writable by others, so not /tmp!!])],
|
||||
[AC_DEFINE_UNQUOTED([TMPDIR], ["$withval"], [Define the location of private temporary files])
|
||||
TMPDIR="$withval"],
|
||||
[AC_DEFINE_UNQUOTED([TMPDIR], ["$HOME/unrealircd/tmp"], [Define the location of private temporary files])
|
||||
TMPDIR="$HOME/unrealircd/tmp"])
|
||||
|
||||
AC_ARG_WITH(datadir, [AS_HELP_STRING([--with-datadir=path],[Specify the directory where permanent data is stored])],
|
||||
[AC_DEFINE_UNQUOTED([DATADIR], ["$withval"], [Define the location of permanent data files])
|
||||
DATADIR="$withval"],
|
||||
[AC_DEFINE_UNQUOTED([DATADIR], ["$HOME/unrealircd/data"], [Define the location of permanent data files])
|
||||
DATADIR="$HOME/unrealircd/data"])
|
||||
|
||||
AC_ARG_WITH(docdir, [AS_HELP_STRING([--with-docdir=path],[Specify the directory where documentation is stored])],
|
||||
[AC_DEFINE_UNQUOTED([DOCDIR], ["$withval"], [Define the location of the documentation])
|
||||
DOCDIR="$withval"],
|
||||
[AC_DEFINE_UNQUOTED([DOCDIR], ["$HOME/unrealircd/doc"], [Define the location of the documentation])
|
||||
DOCDIR="$HOME/unrealircd/doc"])
|
||||
|
||||
AC_ARG_WITH(pidfile, [AS_HELP_STRING([--with-pidfile=path],[Specify the path of the pid file])],
|
||||
[AC_DEFINE_UNQUOTED([PIDFILE], ["$withval"], [Define the path of the pid file])
|
||||
PIDFILE="$withval"],
|
||||
[AC_DEFINE_UNQUOTED([PIDFILE], ["$HOME/unrealircd/data/ircd.pid"], [Define the path of the pid file])
|
||||
PIDFILE="$HOME/unrealircd/data/ircd.pid"])
|
||||
|
||||
AC_SUBST(BINDIR)
|
||||
AC_SUBST(SCRIPTDIR)
|
||||
AC_SUBST(CONFDIR)
|
||||
AC_SUBST(MODULESDIR)
|
||||
AC_SUBST(LOGDIR)
|
||||
AC_SUBST(CACHEDIR)
|
||||
AC_SUBST(TMPDIR)
|
||||
AC_SUBST(DATADIR)
|
||||
AC_SUBST(DOCDIR)
|
||||
AC_SUBST(PIDFILE)
|
||||
|
||||
AC_ARG_WITH(fd-setsize, [AS_HELP_STRING([--with-fd-setsize=size], [Specify the max file descriptors to use])],
|
||||
[ac_fd=$withval],
|
||||
[ac_fd=1024])
|
||||
AC_DEFINE_UNQUOTED([MAXCONNECTIONS], [$ac_fd], [Set to the max connections you want])
|
||||
|
||||
dnl It would be nice if this could just respect --bindir like every other
|
||||
dnl program does someday... -- ohnobinki
|
||||
AC_ARG_WITH(spath, [AS_HELP_STRING([--with-spath],[Specify the location of the executable])],
|
||||
[AC_DEFINE_UNQUOTED([SPATH], ["$withval"], [Define the location of the executable])
|
||||
BINDIR="$withval"],
|
||||
[AC_DEFINE_UNQUOTED([SPATH], ["`pwd`/src/ircd"], [Define the location of the executable])
|
||||
BINDIR="`pwd`/src/ircd"])
|
||||
|
||||
AC_ARG_ENABLE([prefixaq],
|
||||
[AS_HELP_STRING([--disable-prefixaq],[Enable chanadmin (+a) and chanowner (+q) prefixes])],
|
||||
[],
|
||||
@@ -527,8 +585,6 @@ AS_IF([test $enable_dynamic_linking = "yes"],
|
||||
AC_ARG_ENABLE([inet6], [AS_HELP_STRING([--enable-inet6], [Make the IRCd support IPv6])],
|
||||
[AS_IF([test $enableval = "yes"],
|
||||
[AC_ENABLE_INET6])])
|
||||
AC_SUBST(IRCDDIR)
|
||||
AC_SUBST(BINDIR)
|
||||
AC_MSG_CHECKING([if FD_SETSIZE is large enough to allow $ac_fd file descriptors])
|
||||
AC_COMPILE_IFELSE([
|
||||
#include <sys/types.h>
|
||||
@@ -735,9 +791,9 @@ AC_CONFIG_FILES([Makefile
|
||||
src/modules/chanmodes/Makefile
|
||||
src/modules/usermodes/Makefile
|
||||
src/modules/extbans/Makefile
|
||||
unreal
|
||||
unrealircd
|
||||
ircdcron/ircdchk
|
||||
ircdcron/ircd.cron])
|
||||
AC_OUTPUT
|
||||
chmod 0700 unreal
|
||||
chmod 0700 unrealircd
|
||||
chmod 0700 ircdcron/ircdchk
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
* Modules configuration stub... More work will be done on this later.
|
||||
*/
|
||||
|
||||
loadmodule "cloak";
|
||||
loadmodule "m_sethost";
|
||||
loadmodule "m_chghost";
|
||||
loadmodule "m_chgident";
|
||||
loadmodule "m_setname";
|
||||
loadmodule "m_setident";
|
||||
loadmodule "m_sdesc";
|
||||
loadmodule "m_svsmode";
|
||||
loadmodule "m_swhois";
|
||||
loadmodule "m_svsmotd";
|
||||
loadmodule "m_svsnline";
|
||||
loadmodule "m_who";
|
||||
loadmodule "m_mkpasswd";
|
||||
loadmodule "m_away";
|
||||
loadmodule "m_svsnoop";
|
||||
loadmodule "m_svso";
|
||||
loadmodule "m_svsnick";
|
||||
loadmodule "m_adminchat";
|
||||
loadmodule "m_chgname";
|
||||
loadmodule "m_guest";
|
||||
loadmodule "m_kill";
|
||||
loadmodule "m_lag";
|
||||
loadmodule "m_message";
|
||||
loadmodule "m_nachat";
|
||||
loadmodule "m_oper";
|
||||
loadmodule "m_pingpong";
|
||||
loadmodule "m_quit";
|
||||
loadmodule "m_rping";
|
||||
loadmodule "m_sendumode";
|
||||
loadmodule "m_sqline";
|
||||
loadmodule "m_tsctl";
|
||||
loadmodule "m_unkline";
|
||||
loadmodule "m_unsqline";
|
||||
loadmodule "m_unzline";
|
||||
loadmodule "m_whois";
|
||||
loadmodule "m_tkl";
|
||||
loadmodule "m_vhost";
|
||||
loadmodule "m_cycle";
|
||||
loadmodule "m_svsjoin";
|
||||
loadmodule "m_svspart";
|
||||
loadmodule "m_svswatch";
|
||||
loadmodule "m_svssilence";
|
||||
loadmodule "m_sendsno";
|
||||
loadmodule "m_svssno";
|
||||
loadmodule "m_sajoin";
|
||||
loadmodule "m_sapart";
|
||||
loadmodule "m_samode";
|
||||
loadmodule "m_kick";
|
||||
loadmodule "m_topic";
|
||||
loadmodule "m_invite";
|
||||
loadmodule "m_list";
|
||||
loadmodule "m_time";
|
||||
loadmodule "m_sjoin";
|
||||
loadmodule "m_svskill";
|
||||
loadmodule "m_pass";
|
||||
loadmodule "m_userhost";
|
||||
loadmodule "m_ison";
|
||||
loadmodule "m_silence";
|
||||
loadmodule "m_knock";
|
||||
loadmodule "m_umode2";
|
||||
loadmodule "m_squit";
|
||||
loadmodule "m_protoctl";
|
||||
loadmodule "m_addline";
|
||||
loadmodule "m_addomotd";
|
||||
loadmodule "m_wallops";
|
||||
loadmodule "m_admin";
|
||||
loadmodule "m_globops";
|
||||
loadmodule "m_locops";
|
||||
loadmodule "m_chatops";
|
||||
loadmodule "m_trace";
|
||||
loadmodule "m_netinfo";
|
||||
loadmodule "m_links";
|
||||
loadmodule "m_help";
|
||||
loadmodule "m_rules";
|
||||
loadmodule "m_close";
|
||||
loadmodule "m_map";
|
||||
loadmodule "m_eos";
|
||||
loadmodule "m_server";
|
||||
loadmodule "m_stats";
|
||||
loadmodule "m_svsfline";
|
||||
loadmodule "m_dccdeny";
|
||||
loadmodule "m_undccdeny";
|
||||
loadmodule "m_whowas";
|
||||
loadmodule "m_connect";
|
||||
loadmodule "m_dccallow";
|
||||
loadmodule "m_userip";
|
||||
loadmodule "m_nick";
|
||||
loadmodule "m_user";
|
||||
loadmodule "m_mode";
|
||||
loadmodule "m_watch";
|
||||
loadmodule "m_part";
|
||||
loadmodule "m_join";
|
||||
loadmodule "m_motd";
|
||||
loadmodule "m_opermotd";
|
||||
loadmodule "m_botmotd";
|
||||
loadmodule "m_lusers";
|
||||
loadmodule "m_names";
|
||||
loadmodule "m_svsnolag";
|
||||
loadmodule "m_addmotd";
|
||||
loadmodule "m_svslusers";
|
||||
loadmodule "m_starttls";
|
||||
loadmodule "m_nopost";
|
||||
loadmodule "m_cap";
|
||||
loadmodule "m_sasl";
|
||||
loadmodule "m_md";
|
||||
loadmodule "ssl_antidos";
|
||||
loadmodule "certfp";
|
||||
loadmodule "cap_invitenotify";
|
||||
loadmodule "webirc";
|
||||
|
||||
/*** Channel modes ***/
|
||||
loadmodule "chanmodes/jointhrottle"; /* +j */
|
||||
loadmodule "chanmodes/floodprot"; /* +f */
|
||||
loadmodule "chanmodes/nocolor"; /* +c */
|
||||
loadmodule "chanmodes/noctcp"; /* +C */
|
||||
loadmodule "chanmodes/stripcolor"; /* +S */
|
||||
loadmodule "chanmodes/issecure"; /* +Z */
|
||||
loadmodule "chanmodes/permanent"; /* +P */
|
||||
loadmodule "chanmodes/link"; /* +L */
|
||||
loadmodule "chanmodes/censor"; /* +G */
|
||||
loadmodule "chanmodes/delayjoin"; /* +D */
|
||||
loadmodule "chanmodes/noknock"; /* +K */
|
||||
loadmodule "chanmodes/noinvite"; /* +V */
|
||||
loadmodule "chanmodes/operonly"; /* +O */
|
||||
loadmodule "chanmodes/adminonly"; /* +A */
|
||||
loadmodule "chanmodes/nonotice"; /* +T */
|
||||
loadmodule "chanmodes/regonly"; /* +R */
|
||||
loadmodule "chanmodes/nonickchange"; /* +N */
|
||||
loadmodule "chanmodes/nokick"; /* +Q */
|
||||
loadmodule "chanmodes/regonlyspeak"; /* +M */
|
||||
loadmodule "chanmodes/secureonly"; /* +z */
|
||||
|
||||
|
||||
/*** User modes ***/
|
||||
loadmodule "usermodes/noctcp"; /* +T */
|
||||
loadmodule "usermodes/censor"; /* +G */
|
||||
|
||||
/*** Extended Bans ***/
|
||||
loadmodule "extbans/join"; /* +b ~j */
|
||||
loadmodule "extbans/quiet"; /* +b ~q */
|
||||
loadmodule "extbans/nickchange"; /* +b ~n */
|
||||
loadmodule "extbans/realname"; /* +b ~r */
|
||||
loadmodule "extbans/regnick"; /* +b ~R */
|
||||
loadmodule "extbans/account"; /* +b ~a */
|
||||
loadmodule "extbans/inchannel"; /* +b ~c */
|
||||
+3
-10
@@ -233,13 +233,7 @@
|
||||
/* #undef DEBUGMODE */
|
||||
|
||||
/*
|
||||
* Full pathnames and defaults of irc system's support files. Please note that
|
||||
* these are only the recommened names and paths. You must define PPATH if you
|
||||
* want a pidfile written. Also, IRCDTUNE should be defined because it is needed for
|
||||
* operation. All of these options are runtime-configurable (except for CPATH and LPATH)
|
||||
* in the files block of unrealircd.conf. CPATH is runtime-configurable as a command-
|
||||
* line argument. These used as the default values for options absent from the user's
|
||||
* unrealircd.conf.
|
||||
* Full pathnames and defaults of irc system's support files.
|
||||
*/
|
||||
#define CPATH "unrealircd.conf" /* server configuration file */
|
||||
#define MPATH "ircd.motd" /* server MOTD file */
|
||||
@@ -247,7 +241,6 @@
|
||||
#define RPATH "ircd.rules" /* server rules file */
|
||||
#define OPATH "oper.motd" /* Operators MOTD file */
|
||||
#define LPATH "debug.log" /* Where the debug file lives, if DEBUGMODE */
|
||||
#define PPATH "ircd.pid" /* file for server pid */
|
||||
#define VPATH "ircd.svsmotd" /* Services MOTD append. */
|
||||
#define BPATH "bot.motd" /* Bot MOTD */
|
||||
#define IRCDTUNE "ircd.tune" /* tuning .. */
|
||||
@@ -480,9 +473,9 @@
|
||||
/* ------------------------- END CONFIGURATION SECTION -------------------- */
|
||||
#define MOTD MPATH
|
||||
#define RULES RPATH
|
||||
#define MYNAME SPATH
|
||||
#define MYNAME BINDIR "/unrealircd"
|
||||
#define CONFIGFILE CPATH
|
||||
#define IRCD_PIDFILE PPATH
|
||||
#define IRCD_PIDFILE PIDFILE
|
||||
|
||||
#if defined(CHROOTDIR) && !defined(IRC_USER)
|
||||
#error "ERROR: It makes no sense to define CHROOTDIR but not IRC_USER and IRC_GROUP! Please define IRC_USER and IRC_GROUP properly as the user/group to change to."
|
||||
|
||||
+2
-2
@@ -207,8 +207,8 @@ extern MODVAR aConfiguration iConf;
|
||||
#define SASL_SERVER iConf.network.x_sasl_server
|
||||
#define iNAH iConf.network.x_inah
|
||||
#define prefix_quit iConf.network.x_prefix_quit
|
||||
#define SSL_SERVER_CERT_PEM (iConf.x_server_cert_pem ? iConf.x_server_cert_pem : "server.cert.pem")
|
||||
#define SSL_SERVER_KEY_PEM (iConf.x_server_key_pem ? iConf.x_server_key_pem : "server.key.pem")
|
||||
#define SSL_SERVER_CERT_PEM iConf.x_server_cert_pem
|
||||
#define SSL_SERVER_KEY_PEM iConf.x_server_key_pem
|
||||
|
||||
#define STATIC_QUIT iConf.static_quit
|
||||
#define STATIC_PART iConf.static_part
|
||||
|
||||
+29
-5
@@ -1,8 +1,17 @@
|
||||
/* include/setup.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define the directory where the unrealircd binary is located */
|
||||
#undef BINDIR
|
||||
|
||||
/* Define if you have BSD signals */
|
||||
#undef BSD_RELIABLE_SIGNALS
|
||||
|
||||
/* Define the location of the cached remote include files */
|
||||
#undef CACHEDIR
|
||||
|
||||
/* Define the location of the configuration files */
|
||||
#undef CONFDIR
|
||||
|
||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c' support on those systems.
|
||||
*/
|
||||
@@ -11,6 +20,9 @@
|
||||
/* Define to 1 if using `alloca.c'. */
|
||||
#undef C_ALLOCA
|
||||
|
||||
/* Define the location of permanent data files */
|
||||
#undef DATADIR
|
||||
|
||||
/* The default permissions for configuration files. Set to 0 to prevent
|
||||
unrealircd from calling chmod() on the files. */
|
||||
#undef DEFAULT_PERMISSIONS
|
||||
@@ -21,8 +33,8 @@
|
||||
/* Define if you want to disable /set* and /chg* */
|
||||
#undef DISABLE_USERMOD
|
||||
|
||||
/* Define the location of the configuration files */
|
||||
#undef DPATH
|
||||
/* Define the location of the documentation */
|
||||
#undef DOCDIR
|
||||
|
||||
/* Define if you can set the core size to unlimited */
|
||||
#undef FORCE_CORE
|
||||
@@ -205,6 +217,9 @@
|
||||
/* Define if you want modes shown in /list */
|
||||
#undef LIST_SHOW_MODES
|
||||
|
||||
/* Define the location of the log files */
|
||||
#undef LOGDIR
|
||||
|
||||
/* Define if rlim_t is long long */
|
||||
#undef LONG_LONG_RLIM_T
|
||||
|
||||
@@ -220,6 +235,9 @@
|
||||
/* Set to the max sendq you want */
|
||||
#undef MAXSENDQLENGTH
|
||||
|
||||
/* Define the location of the modules */
|
||||
#undef MODULESDIR
|
||||
|
||||
/* Define if you have O_NDELAY */
|
||||
#undef NBLOCK_BSD
|
||||
|
||||
@@ -292,6 +310,9 @@
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
#undef PARAMH
|
||||
|
||||
/* Define the path of the pid file */
|
||||
#undef PIDFILE
|
||||
|
||||
/* Define if you have POSIX signals */
|
||||
#undef POSIX_SIGNALS
|
||||
|
||||
@@ -305,6 +326,9 @@
|
||||
/* Define if you have the <sys/rusage.h> header file. */
|
||||
#undef RUSAGEH
|
||||
|
||||
/* Define the directory where the unrealircd start stop scripts is located */
|
||||
#undef SCRIPTDIR
|
||||
|
||||
/* Define to 1 if the `setpgrp' function takes no argument. */
|
||||
#undef SETPGRP_VOID
|
||||
|
||||
@@ -323,9 +347,6 @@
|
||||
/* The size of `short', as computed by sizeof. */
|
||||
#undef SIZEOF_SHORT
|
||||
|
||||
/* Define the location of the executable */
|
||||
#undef SPATH
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at runtime.
|
||||
@@ -365,6 +386,9 @@
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Define the location of private temporary files */
|
||||
#undef TMPDIR
|
||||
|
||||
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||
#undef TM_IN_SYS_TIME
|
||||
|
||||
|
||||
@@ -44,8 +44,12 @@
|
||||
#undef TIMES_2
|
||||
#undef GETRUSAGE_2
|
||||
#define HAVE_ALLOCA
|
||||
#define SPATH "."
|
||||
#define DPATH "."
|
||||
#define CONFDIR "conf"
|
||||
#define MODULESDIR "modules"
|
||||
#define LOGDIR "logs"
|
||||
#define DATADIR "data"
|
||||
#define CACHEDIR "cache"
|
||||
#define TMPDIR "tmp"
|
||||
#define NO_U_TYPES
|
||||
#define NEED_U_INT32_T
|
||||
#define PREFIX_AQ
|
||||
|
||||
-149
@@ -1,149 +0,0 @@
|
||||
/*
|
||||
* Modules configuration stub... More work will be done on this later.
|
||||
*/
|
||||
|
||||
loadmodule "modules/cloak";
|
||||
loadmodule "modules/m_sethost";
|
||||
loadmodule "modules/m_chghost";
|
||||
loadmodule "modules/m_chgident";
|
||||
loadmodule "modules/m_setname";
|
||||
loadmodule "modules/m_setident";
|
||||
loadmodule "modules/m_sdesc";
|
||||
loadmodule "modules/m_svsmode";
|
||||
loadmodule "modules/m_swhois";
|
||||
loadmodule "modules/m_svsmotd";
|
||||
loadmodule "modules/m_svsnline";
|
||||
loadmodule "modules/m_who";
|
||||
loadmodule "modules/m_mkpasswd";
|
||||
loadmodule "modules/m_away";
|
||||
loadmodule "modules/m_svsnoop";
|
||||
loadmodule "modules/m_svso";
|
||||
loadmodule "modules/m_svsnick";
|
||||
loadmodule "modules/m_adminchat";
|
||||
loadmodule "modules/m_chgname";
|
||||
loadmodule "modules/m_guest";
|
||||
loadmodule "modules/m_kill";
|
||||
loadmodule "modules/m_lag";
|
||||
loadmodule "modules/m_message";
|
||||
loadmodule "modules/m_nachat";
|
||||
loadmodule "modules/m_oper";
|
||||
loadmodule "modules/m_pingpong";
|
||||
loadmodule "modules/m_quit";
|
||||
loadmodule "modules/m_rping";
|
||||
loadmodule "modules/m_sendumode";
|
||||
loadmodule "modules/m_sqline";
|
||||
loadmodule "modules/m_tsctl";
|
||||
loadmodule "modules/m_unkline";
|
||||
loadmodule "modules/m_unsqline";
|
||||
loadmodule "modules/m_unzline";
|
||||
loadmodule "modules/m_whois";
|
||||
loadmodule "modules/m_tkl";
|
||||
loadmodule "modules/m_vhost";
|
||||
loadmodule "modules/m_cycle";
|
||||
loadmodule "modules/m_svsjoin";
|
||||
loadmodule "modules/m_svspart";
|
||||
loadmodule "modules/m_svswatch";
|
||||
loadmodule "modules/m_svssilence";
|
||||
loadmodule "modules/m_sendsno";
|
||||
loadmodule "modules/m_svssno";
|
||||
loadmodule "modules/m_sajoin";
|
||||
loadmodule "modules/m_sapart";
|
||||
loadmodule "modules/m_samode";
|
||||
loadmodule "modules/m_kick";
|
||||
loadmodule "modules/m_topic";
|
||||
loadmodule "modules/m_invite";
|
||||
loadmodule "modules/m_list";
|
||||
loadmodule "modules/m_time";
|
||||
loadmodule "modules/m_sjoin";
|
||||
loadmodule "modules/m_svskill";
|
||||
loadmodule "modules/m_pass";
|
||||
loadmodule "modules/m_userhost";
|
||||
loadmodule "modules/m_ison";
|
||||
loadmodule "modules/m_silence";
|
||||
loadmodule "modules/m_knock";
|
||||
loadmodule "modules/m_umode2";
|
||||
loadmodule "modules/m_squit";
|
||||
loadmodule "modules/m_protoctl";
|
||||
loadmodule "modules/m_addline";
|
||||
loadmodule "modules/m_addomotd";
|
||||
loadmodule "modules/m_wallops";
|
||||
loadmodule "modules/m_admin";
|
||||
loadmodule "modules/m_globops";
|
||||
loadmodule "modules/m_locops";
|
||||
loadmodule "modules/m_chatops";
|
||||
loadmodule "modules/m_trace";
|
||||
loadmodule "modules/m_netinfo";
|
||||
loadmodule "modules/m_links";
|
||||
loadmodule "modules/m_help";
|
||||
loadmodule "modules/m_rules";
|
||||
loadmodule "modules/m_close";
|
||||
loadmodule "modules/m_map";
|
||||
loadmodule "modules/m_eos";
|
||||
loadmodule "modules/m_server";
|
||||
loadmodule "modules/m_stats";
|
||||
loadmodule "modules/m_svsfline";
|
||||
loadmodule "modules/m_dccdeny";
|
||||
loadmodule "modules/m_undccdeny";
|
||||
loadmodule "modules/m_whowas";
|
||||
loadmodule "modules/m_connect";
|
||||
loadmodule "modules/m_dccallow";
|
||||
loadmodule "modules/m_userip";
|
||||
loadmodule "modules/m_nick";
|
||||
loadmodule "modules/m_user";
|
||||
loadmodule "modules/m_mode";
|
||||
loadmodule "modules/m_watch";
|
||||
loadmodule "modules/m_part";
|
||||
loadmodule "modules/m_join";
|
||||
loadmodule "modules/m_motd";
|
||||
loadmodule "modules/m_opermotd";
|
||||
loadmodule "modules/m_botmotd";
|
||||
loadmodule "modules/m_lusers";
|
||||
loadmodule "modules/m_names";
|
||||
loadmodule "modules/m_svsnolag";
|
||||
loadmodule "modules/m_addmotd";
|
||||
loadmodule "modules/m_svslusers";
|
||||
loadmodule "modules/m_starttls";
|
||||
loadmodule "modules/m_nopost";
|
||||
loadmodule "modules/m_cap";
|
||||
loadmodule "modules/m_sasl";
|
||||
loadmodule "modules/m_md";
|
||||
loadmodule "modules/ssl_antidos";
|
||||
loadmodule "modules/certfp";
|
||||
loadmodule "modules/cap_invitenotify";
|
||||
loadmodule "modules/webirc";
|
||||
|
||||
/*** Channel modes ***/
|
||||
loadmodule "modules/chanmodes/jointhrottle"; /* +j */
|
||||
loadmodule "modules/chanmodes/floodprot"; /* +f */
|
||||
loadmodule "modules/chanmodes/nocolor"; /* +c */
|
||||
loadmodule "modules/chanmodes/noctcp"; /* +C */
|
||||
loadmodule "modules/chanmodes/stripcolor"; /* +S */
|
||||
loadmodule "modules/chanmodes/issecure"; /* +Z */
|
||||
loadmodule "modules/chanmodes/permanent"; /* +P */
|
||||
loadmodule "modules/chanmodes/link"; /* +L */
|
||||
loadmodule "modules/chanmodes/censor"; /* +G */
|
||||
loadmodule "modules/chanmodes/delayjoin"; /* +D */
|
||||
loadmodule "modules/chanmodes/noknock"; /* +K */
|
||||
loadmodule "modules/chanmodes/noinvite"; /* +V */
|
||||
loadmodule "modules/chanmodes/operonly"; /* +O */
|
||||
loadmodule "modules/chanmodes/adminonly"; /* +A */
|
||||
loadmodule "modules/chanmodes/nonotice"; /* +T */
|
||||
loadmodule "modules/chanmodes/regonly"; /* +R */
|
||||
loadmodule "modules/chanmodes/nonickchange"; /* +N */
|
||||
loadmodule "modules/chanmodes/nokick"; /* +Q */
|
||||
loadmodule "modules/chanmodes/regonlyspeak"; /* +M */
|
||||
loadmodule "modules/chanmodes/secureonly"; /* +z */
|
||||
|
||||
|
||||
/*** User modes ***/
|
||||
loadmodule "modules/usermodes/noctcp"; /* +T */
|
||||
loadmodule "modules/usermodes/censor"; /* +G */
|
||||
|
||||
/*** Extended Bans ***/
|
||||
loadmodule "modules/extbans/join"; /* +b ~j */
|
||||
loadmodule "modules/extbans/quiet"; /* +b ~q */
|
||||
loadmodule "modules/extbans/nickchange"; /* +b ~n */
|
||||
loadmodule "modules/extbans/realname"; /* +b ~r */
|
||||
loadmodule "modules/extbans/regnick"; /* +b ~R */
|
||||
loadmodule "modules/extbans/account"; /* +b ~a */
|
||||
loadmodule "modules/extbans/inchannel"; /* +b ~c */
|
||||
+5
-8
@@ -151,7 +151,6 @@ int bootopt = 0; /* Server boot option flags */
|
||||
char *debugmode = ""; /* -"- -"- -"- */
|
||||
char *sbrk0; /* initial sbrk(0) */
|
||||
static int dorehash = 0, dorestart = 0;
|
||||
static char *dpath = DPATH;
|
||||
MODVAR int booted = FALSE;
|
||||
MODVAR TS lastlucheck = 0;
|
||||
|
||||
@@ -1054,7 +1053,7 @@ int InitwIRCD(int argc, char *argv[])
|
||||
}
|
||||
#endif
|
||||
#ifdef CHROOTDIR
|
||||
if (chdir(dpath)) {
|
||||
if (chdir(CONFDIR)) {
|
||||
perror("chdir");
|
||||
fprintf(stderr, "ERROR: Unable to change to directory '%s'\n", dpath);
|
||||
exit(-1);
|
||||
@@ -1105,7 +1104,7 @@ int InitwIRCD(int argc, char *argv[])
|
||||
}
|
||||
umask(umaskold);
|
||||
}
|
||||
if (chroot(DPATH)) {
|
||||
if (chroot(CONFDIR)) {
|
||||
(void)fprintf(stderr, "ERROR: Cannot (chdir/)chroot to directory '%s'\n", dpath);
|
||||
exit(5);
|
||||
}
|
||||
@@ -1206,9 +1205,6 @@ int InitwIRCD(int argc, char *argv[])
|
||||
bootopt |= BOOT_QUICK;
|
||||
break;
|
||||
#endif
|
||||
case 'd':
|
||||
dpath = p;
|
||||
break;
|
||||
case 'F':
|
||||
bootopt |= BOOT_NOFORK;
|
||||
break;
|
||||
@@ -1338,6 +1334,7 @@ int InitwIRCD(int argc, char *argv[])
|
||||
exit(0);
|
||||
#endif
|
||||
case 'U':
|
||||
chdir(CONFDIR);
|
||||
update_conf();
|
||||
exit(0);
|
||||
default:
|
||||
@@ -1353,10 +1350,10 @@ int InitwIRCD(int argc, char *argv[])
|
||||
do_version_check();
|
||||
|
||||
#ifndef CHROOTDIR
|
||||
if (chdir(dpath)) {
|
||||
if (chdir(CONFDIR)) {
|
||||
# ifndef _WIN32
|
||||
perror("chdir");
|
||||
fprintf(stderr, "ERROR: Unable to change to directory '%s'\n", dpath);
|
||||
fprintf(stderr, "ERROR: Unable to change to directory '%s'\n", CONFDIR);
|
||||
# else
|
||||
if (!IsService) {
|
||||
MessageBox(NULL, strerror(GetLastError()),
|
||||
|
||||
+14
-33
@@ -320,49 +320,33 @@ char *Module_Create(char *path_)
|
||||
char *Mod_Version;
|
||||
unsigned int *compiler_version;
|
||||
static char errorbuf[1024];
|
||||
char pathbuf[1024];
|
||||
char *path, *tmppath;
|
||||
char path[1024];
|
||||
char *tmppath;
|
||||
ModuleHeader *mod_header = NULL;
|
||||
int ret = 0;
|
||||
Module *mod = NULL, **Mod_Handle = NULL;
|
||||
char *expectedmodversion = our_mod_version;
|
||||
unsigned int expectedcompilerversion = our_compiler_version;
|
||||
long modsys_ver = 0;
|
||||
Debug((DEBUG_DEBUG, "Attempting to load module from %s",
|
||||
path_));
|
||||
path = path_;
|
||||
Debug((DEBUG_DEBUG, "Attempting to load module from %s", path_));
|
||||
|
||||
if (!strstr(path, MODULE_SUFFIX))
|
||||
/* Prefix the module path with MODULESDIR, unless it's an absolute path
|
||||
* (we check for "/", "\" and things like "C:" to detect absolute paths).
|
||||
_ */
|
||||
if ((*path_ != '/') && (*path_ != '\\') && !(*path_ && (path_[1] == ':')))
|
||||
{
|
||||
char dirbase[1024];
|
||||
#ifdef CHROOTDIR
|
||||
/* Not so sure if I like this magic... */
|
||||
if (!strncmp(path, "modules/", 8) && (access("modules", F_OK)<0) && (access("src/modules", F_OK)==0))
|
||||
strcpy(dirbase, "./src");
|
||||
else
|
||||
strcpy(dirbase, ".");
|
||||
#elif !defined(_WIN32)
|
||||
unreal_getpathname(SPATH, dirbase);
|
||||
#else
|
||||
strcpy(dirbase, ".");
|
||||
#endif
|
||||
ircsnprintf(pathbuf, sizeof(pathbuf), "%s/%s%s", dirbase, path, MODULE_SUFFIX);
|
||||
path = pathbuf;
|
||||
snprintf(path, sizeof(path), "%s/%s", MODULESDIR, path_);
|
||||
} else {
|
||||
strlcpy(path, path_, sizeof(path));
|
||||
}
|
||||
|
||||
/* auto-suffix .dll / .so */
|
||||
if (!strstr(path, MODULE_SUFFIX))
|
||||
strlcat(path, MODULE_SUFFIX, sizeof(path));
|
||||
|
||||
tmppath = unreal_mktemp("tmp", unreal_getfilename(path));
|
||||
if (!tmppath)
|
||||
return "Unable to create temporary file!";
|
||||
#ifndef _WIN32
|
||||
if(!strchr(path, '/'))
|
||||
#else
|
||||
if (!strchr(path, '\\') && !strchr(path, '/'))
|
||||
#endif
|
||||
{
|
||||
size_t pathsize = strlen(path)+3;
|
||||
path = MyMalloc(pathsize);
|
||||
ircsnprintf(path, pathsize, "./%s", path_);
|
||||
}
|
||||
|
||||
if (!file_exists(path))
|
||||
{
|
||||
@@ -510,9 +494,6 @@ char *Module_Create(char *path_)
|
||||
/* Return the error .. */
|
||||
return ((char *)irc_dlerror());
|
||||
}
|
||||
|
||||
if (path != path_ && path != pathbuf)
|
||||
free(path);
|
||||
}
|
||||
|
||||
void Module_DelayChildren(Module *m)
|
||||
|
||||
@@ -578,15 +578,6 @@ void init_sys(void)
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
/* Startup message
|
||||
pid = getpid();
|
||||
pid++;
|
||||
fprintf(stderr, "|---------------------------------------------\n");
|
||||
fprintf(stderr, "| UnrealIRCD has successfully loaded.\n");
|
||||
fprintf(stderr, "| Config Directory: %s\n", DPATH);
|
||||
fprintf(stderr, "| MAXCONNECTIONS set at %d\n", MAXCONNECTIONS);
|
||||
fprintf(stderr, "| Process ID: %d\n", pid);
|
||||
fprintf(stderr, "|---------------------------------------------\n"); */
|
||||
#if defined(PCS) || defined(SVR3)
|
||||
char logbuf[BUFSIZ];
|
||||
|
||||
|
||||
@@ -1555,6 +1555,8 @@ void config_setdefaultsettings(aConfiguration *i)
|
||||
i->nicklen = NICKLEN;
|
||||
i->link_bindip = strdup("*");
|
||||
i->oper_only_stats = strdup("*");
|
||||
i->x_server_cert_pem = strdup("ssl/server.cert.pem");
|
||||
i->x_server_key_pem = strdup("ssl/server.key.pem");
|
||||
}
|
||||
|
||||
/* 1: needed for set::options::allow-part-if-shunned,
|
||||
@@ -6111,6 +6113,16 @@ int _test_log(ConfigFile *conf, ConfigEntry *ce) {
|
||||
ce->ce_fileptr->cf_filename, ce->ce_varlinenum);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Hmmm... not really proper huh... */
|
||||
if (ce->ce_vardata[0] != '/')
|
||||
{
|
||||
char *str = MyMallocEx(strlen(ce->ce_vardata) + strlen(LOGDIR) + 4);
|
||||
sprintf(str, "%s/%s", LOGDIR, ce->ce_vardata);
|
||||
MyFree(ce->ce_vardata);
|
||||
ce->ce_vardata = str;
|
||||
}
|
||||
|
||||
for (cep = ce->ce_entries; cep; cep = cep->ce_next)
|
||||
{
|
||||
if (!cep->ce_varname)
|
||||
|
||||
+1
-1
@@ -657,7 +657,7 @@ LRESULT CALLBACK FromFileDLG(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPar
|
||||
lpopen.lpstrFile = path;
|
||||
lpopen.nMaxFile = MAX_PATH;
|
||||
lpopen.lpstrFileTitle = NULL;
|
||||
lpopen.lpstrInitialDir = DPATH;
|
||||
lpopen.lpstrInitialDir = CFGPATH;
|
||||
lpopen.lpstrTitle = NULL;
|
||||
lpopen.Flags = (OFN_ENABLESIZING|OFN_NONETWORKBUTTON|
|
||||
OFN_OVERWRITEPROMPT);
|
||||
|
||||
+16
-26
@@ -1,11 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
PID_FILE="@IRCDDIR@/ircd.pid"
|
||||
PID_BACKUP="@IRCDDIR@/ircd.pid.bak"
|
||||
if [ ! -f @BINDIR@ ]; then
|
||||
echo "ERROR: Could not find the IRCd binary (@BINDIR@)"
|
||||
echo "This usually means you did not answer the question correctly"
|
||||
echo "during './Config', or you forgot to run 'make install'."
|
||||
PID_FILE="@PIDFILE@"
|
||||
PID_BACKUP="@PIDFILE@.bak"
|
||||
if [ ! -f @BINDIR@/unrealircd ]; then
|
||||
echo "ERROR: Could not find the IRCd binary (@BINDIR@/unrealircd)"
|
||||
echo "This could mean two things:"
|
||||
echo "1) You forgot to run 'make install' after running 'make'"
|
||||
echo "2) You answered a ./Config question incorrectly"
|
||||
exit
|
||||
fi
|
||||
if [ "$1" = "start" ] ; then
|
||||
@@ -13,7 +14,7 @@ if [ "$1" = "start" ] ; then
|
||||
if [ -r $PID_FILE ] ; then
|
||||
mv -f $PID_FILE $PID_BACKUP
|
||||
fi
|
||||
@BINDIR@
|
||||
@BINDIR@/unrealircd
|
||||
sleep 1
|
||||
if [ ! -r $PID_FILE ] ; then
|
||||
echo "Possible error encountered (IRCd seemingly not started)"
|
||||
@@ -22,7 +23,7 @@ if [ "$1" = "start" ] ; then
|
||||
echo "ircd.log. If you cannot solve the problem, read"
|
||||
echo "Unreal.nfo on where to get support"
|
||||
echo "====================================================="
|
||||
tail -n 5 @IRCDDIR@/ircd.log
|
||||
tail -n 5 @LOGDIR@/ircd.log
|
||||
if [ -r $PID_BACKUP ] ; then
|
||||
mv -f $PID_BACKUP $PID_FILE
|
||||
fi
|
||||
@@ -49,28 +50,17 @@ elif [ "$1" = "restart" ] ; then
|
||||
fi
|
||||
kill -2 `cat $PID_FILE`
|
||||
elif [ "$1" = "mkpasswd" ] ; then
|
||||
@BINDIR@ -P $2 $3
|
||||
@BINDIR@/unrealircd -P $2 $3
|
||||
elif [ "$1" = "version" ] ; then
|
||||
@BINDIR@ -v
|
||||
@BINDIR@/unrealircd -v
|
||||
elif [ "$1" = "gencloak" ] ; then
|
||||
@BINDIR@ -k
|
||||
@BINDIR@/unrealircd -k
|
||||
elif [ "$1" = "upgrade-conf" ] ; then
|
||||
@BINDIR@ -U
|
||||
@BINDIR@/unrealircd -U
|
||||
elif [ "$1" = "backtrace" ] ; then
|
||||
cd @IRCDDIR@
|
||||
|
||||
if [ -d "modules" ]; then
|
||||
modpath="modules"
|
||||
elif [ -d "src/modules" ]; then
|
||||
modpath="src/modules"
|
||||
else
|
||||
echo 'Enter the path to your modules directory relative to your root installed directory (eg: "mods")'
|
||||
read modpath
|
||||
if [ ! -d "$modpath" ]; then
|
||||
echo "Not a directory"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
modpath="@MODULESDIR@"
|
||||
|
||||
# Find the corefile
|
||||
echo "Core files available:"
|
||||
@@ -111,7 +101,7 @@ elif [ "$1" = "backtrace" ] ; then
|
||||
|
||||
# The tmp/*.so files are often already deleted. Here we have some
|
||||
# (ugly) scripting to recreate the tmp/*.so links to the modules *.so files...
|
||||
echo 'info sharedlibrary'|gdb @BINDIR@ $corefile 2>/dev/null|\
|
||||
echo 'info sharedlibrary'|gdb @BINDIR@/unrealircd $corefile 2>/dev/null|\
|
||||
grep No|grep tmp/|awk '{ print $2 }'|\
|
||||
awk -F '.' "{ system(\"ln -s ../$modpath/\" \$2 \".so \" \$0) }"
|
||||
|
||||
@@ -130,7 +120,7 @@ bt 3 full
|
||||
quit
|
||||
__EOF__
|
||||
|
||||
gdb -batch -x gdb.commands @BINDIR@ $corefile
|
||||
gdb -batch -x gdb.commands @BINDIR@/unrealircd $corefile
|
||||
rm -f gdb.commands
|
||||
echo "GCC: `gcc -v 2>&1|tail -n 1`"
|
||||
echo "UNAME: `uname -a`"
|
||||
Reference in New Issue
Block a user