1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-13 15:04:46 +02:00

37 Commits

Author SHA1 Message Date
Bram Matthys c75d4d64a0 3.2 with -d -P, just to be sure. 2004-04-25 00:06:55 +00:00
Bram Matthys 00bd34adf4 3.2! 2004-04-24 23:16:03 +00:00
Bram Matthys c7dcad793c 3.2-RC1fix
and screw all those weird changesa!~J@J~Lds
2004-03-07 22:26:23 +00:00
Bram Matthys 6feeb23ae3 3.2-RC2 2004-03-07 18:58:42 +00:00
Bram Matthys 8ea0ac5f4c RC1 2004-02-14 20:23:42 +00:00
Bram Matthys 4560beb895 Unreal3.2-beta19 2003-11-24 19:42:37 +00:00
stskeeps dae494ddb1 beta18 2003-09-23 18:42:03 +00:00
stskeeps 33f23cefb8 3.2-beta17 2003-06-15 17:14:10 +00:00
stskeeps b67cdeda7b 3.2-beta16 2003-05-03 15:42:48 +00:00
stskeeps 778efe22e3 beta15 2003-03-03 18:42:24 +00:00
stskeeps b9a2b18077 beta15 release 2003-03-03 18:34:45 +00:00
stskeeps e638fef3a7 3.2-beta14 2003-01-18 20:10:27 +00:00
stskeeps 7b88c81ef2 beta14 2003-01-17 22:07:01 +00:00
stskeeps b6cef35228 3-2beta13 2002-12-09 20:13:51 +00:00
stskeeps 51e5031fbd Unreal3.2-beta12 2002-08-25 12:08:08 +00:00
stskeeps 19d3ff1a84 3.2-beta11 2002-08-07 21:30:49 +00:00
stskeeps c2dc1e4909 beta10 2002-05-20 19:43:14 +00:00
stskeeps fdd3c1a2d8 3.2-beta9 2002-03-24 17:53:11 +00:00
stskeeps 104990002e b8 2002-03-17 23:26:09 +00:00
stskeeps c39013f134 beta7 2002-03-12 20:49:09 +00:00
stskeeps a09902cf2c beta6 AGAIN 2002-01-11 22:33:09 +00:00
stskeeps e527514f03 beta6 2002-01-07 21:10:06 +00:00
stskeeps bd4542cda1 extra beta5 2001-12-24 23:07:25 +00:00
stskeeps 769b98a83d Unreal3.2-beta5 2001-12-24 14:09:22 +00:00
stskeeps cad17acd21 . 2001-10-28 17:09:43 +00:00
stskeeps 49f524b6a4 beta4 2001-10-28 16:25:13 +00:00
stskeeps 20ae445980 3.2-
beta3
2001-10-08 17:47:39 +00:00
stskeeps 51dd0849e2 . 2001-08-07 21:37:25 +00:00
stskeeps c294689287 beta2 2001-08-07 19:00:40 +00:00
stskeeps a3641d1ffb Unreal3.1.1->Unreal3.2-beta1 2001-07-13 21:06:54 +00:00
stskeeps f4d102edfb Merge beta with unreal3_1_1_darkshades 2000-12-10 21:23:50 +00:00
stskeeps 2cadcc8624 . 2000-08-20 12:00:43 +00:00
stskeeps 750a9d31ff Upgrade to Unreal3.1-Silverheart+ 2000-08-20 11:40:43 +00:00
stskeeps 0efacfa2ab *** empty log message *** 2000-08-07 17:54:57 +00:00
stskeeps 70f34f75fc *** empty log message *** 2000-08-07 17:49:38 +00:00
stskeeps c37c0594cb Merge of devel (Mon Aug 7 18:33:23 BST 2000) 2000-08-07 17:33:42 +00:00
stskeeps 206dc189ba Unreal3.1-beta3 to Unreal3.1 2000-07-16 20:37:15 +00:00
322 changed files with 31450 additions and 82145 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
\___/|_| |_|_| \___|\__,_|_|\___/\_| \_| \____/\__,_|
Configuration Program
for Unreal3.2.5
for Unreal3.2
This program will help you to compile your IRC server, and ask you
questions regarding the compile-time settings of it during the process.
+50 -3
View File
@@ -1,3 +1,50 @@
This is the Unreal3.3* development tree.
We are currently in pre-alpha stage, which means this code should not be
used by anyone but the developers or other people liking a broken ircd ;)
Unreal3.2 Release Notes
========================
==[ GENERAL INFORMATION ]==
* If you are upgrading, make sure you run make clean and ./Config before doing make
* The official UnrealIRCd documentation is doc/unreal32docs.html
online version at: http://www.vulnscan.org/UnrealIrcd/unreal32docs.html
FAQ: http://www.vulnscan.org/UnrealIrcd/faq/
Read them before asking for help.
* Report bugs at http://bugs.unrealircd.org/
== [ NEW ]==
- Added german docs (doc/unreal32docs.de.html)
- In a spamfilter reason field '_' gets converted to a space (' '),
now also added '__' which gets converted to underscore itself ('_').
==[ MAJOR BUGS FIXED ]==
- '/spamfiltere remove' was often removing the wrong entry (RC2 bug)
- The TRE regex library was sometimes matching too much if [range].+
was used multiple times.
- Fixed a remote include issue and added timeouts in case a connection/transfer fails
==[ MINOR BUGS FIXED ]==
- Sometimes hosts were not resolved on Windows due to a resolver bug
- spamfilter and sqline: memory leak on /rehash (a few kb)
- spamfilter: protect against insane long reason/regex fields in configfile
- set::modes-on-join now accepts extended channelmodes
- Opteron: various crashbugs fixed, should work ok now.
- Win32 GUI "rehash all" option did not reload motd/rules.
- Same for ./unreal rehash on *NIX
- Usermode 'r' (registered) was unset if you changed the case of your
nick (eg: 'blah'->'Blah'), this affected at least ircservices.
- vhost::swhois wasn't shown if you did a remote /whois.
- Made './curlinstall' work with new c-ares-1.0.0.
- Fixed compile problem on some machines related to TRE / libintl.
- /who +m was incorrectly hiding +H users even for opers.
- Fixed /rehash bug if an .so or remote include didn't load properly
==[ CHANGED ]==
- spamfilter.conf: fixed fyle sig, added sigs for: soex, Nkie, LOI, Gaggle,
changed a lot of sigs from block to gline.
- Windows: now using new Inno Setup which made the installer 300k smaller
- Docs, help.conf and other text updates.
==[ COMMING UP ]==
- You can expect module support on windows in a nearby release.
==[ ADDITIONAL INFO ]==
* See Changelog
Vendored
+1 -1
View File
@@ -13,7 +13,7 @@
--braces-on-struct-decl-line
--paren-indentation0
--case-brace-indentation0
--line-length110
--line-length80
--declaration-indentation5
-T size_t
-T aClass
+3088 -1838
View File
File diff suppressed because it is too large Load Diff
-3093
View File
File diff suppressed because it is too large Load Diff
+50 -338
View File
@@ -21,31 +21,6 @@
RUN_CONFIGURE () {
ARG=""
# 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
ARG="$ARG--with-moduleswhich=$MODULESWHICH "
fi
if [ "$NOSPOOF" = "1" ] ; then
ARG="$ARG--enable-nospoof "
fi
@@ -81,14 +56,14 @@ ARG="$ARG--with-spath=$SPATH "
ARG="$ARG--with-nick-history=$NICKNAMEHISTORYLENGTH "
ARG="$ARG--with-sendq=$MAXSENDQLENGTH "
ARG="$ARG--with-bufferpool=$BUFFERPOOL "
ARG="$ARG--with-hostname=$DOMAINNAME "
ARG="$ARG--with-permissions=$DEFPERM "
ARG="$ARG--with-fd-setsize=$MAXCONNECTIONS "
ARG="$ARG--enable-dynamic-linking "
ARG="$ARG $EXTRAPARA "
CONF="./configure $ARG"
echo $CONF
$CONF || exit 1
cd "$UNREALCWD"
$CONF
if [ "$CRYPTOIRCD" = "1" ] ; then
if [ ! -f server.req.pem ]; then
export OPENSSLPATH
@@ -101,252 +76,13 @@ fi
fi
}
RUN_ADVANCED () {
TEST=""
while [ -z "$TEST" ] ; do
if [ "$SHOWLISTMODES" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Do you want to show the modes a channel has set in the /list output?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
SHOWLISTMODES="1"
;;
[Nn]*)
SHOWLISTMODES=""
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
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 Unreal 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
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Do you want to disable oper override?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
NOOPEROVERRIDE="1"
;;
[Nn]*)
NOOPEROVERRIDE=""
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
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
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Do you want to require opers to /invite themselves into a +s or +p channel?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
OPEROVERRIDEVERIFY="1"
;;
[Nn]*)
OPEROVERRIDEVERIFY=""
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
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
TEST=""
while [ -z "$TEST" ]; do
if [ "$MODULESWHICH" = "onlycommands" ]; then
TEST="commands"
elif [ "$MODULESWHICH" = "onlymodules" ]; then
TEST="modules"
else
TEST="both"
fi
echo ""
echo "Do you wish to compile commands.so, the m_*.so modules, or both?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ]; then
cc=$TEST
fi
case "$cc" in
commands|commands.so|onlycommands|commandsonly)
MODULESWHICH="onlycommands"
;;
modules|m_\*.so|onlymodules|modulesonly)
MODULESWHICH="onlymodules"
;;
both|commandsandmodules|modulesandcommands)
MODULESWHICH="commandsandmodules"
;;
*)
echo ""
echo "Unrecognized response"
TEST=""
esac
done
}
c=""
n=""
UNREALCWD="`pwd`"
NOSPOOF=""
DPATH="`pwd`"
SPATH="`pwd`/src"
SPATH="`pwd`/src/ircd"
HUB="1"
DOMAINNAME=`hostname`
DEFPERM="0600"
CRYPTOIRCD=""
SSLDIR=""
@@ -360,15 +96,7 @@ MAXCONNECTIONS="1024"
INET6=""
REMOTEINC=""
CURLDIR=""
PREFIXAQ="1"
SHOWLISTMODES="1"
TOPICNICKISNUH=""
SHUNNOTICES=""
NOOPEROVERRIDE=""
DISABLEUSERMOD=""
OPEROVERRIDEVERIFY=""
DISABLEEXTBANSTACKING=""
MODULESWHICH=""
PREFIXAQ=""
EXTRAPARA=""
if [ "`eval echo -n 'a'`" = "-n a" ] ; then
c="\c"
@@ -380,53 +108,37 @@ fi
#parse arguments
NOCACHE=""
NOINTRO=""
CLEAN=""
ADVANCED=""
while [ $# -ge 1 ] ; do
if [ $1 = "--help" ] ; then
echo "Config utility for UnrealIRCd"
echo "-----------------------------"
echo "Syntax: ./Config [options]"
echo "-nocache Ignore settings saved in config.settings"
echo "-nointro Skip intro (release notes, etc)"
echo "-quick Skip questions, go straight to configure"
echo "-advanced Include additional advanced questions"
echo "-clean Clean ./configure cache"
exit 0
elif [ $1 = "-nocache" ] ; then
NOCACHE="1"
elif [ $1 = "-nointro" ] ; then
NOINTRO="1"
elif [ $1 = "-quick" -o $1 = "-q" ] ; then
echo "running quick config"
if [ -f "config.settings" ] ; then
. ./config.settings
fi
RUN_CONFIGURE
cd "$UNREALCWD"
exit 0
elif [ $1 = "-clean" -o $1 = "-C" ] ; then
CLEAN="1"
elif [ $1 = "-advanced" ] ; then
PREADVANCED="1"
fi
shift 1
done
if [ "$1" = "--help" ] ; then
echo "Config utility for UnrealIRCd"
echo "-----------------------------"
echo "Syntax: ./Config [options]"
echo "-nocache Ignore settings saved in config.settings"
echo "-nointro Skip intro (release notes, etc)"
echo "-quick Skip questions, go straight to configure"
echo "-C Clean ./configure cache"
exit 0
fi
if [ "$1" = "-nocache" -o "$2" = "-nocache" ] ; then
NOCACHE="1"
fi
if [ "$1" = "-nointro" -o "$2" = "-nointro" ] ; then
NOINTRO="1"
fi
if [ -f "config.settings" -a -z "$NOCACHE" ] ; then
. ./config.settings
. config.settings
fi
if [ "$PREADVANCED" = "1" ] ; then
ADVANCED="1"
elif [ "$ADVANCED" = "1" ]; then
ADVANCED=""
fi
if [ -n "$CLEAN" ] ; then
if [ "$1" = "-C" -o "$2" = "-C" ] ; then
rm -f config.cache
fi
if [ "$1" = "-quick" -o "$1" = "-q" -o "$2" = "-quick" ] ; then
echo "running quick config"
RUN_CONFIGURE
exit 0
fi
clear
if [ -f ".CHANGES.NEW" -a -z "$NOINTRO" ] ; then
@@ -479,7 +191,7 @@ done
TEST="$DPATH"
echo ""
echo "Where do you want to install the server configuration files?"
echo "What directory are all the server configuration files in?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
@@ -490,7 +202,7 @@ fi
TEST="$SPATH"
echo ""
echo "Where do you want to install the server binary?"
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
@@ -529,6 +241,17 @@ while [ -z "$TEST" ] ; do
esac
done
TEST="$DOMAINNAME"
echo ""
echo "What is the hostname of the server running your IRCd?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
DOMAINNAME=$TEST
else
DOMAINNAME=`eval echo $cc` # modified
fi
TEST=""
while [ -z "$TEST" ] ; do
TEST="$DEFPERM"
@@ -584,14 +307,14 @@ while [ -z "$TEST" ] ; do
done
if [ "$CRYPTOIRCD" = "1" ] ; then
TEST="$SSLDIR"
TEST=""
echo ""
echo "If you know the path to OpenSSL on your system, enter it here. If not"
echo "leave this blank"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
SSLDIR="$TEST"
SSLDIR=""
else
SSLDIR=`eval echo $cc` # modified
fi
@@ -656,14 +379,14 @@ while [ -z "$TEST" ] ; do
done
if [ "$ZIPLINKS" = "1" ] ; then
TEST="$ZIPLINKSDIR"
TEST=""
echo ""
echo "If you know the path to zlib on your system, enter it here. If not"
echo "leave this blank"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
ZIPLINKSDIR="$TEST"
ZIPLINKSDIR=""
else
ZIPLINKSDIR=`eval echo $cc` # modified
fi
@@ -727,8 +450,8 @@ while [ -z "$TEST" ] ; do
echo ""
echo "Do you want to enable prefixes for chanadmin and chanowner?"
echo "This will give +a the & prefix and ~ for +q (just like +o is @)"
echo "Supported by the major clients (mIRC, xchat, epic, eggdrop, Klient,"
echo "PJIRC, irssi, CGI:IRC, etc.)"
echo "Supported by the major clients (mIRC, xchat, epic, eggdrop, Klient, PJIRC, etc.)"
echo "with the notable exceptions of irssi, KVIrc and CGI:IRC."
echo "This feature should be enabled/disabled network-wide."
echo $n "[$TEST] -> $c"
read cc
@@ -869,9 +592,7 @@ while [ -z "$TEST" ] ; do
;;
esac
done
if [ -n "$ADVANCED" ] ; then
RUN_ADVANCED
fi
echo ""
echo "Would you like any more parameters to configure?"
echo "Write them here:"
@@ -892,6 +613,7 @@ BUFFERPOOL="$BUFFERPOOL"
MAXCONNECTIONS="$MAXCONNECTIONS"
NICKNAMEHISTORYLENGTH="$NICKNAMEHISTORYLENGTH"
HUB="$HUB"
DOMAINNAME="$DOMAINNAME"
DEFPERM="$DEFPERM"
CRYPTOIRCD="$CRYPTOIRCD"
SSLDIR="$SSLDIR"
@@ -899,19 +621,9 @@ ZIPLINKS="$ZIPLINKS"
ZIPLINKSDIR="$ZIPLINKSDIR"
REMOTEINC="$REMOTEINC"
CURLDIR="$CURLDIR"
SHOWLISTMODES="$SHOWLISTMODES"
TOPICNICKISNUH="$TOPICNICKISNUH"
SHUNNOTICES="$SHUNNOTICES"
NOOPEROVERRIDE="$NOOPEROVERRIDE"
DISABLEUSERMOD="$DISABLEUSERMOD"
OPEROVERRIDEVERIFY="$OPEROVERRIDEVERIFY"
DISABLEEXTBANSTACKING="$DISABLEEXTBANSTACKING"
MODULESWHICH="$MODULESWHICH"
EXTRAPARA="$EXTRAPARA"
ADVANCED="$ADVANCED"
__EOF__
RUN_CONFIGURE
cd "$UNREALCWD"
cat << __EOF__
_______________________________________________________________________
+2 -2
View File
@@ -5,11 +5,11 @@ you like Unreal, and you'd like to see it continue to exist, please consider mak
a donation. We're not asking for anything huge, whatever you can afford is fine.
PayPal Donation Link:
<https://www.paypal.com/xclick/business=donation%40unrealircd.org&
<https://www.paypal.com/xclick/business=donation%40unrealircd.com&
item_name=UnrealIRCd+Donation&no_shipping=1&cn=Comments&tax=0&currency_code=USD>
Or simply send a payment through PayPal to:
donation@unrealircd.org
donation@unrealircd.com
If you don't want to use PayPal, or you want to donate something other than money
(old computer hardware, etc.), contact Stskeeps (stskeeps@unrealircd.com) and send
+12 -29
View File
@@ -20,7 +20,6 @@
#*/
CC=@CC@
CXX=@CXX@
INCLUDEDIR=../include
NETWORKSDIR=
FROMDOS=/home/cmunk/bin/4dos
@@ -35,11 +34,11 @@ FROMDOS=/home/cmunk/bin/4dos
#
#XCFLAGS=-O -g -export-dynamic
IRCDLIBS=@IRCDLIBS@ @TRELIBS@ @CARESLIBS@
IRCDLIBS=@IRCDLIBS@ @TRELIBS@
CRYPTOLIB=@CRYPTOLIB@
OPENSSLINCLUDES=
XCFLAGS=-I@TREINCDIR@ -I@CARESINCDIR@ @CARESLIBDIR@ @CFLAGS@
XCFLAGS=-I@TREINCDIR@ @CFLAGS@
#
# use the following on MIPS:
#CFLAGS= -systype bsd43 -DSYSTYPE_BSD43 -I$(INCLUDEDIR)
@@ -132,22 +131,11 @@ MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'IRCDLIBS=${IRCDLIBS}' \
'RM=${RM}' 'CP=${CP}' 'TOUCH=${TOUCH}' \
'SHELL=${SHELL}' 'STRTOUL=${STRTOUL}' \
'CRYPTOLIB=${CRYPTOLIB}' \
'CRYPTOINCLUDES=${CRYPTOINCLUDES}' \
'URL=${URL}' 'CXX=${CXX}'
INSTALL_CONFS = badwords.channel.conf badwords.message.conf \
badwords.quit.conf dccallow.conf help.conf \
spamfilters.conf.sample LICENSE Donation
INSTALL_DOCS = doc/Authors doc/example.conf doc/coding-guidelines \
doc/tao.of.irc doc/unreal32docs.html
'CRYPTOINCLUDES=${CRYPTOINCLUDES}' 'URL=${URL}'
custommodule:
cd src; ${MAKE} ${MAKEARGS} MODULEFILE=${MODULEFILE} 'EXLIBS=${EXLIBS}' custommodule
custommodulecpp:
cd src; ${MAKE} ${MAKEARGS} MODULEFILE=${MODULEFILE} 'EXLIBS=${EXLIBS}' custommodulecpp
server:
build:
-@if [ ! -f include/setup.h ] ; then \
@@ -214,26 +202,21 @@ depend:
install: all
$(INSTALL) -m 0700 -d $(IRCDDIR)
$(INSTALL) -m 0700 -d $(BINDIR)
$(INSTALL) -b -m 0700 src/ircd $(BINDIR)
$(INSTALL) -m 0700 src/ircd $(BINDIR)
$(INSTALL) -m 0700 -d $(IRCDDIR)/networks
$(INSTALL) -m 0600 networks/*.network $(IRCDDIR)/networks
$(INSTALL) -m 0700 networks/makenet $(IRCDDIR)/networks
$(INSTALL) -m 0600 networks/networks.ndx $(IRCDDIR)/networks
$(INSTALL) -m 0700 -d $(IRCDDIR)/doc
$(INSTALL) -m 0600 $(INSTALL_DOCS) $(IRCDDIR)/doc
$(INSTALL) -m 0600 doc/Authors doc/example.conf doc/example.settings 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
$(TOUCH) $(IRCDDIR)/unrealircd.conf
chmod 0600 $(IRCDDIR)/unrealircd.conf
$(INSTALL) -b -m 0600 $(INSTALL_CONFS) $(IRCDDIR)
$(INSTALL) -b -m 0700 unreal $(IRCDDIR)
$(INSTALL) -m 0600 badwords.*.conf help.conf LICENSE Donation $(IRCDDIR)
$(INSTALL) -m 0700 unreal $(IRCDDIR)
$(INSTALL) -m 0700 -d $(IRCDDIR)/modules
$(INSTALL) -b -m 0700 src/modules/*.so $(IRCDDIR)/modules
-@if [ ! -f "$(IRCDDIR)/curl-ca-bundle.crt" ] ; then \
$(INSTALL) -b -m 0700 curl-ca-bundle.crt $(IRCDDIR) ; \
fi
-@if [ -f server.key.pem ] ; then \
if [ ! -f "$(IRCDDIR)/server.key.pem" ] ; then \
$(INSTALL) -b -m 0600 server.*.pem $(IRCDDIR) ; \
fi ; \
fi
$(INSTALL) -m 0700 src/modules/*.so $(IRCDDIR)/modules
pem: src/ssl.cnf
@echo "Generating certificate request .. "
+33 -29
View File
@@ -1,32 +1,33 @@
===============================================
= UnrealIRCd v3.3* =
= UnrealIRCd v3.2 =
===============================================
Was brought to you by:
The head coders
================
* Stskeeps <stskeeps@tspre.org>
* Syzop <syzop@unrealircd.com>
* codemastr <codemastr@unrealircd.com>
The core team:
==============
* Stskeeps <stskeeps@tspre.org>
* codemastr <codemastr@unrealircd.com>
* Syzop <syzop@unrealircd.org>
* Luke <luke@unrealircd.com>
The coders
===========
* DarkElf <darkelf@unrealircd.com>
* Trocotronic <trocotronic@unrealircd.com>
* aquanight <aquanight@unrealircd.com>
Additional credits
===================
Credit also goes to past UnrealIRCd coders, including: McSkaf, Zogg,
NiQuiL, assyrian, nighthawk, DrBin, llthangel and Griever.
Credit also goes to everyone else who contributed, and those who coded
or contributed to UnrealIRCd's ancestors.
WEBSITE
========
http://www.unrealircd.com/
Contributors
============
* McSkaf <mcskaf@unrealircd.org>
* Zogg <zogg@unrealircd.org>
* NiQuiL <niquil@unrealircd.org>
* assyrian <assyrian@unrealircd.org>
* nighthawk <nighthawk@unrealircd.com>
* DrBin <drbin@unrealircd.com>
* llthangel <llthangel@unrealircd.org>
* Griever <griever@unrealircd.com>
Documentation:
==============
* CKnight^ <cknight@unrealircd.com>
Precenses on the Internet:
* http://www.unrealircd.com
CVS
====
To get anonymous access: (read only)
@@ -35,17 +36,19 @@
press enter when asked for password
Then, choose the appropiate branch you want:
latest 3.3 release (unstable/development):
"cvs -d :pserver:anonymous@cvs.ircsystems.net:/home/cmunk/ircsystems/cvsroot checkout -r devel -d Unreal-stable unreal"
latest 3.2 release ("stable"):
"cvs -d :pserver:anonymous@cvs.ircsystems.net:/home/cmunk/ircsystems/cvsroot checkout -r stable -d Unreal-stable unreal"
latest 3.2 fixes / development ("unreal3_2_fixes"):
"cvs -d :pserver:anonymous@cvs.ircsystems.net:/home/cmunk/ircsystems/cvsroot checkout -r unreal3_2_fixes -d Unreal-stable unreal"
To get support
================
Before asking others for help you MUST:
* read the docs (doc/unreal32docs.html or online: www.unrealircd.com/unreal32docs.html)
* check the FAQ (www.vulnscan.org/UnrealIRCd/faq/)
* check the FAQ (www.vulnscan.org/UnrealIrcd/faq/)
Means of support:
* Forum: http://forums.unrealircd.com/
* IRC: /server irc.ircsystems.net 6667 - /join #unreal-support
[Note: Follow the bots instructions in order to get voice.
Please be patient after asking questions, we may do other stuff
@@ -53,14 +56,15 @@
READ THE TOPIC before you ask anything. We do this on a free
base so we are volunteeringly helping you, but we are humans
like you, and we got to have peace at times as well.]
* Forum: http://forums.unrealircd.com/
* Mailing list: unreal-users@lists.sourceforge.net
(http://lists.sourceforge.net/lists/listinfo/unreal-users also
has links to the archive).
UnrealIRCd Bugtracker (Where to report bugs or make suggestions)
=================================================================
==================================================================
http://bugs.unrealircd.org
Want to discuss, chat, etc?
=============================
* IRC: /server irc.unrealircd.org 6667 - /join #UnrealIRCd
* IRC: /server irc.ircsystems.net 6667 - /join #UnrealIRCd
+6 -6
View File
@@ -2,12 +2,12 @@
alias identify {
format "^#" {
target chanserv;
nick chanserv;
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
target nickserv;
nick nickserv;
type services;
parameters "IDENTIFY %1-";
};
@@ -16,12 +16,12 @@ alias identify {
alias services {
format "^#" {
target chanserv;
nick chanserv;
type services;
parameters "%1-";
};
format "^[^#]" {
target nickserv;
nick nickserv;
type services;
parameters "%1-";
};
@@ -30,12 +30,12 @@ alias services {
alias register {
format "^#" {
target chanserv;
nick chanserv;
type services;
parameters "REGISTER %1-";
};
format "^[^#]" {
target nickserv;
nick nickserv;
type services;
parameters "REGISTER %1-";
};
+8 -7
View File
@@ -1,18 +1,19 @@
/* Anope Aliases */
alias nickserv { type services; };
alias ns { target nickserv; type services; };
alias ns { nick nickserv; type services; };
alias chanserv { type services; };
alias cs { target chanserv; type services; };
alias memoserv { type services; spamfilter yes; };
alias ms { target memoserv; type services; spamfilter yes; };
alias cs { nick chanserv; type services; };
alias memoserv { type services; };
alias ms { nick memoserv; type services; };
alias operserv { type services; };
alias os { target operserv; type services; };
alias os { nick operserv; type services; };
alias helpserv { type services; };
alias hs { nick helpserv; type services; };
alias botserv { type services; };
alias bs { target botserv; type services; };
alias bs { nick botserv; type services; };
alias hostserv { type services; };
alias hs { target hostserv; type services; };
alias hs { nick hostserv; type services; };
include "aliases/aliases.conf";
+9 -26
View File
@@ -1,33 +1,16 @@
/* Auspice Aliases */
/* Uncomment this, if you have enabled "MassServ, W and X" in auspice */
# alias massserv { type services; };
# alias ma { target massserv; type services; };
# alias W { type services; };
# alias X { type services; };
/* Uncomment this, if you have enabled "WebServ" in auspice */
# alias webserv { type services; };
# alias ws { target webserv; type services; };
alias agent { type services; };
alias adminserv { type services; };
alias as { target adminserv; type services; };
alias botserv { type services; };
alias bs { target botserv; type services; };
alias chanserv { type services; };
alias cs { target chanserv; type services; };
alias helpserv { type services; };
alias hs { target helpserv; type services; };
alias hostserv { type services; };
alias ho { target hostserv; type services; };
alias memoserv { type services; spamfilter yes; };
alias ms { target memoserv; type services; spamfilter yes; };
alias nickserv { type services; };
alias ns { target nickserv; type services; };
alias ns { nick nickserv; type services; };
alias chanserv { type services; };
alias cs { nick chanserv; type services; };
alias memoserv { type services; };
alias ms { nick memoserv; type services; };
alias helpserv { type services; };
alias hs { nick helpserv; type services; };
alias operserv { type services; };
alias os { target operserv; type services; };
alias os { nick operserv; type services; };
alias rootserv { type services; };
alias rs { target rootserv; type services; };
alias rs { nick rootserv; type services; };
include "aliases/aliases.conf";
+5 -5
View File
@@ -1,12 +1,12 @@
/* Cygnus Aliases */
alias nickserv { type services; };
alias ns { target nickserv; type services; };
alias ns { nick nickserv; type services; };
alias chanserv { type services; };
alias cs { target chanserv; type services; };
alias memoserv { type services; spamfilter yes; };
alias ms { target memoserv; type services; spamfilter yes; };
alias cs { nick chanserv; type services; };
alias memoserv { type services; };
alias ms { nick memoserv; type services; };
alias rootserv { type services; };
alias rs { target rootserv; type services; };
alias rs { nick rootserv; type services; };
include "aliases/aliases.conf";
+7 -7
View File
@@ -1,16 +1,16 @@
/* Epona Aliases */
alias nickserv { type services; };
alias ns { target nickserv; type services; };
alias ns { nick nickserv; type services; };
alias chanserv { type services; };
alias cs { target chanserv; type services; };
alias memoserv { type services; spamfilter yes; };
alias ms { target memoserv; type services; spamfilter yes; };
alias cs { nick chanserv; type services; };
alias memoserv { type services; };
alias ms { nick memoserv; type services; };
alias operserv { type services; };
alias os { target operserv; type services; };
alias os { nick operserv; type services; };
alias helpserv { type services; };
alias hs { target helpserv; type services; };
alias hs { nick helpserv; type services; };
alias botserv { type services; };
alias bs { target botserv; type services; };
alias bs { nick botserv; type services; };
include "aliases/aliases.conf";
+6 -6
View File
@@ -1,14 +1,14 @@
/* Generic Aliases */
alias nickserv { type services; };
alias ns { target nickserv; type services; };
alias ns { nick nickserv; type services; };
alias chanserv { type services; };
alias cs { target chanserv; type services; };
alias memoserv { type services; spamfilter yes; };
alias ms { target memoserv; type services; spamfilter yes; };
alias cs { nick chanserv; type services; };
alias memoserv { type services; };
alias ms { nick memoserv; type services; };
alias operserv { type services; };
alias os { target operserv; type services; };
alias os { nick operserv; type services; };
alias helpserv { type services; };
alias hs { target helpserv; type services; };
alias hs { nick helpserv; type services; };
include "aliases/aliases.conf";
+1 -1
View File
@@ -1,4 +1,4 @@
/* Generic StatServ Aliases */
alias statserv { type stats; };
alias ss { target statserv; type stats; };
alias ss { nick statserv; type stats; };
+7 -7
View File
@@ -1,17 +1,17 @@
/* IRCServices Aliases */
alias nickserv { type services; };
alias ns { target nickserv; type services; };
alias ns { nick nickserv; type services; };
alias chanserv { type services; };
alias cs { target chanserv; type services; };
alias memoserv { type services; spamfilter yes; };
alias ms { target memoserv; type services; spamfilter yes; };
alias cs { nick chanserv; type services; };
alias memoserv { type services; };
alias ms { nick memoserv; type services; };
alias operserv { type services; };
alias os { target operserv; type services; };
alias os { nick operserv; type services; };
alias helpserv { type services; };
alias hs { target helpserv; type services; };
alias hs { nick helpserv; type services; };
alias irciihelp { type services; };
alias statserv { type services; };
alias ss { target statserv; type services; };
alias ss { nick statserv; type services; };
include "aliases/aliases.conf";
+2 -2
View File
@@ -1,6 +1,6 @@
/* OperStats Aliases */
alias operserv { type stats; };
alias os { target operserv; type stats; };
alias os { nick operserv; type stats; };
alias statserv { type stats; };
alias ss { target statserv; type stats; };
alias ss { nick statserv; type stats; };
+6 -39
View File
@@ -52,29 +52,14 @@ AC_DEFUN(CHECK_LIBCURL,
[AC_HELP_STRING([--enable-libcurl=DIR],[enable libcurl (remote include) support])],
[
CURLCFLAG=`$enableval/bin/curl-config --cflags`
CFLAGS="$CFLAGS $CURLCFLAG -DUSE_LIBCURL"
CURLLIBS=`$enableval/bin/curl-config --libs`
dnl Ok this is ugly, basically we need to strip the version of c-ares that curl uses
dnl because we want to use our own version (which is hopefully fully binary
dnl compatible with the curl one as well).
dnl Therefore we need to strip the cares libs in a weird way...
dnl If anyone can come up with something better and still portable (no awk!?)
dnl then let us know.
if test "x`echo $CURLLIBS |grep ares`" != x ; then
dnl Attempt one: Linux sed
XCURLLIBS="`echo "$CURLLIBS"|sed -r 's/(@<:@^ @:>@+ @<:@^ @:>@+ )(@<:@^ @:>@+ @<:@^ @:>@+ )(.+)/\1\3/g' 2>/dev/null`"
if test x"$XCURLLIBS" = x; then
dnl Attempt two: FreeBSD (and others?) sed
XCURLLIBS="`echo "$CURLLIBS"|sed -E 's/(@<:@^ @:>@+ @<:@^ @:>@+ )(@<:@^ @:>@+ @<:@^ @:>@+ )(.+)/\1\3/g' 2>/dev/null`"
if test x"$XCURLLIBS" = x; then
AC_MSG_ERROR([sed appears to be broken. It is needed for a remote includes compile hack.])
fi
fi
CURLLIBS="$XCURLLIBS"
dnl curl-7.11.0 and up will include the ares info, older versions do not
if test "x`echo $CURLLIBS |grep .*ares.*`" = x ; then
CURLLIBS="$CURLLIBS -lares"
fi
IRCDLIBS="$IRCDLIBS $CURLLIBS"
CFLAGS="$CFLAGS $CURLCFLAG -DUSE_LIBCURL"
URL="url.o"
AC_SUBST(URL)
])
@@ -109,16 +94,7 @@ AC_MSG_CHECKING(for openssl)
done
if test x_$found_ssl != x_yes; then
AC_MSG_RESULT(not found)
echo ""
echo "Apparently you do not have both the openssl binary and openssl development libraries installed."
echo "You have two options:"
echo "a) Install the needed binaries and libraries"
echo " and run ./Config"
echo "OR"
echo "b) If you don't need SSL..."
echo " Run ./Config and say 'no' when asked about SSL"
echo ""
exit 1
AC_WARN(disabling ssl support)
else
CRYPTOLIB="-lssl -lcrypto";
if test ! "$ssldir" = "/usr" ; then
@@ -151,16 +127,7 @@ AC_MSG_CHECKING(for zlib)
done
if test x_$found_zlib != x_yes; then
AC_MSG_RESULT(not found)
echo ""
echo "Apparently you do not have the zlib development library installed."
echo "You have two options:"
echo "a) Install the zlib development library"
echo " and run ./Config"
echo "OR"
echo "b) If you don't need compressed links..."
echo " Run ./Config and say 'no' when asked about ziplinks support"
echo ""
exit 1
AC_WARN(disabling ziplink support)
else
IRCDLIBS="$IRCDLIBS -lz";
if test "$zlibdir" != "/usr" ; then
+30 -137
View File
@@ -20,20 +20,6 @@ CFLAGS="-pipe $CFLAGS"
fi
fi
dnl (the gcc flag detection trick is taken from xemacs/Vin Shelton)
dnl UnrealIRCd might not be strict-aliasing safe at this time
case "`$CC -v --help 2>&1`" in
*-fstrict-aliasing* ) CFLAGS="$CFLAGS -fno-strict-aliasing" ;;
esac
dnl Pointer signedness warnings are really a pain and 99.9% of the time
dnl they are of absolutely no use whatsoever. IMO the person who decided
dnl to enable this without -Wall should be shot on sight.
case "`$CC -v --help 2>&1`" in
*-Wpointer-sign* ) CFLAGS="$CFLAGS -Wno-pointer-sign" ;;
esac
AC_PROG_CXX
AC_PATH_PROG(RM,rm)
AC_PATH_PROG(CP,cp)
AC_PATH_PROG(TOUCH,touch)
@@ -54,13 +40,13 @@ AC_SUBST(IRCDLIBS)
AC_SUBST(MKPASSWDLIBS)
dnl module checking based on Hyb7's module checking code
AC_DEFUN([AC_ENABLE_DYN],
AC_DEFUN(AC_ENABLE_DYN,
[
AC_CHECK_FUNC(dlopen,, [AC_CHECK_LIB(dl, dlopen,IRCDLIBS="$IRCDLIBS -ldl",
AC_CHECK_FUNC(dlopen,, AC_CHECK_LIB(dl, dlopen,IRCDLIBS="$IRCDLIBS -ldl",
[
AC_MSG_WARN(Dynamic linking is not enabled because dlopen was not found)
AC_DEFINE(STATIC_LINKING)
])])
]))
hold_cflags=$CFLAGS
CFLAGS="$CFLAGS -export-dynamic"
@@ -77,9 +63,6 @@ if test "$ac_cv_prog_gcc" = "yes"; then
Darwin*[)]
ac_cv_pic="-bundle -flat_namespace -undefined suppress"
;;
HP-UX*[)]
ac_cv_pic="-fPIC"
;;
esac
else
case `uname -s` in
@@ -110,7 +93,7 @@ fi
MODULEFLAGS=$ac_cv_pic
AC_DEFINE(DYNAMIC_LINKING)
])
AC_DEFUN([AC_ENABLE_INET6],[
AC_DEFUN(AC_ENABLE_INET6,[
AC_CACHE_CHECK(if your system has IPv6 support, ac_cv_ip6, [
save_libs="$LIBS"
LIBS="$LIBS $SOCKLIB"
@@ -128,26 +111,9 @@ if test "$ac_cv_ip6" = "no"; then
AC_MSG_WARN(Your system does not support IPv6 so it will not be enabled)
else
AC_DEFINE(INET6)
dnl in6addr_any detection code taken from ratbox
AC_MSG_CHECKING([for struct in6addr_any])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#define IN_AUTOCONF
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>]],
[[struct in6_addr a = in6addr_any;]]
)],
[AC_MSG_RESULT(yes)],
[
AC_MSG_RESULT(no)
AC_DEFINE(NO_IN6ADDR_ANY)
]
)
fi
LIBS="$save_libs"
])
AC_CHECK_HEADER(sys/param.h,AC_DEFINE(PARAMH))
AC_CHECK_HEADER(stdlib.h,AC_DEFINE(STDLIBH))
AC_CHECK_HEADER(stddef.h,AC_DEFINE(STDDEFH))
@@ -258,27 +224,12 @@ dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_SETPGRP
AC_FUNC_SETVBUF_REVERSED
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(snprintf,AC_DEFINE(HAVE_SNPRINTF))
AC_CHECK_FUNCS(vsnprintf,AC_DEFINE(HAVE_VSNPRINTF))
AC_CHECK_FUNCS(strlcpy, AC_DEFINE(HAVE_STRLCPY))
AC_CHECK_FUNCS(strlcat, AC_DEFINE(HAVE_STRLCAT))
AC_CHECK_FUNCS(strlncat, AC_DEFINE(HAVE_STRLNCAT))
AC_CHECK_FUNCS(inet_pton, AC_DEFINE(HAVE_INET_PTON))
AC_CHECK_FUNCS(inet_ntop, AC_DEFINE(HAVE_INET_NTOP))
dnl Check if it supports C99 style variable length arrays
AC_CACHE_CHECK(if C99 variable length arrays are supported, ac_cv_varlen_arrays, [
AC_TRY_COMPILE(,[
int main() {
int i = 5;
int a[i];
a[0] = 1;
return 0;
}], ac_cv_varlen_arrays=yes, ac_cv_varlen_arrays=no)
])
if test "$ac_cv_varlen_arrays" = "yes" ; then
AC_DEFINE(HAVE_C99_VARLEN_ARRAY)
fi
AC_CACHE_CHECK(if we can set the core size to unlimited, ac_cv_force_core,[
AC_TRY_RUN([
#include <sys/time.h>
@@ -367,50 +318,25 @@ AC_ARG_WITH(sendq, [AC_HELP_STRING([--with-sendq=maxsendq],[Specify the max send
AC_DEFINE_UNQUOTED(MAXSENDQLENGTH,$withval),AC_DEFINE(MAXSENDQLENGTH,3000000))
AC_ARG_WITH(bufferpool, [AC_HELP_STRING([--with-bufferpool=size],[Specify the size of the buffer pool])],
AC_DEFINE_UNQUOTED(BUFFERPOOL,[($withval * MAXSENDQLENGTH)]),AC_DEFINE(BUFFERPOOL,[(18 * MAXSENDQLENGTH)]))
AC_ARG_WITH(hostname, [AC_HELP_STRING([--with-hostname=host],[Specify the local hostname of the server])], AC_DEFINE_UNQUOTED(DOMAINNAME,"$withval"),AC_DEFINE_UNQUOTED(DOMAINNAME,"`hostname`"))
AC_DEFINE_UNQUOTED(MYOSNAME,"`uname -a`")
AC_ARG_WITH(permissions, [AC_HELP_STRING([--with-permissions=permissions],[Specify the default permissions for
configuration files])], AC_DEFINE_UNQUOTED(DEFAULT_PERMISSIONS,$withval), AC_DEFINE(DEFAULT_PERMISSIONS, 0600))
AC_ARG_WITH(dpath, [AC_HELP_STRING([--with-dpath=path],[Specify the path where configuration files are stored])],
AC_DEFINE_UNQUOTED(DPATH, "$withval") IRCDDIR="$withval", AC_DEFINE_UNQUOTED(DPATH,"`pwd`") IRCDDIR="`pwd`")
AC_DEFINE_UNQUOTED(DPATH, "$withval") IRCDDIR="$withval"; mkdir $withval/tmp, AC_DEFINE_UNQUOTED(DPATH,"`pwd`") IRCDDIR="`pwd`" mkdir `pwd`/tmp)
AC_ARG_WITH(fd-setsize, [AC_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)
AC_ARG_WITH(spath, [AC_HELP_STRING([--with-spath],[Specify the location of the executable])],
AC_DEFINE_UNQUOTED(SPATH,"$withval/ircd") BINDIR="$withval",AC_DEFINE_UNQUOTED(SPATH,"`pwd`/src/ircd") BINDIR="`pwd`/src/ircd")
AC_DEFINE_UNQUOTED(SPATH,"$withval") BINDIR="$withval",AC_DEFINE_UNQUOTED(SPATH,"`pwd`/src/ircd") BINDIR="`pwd`/src/ircd")
AC_ARG_ENABLE(nospoof, [AC_HELP_STRING([--enable-nospoof],[Enable spoofing protection])], AC_DEFINE(NOSPOOF))
AC_ARG_ENABLE(prefixaq, [AC_HELP_STRING([--enable-prefixaq],[Enable chanadmin and chanowner prefixes])], AC_DEFINE(PREFIX_AQ))
AC_ARG_ENABLE(hub, [AC_HELP_STRING([--enable-hub],[Compile as a hub server])], AC_DEFINE(HUB))
AC_ARG_WITH(showlistmodes, [AC_HELP_STRING([--with-showlistmodes], [Specify whether modes are shown in /list])],
AC_DEFINE(LIST_SHOW_MODES))
AC_ARG_WITH(topicisnuhost, [AC_HELP_STRING([--with-topicisnuhost], [Display nick!user@host as the topic setter])],
AC_DEFINE(TOPIC_NICK_IS_NUHOST))
AC_ARG_WITH(shunnotices, [AC_HELP_STRING([--with-shunnotices], [Notify a user when he/she is no longer shunned])],
AC_DEFINE(SHUN_NOTICES))
AC_ARG_WITH(no-operoverride, [AC_HELP_STRING([--with-no-operoverride], [Disable OperOverride])],
AC_DEFINE(NO_OPEROVERRIDE))
AC_ARG_WITH(disableusermod, [AC_HELP_STRING([--with-disableusermod], [Disable /set* and /chg*])],
AC_DEFINE(DISABLE_USERMOD))
AC_ARG_WITH(operoverride-verify, [AC_HELP_STRING([--with-operoverride-verify], [Require opers to invite themselves to +s/+p channels])],
AC_DEFINE(OPEROVERRIDE_VERIFY))
AC_ARG_WITH(disable-extendedban-stacking, [AC_HELP_STRING([--with-disable-extendedban-stacking], [Disable extended ban stacking])],
AC_DEFINE(DISABLE_STACKED_EXTBANS))
MODULES_WHICH=commandsandmodules
AC_MSG_CHECKING(for how much module building work we need to do)
AC_ARG_WITH(moduleswhich,
[ --with-moduleswhich=onlycommands|onlymodules|commandsandmodules What modules to build],
[ case "$withval" in
yes|no)
;;
* )
MODULES_WHICH="$withval"
;;
esac])
AC_SUBST(MODULES_WHICH)
AC_MSG_RESULT($MODULES_WHICH)
CHECK_SSL
CHECK_ZLIB
CHECK_LIBCURL
AC_ARG_ENABLE(dynamic-linking, [AC_HELP_STRING([--enable-dynamic-linking],[Make the IRCd dynamically link shared objects rather than statically])], [AC_ENABLE_DYN], [AC_DEFINE(STATIC_LINKING)])
AC_ARG_ENABLE(inet6, [AC_HELP_STRING([--enable-inet6],[Make the IRCd support IPv6])], [AC_ENABLE_INET6])
AC_ARG_ENABLE(dynamic-linking, [AC_HELP_STRING([--enable-dynamic-linking],[Make the IRCd dynamically link shared objects rather than statically])], AC_ENABLE_DYN, AC_DEFINE(STATIC_LINKING))
AC_ARG_ENABLE(inet6, [AC_HELP_STRING([--enable-inet6],[Make the IRCd support IPv6])], AC_ENABLE_INET6)
AC_SUBST(IRCDDIR)
AC_SUBST(BINDIR)
AC_MSG_CHECKING(if FD_SETSIZE is large enough to allow $ac_fd file descriptors)
@@ -438,70 +364,37 @@ IRCDLIBS="$IRCDLIBS -lresolv "
;;
esac
dnl REMEMBER TO CHANGE WITH A NEW PCRE RELEASE!
tre_version="7.2"
AC_MSG_RESULT(extracting PCRE regex library)
dnl REMEMBER TO CHANGE WITH A NEW RELEASE!
tre_version="0.6.6"
AC_MSG_RESULT(extracting TRE regex library)
cur_dir=`pwd`
cd extras
dnl remove old tre directory to force a recompile...
rm -rf pcre-$tre_version
rm -rf tre-$tre_version
if test "x$ac_cv_path_GUNZIP" = "x" ; then
tar xfz pcre.tar.gz
tar xfz tre.tar.gz
else
cp pcre.tar.gz pcre.tar.gz.bak
gunzip -f pcre.tar.gz
cp pcre.tar.gz.bak pcre.tar.gz
tar xf pcre.tar
cp tre.tar.gz tre.tar.gz.bak
gunzip -f tre.tar.gz
cp tre.tar.gz.bak tre.tar.gz
tar xf tre.tar
fi
AC_MSG_RESULT(configuring PCRE regex library)
cd pcre-$tre_version
./configure --disable-shared --disable-system-abi --disable-utf8 --prefix=$cur_dir/extras/regexp || exit 1
AC_MSG_RESULT(compiling PCRE regex library)
$ac_cv_prog_MAKER || exit 1
AC_MSG_RESULT(installing PCRE regex library)
$ac_cv_prog_MAKER install || exit 1
AC_MSG_RESULT(configuring TRE regex library)
cd tre-$tre_version
./configure --disable-agrep --disable-shared --disable-system-abi --disable-wchar --disable-multibyte --prefix=$cur_dir/extras/regexp
AC_MSG_RESULT(compiling TRE regex library)
$ac_cv_prog_MAKER
AC_MSG_RESULT(installing TRE regex library)
$ac_cv_prog_MAKER install
TREINCDIR="$cur_dir/extras/regexp/include"
AC_SUBST(TREINCDIR)
if test "x$ac_cv_path_PKGCONFIG" = "x" ; then
TRELIBS="-L../extras/regexp/lib -lpcreposix -lpcre"
TRELIBS="-L../extras/regexp/lib -ltre"
else
TRELIBS="`$ac_cv_path_PKGCONFIG --libs libpcre.pc` -lpcreposix -lpcre"
TRELIBS=`$ac_cv_path_PKGCONFIG --libs tre.pc`
fi
AC_SUBST(TRELIBS)
cd $cur_dir
dnl REMEMBER TO CHANGE WITH A NEW C-ARES RELEASE!
cares_version="1.4.0"
AC_MSG_RESULT(extracting c-ares resolver library)
cur_dir=`pwd`
cd extras
dnl remove old c-ares directory to force a recompile...
rm -rf c-ares-$cares_version
if test "x$ac_cv_path_GUNZIP" = "x" ; then
tar xfz c-ares.tar.gz
else
cp c-ares.tar.gz c-ares.tar.gz.bak
gunzip -f c-ares.tar.gz
cp c-ares.tar.gz.bak c-ares.tar.gz
tar xf c-ares.tar
fi
AC_MSG_RESULT(configuring c-ares library)
cd c-ares-$cares_version
./configure --prefix=$cur_dir/extras/c-ares || exit 1
AC_MSG_RESULT(compiling c-ares resolver library)
$ac_cv_prog_MAKER || exit 1
AC_MSG_RESULT(installing c-ares resolver library)
$ac_cv_prog_MAKER install || exit 1
CARESINCDIR="$cur_dir/extras/c-ares/include"
AC_SUBST(CARESINCDIR)
CARESLIBDIR="-L../extras/c-ares/lib"
AC_SUBST(CARESLIBDIR)
CARESLIBS="-lcares"
AC_SUBST(CARESLIBS)
cd $cur_dir
AC_OUTPUT(Makefile src/modules/Makefile src/modules/chanmodes/Makefile unreal ircdcron/ircdchk)
AC_OUTPUT(Makefile src/modules/Makefile unreal ircdcron/ircdchk)
chmod 0700 unreal
chmod 0700 ircdcron/ircdchk
Vendored
+2086 -5249
View File
File diff suppressed because it is too large Load Diff
-4453
View File
File diff suppressed because it is too large Load Diff
-42
View File
@@ -1,42 +0,0 @@
/* Example of a possible semi-secure /DCCALLOW configuration written by Syzop.
* $Id$
*
* Actually nothing is *100% secure*... there could still be
* bugs in the software itself (think: a winamp bug that can
* be exploited via an mp3, or: a wmplayer bug that can be
* exploited via a specially crafted .wmv, etc..).
* If you are really that paranoid you could just remove
* all 'allow dcc'-blocks and prompt the user for EVERY file ;).
*
* Still, I think this file is a good tradeoff between userfriendlyness
* and security. Note that when you try to only DENY specific
* file type (exe, com, etc) you are *guaranteed* to miss ones
* (like: did you know .r17 gets treated as a rar archive?
* and that an exe can be disguished as .cmd which is executable
* on nt/w2k/xp?)
*/
/* first.. deny everything, then allow known-good stuff... */
deny dcc { filename "*"; reason "Possible executable content"; soft yes; };
/* common image formats */
allow dcc { filename "*.jpg"; soft yes; };
allow dcc { filename "*.jpeg"; soft yes; };
allow dcc { filename "*.gif"; soft yes; };
allow dcc { filename "*.png"; soft yes; };
allow dcc { filename "*.bmp"; soft yes; };
/* audio / video (but not scripted/playlists!) */
allow dcc { filename "*.mp1"; soft yes; };
allow dcc { filename "*.mp2"; soft yes; };
allow dcc { filename "*.mp3"; soft yes; };
allow dcc { filename "*.mpg"; soft yes; };
allow dcc { filename "*.mpeg"; soft yes; };
allow dcc { filename "*.m1v"; soft yes; };
allow dcc { filename "*.m2v"; soft yes; };
allow dcc { filename "*.vob"; soft yes; };
allow dcc { filename "*.wav"; soft yes; };
/* text / misc */
allow dcc { filename "*.txt"; soft yes; };
allow dcc { filename "*.log"; soft yes; };
allow dcc { filename "*.pdf"; soft yes; };
allow dcc { filename "*.c"; soft yes; };
allow dcc { filename "*.cpp"; soft yes; };
+2 -3
View File
@@ -123,8 +123,7 @@ Carsten Munk <stskeeps@unrealircd.com> / May 1999, date
Dominick Meglio <codemastr@unrealircd.com> / June 1999, date
David Flynn / March 2000, June 2000
McSkaf / June 2001, September 2001
Finny Merrill <griever@unrealircd.com> / November 2001, December 2002
Bram Matthys <syzop@unrealircd.com> / January 2002, date
Finny Merrill <griever@unrealircd.com> / November 2001, date
Thanks go to those persons not mentioned here who have added their advice,
opinions, and code to IRC.
@@ -144,4 +143,4 @@ Eric P. Scott <eps@toaster.sfsu.edu>
Dan Goodwin <fornax@wpi.wpi.edu>
Noah Friedman <friedman@ai.mit.edu>
[ $Id$ ]
[ $Id$ ]
+195
View File
@@ -0,0 +1,195 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>UnrealIRCd - 3.2 - Offical Documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<p> <font size="-1">I M P O R T A N T R E A D I N G</font></p>
<p><font size="-1">(YES, YOU WILL NEED TO READ ALL OF THIS)</font></p>
<p><font size="-1">* Unreal3.2 is a lot different than Unreal3.1.1. Forget
all you have learned about setting up Unreal3.1.1 - this is a lot different.
We have got a new configuration format that integrates all the former config
files,ircd.conf, vhost.conf, chrestrict.conf, unrealircd.conf, into to one newunrealircd.conf
(what the ircd.conf is called now). See doc/ for more information on the configuration
format</font></p>
<p><font size="-1">* THIS IS A BETA VERSION, REPORT BUGS ON http://bugs.unrealircd.org</font></p>
<p><font size="-1">* We have introduced a new cloaking algorithm (+x), which makes
it incompatible with Unreal3.1.1 - these can however still link, but the hostname
will look different. This is made of three big numbers, configured in the config
file - and these MUST be the same on all servers on the network. Keep these
numbers secret, and the cloaking algorithm is uncrackable (within 55 years,
that is). The +x algorithm was changed slightly to fix a method of cracking
that was found. #define COMPAT_BETA4_KEYS to use the beta4 system for compatibility
with older betas.</font></p>
<p><font size="-1">* If you use Linux and have problems where the IRCd complains
that MAXCONNECTIONS is larger than FD_SETSIZE, you need to get your root to
edit /usr/include/bits/types.h - #define __FD_SETSIZE 1024 to be somenumber
that is equal or higher than MAXCONNECTIONS. This is a problem with Linux that
it is hard coded and non override able in some distributions. We recommend you
use FreeBSD or the variants of this if you need to run high load IRC servers.</font></p>
<p><font size="-1">* We use autoconf to help with compilation, and this should
make us able to a lot more platform (we have even ported to BeOS).</font></p>
<p><font size="-1">* We require a pthreads library for the SOCKS scan now - and
this is now done in the background (no more waiting!).</font></p>
<p><font size="-1">* The IRCd is now modularized, and you load modules with the
loadmodule command. You will most likely want to add these lines:<br>
loadmodule &quot;src/modules/commands.so&quot;;<br>
loadmodule &quot;src/modules/scan.so&quot;;<br>
loadmodule &quot;src/modules/scan_socks.so&quot;;<br>
loadmodule &quot;src/modules/scan_http.so&quot;;</font></p>
<p><font size="-1"> If you would like to code a module, doc/ will contain a module
guide,and we got an example module in src/modules/m_dummy.c.</font></p>
<p><font size="-1">* We have some IPv6 support, and there are some minor bugs
in it.</font></p>
<p><font size="-1">* The documentation is NOT yet 100% complete</font></p>
<p><font size="-1">* We have added snomask (similar to ircu), basically this allowed
us to remove several modes. Modes +cfFkje are gone, but don't worry, you can
still use them. They are now added like this:</font></p>
<p><font size="-1"> /mode yournick +s +cF</font></p>
<p><font size="-1"> You set the flags in the second parameter of the mode command
for a mode change +s, setting -s with no parameters removes all your snomask.
You can remove a specific snomask by doing:</font></p>
<p><font size="-1"> /mode yournick -s -c</font></p>
<p><font size="-1">The current snomasks are:</font></p>
<p><font size="-1"> c - local connects<br>
F - far connects<br>
f - flood notices<br>
k - kill notices<br>
e - 'eyes' notices<br>
j - 'junk' notices<br>
v - vhost notices<br>
G - gline/shun notices<br>
n - nick change notices<br>
q - deny nick (Q:line) rejection notices</font></p>
<p><font size="-1"> It shouldn't be too hard to figure out, just play around with
it a bit :)</font></p>
<p><font size="-1">* /who needs testing it was recorded and may contain bugs</font></p>
<p><font size="-1">* We have added alias {} which allows you to dynamically create
commands such as /nickserv Read example.conf for more information on how to
create your own. To use standard ones include one of the following files</font></p>
<p><font size="-1"> aliases/ircservices.conf (IRCServices, Daylight)<br>
aliases/epona.conf (Epona)<br>
aliases/auspice.conf (Auspice)<br>
aliases/generic.conf (Magick, Sirius, Wrecked)<br>
aliases/operstats.conf (OperStats)<br>
aliases/genericstats.conf (GeoStats, NeoStats)</font></p>
<p><font size="-1">* You can now use an IP in the oper::from and vhost::from fields
even if the host resolves</font></p>
<p><font size="-1">* Added an http proxy scanner (scan_http.so)</font></p>
<p><font size="-1">* Added oper::snomask to specify default oper snomask modes</font></p>
<p><font size="-1">* /helpop text has been moved to a config directive, help {}.
To keep the standard help text you need to include help.conf so add include
&quot;help.conf&quot;; to your config file.</font></p>
<p><font size="-1">* To be able to use G:lines you must now have the can_gkline
flag (or t if old style flags)</font></p>
<p><font size="-1">* Usermode +T (Tech Admin) has been removed, since it is 100%
useless</font></p>
<p><font size="-1">* Added a make install to copy files to the installation location</font></p>
<p><font size="-1">* Removed ./ircd, ./killircd, crypt/mkpasswd, ./rehash and
merged them into a new ./unreal [start|stop|rehash|mkpasswd] for mkpasswd the
format is</font></p>
<p><font size="-1"> ./unreal mkpasswd [method] [password]</font></p>
<p><font size="-1">* Added a new system for crypting passwords. You now do for
example password &quot;my password&quot; { crypt; }; This allows you to have
some crypted passwords and others not. If you have SSL enabled you may also
use the md5 and sha1 methods.</font></p>
<p><font size="-1">* The old blackhole is now set::scan::endpoint and specifies
an IP and port to tell proxies to connect to.</font></p>
<p><font size="-1">* You can now specify a cipher list for SSL links (read doc/conf.doc
for more info)</font></p>
<p><font size="-1">* +I is now in invisibility.so so it is easily disabled</font></p>
<p><font size="-1">* set::socks has been replaced by set::scan (read doc/conf.doc
for more info)</font></p>
<p><font size="-1">* If you experience problems with the scanners, perhaps check
out BOPM (http://www.blitzed.org/bopm)</font></p>
<p><font size="-1">* log {} syslog support added (read doc/unreal32docs.html for
more info)</font></p>
<p><font size="-1">* Added ripemd-160 password encryption support</font></p>
<p><font size="-1">* Enabled sha1 and md5 password encryption on Win32 regardless
of whether SSL is used.</font></p>
<p><font size="-1">* Added WinNT/2k/XP service support (experimental) To use this
you use the unreal.exe utility: unreal install -installs the service<br>
unreal uninstall -uninstalls the service <br>
unreal start -starts the service <br>
unreal stop -stops the service<br>
unreal restart -restarts the service<br>
unreal rehash -rehashes the config file</font></p>
<p><font size="-1"> Config errors and crashes are now logged to service.log when
in service mode.</font></p>
<p><font size="-1">* Implemented a new win32 debugger to make fixing bugs much
easier.</font></p>
<p><font size="-1">* Added a win32 installer to simplify installing under Windows.</font></p>
<p><font size="-1">* AKILL/RAKILL is deprecated. Server command still works but
will be removed eventually (aliases to TKL G). For normal opers it notices that
the commands are deprecated.</font></p>
<p><font size="-1">Made the config parser smarter when it comes to time values
and size values. Entries are no longer limited to 1d2h1m. You can now enter
&quot;1day 2 hours 1 minute&quot; for example. See doc/conf.doc for more information.</font></p>
<p><font size="-1">* The oper override code has been rewritten to be less intrusive.
You can now no longer automatically join a channel for which you must override
a mode. You must /invite yourself to the channel. The idea behind this is it
prevents the accidental &quot;rejoin on kick&quot; ban override and joining
a +s channel without realizing it is +s and therefore you shouldn't know it
exists.</font></p>
<p><font size="-1">* If you use the SSL features of Unreal, you should use OpenSSL
0.9.6e or later. This is important as the older versions may make the program
exploitable. See http://www.openssl.org for more information</font></p>
<p><font size="-1">* We have made a lot of changes to deal with SSL, and if you
find any flaws or problems, please contact the coder team. We however think
that the changes will make SSL more transparent and make it work more efficiently.</font></p>
<p><font size="-1">* Added technical documentation in doc/technical. This directory
will contain information about the protocol used by Unreal.</font></p>
<p><font size="-1">* Added EGD support for SSL. EGD allows entropy to be gathered
on systems that do not have a random device (/dev/random or /dev/urandom) or
have an unreliable random device. Unreal has been tested using EGADS (http://www.securesoftware.com/egads.php)
[With EGD support enabled], PRNGD (http://www.aet.tu-cottbus.de/personen/jaenicke/postfix_tls/prngd.html),
and EGD (http://egd.sourceforge.net). Other EGD compatible programs should work
as well.</font></p>
<p><font size="-1">* We have created a new complete set of docs! doc/unreal32docs.html
is now a complete<br>
set of docs! It is still not finished, however it contains atleast what was
already<br>
avail. in the other doc files. <br>
It can also be view online @ http://www.unrealircd.com/unreal32docs.html</font></p>
<p><font size="-1">* We have removed ./Setup - Please read the new docs for information
on configuring &amp;<br>
setting up Unreal3.2</font></p>
<p><font size="-1">* Removed makeconf - Read the docs to make a config file</font></p>
<p><font size="-1">* Added set::ssl::options with the following options:<br>
fail-if-no-clientcert - If SSL client connects and doesn't provide a client<br>
certificate, abort connection immediately<br>
verify-certificate - Check the certificate's validity using X509 methods, check if<br>
we trust CA's, etc. <br>
It however does slip self signed certificates through UNLESS<br>
no-self-signed - Don't allow self-signed certificates through (requires<br>
verify-certificate)</font></p>
<p><font size="-1">* Added the ability specify which CA's are trusted using set::ssl::trusted-ca-file</font></p>
<p><font size="-1">* A new configuration system has been added. The system is a bit more strict (meaning it
will complain more often) but it will never crash due to configuration errors, just
display a message saying errors exist.</font></p>
<p><font size="-1">* SVSLUSERS was added to all U:lines to change local and global max user counts (this is
NOT meant so you can make the max count higher than it really should be.)</font></p>
<p><font size="-1">* A new oper flag, can_override/v has been added. This is an attempt to stop oper abuse.
All opers can no longer use oper-override, this oflag MUST be in place for oper-override
to be allowed. Can_override is NOT assumed to be present no matter what your flags,
meaning you could be +N but still not be allowed to use oper-override.</font></p>
<p><font size="-1">* UNKLINE and UNZLINE have been removed in favor of a system like G:lines, to remove you
now /kline -user@host or /zline -user@host</font></p>
<p><font size="-1">* MAKE SURE YOU RERUN ./Config AND RUN make clean BEFORE USING
THIS VERSION!!!</font></p>
<p> </p>
<p> </p>
<p><font size="+2"><strong>Notes on compatibility</strong><a name="notesoncompatibility" id="notesoncompatibility"></a></font><br>
</p>
<p>Unreal 3.2 is ONLY compatible with Unreal3.1.4 and Unreal3.2 servers. DO NOT
ATTEMPT to link to servers that it is NOT compatible with.</p>
<p>
</body>
</html>
+1 -57
View File
@@ -2,12 +2,7 @@
Some minor rules about patches & modifications to UnrealIRCd
1. When making a change, always add a small description in Changes, in the
BOTTOM. Be sure to mention the bugid# (or muliple id's) if you are fixing
a bug from a bugtracker, and be sure to credit the reporter. Use:
'Fixed blahblahblah, reported by Blah (#0001234).'
Or, for example, for features:
'Added support for blahbalbvdshd, suggested by Blah (#0001235).'
Or something similar ;)
BOTTOM
2. If new files are made, it must contain proper copyright headers,
and a $Id$ somewhere.
@@ -44,54 +39,3 @@ Some minor rules about patches & modifications to UnrealIRCd
8. We do NOT rip people off. If we use other people's code, it MUST be
properly credited.
9. We generally use tabsize 4 and 8. In any case, use tabs and NOT spaces.
Some code is old and horrible and has a mix of tabs and spaces used for
spacing, that's something we do not want to have ;)
10. Be careful about overflows. As you know a line from a user can never be longer
than 511 (510?) characters, sometimes you can use this knowledge to your
advantage. Whenever it's not safe or when you don't know what input size you
can expect, use strlcpy instead of strcpy. Do not ever use strncpy, this is
older, slower, and does not add proper zero termination.
For the same reason, use snprintf if really needed. Note though, that using
ircsprintf with a bigger buffer (eg: 1024 bytes) is MUCH faster, so preferably
use that instead of snprintf. The same can be true for strcpy vs strlcpy in
some circumstances as well.
11. Speed. When optimizing or writing code, keep in mind that readability and
stability comes first, and after that comes speed. So we'd rather prefer some
readable code (even if difficult) over some odd highly optimized routine which
nobody understands, is difficult to extend, and might have several bugs.
As mentioned earlier: use ircsprintf, not sprintf (this is because ircsprintf
is optimized for simple strings like the ones we use).
Prefer ircsprintf with a bigger buffer over the use of snprintf, since
ircsprintf is much faster.
12. Initialize your structs and use the proper memory calls.
In UnrealIRCd we use MyMalloc, MyMallocEx and MyFree (so not malloc/free).
MyMalloc usually maps to malloc, and MyMallocEx is a malloc plus filling
the memory area (eg: the struct) with zero's (a la calloc).
Use of MyMallocEx is suggested. In general you should not be using MyMalloc.
"But MyMalloc is faster!" you might say. This is true, but using MyMallocEx
has very little speed impact and enourmous benefits: people tend to forget
to set certain fields in the struct to NULL, or much more common: when
someone later on (eg: 1 year later) adds a field to a struct, there could
be several places he/she needs to update to make sure x->something is NULL
after allocating a new struct. Bad idea.
Little speed impact, huge stability benefits, easy decision ;).
13. Comment your code! This should speak for itself...
Put comments wherever you think they are needed, to aid any further coders
with reading your code.. and, in fact, it will aid yourself as well if you
would look back at your code 2 years later.
If there's some obscure pitfall, do mention it! Don't just "hope" a next
author will see it like you did.
14. Use enums whenever possible, rather than #define constants. Besides making
things more clean, it also aids debugging.
15. Whenever you add a new directive or setting, be sure to add documentation
for it in unreal32docs, and for new commands in help.conf as well.
16. Whenever you add a new set:: item, be sure to add it to /stats S
+33 -99
View File
@@ -1,109 +1,43 @@
==[ IMPORTANT MESSAGE ABOUT DISABLING NOSPOOF ]==
Disabling NOSPOOF at windows (w9x, nt, w2k, xp) is NOT recommended since this
WILL allow users to use "spoofed hosts" (like the IP of someone you trust).
will allow users to use "spoofed hosts" (like the IP of someone you trust).
If you have problems with NOSPOOF, fix your client (bot?) instead (you should PONG
back to the initial PING at connect).
If you got problems with NOSPOOF fix your client (bot?) instead (you should
PONG back to the initial PING at connect).
==[ GENERAL GUIDELINES ]==
First of all you need Microsoft Visual C++ (see below), compiling with
cygwin is not supported (nor is there any good reason to do so).
==[ HOW TO COMPILE UNREALIRCD WITHOUT SSL AT WINDOWS ]==
First of all you need Microsoft Visual C++, compiling with cygwin
is not supported.
Compatible compilers:
cygwin NOT supported. Will not work. Should be no reason to use this anyway.
msvc 6.x Microsoft Visual Studio 6 does not work, this compiler is too old.
msvc 7.x Microsoft Visual Studio 7.x (.NET) will work just fine
msvc 8.x Microsoft Visual Studio 8.x (.NET 2005), including the free kit,
should work fine (since Unreal3.2.5).
If you don't have the paid version of Microsoft Visual Studio 7.x, then you can
use the FREE development kit and PSDK as explained below:
1. Download the MS Visual Studio Development kit at:
http://msdn.microsoft.com/visualc/vctoolkit2003/
2. Install the Platform Software Development Kit (PSDK) from:
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
3. NOTE: Whenever you need to compile something we say 'Start the Visual Studio
.NET Command Prompt' below, but you - a person using the free version - will
actually have to start the Platform SDK Prompt instead (check out the
Start Menu).
== Simple compile (no SSL/ZIP/Remote includes) ==
1. Start the Visual Studio .NET Command Prompt
2. Go to your UnrealIRCd dir (like: cd \dev\unreal3.2) and then compile with:
== "old" VC++ 6.0 ==
1. You need the Platform SDK (PSDK)
Grab it at: http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ ->
core sdk -> install this sdk.
Note that this can take some time to download because it's >200Mb
(450mb installed) [!].
2. To compile:
start -> programs -> platform sdk blabla -> open build env. -> (choose os) ->
set blabla build env (debug). This will launch a DOS window.
3. Go to your UnrealIrcd dir (like: cd \dev\unreal3.2) and then compile with:
nmake -f makefile.win32
This will generate a wircd.exe and unreal.exe
3. Copy the src\win32\tre.dll to your UnrealIRCd main dir.
4. Copy the src\win32\tre.dll to your UnrealIrcd main dir.
5. Done!
== VC++ 7.x (.NET) ==
1. Start the Visual Studio .NET Command Prompt
2. Go to your UnrealIrcd dir (like: cd \dev\unreal3.2) and then compile with:
nmake -f makefile.win32
This will generate a wircd.exe and unreal.exe
3. Copy the src\win32\tre.dll to your UnrealIrcd main dir.
4. Done!
== Compiling modules ==
1. Put your module (the .c file) in src\modules (eg: c:\dev\unreal3.2\src\modules).
2. Start the Visual Studio .NET Command Prompt
3. Go to your UnrealIRCd dir (like: cd \dev\unreal3.2).
4. Compile the module with:
nmake -f makefile.win32 custommodule MODULEFILE=<name>
<name> is the name of the module WITHOUT the .c suffix, so if your
module has the filename 'm_crappymod.c', then you use:
nmake -f makefile.win32 custommodule MODULEFILE=m_crappymod
5. Done. A .dll file should have been created.
==[ HOW TO COMPILE UNREALIRCD WITH SSL AT WINDOWS ]==
Ouch, that's much work ;).
You need to compile openssl yourself.
Then have a look at makefile.win32 for instruction on how
to enable / specify path / etc...
DO NOT ask us for help with compiling openssl!
If you compiled with VC7 and used the official source (not a CVS version,
but for example 3.2.1 source) then the module should work on all these
versions (binary compatible) and you could for example put them on
your website so users can download them.
Such a module will work on both SSL and non-SSL, there should be no need
for separate versions... unless, of course, you use SSL-specific code in your
mod.
DO NOT download a CVS version & compile your mod and then start
distributing the .dll for use at another (non-CVS) version!!
Every time we change a struct (and in some other cases) it makes the
binary/module binary incompatible which practically means that your module
might seem to work fine at first (or not..) but will CRASH or cause memory
corruption and other subtle errors.
== COMPILING WITH ZIP LINKS / SSL / REMOTE INCLUDES SUPPORT ==
First of all, DO NOT use any precompiled libs from the official
zlib/openssl/curl sites. We require certain compile parameters.
Versions downloaded from such sites will often CRASH.
The easiest is to download the UnrealIRCd development package
which contains zlib, openssl and curl precompiled for you.
See: www.vulnscan.org/unrealwin32dev/
Just extract it somewhere (eg: to c:\dev).
Then, use compile flags to enable the features + specify where to look.
Here are examples if you used c:\dev:
ZIP: nmake -f makefile.win32 USE_ZIPLINKS=1 ZLIB_INC_DIR="c:\dev\zlib" ZLIB_LIB_DIR="c:\dev\zlib\dll32"
SSL: nmake -f makefile.win32 USE_SSL=1 OPENSSL_INC_DIR="c:\dev\openssl\include" OPENSSL_LIB_DIR="c:\dev\openssl\lib"
CURL: nmake -f makefile.win32 USE_REMOTEINC=1 LIBCURL_INC_DIR="c:\dev\curl\include" LIBCURL_LIB_DIR="c:\dev\curl\lib"
Obviously you can (and probably will) combine all these options, like
to build a zip+ssl+curl version (all in 1 line):
nmake -f makefile.win32 USE_ZIPLINKS=1 ZLIB_INC_DIR="c:\dev\zlib" ZLIB_LIB_DIR="c:\dev\zlib\dll32"
USE_SSL=1 OPENSSL_INC_DIR="c:\dev\openssl\include" OPENSSL_LIB_DIR="c:\dev\openssl\lib" USE_REMOTEINC=1
LIBCURL_INC_DIR="c:\dev\curl\include" LIBCURL_LIB_DIR="c:\dev\curl\lib"
== SYMBOL FILES ==
If you get something like this:
Creating library L_COMMANDS.lib and object L_COMMANDS.exp
M_OPER.obj : error LNK2019: unresolved external symbol _sendto_snomask_global re
ferenced in function _m_oper
(note: the exact name of the symbol will vary)
Then you will have to rebuild the wircd.def symbol file. You do this by
downloading http://www.vulnscan.org/tmp/dlltool.exe and putting the file somewhere
in your path (eg: c:\winnt\system32).
Then, to compile you do this:
nmake -f makefile.win32 [your other options here]
nmake -f makefile.win32 SYMBOLFILE
nmake -f makefile.win32 [your other options here]
So basically you just run 'nmake -f makefile.win32 SYMBOLFILE' and then restart
compiling again.
== COMPILING ZLIB/SSL/CURL YOURSELF ==
This is off-topic and not explained here.
Again, use the stuff from the win32 development pack unless you have a good
reason to do otherwise (in which case we might not support your self-compiled version
because we work with specific versions / compile options).
==[ AND ZIP LINKS SUPPORT? ]==
See makefile.win32 for instructions.
+69 -77
View File
@@ -14,11 +14,9 @@
* closing } line. The IRCd will ignore commented lines.
*
* PLEASE READ doc/unreal32docs.html! The online version is also available at:
* www.vulnscan.org/UnrealIRCd/unreal32docs.html
* www.vulnscan.org/UnrealIrcd/unreal32docs.html
* It contains a lot information about the configfile: gives information about
* every block, variable, etc..
* If you try to edit this file without reading the documentation properly
* then you are pretty much guaranteed to fail!
*/
/* Type of comments */
@@ -28,17 +26,10 @@
#those lines are ignored by the ircd.
/*
* UnrealIRCd supports modules, loading some of them is required.
* You need at least the commands module and a cloaking module.
* At *NIX UnrealIrcd supports modules.
* Loading the commands module is required:
*/
/* FOR *NIX, uncomment the following 2lines: */
//loadmodule "src/modules/commands.so";
//loadmodule "src/modules/cloak.so";
/* FOR Windows, uncomment the following 2 lines: */
//loadmodule "modules/commands.dll";
//loadmodule "modules/cloak.dll";
loadmodule "src/modules/commands.so";
/*
* You can also include other configuration files.
@@ -74,8 +65,7 @@ me
/*
* NEW: admin {}
* OLD: A:Line
* Admin gives information on the server admin. you
* OLD: A:Line Admin gives information on the server admin. you
* may put as many lines under admin { as you wish.
* Syntax is as follows:
* admin {
@@ -190,10 +180,39 @@ allow channel {
* };
*/
/* OLD OPER FLAG | NEW FLAG NAME
O global
o local
a services-admin
A admin
r can_rehash
D can_die
R can_restart
h helpop
w can_wallops
g can_globops
c can_localroute
L can_globalroute
k can_localkill
K can_globalkill
b can_kline
Z can_gzline
t can_gkline
B can_unkline
n can_localnotice
G can_globalnotice
N netadmin
C coadmin
z can_zline
W get_umodew
H get_host
v can_override
*/
/* For a list of oper flags, see doc/unreal32docs.html#operblock
* [HIGHLY recommended to read]
*/
/*
Note: netadmin gives you OaAN
admin and services-admin give you o as well
*/
oper bobsmith {
class clients;
@@ -204,13 +223,9 @@ oper bobsmith {
flags
{
netadmin;
can_zline;
can_gzline;
can_gkline;
global;
};
};
/*
* NEW: listen {}
* OLD: P:Line
@@ -262,14 +277,6 @@ listen *:6697
listen *:8067;
listen *:6667;
/* NOTE: If you are on an IRCd shell with multiple IP's you are
* likely to get 'Address already in use' errors in your log
* and the ircd won't start. This means you MUST bind
* to a specific IP instead of '*', so for example:
* listen 1.2.3.4:6667;
* Obviously, replace the IP with the IP that was assigned to you.
*/
/*
* NEW: link {}
* OLD: C/N:Lines
@@ -290,9 +297,9 @@ listen *:6667;
* options {
* (options here*);
* };
* // If we use SSL, we can choose what cipher to use in SSL mode
* // Retrieve a list by "openssl ciphers", separate ciphers with :'s
*
* /* If we use SSL, we can choose what cipher to use in SSL mode
* * Retrieve a list by "openssl ciphers", seperate ciphers with :'s
* */
* ciphers "DES-CBC3-MD5";
*
* };
@@ -320,7 +327,9 @@ link hub.mynet.com
password-receive "LiNk";
class servers;
options {
/* Note: You should not use autoconnect when linking services */
/* Note: You should not use autoconnect when linking
* services
*/
autoconnect;
ssl;
zip;
@@ -365,6 +374,8 @@ drpass {
*
* FLAGS: errors, kills, tkl, connects, server-connects, kline, oper
*
* NOTICE: Right now, SEGV messages are *always* sent to ircd.log. codemastr is
* working on a way to redirect the messages to this log file. *
* Syntax:
* log "log file"
* {
@@ -388,10 +399,6 @@ log "ircd.log" {
server-connects;
kills;
errors;
sadmin-commands;
chg-commands;
oper-override;
spamfilter;
};
};
@@ -403,7 +410,7 @@ log "ircd.log" {
*
* Syntax:
* alias "name" {
* target "points to";
* nick "points to";
* type aliastype;
* };
*
@@ -412,14 +419,14 @@ log "ircd.log" {
// This points the command /nickserv to the user NickServ who is connected to the set::services-server server
/*alias NickServ {
target "NickServ";
nick "NickServ";
type services;
};*/
// If you want the command to point to the same nick as the command, you can leave the nick entry out
//alias ChanServ { type services; };
// Points the /statserv command to the user StatServ on the set::stats-server server
// Points the /statserv command to the user StatServ on the set::stats-name server
//alias StatServ { type stats; };
// Points the /superbot command to the user SuperBot
@@ -441,7 +448,7 @@ alias StatServ { type stats; };
* Syntax:
* alias "name" {
* format "format string" {
* target "points to";
* nick "points to";
* type aliastype;
* parameters "parameters to send";
* };
@@ -454,12 +461,12 @@ alias StatServ { type stats; };
/*
alias "identify" {
format "^#" {
target "chanserv";
nick "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
target "nickserv";
nick "nickserv";
type services;
parameters "IDENTIFY %1-";
};
@@ -474,19 +481,18 @@ alias "identify" {
/* The alias::format::parameters is similar to scripting languages. %N (where N is a number) represents a
* parameter sent to the command (in this case /identify). If you specify %N- it means all parameters from
* N until the last parameter in the string. You may also specify %n which is replaced by
* the user's nickname.
* N until the last parameter in the string.
*/
/* Standard aliases */
alias "services" {
format "^#" {
target "chanserv";
nick "chanserv";
type services;
parameters "%1-";
};
format "^[^#]" {
target "nickserv";
nick "nickserv";
type services;
parameters "%1-";
};
@@ -495,30 +501,18 @@ alias "services" {
alias "identify" {
format "^#" {
target "chanserv";
nick "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
target "nickserv";
nick "nickserv";
type services;
parameters "IDENTIFY %1-";
};
type command;
};
/* This is an example of a real command alias */
/* This maps /GLINEBOT to /GLINE <parameter> 2d etc... */
alias "glinebot" {
format ".+" {
command "gline";
type real;
parameters "%1 2d Bots are not allowed on this server, please read the faq at http://www.example.com/faq/123";
};
type command;
};
/*
* NEW: tld {}
@@ -539,11 +533,6 @@ tld {
rules "ircd.rules.fr";
};
/* note: you can just delete the example block above,
* in which case the defaults motd/rules files (ircd.motd, ircd.rules)
* will be used for everyone.
*/
/*
* NEW: ban nick {}
* OLD: Q:Line
@@ -707,16 +696,14 @@ set {
help-channel "#ROXnet";
hiddenhost-prefix "rox";
/* prefix-quit "no"; */
/* Cloak keys should be the same at all servers on the network.
/* Your cloak keys should be 3 random numbers between 10000 and 2147483646
* and should be the same at all servers on the network.
* They are used for generating masked hosts and should be kept secret.
* The keys should be 3 random strings of 5-100 characters
* (10-20 chars is just fine) and must consist of lowcase (a-z),
* upcase (A-Z) and digits (0-9) [see first key example].
*/
cloak-keys {
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
"and another one";
"and another one";
9666;
3333;
3330;
};
/* on-oper host */
hosts {
@@ -737,6 +724,11 @@ set {
modes-on-connect "+ixw";
modes-on-oper "+xwgs";
oper-auto-join "#opers";
dns {
nameserver 127.0.0.1;
timeout 2s;
retries 2;
};
options {
hide-ulines;
/* You can enable ident checking here if you want */
@@ -763,7 +755,7 @@ set {
*/
oper-only-stats "okfGsMRUEelLCXzdD";
/* Throttling: this example sets a limit of 3 connection attempts per 60s (per host). */
/* Throttling: this example sets a limit of 3 connections per 60s (per host). */
throttle {
connections 3;
period 60s;
@@ -785,8 +777,8 @@ set {
/*
* Problems or need more help?
* 1) www.vulnscan.org/UnrealIRCd/unreal32docs.html
* 2) www.vulnscan.org/UnrealIRCd/faq/ <- contains 80% of your questions!
* 1) www.vulnscan.org/UnrealIrcd/unreal32docs.html
* 2) www.vulnscan.org/UnrealIrcd/faq/ <- contains 80% of your questions!
* 3) If you still have problems you can go irc.ircsystems.net #unreal-support,
* note that we require you to READ THE DOCUMENTATION and FAQ first!
*/
+53
View File
@@ -0,0 +1,53 @@
/*
* Example set {} block
*/
set {
/*
* This is the mail users will get shown when k-lined
*/
kline-address "mail.to.mail.to";
/*
* What modes will users get when connecting to this server
*/
modes-on-connect "+ix";
/* What channels users will autojoin */
auto-join "0";
/* What channels opers will autojoin on connect*/
oper-auto-join "0";
dns {
/* What IP has our DNS server got? */
nameserver 127.0.0.1;
/* How long time will we wait for each attempt? */
timeout 2s;
/* How many attempts will we do */
retries 2s;
};
options {
enable-opermotd;
enable-chatops;
hide-ulines;
// webtv-support;
identd-check;
};
/*
* How many channels each user can join
*/
maxchannelsperuser 10;
/*
* This is a new thing in Unreal3.2.
* You _need_ to make three numbers up, bigger than 100000
* These MUST be the SAME on EVERY server in your NETWORK
* If people discover these keys, it is easier for them to crack
* the +x algoritm.
*/
cloak-keys
{
0;
0;
0;
};
};
+8 -73
View File
@@ -1,4 +1,5 @@
Numeric 005 Documentation (c) 2002-2005 codemastr (Dominick Meglio) [codemastr@unrealircd.com]
Numeric 005 Documentation (c) 2002 codemastr (Dominick Meglio) [codemastr@unrealircd.com]
(As of Unreal3.2-beta11)
Numeric 005 allows the server to inform the client of any protocol specific features in the
IRCd. The numeric is sent at connection time immediately after numeric 004. Additionally
@@ -16,23 +17,13 @@ by this server"
Currently UnrealIRCd supports several tokens that are included in numeric 005. A list of
all tokens, their respective value and a brief description are listed below.
Unreal attempts to follow the proposed ISupport standard as much as possible. Unreal only
ignores the standard in one regard, the TARGMAX token. This token is believed to be
impractical and technically impossible to correctly implement due to existing limitations
in the standard. Therefore, this token is not currently supported.
Unreal does additionally provide a few tokens which are not specified in the standard, these
include: HCN, AWAYLEN, WATCH, SILENCE, EXTBAN, ELIST, and CMDS. Unreal also maintains a few
legacy tokens such as MAXCHANNELS and WALLCHOPS to ensure compatibility until the ISupport
standard is more widely accepted by clients.
Token Value Default Value Description
------------------------------------------------------------------------------------------------
MAP none none Informs the client that the /map
command is present. [Obsolete]
command is present.
KNOCK none none Informs the client that the /knock
command is present. [Obsolete]
command is present.
SAFELIST none none The LIST command is sent in
multiple iterations so that the
@@ -43,11 +34,10 @@ HCN none none The server supports t
(Hybrid Connect Notice) protocol.
MAXCHANNELS number 10 The maximum number of channels a
user may join. [Deprecated]
user may join.
MAXBANS number 60 The maximum number of bans that
may be placed for a channel.
[Obsolete]
NICKLEN number 30 Maximum length of a user's
nickname.
@@ -65,7 +55,6 @@ AWAYLEN number 307 Maximum length of an
WALLCHOPS none none Indicates that you may use
NOTICE/PRIVMSG to send to +ohv by
using PRIVMSG/NOTICE [@|%|+]#channel.
[Deprecated]
WATCH number 128 Indicates the presence of the
WATCH command and specifies the
@@ -85,8 +74,8 @@ PREFIX (modes)prefixes (qaohv)~&@%+ Indicates the modes o
that corespond to the given
nickname prefixes.
CHANMODES A,B,C,D be,kfL,lj, Specifies how each channel mode is
psmntirRcOAQKVHGCuzNSMT set/unset. The A section specifies
CHANMODES A,B,C,D be,k,lfL, Specifies how each channel mode is
psmntirRcOAQKVHGCuzN set/unset. The A section specifies
modes that add a nick/mask to a
list. The B section specifies
modes that require a parameter
@@ -106,62 +95,8 @@ CASEMAPPING string ascii Specifies what defini
characters are upper/lowercase
of eachother.
EXTBAN prefix,types ~,cqnr Specifies what extbans are
EXTBAN prefix,types ~,cqr Specifies what extbans are
supported by the server. The prefix
defines which character indicates
an extban and the types defines
which extbans the server supports.
ELIST flags MNUCT Specifies the set of extended LIST
options supported. The M flag
indicates mask based searching,
the N flag indicates negative
mask based searching. The U flag
means support for user count
searching. The C flag allows channel
creation time searching, and the T
flag allows topic set time
searching.
CMDS commands MAP,KNOCK,DCCALLOW,USERIP Specifies a series of commands that
can be useful for the client to know
exist as they may provide a more
efficient means for the client to
accomplish a specific task. This
token replaces the MAP and KNOCK
tokens.
STATUSMSG flags ~&@%+ Specifies the mode flags that may
prefix a channel name in a PRIVMSG
or NOTICE to limit who receives the
message to only those with a certain
level of access. This token will
replace the WALLCHOPS token.
EXCEPTS none none Indicates that channel ban exceptions
(+e) are supported by the server.
INVEX none none Indicates that channel invite
exceptions (+I) are supported by
the server.
MAXLIST mode:num,... b:60,e:60,I:60 Specifies the maximum number of
entries that may be added to a
particular mode list (type A modes).
This token replaces MAXBANS.
CHANLIMIT pfx:num,... #:10 Specifies the maximum number of
channels with the specified prefix
that a user may join at one time.
This token will replace MAXCHANNELS.
CHANNELLEN number 32 Provides the maximum length of a
channel name that a user can create.
NAMESX none none Indicates that extended /NAMES info
is available on this server. If the
client sends "PROTOCTL NAMESX" then
the server will, from then on, send
all channel rights in a NAMES reply
instead of only the highest right
(eg: @+Person instead of @Person).
-11
View File
@@ -128,14 +128,3 @@ ZIP If both servers have this set then the link will be (zlib) compres
TKLEXT This allows 10 instead of 8 parameters in TKL's for spamfilter, see s_kline.c
function m_tkl for more info on this (added in 3.2RC2).
NICKIP This token indicates that a (standard) base64 encoded IP address is included
in the NICK command. The IP is in binary network byte order formated and
encoded using the standard base64 algorithm. '*' is used if no IP is available.
NICKCHARS This specifies a list of language characters that are allowed in nicks.
USMARC codes are used, with a suffix if needed. See src/charsys.c for the full
list (ctrl+f, static LangList) of possible languages (2nd column).
The items in the list sent as NICKCHARS=.. must always be sorted.
If a server sends NICKCHARS= and if the remote parameters do not match the
charsets in use locally, then the server link is rejected.
-465
View File
@@ -1,465 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- $Id$ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>Unreal 3.2 Protocol Documentation</title>
</head>
<body>
<h1 style="text-align: center;">Unreal 3.2 Protocol Documentation</h1>
<h3 style="text-align: center;">Last update: 29 November 2006</h3>
<h1>Table of Contents</h1>
<p><a href="#S1">1 Introduction</a></p>
<p><a href="#S2">2 Server Negotiation</a></p>
<blockquote><p><a href="#S2_1">2.1 PASS - Connection Password</a></p></blockquote>
<blockquote><p><a href="#S2_2">2.2 PROTOCTL - Server Protocol Negotiation</a></p></blockquote>
<blockquote><p><a href="#S2_3">2.3 SERVER - Server Negotiation</a></p></blockquote>
<blockquote><p><a href="#S2_4">2.4 EOS - End Of Synch</a></p></blockquote>
<blockquote><p><a href="#S2_5">2.5 NETINFO - Network Information</a></p></blockquote>
<p><a href="#S3">3 User Operations</a></p>
<blockquote><p><a href="#S3_1">3.1 NICK - User Introduction and Nick Change</a></p></blockquote>
<blockquote><blockquote><p><a href="#S3_1_1">3.1.1 Nick Collisions</a></p></blockquote></blockquote>
<blockquote><p><a href="#S3_2">3.2 MODE, UMODE2 - User Mode Change</a></p></blockquote>
<blockquote><p><a href="#S3_3">3.3 QUIT - User Disconnect</a></p></blockquote>
<blockquote><p><a href="#S3_4">3.4 KILL - Force Disconnect</a></p></blockquote>
<blockquote><p><a href="#S3_5">3.5 SETHOST/CHGHOST - Change virtual host</a></p></blockquote>
<blockquote><p><a href="#S3_6">3.6 SETIDENT/CHGIDENT - Change a user's username</a></p></blockquote>
<blockquote><p><a href="#S3_7">3.7 SETNAME/CHGNAME - Change a user's realname</a></p></blockquote>
<blockquote><p><a href="#S3_8">3.8 WHOIS - User Information</a></p></blockquote>
<p><a href="#S1">4 Server Operations</a></p>
<blockquote><p><a href="#S4_1">4.1 SERVER - Server Introduction</a></p></blockquote>
<blockquote><p><a href="#S4_2">4.2 SQUIT - Server Removal</a></p></blockquote>
<blockquote><p><a href="#S4_3">4.3 SDESC - Server Description</a></p></blockquote>
<blockquote><p><a href="#S4_4">4.4 PING - Live Connection Query</a></p></blockquote>
<blockquote><p><a href="#S4_5">4.5 PONG - Live Connection Reply</a></p></blockquote>
<blockquote><p><a href="#S4_6">4.6 STATS - Server Stats</a></p></blockquote>
<p><a href="#S5">5 Channel Operations</a></p>
<blockquote><p><a href="#S5_1">5.1 SJOIN - Channel Burst</a></p></blockquote>
<blockquote><p><a href="#S5_2">5.2 JOIN - Channel Join</a></p></blockquote>
<blockquote><p><a href="#S5_3">5.3 PART - Channel Part</a></p></blockquote>
<blockquote><p><a href="#S5_4">5.4 KICK - Channel Kick</a></p></blockquote>
<blockquote><p><a href="#S5_5">5.5 MODE - Channel Mode</a></p></blockquote>
<blockquote><p><a href="#S5_6">5.6 INVITE - Invite a user to a channel</a></p></blockquote>
<blockquote><p><a href="#S5_7">5.7 SAJOIN - Channel Force Join</a></p></blockquote>
<blockquote><p><a href="#S5_8">5.8 SAPART - Channel Force Part</a></p></blockquote>
<blockquote><p><a href="#S5_9">5.9 SAMODE - Channel Force Mode</a></p></blockquote>
<blockquote><p><a href="#S5_10">5.10 TOPIC - Chanel Topic</a></p></blockquote>
<p><a href="#S6">6 Services Commands</a></p>
<blockquote><p><a href="#S6_1">6.1 SVSKILL - Force Disconnect by Service</a></p></blockquote>
<blockquote><p><a href="#S6_2">6.2 SVSMODE, SVS2MODE - Force User Mode Change</a></p></blockquote>
<blockquote><p><a href="#S6_3">6.3 SVSSNO, SVS2SNO - Forced SNomask Change</a></p></blockquote>
<blockquote><p><a href="#S6_4">6.4 SVSNICK - Forced Nick Change</a></p></blockquote>
<blockquote><p><a href="#S6_5">6.5 SVSJOIN - Forced Join</a></p></blockquote>
<blockquote><p><a href="#S6_6">6.6 SVSPART - Forced Part</a></p></blockquote>
<blockquote><p><a href="#S6_7">6.7 SVSO - Oper Permissions</a></p></blockquote>
<blockquote><p><a href="#S6_8">6.8 SVSNOOP - Oper Lockdown</a></p></blockquote>
<blockquote><p><a href="#S6_9">6.9 SVSNLINE - RealName Ban</a></p></blockquote>
<blockquote><p><a href="#S6_10">6.10 SVSFLINE - File Ban</a></p></blockquote>
<p><a href="#S7">7 Messaging</a></p>
<blockquote><p><a href="#S7_1">7.1 PRIVMSG, NOTICE - Simple Message Transmission</a></p></blockquote>
<blockquote><p><a href="#S7_2">7.2 SENDUMODE, SMO - Usermode-based Delivery</a></p></blockquote>
<blockquote><p><a href="#S7_3">7.3 SENDSNO - SNomask-based Delivery</a></p></blockquote>
<blockquote><p><a href="#S7_4">7.4 CHATOPS - IRCop Chat</a></p></blockquote>
<blockquote><p><a href="#S7_5">7.5 WALLOPS - Wallop Chat</a></p></blockquote>
<blockquote><p><a href="#S7_6">7.6 GLOBOPS - FailOp Chat</a></p></blockquote>
<blockquote><p><a href="#S7_7">7.7 ADCHAT - Admin Chat</a></p></blockquote>
<blockquote><p><a href="#S7_8">7.8 NACHAT - NetAdmin Chat</a></p></blockquote>
<p><a href="#S8">8 Ban Control</a></p>
<blockquote><p><a href="#S8_1">8.1 TKL - Master Ban Control</a></p></blockquote>
<blockquote><blockquote><p><a href="#S8_1_1">8.1.1 GLINE - Network-wide user@host ban</a></p></blockquote></blockquote>
<blockquote><blockquote><p><a href="#S8_1_2">8.1.2 GZLINE - Network-wide IP ban</a></p></blockquote></blockquote>
<blockquote><blockquote><p><a href="#S8_1_3">8.1.3 SQLINE, UNSQLINE - Network-wide Nickname ban</a></p></blockquote></blockquote>
<blockquote><blockquote><p><a href="#S8_1_4">8.1.4 SPAMFILTER - Message Spam Filtration System</a></p></blockquote></blockquote>
<p><a href="#S9">9 Base64 Tables</a></p>
<blockquote><p><a href="#S9_1">9.1 Table for SJB64 (NICK and SJOIN).</a></p></blockquote>
<blockquote><p><a href="#S9_2">9.2 Table for NICKIP.</a></p></blockquote>
<hr/>
<h1><a name="S1"></a>1 Introduction</h1>
<p>This document describes the UnrealIRCd server-to-server protocol as of protocol 2307 (Unreal 3.2.4).</p>
<h2>A word about clocks.</h2>
<p>Unreal is very time-dependant. Users and channels, for example, are timestamped, and if server clocks are not synchronized properly, things can go very wrong very fast. See <a href="http://vulnscan.org/UnrealIrcd/faq/#67">http://vulnscan.org/UnrealIrcd/faq/#67</a> for more information on this. Note that there is a slight difference between server time and what is actually reported by the UNIX date command or by the C time() function. Unreal can apply an offset to the real time to create the server time, allowing servers to be virtually synchronized when synchronizing the real clocks is not possible (such as on shell servers).
I should make it quite clear that GMT time is used for everything. To be specific, timestamps in unreal are 32-bit integer values (actually, however many bits the time_t type is, which is 32 on 32-bit systems such as x86). This integer value is the number of seconds that have elapsed since Midnight January 1, 1970 GMT (can be referred to as Epoch time in the UNIX world). This means that timezones are no problem, nor is daylight savings time (or whatever your country of choice calls it).</p>
<hr/>
<h1><a name="S2"></a>2 Server Negotiation</h1>
<p>The first step to establish a server-to-server communication is to negotiate the connection as a server. Negotiation is done using standard IRC commands - no PROTOCTL options are in force until the link is established. The first step is to open a TCP/IP connection to the target server. The target port must be one described by a listen {} block in the remote server's configuration, and that listen block must not have the clientsonly option. After the connection is open, you will be treated as any other connection and be greeted with the "Looking up your hostname..." and "Checking identd..." notices as you would for a client. As these are NOTICE messages and your session as a server isn't established, they should simply be ignored. Use the commands below to introduce a server connection.</p>
<h2><a name="S2_1"></a>2.1 PASS - Connection Password</h2>
<p><b>Syntax:</b> <tt>PASS :<i>link password</i></tt></p>
<p>The PASS command is used to transmit the password required for a server link. It must match the password specified in the remote server's link::password-receive (which can be crypted), otherwise the link will be rejected. This should be the first message sent.</p>
<h2><a name="S2_2"></a>2.2 PROTOCTL - Server Protocol Negotiation</h2>
<p><b>Syntax:</b> <tt>PROTOCTL <i>protocol options</i></tt></p>
<p>The PROTOCTL command sets several protocol options. The tokens supported are listed below.</p>
<ul>
<li>NOQUIT : When a netsplit occurs, only send a SQUIT message for each server lost. This server will assume that clients on these servers were also lost and will send the appropriate QUIT messages to local clients and to any non-NOQUIT servers.</li>
<li>TOKEN : Use tokenized commands. Tokens are case-sensitive, shortened versions of command names. Tokens will be usually one or two characters.</li>
<li>NICKv2 : Use extended NICK message for introducing users. See the NICK command for information about this.</li>
<li>VHP : When introducing a user, send his cloaked host as if it were a vhost. Usually used for services to avoid having duplicate code.</li>
<li>SJOIN : Supports SJOIN version 1 which is no longer in use. Use with SJ3.</li>
<li>SJOIN2 : Supports SJOIN version 2 which is no longer in use. Use with SJ3.</li>
<li>UMODE2 : Supports the UMODE2 command, which is a shortened version of MODE for usermode changes.</li>
<li>VL : Supports V:Line information. Extends the SERVER message to include version information used in deny version{} blocks. Note that this is assumed - unreal will always send its own version information.</li>
<li>SJ3 : Supports SJOIN version 3.</li>
<li>NS : Supports server numerics which provides a shorthand for server names. In any circumstance where a :server.name is permitted (the server is the message's real source), @servernumeric may be used instead. In addition, the server.name parameter in the NICK message may be simply the server's numeric. Requires VL support.</li>
<li>SJB64 : Timestamps in NICK and SJOIN are expressed in base64 rather than base10.</li>
<li>TKLEXT : Supports exntended TKL messages for spamfilter support.</li>
<li>NICKIP : Adds an IP parameter to the NICK message, which is the base64 encoding of the user's ip address (in network byte order). Requires NICKv2.</li>
<li>NICKCHARS : Indicates the set of enabled nickchar options (see the regular documention for info about this).</li>
<li>CHANMODES : (Not required to be sent) This is the same as the CHANMODES value in the 005 for client connections. Useful for autodetecting things like what modes are valid for ChanServ MLOCK, for example.</li>
<li>CLK : Supports an extra field in NICK for sending the cloaked host (not vhost).</li>
</ul>
<p>The syntax examples here follow the conventions for TOKEN and also NS in cases of server-only messages.</p>
<h2><a name="S2_3"></a>2.3 SERVER - Server Negotiation</h2>
<p><b>Note:</b> This message is also used for introducing additional servers, the format of this message in those cases is described later.</p>
<p><b>Syntax (normal):</b> <tt>SERVER <i>server.name</i> 1 :<i>server description</i></tt></p>
<p><b>Syntax (with VL):</b> <tt>SERVER <i>server.name</i> 1 :U<i>protocolversion</i>-<i>protocolflags</i> <i>server description</i></tt></p>
<p><b>Syntax (with VL and NS):</b> <tt>SERVER <i>server.name</i> 1 :U<i>protocolversion</i>-<i>protocolflags</i>-<i>servernumeric</i> <i>server description</i></tt></p>
<p>The literal 1 in the parameter list is the hopcount parameter. Since you are a direct link, your own hopcount will be 1.</p>
<p>The server.name is the same as that in the remote server's link:: block. When received from unreal servers, this will be the value of that server's me::name. The protocol version is the numeric protocol version (2306 for example), and the protocol flags are the server's compilation flags (described below). These two fields are checked against the deny version {} blocks in the remote server's configuration. A value of 0 for either field prevents deny version{} checking for that field. The server description can be anything. When received from unreal servers, it'll be the value of me::description.</p>
<p>The following version numbers have been used previously:</p>
<ul>
<li>2309 - Unreal 3.2.6</li>
<li>2308 - Unreal 3.2.5</li>
<li>2307 - Unreal 3.2.4</li>
<li>2306 - Unreal 3.2.3</li>
<li>2305 - Unreal 3.2.2</li>
<li>2304 - Unreal 3.2.1</li>
<li>2303 - Unreal 3.2beta* through 3.2 Release</li>
<li>2302 - Unreal 3.1.1 through 3.1.4</li>
<li>2301 - Unreal 3.1 Release</li>
<li>2300 - Unreal 3.0 Release</li>
</ul>
<p>The compile flags as specified in protocol flags are:</p>
<ul>
<li>c : Server is chrooted (#define CHROOTDIR).</li>
<li>C : Server has command line config (-f option) enabled (#define CMDLINE_CONFIG).</li>
<li>D : Server is in debugmode (#define DEBUGMODE).</li>
<li>F : Using filedescriptor lists.</li>
<li>h : Server is compiled with hub support (#define HUB or answer "Hub" to relevant ./Config prompt).</li>
<li>i : Server shows invisible users in /TRACE.</li>
<li>n : NOSPOOF (pingcookies) is enabled (#define NOSPOOF or answer "Yes" to relevant ./Config prompt).</li>
<li>V : Server is using valloc().</li>
<li>W : Windows IRCd.</li>
<li>Y : Syslog logging enabled.</li>
<li>6 : Server has IPv6 support (#define INET6 or answer "yes" to relevant ./Config prompt).</li>
<li>X : Server has badword stripping (user and channel modes +G) (#define STRIPBADWORDS).</li>
<li>P : Server is using poll().</li>
<li>e : Server has SSL Support (#define USE_SSL or answer "yes" (and have ssl libraries installed) to relevant ./Config prompt).</li>
<li>O : Server has OperOverride enabled (#undef NO_OPEROVERRIDE or answer "no" to relevant ./Config prompt).</li>
<li>o : Server has disabled Oper verify (#undef OPEROVERRIDE_VERIFY or answer "no" to relevant ./Config prompt).</li>
<li>Z : Server has ziplink support (#define ZIP_LINKS or answer "yes" to relevant ./Config prompt AND have the zlib dev libraries).</li>
<li>E : Server has extended channel mode support.</li>
<li>3 : 3rd party modules are loaded or some system libraries are wonky.</li>
<li>m : Private message handling is 'tainted' (one or modules registered a USERMSG hook).</li>
<li>M : Channel message handling is 'tainted' (one or modules registered a CHANMSG hook).</li>
<li>Additional Version flags can be added by 3rd-party modules.</li>
</ul>
<h2><a name="S2_4"></a>2.4 EOS - End Of Synch (TOKEN: ES)</h2>
<p><b>Syntax:</b> ES</p>
<p>Marks the end of the synching process. This is really optional, but it might be a good idea to send it anyway when you really are done synching. Once you send this, unreal will announce &quot;Client connecting&quot; or &quot;Client exiting&quot; notices (to those with snomask +F) for users (unless your server is U:Lined), and joins will be counted toward channel flood controls (chanmode +f).</p>
<p>Sending EOS only marks your server as synched, but does not do so for servers behind you. EOS would need to be sent on those servers' behalf as well.</p>
<h2><a name="S2_5"></a>2.5 NETINFO - Network Information (TOKEN: AO)</h2>
<p><b>Syntax:</b> AO <i>maxglobal</i> <i>currenttime</i> <i>protocolversion</i> <i>cloakhash</i> 0 0 0 :<i>networkname</i></p>
<p>This tells the other server your current network configuration. The max global is the highest number of concurrent users network-wide that this server has seen. The current time is a timestamp value. Protocolversion is the same as that in the SERVER command. Cloakhash is a hash representing the configured cloak keys. It may be a * if you are implementing services. The network name is that specified in set::network-name. The cloak-prefix is currently not sent here (and thus unreal won't generate warning for mismatching cloak prefixes, but they should be the same anyway).</p>
<p>It is NETINFO, not EOS, that triggers the &quot;Link bla bla bla is now synched&quot; notices, but NETINFO does not imply synching is actually complete (see EOS).</p>
<hr/>
<h1><a name="S3"></a>3 User Operations</h1>
<p>One important function of servers is it must notify all other servers about all of the users behind it. These commands represent the operations that can result in the change of a user's global state.</p>
<h2><a name="S3_1"></a>3.1 NICK - User Introduction and Nick Change (TOKEN: &amp;)</h2>
<p><b>Syntax (nick change):</b> <tt>:<i>oldnick</i> &amp; <i>newnick</i> :<i>timestamp</i></tt></p>
<p>This format of the NICK message indicates an existing user is changing his or her nickname. If a collision occurs, see the section on Nick Collisions below. The timestamp is the new nickname's timestamp.</p>
<p><b>Syntax (normal):</b> <tt>&amp; <i>nick</i> <i>hopcount</i> <i>timestamp</i> <i>username</i> <i>hostname</i> <i>server</i> <i>servicestamp</i> :<i>realname</i></tt></p>
<p><b>Syntax (NICKv2):</b> <tt>&amp; <i>nick</i> <i>hopcount</i> <i>timestamp</i> <i>username</i> <i>hostname</i> <i>server</i> <i>servicestamp</i> <i>+usermodes</i> <i>virtualhost</i> :<i>realname</i></tt></p>
<p><b>Syntax (NICKv2+CLK):</b> <tt>&amp; <i>nick</i> <i>hopcount</i> <i>timestamp</i> <i>username</i> <i>hostname</i> <i>server</i> <i>servicestamp</i> <i>+usermodes</i> <i>virtualhost</i> <i>cloakhost</i> :<i>realname</i></tt>
<p><b>Syntax (NICKv2+NICKIP):</b> <tt>&amp; <i>nick</i> <i>hopcount</i> <i>timestamp</i> <i>username</i> <i>hostname</i> <i>server</i> <i>servicestamp</i> <i>+usermodes</i> <i>virtualhost</i> <i>nickipaddr</i> :<i>realname</i></tt></p>
<p><b>Syntax (NICKv2+NICKIP+CLK):</b> <tt>&amp; <i>nick</i> <i>hopcount</i> <i>timestamp</i> <i>username</i> <i>hostname</i> <i>server</i> <i>servicestamp</i> <i>+usermodes</i> <i>virtualhost</i> <i>cloakhost</i> <i>nickipaddr</i> :<i>realname</i></tt>
<p><b>Note:</b> Because each server normally does its own cloak generation, Unreal does not expect to receive NICK messages with the CLK info, so do not send it. It will send this info to a server it has received a PROTOCTL CLK from however.</p>
<p>This format of the NICK message introduces a new user to the network. If PROTOCTL VHP is enabled, the user's cloaked host is put in the virtualhost field, otherwise it'll be * unless the user is +t. With the addition of CLK, VHP is no longer necessary for determining the cloak host.</p>
<h3><a name="S3_1_1"></a>3.1.1 Nick Collisions</h3>
<p>A nick collision occurs when a server receives a NICK message (or &amp; token) introducing a user that the server already sees on the network. When a collision occurs, one or both of the colliding clients must be disconnected. The timestamp is examined to determine which client loses. The client with the earlier timestamp remains. If both clients have equal timestamps, both are removed. Currently, Unreal handles NICK collisions both passively and agressively:</p>
<ul>
<li><b>Aggressive Handling:</b> The server actively sends a KILL message back across the link to terminate that end's client.</li>
<li><b>Passive Handling:</b> Upon receipt of a NICK message that should "win", the server simply silently exits it's own client.</li>
</ul>
<h2><a name="S3_2"></a>3.2 MODE, UMODE2 - User Mode Change (TOKEN: G or |)</h2>
<p><b>Syntax (MODE):</b> <tt>:<i>user</i> G <i>user</i> <i>modechange</i></tt></p>
<p><b>Syntax (UMODE2):</b> <tt>:<i>user</i> | <i>modechange</i></tt></p>
<p>This indicates a usermode change. The modechange can consist of zero or more strings of characters, each prefixed with either a + or -; the only delimiter between them being said + or -. If no + or - is at the beginning of the mode string, a + should be implied.</p>
<p>Some user modes are never sent between servers. Specifically, usermode +s and +O are not sent between servers. Modules can define additional usermodes that also might not be sent between servers. The UMODE2 saves bandwidth by not including the redundant target field for usermode changes, so use it when possible.</p>
<h2><a name="S3_3"></a>3.3 QUIT - User Disconnect (TOKEN: ,)</h2>
<p><b>Syntax:</b> <tt>:<i>user</i> , :<i>reason</i></tt></p>
<p>This command indicates that a user has disconnected. The reason field is filled in with the reason the user disconnected, which will be any of: quit message provided by the user in a /quit command, kill message for local operator kills, "Client exited" if the user does a brutal quit (clean (by TCP's definition) disconnect without sending a QUIT message), or a socket error message if present.</p>
<p>The QUIT message must NOT be prefixed when passing on to other servers. Only local user quit messages are affected by set::prefix-quit.</p>
<h2><a name="S3_4"></a>3.4 KILL - Force Disconnect (TOKEN: .)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> . <i>target</i> :<i>killpath</i>!<i>source</i> (<i>reason</i>)</tt></p>
<p>Used to indicate that an operator has used KILL on a user not on the same server. Anything beyond the last ! in the kill path is used as the reason. The source (reason) part is simply a standard used by Unreal. As each server passes on a KILL message, it usually prepends the bottommost part (up to the first .) of it's name followed by a ! character. When unreal receives a KILL from a directly connected irc operator, it will usually add that oper's vhost (or realhost if -x) as the first hop in the kill path, then follow with it's own name as mentioned before if it is passing to another server.</p>
<p>A server can also send KILLs on it's own. This is done in cases involving nickname collisions, fake senders, bad direction, and other cases of protocol errors. Usually, in these cases, the server puts it's own name as the source, and also prefixes with <i>bottompart</i>! like for any other ircop on that server. For example: @3 . someone :irc!irc.example.com (Nick collision)</p>
<h2><a name="S3_5"></a>3.5 SETHOST/CHGHOST - Change virtual host (TOKEN: AA or AL)</h2>
<p><b>Syntax (SETHOST):</b> <tt>:<i>source</i> AA <i>newvhost</i></tt></p>
<p><b>Syntax (CHGHOST):</b> <tt>:<i>source</i> AL <i>target</i> <i>newvhost</i></tt></p>
<p>Indicates the change of a user's virtual host. Currently, servers are expected to assume UMODE2 +xt on the target user in both commands. (In the case of SETHOST, the target is the sender.) Servers using PROTOCTL VHP will receive the cloaked host in a SETHOST message when a user activates his cloaked host. A server can also send CHGHOST (from one of it's opered clients) to change a user's hostname. This is generally used by HostServ implementations. To disable a cloaked host, use CHGHOST to set the user's virtual host equal to his real host, or use SVSMODE -xt, but the latter requires services.</p>
<h2><a name="S3_6"></a>3.6 SETIDENT/CHGIDENT - Change a user's username (TOKEN: AD or AZ)</h2>
<p><b>Syntax (SETIDENT):</b> <tt>:<i>source</i> AD <i>newusername</i></tt></p>
<p><b>Syntax (CHGIDENT):</b> <tt>:<i>source</i> AZ <i>target</i> <i>newusername</i></tt></p>
<p>Indicates the change of a user's username. No usermode change is associated with this. Unreal does not use a distinguished virtual username, so servers should only keep the original username (from the NICK message) if they intend to allow the user to reset the original username. Servers can use CHGIDENT to change a user's username.</p>
<h2><a name="S3_7"></a>3.7 SETNAME/CHGNAME - Change a user's realname (TOKEN: AE or BK)</h2>
<p><b>Syntax (SETNAME):</b> <tt>:<i>source</i> AE :<i>newrealname</i></tt></p>
<p><b>Syntax (CHGNAME):</b> <tt>:<i>source</i> BK <i>target</i> :<i>newrealname</i></tt></p>
<p>Indicates the change of a user's realname. No usermode change is associated with this. Unreal does not use a distinguished virtual realname, so servers should only keep the original realname (from the NICK message) if they intend to allow the user to reset the original realname. Servers can use CHGNAME to change a user's username. Note that servers must NOT check that the sender be an IRCop in SETNAME - normal users are permitted to use SETNAME.</p>
<h2><a name="#S3_8"></a>3.8 WHOIS - User Information (TOKEN: #)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> # [<i>from-server</i> ]<i>nick</i></tt></p>
<p>Requests the information on a user. This works exactly like the user /whois command - in fact, the source parameter must be a user, or the command will do nothing. <i>from-server</i> is the server to request the information from; if a server recives a WHOIS message without this parameter, it should return its own information on the user, otherwise it should pass the message to the given server. Note that <i>from-server</i> may name a user instead of a server (such as when a user uses /whois nick nick), in which case the the nick should be interpreted as naming the server that user is on. <i>nick</i> may be several users seperated by commas, but may not contain wildcards.</p>
<p>The reply to a WHOIS message uses the same numeric replies as the user command.</p>
<hr/>
<h1><a name="S4"></a>4 Server Operations</h1>
<p>This is different from server negotiation. Negotiation is when you are first connecting. Server introduction is used for introducing additional servers behind an existing server (aka hubbing). Hubbing is limited as specified by the hub, leaf, and leafdepth parameters in the link block and attempted violation of a hub restriction results in termination of the link. If no hub or leaf directive is given your server is a leaf by default, so any introduction of any server behind you would be an automatic drop. U:Lines don't matter here; services must be configured as a hub in the link block. The reason is U:Line is a permission rule, but hub privilege is a network structure rule.</p>
<h2><a name="S4_1"></a>4.1 SERVER - Server Introduction (TOKEN: ')</h2>
<p><b>Note: This command is also used for negotiation. Be warned that the token for this command is NOT VALID at that time! See section 2.3 for the syntax for negotiation.</b></p>
<p><b>Syntax (without PROTOCTL NS):</b> <tt>:<i>source</i> SERVER <i>new.server</i> <i>hopcount</i> :<i>description</i></tt></p>
<p><b>Syntax (with PROTOCTL NS):</b> <tt>@<i>sourcenumeric</i> SERVER <i>new.server</i> <i>hopcount</i> <i>numeric</i> :<i>description</i></tt></p>
<p>The command indicates that the server named new.server is being introduced by the source (the source is the server which new.server is directly linked to). The hopcount will be the number of links the receiving server would have to cross to reach new.server. In other words, new.server introduced itself with a hopcount of 1, and as the SERVER message is passed along, hopcount is incremented.</p>
<p>As an example, a services server faking a SERVER message for JUPE functionality would use a hopcount of 2.</p>
<h2><a name="S4_2"></a>4.2 SQUIT - Server Removal (TOKEN: -)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> SQUIT <i>server.name</i> <i>:reason</i></tt></p>
<p>From an IRCop or when server.name is not behind the source, this command requests the removal of the specified server.name. The command in this case is treated very much like KILL in the respect that the message is broadcasted to all servers, except server.name and any servers behind it. When the SQUIT reaches server.name's uplink, that server closes the link to server.name (which would then generate it's own SQUIT on behalf of it's uplink for the servers behind it).</p>
<p>A server can also use SQUIT in the same manner as QUIT to note the removal of a server behind it, or that it itself is quitting. In the former case, server.name is behind source, and the message is forward on to all other servers. In the latter case, source and server.name are equal, the receiving server closes the link and forwards the SQUIT message.</p>
<p>Unreal closes a direct link by simply sending an ERROR message and then closing the TCP connection. This typically causes the other end to generate an SQUIT bearing the message "Client exited" or similar, however, the ERROR will usually cause the server to send a message to all IRCops.</p>
<h2><a name="S4_3"></a>4.3 SDESC - Server Description (TOKEN: AG)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> AG :<i>newdesc</i></tt></p>
<p>The server to which source is connected to should have it's description updated to newdesc. This does NOT include the VL inforamtion.</p>
<h2><a name="S4_4">4.4 PING - Live Connection Query (TOKEN: 8)</a></h2>
<p><b>Syntax:</b> <tt>8 <i>source</i>[ :<i>destination</i>]</tt></p>
<p>Used to check if a connection is still live if it has been &quot;quiet&quot; for a certain amount of time. Typically, unreal will send PING requests at intervals determined by the class::pingfreq setting. PINGs originating from the direct uplink will use the token, but it seems PINGs originating from a distant server will not.</p>
<p>The response to a PING is sent with the <a href="#S4_5">PONG</a> command.</p>
<p>When receiving a two-parameter PING, the second parameter is the target. If the target isn't you, you can either reply on behalf of that target (using its name instead of yours), or if there is a real connection representing the target, forward the PING to the target.</p>
<h2><a name="S4_5">4.5 PONG - Live Connection Reply (TOKEN: 9)</a></h2>
<p><b>Syntax:</b> <tt>9 <i>source</i>[ :<i>destination</i>]</tt></p>
<p>Used to respond to a <a href="#S4_4">PING</a> query.</p>
<p><b>Responding to a ping:</b> Once a PING is received, you usually have an amount of time to respond equal to your class::pingfreq. The correct response will always have two parameters. If you received one parameter, then the received parameter becomes the second parameter of your response, and the first parameter is your server name. If you received two parameters, the response returns both parameters in reverse order.</p>
<p>For example, the response to <tt>8 uplink.server</tt> is <tt>9 my.name uplink.server</tt>, while the response to <tt>PING distant.server your.server</tt> is <tt>9 your.server distant.server</tt>. Unreal typically includes a : prior to the last parameter. This isn't required if that parameter contains no spaces, but it is especially important to not include the colon when reversing the parameters, or else Unreal mistake it for a single-parameter PONG.
<p>If a two-parameter PONG is received, the second parameter names the target. If the target is not you, and a real connection represents that target, you should forward the PONG message via that connection.</p>
<h2><a name="#S4_6"></a>4.6 STATS - Server Stats (TOKEN: 2)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> 2 [<i>type</i> [<i>server</i>] [<i>extended-params</i>]]</tt></p>
<p>Requests statistics or configuration information from a server. This command is used to transport cross-server STATS requests from users (eg: /stats o other.server), and should only be sent from a user (not a server). With no parameters, this will cause unreal to simply dump its help output. <i>type</i> is the type of stats to request, <i>server</i> names a server (or a user on that server) to request stats from, and <i>extended-params</i> is used to filter output from STATS G, etc. When received, it is up to the receiver to determine what stats to support and how to reply, but generally numeric replies are used. For the list of unreal's stats types, type /stats in a client for the helptext dump.</p>
<p><b>Note:</b> Stats set as oper-only (see set::oper-only-stats) will be refused from a server. In this case, it will be necessary to send the stats request from a psuedo-oper (such as a services agent, etc) for services/stats/etc.</p>
<hr/>
<h1><a name="S5"></a>5 Channel Operations</h1>
<p>These commands deal with the state of channels across the network. Unreal only supports Network Channels, where the first character is a # character.</p>
<h2><a name="S5_1"></a>5.1 SJOIN - Channel Burst (TOKEN: ~)</h2>
<p><b>Syntax:</b> <tt>@<i>servernumeric</i> ~ <i>timestamp</i> <i>channel</i> +<i>modes</i>[ <i>modeparams</i>] :<i>memberlist</i> <i>&amp;ban</i> <i>"exempt</i> <i>'invex</i></tt></p>
<p>Timestamp is the channel timestamp and can be !b64 as defined by PROTOCTL SJB64. Modes should only include those in the last three mode sets listed in CHANMODES. Modeparams is one parameter for each mode character that requires one. Memberlist is a series of users (all of which must at least be behind the server sending the SJOIN), each user is prefixed with one or more characters indicating their status. Owners (+q) are prefixed with *, admins (+a) ~, ops (+o) @, halfops (+h) %, voices (+v) +. Normal users are not prefixed with anything. Ban, ban exception, and invite exception masks are also included, with bans prefixed with &amp;, ban exceptions prefixed with ", and invite exceptions with '. Note that when a &amp;, " or ' is encountered as the first character, further processing of ~, *, @, %, or + characters must not continue because ban, exempt, and invite masks can contain any of those characters. (Plus it's just not right for a ban mask to be marked as a channel admin...)</p>
<p>If the channel didn't already exist it is created with the information given in the SJOIN. Otherwise the timestamp is used to determine how the SJOIN information is handled. As a given, all members are joined into the channel, regardless. The mode information (modes, modeparams, memberlist prefixes, bans, exempts, and invites) is subject to the timestamp rules:</p>
<ul>
<li>If the channel's current timestamp is equal to the timestamp in SJOIN, then the mode information is merged.</li>
<li>If the channel's current timestamp is less than the SJOIN timestamp, then the mode information is ignored.</li>
<li>If the channel's current timestamp is greater than the SJOIN timestamp, then the channel's existing mode information is cleared (for example, deop, etc all local clients), and the SJOIN mode information is added.</li>
</ul>
<p>When merging modes, conflicting modes (including +p vs +s, differing +l limits or +k keys, etc) are handled as follows:</p>
<ul>
<li><b>Private (+p) vs. Secret (+s):</b> Secret (+s) is preferred. Private (+p) is removed. (Note: there is a <a href="http://bugs.unrealircd.org/view.php?id=2391">bug</a> in Unreal versions prior to 3.2.3 in which a desynch will occur in which one side is +p and the other is +s. Update to Unreal 3.2.4 if you have problems with this.)</li>
<li><b>Strip Color (+S) vs. Block Color (+c):</b> Block (+c) is preferred. Strip (+S) is removed. (Note: Bug for +p vs. +s in prior unreal versions apply here as well.)</li>
<li><b>Channel Limit:</b> Numericly larger limit is preferred (for example, +l 30 versus +l 15 : +l 30 wins).</li>
<li><b>Channel Key:</b> &quot;Larger&quot; key (as defined by strcmp) is preferred (for example, +k moo versus +k meow : +k moo wins).</li>
<li><b>Channel Link:</b> &quot;Larger&quot; link name (as defined by stricmp - not case sensitive) is preferred (for example, +L #moo versus +L #meow : +L #moo wins, but +L #Meow versus +L #meow : values are equal).</li>
<li><b>Flood String:</b> Not really sure on this. I think larger value in each component wins.</li>
<li><b>Join-Throttle:</b> Highest of time period wins, if equal, highest of join amount wins (so +j 3:40 beats +j 5:20 but +j 5:20 beats +j 3:20).</li>
<li>Parameterized modes in third party modules will define their own conflict resolution formula.</li>
</ul>
<h2><a name="S5_2"></a>5.2 JOIN - Channel Join (TOKEN: C)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> C <i>#channel</i></tt></p>
<p>Indicates a user has joined a channel. Only one channel is sent this way, and the key is not sent even if the user gave one one joining. If the channel parameter is the special "0" case, the server must interpret the message as a PART for all channels the user is on.</p>
<h2><a name="S5_3"></a>5.3 PART - Channel Part (TOKEN: D)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> D <i>#channel</i>[ :<i>reason</i></tt>]</p>
<p>Indicates a user has left a channel. Only one channel is sent this way. The reason parameter may be left out if no reason was given.</p>
<h2><a name="S5_4"></a>5.4 KICK - Channel Kick (TOKEN: H)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> H <i>#channel</i> <i>user</i> :<i>reason</i></tt></p>
<p>Orders the forced removal of user from #channel with the given reason. When updating state for this command, it should be the same as if :user PART #channel had been received - the user is removed from #channel's memberlist.</p>
<h2><a name="S5_5"></a>5.5 MODE - Channel Mode (TOKEN: G)</h2>
<p><b>Note:</b> This is the same command as that used for usermode changes.</p>
<p><b>Syntax:</b> <tt>:<i>source</i> G <i>#channel</i> <i>modechange</i> <i>modeparams</i>[ <i>timestamp</i>]</tt></p>
<p>Changes the specified modes on the given channel. If the source is a server and the last parameter is numeric, it is interpreted as timestamp (although it can also be consumed as a parameter for modes. For example: :server.name MODE #channel +l 4 &lt;-- 4 will be a timestamp and the +l parameter). When a mode change is timestamped in this way, the mode is treated as it is with SJOIN: the MODE message is ignored if the timestamp is greater than the channel timestamp. (If the timestamp is equal, the mode is simply added replacing any conflicting modes already in place.)</p>
<p>A services implementation can easily clear all entries in a list mode such as bans with SVSMODE (see below).</p>
<h2><a name="S5_6"></a>5.6 INVITE - Invite a user to a channel (TOKEN: *)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> * <i>target</i> <i>#channel</i></tt></p>
<p>Sends to target an invitation to join #channel. If the source is a channel operator on #channel, or a U:Lined server, the invitation grants the user the temporary ability to join the channel regardless of any bans or some restricting channel modes (not +O or +A).</p>
<h2><a name="S5_7"></a>5.7 SAJOIN - Channel Force Join (TOKEN: AX)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> AX <i>targetuser</i> <i>#channel</i></tt></p>
<p>This requests the forced join of targetuser to #channel. This type of forced join overrides bans, and most modes. The server to which targetuser is connected to must actually acknowledge the join for it to occur. Service implementations may ignore this command, as they would only ever receive it if an SAJOIN was targeted at a service client, in which case it should be ignored...</p>
<h2><a name="S5_8"></a>5.8 SAPART - Channel Force Part (TOKEN: AY)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> AY <i>targetuser</i> <i>#channel</i>[ :<i>reason</i>]</tt></p>
<p>This requests the forced part of targetuser from #channel. This is slightly different from a KICK in that the user's removal is announced with PART. The server to which targetuser is connected to must actually acknowledge the part for it to occur. Service implementations may ignore this command, as they would only ever receive it if an SAPART was targeted at a service client, in which case it should be ignored...</p>
<p>The reason field is optional. If provided the acknowledging PART message should prefix the message with &quot;SAPart:&quot;.</p>
<h2><a name="S5_9"></a>5.9 SAMODE - Channel Force Mode (TOKEN: o)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> o <i>#channel</i> <i>modechange</i> <i>modeparams</i></tt></p>
<p>This has the same parameters as for MODE. The only difference is that servers probably will never receive this (but is best to document just in case), and that absolutely NO permission checking is done on anything.</p>
<h2><a name="S5_10"></a>5.10 TOPIC - Channel Topic (TOKEN: ) )</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> ) <i>#channel</i> <i>nick</i> <i>timestamp</i> :<i>topic</i></tt></p>
<p>Changes the channel topic information. This format is used when synching, as well as when a topic is changed normally. Nick is the user who changed the topic (depending on compile options, it can be just nick or a full nick!user@host), timestamp is when the change occured, and topic is the new topic text. Normally, only a newer timestamp will actually change the topic, but a U:Lined server can use an older timestamp as well (such as for TOPICLOCK).
<hr/>
<h1><a name="S6"></a>6 Services Commands</h1>
<p>These are commands typically employed by a service implementation, in addition to some of the normal commands. All of the commands listed here require the sender to be correctly U:Lined. This means that the services server name must appear within a ulines {} block in the unrealircd.conf configuration for ALL servers in the network. All servers and clients behind a U:Lined server are themselves U:Lined.</p>
<h2><a name="S6_1"></a>6.1 SVSKILL - Force Disconnect by Service (TOKEN: h)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> h <i>target</i> :<i>reason</i></tt></p>
<p>This command is similar to KILL but differs in several ways. First of all: there is no mutilation of the reason value. The reason given is the exact reason used to generate QUIT messages sent to users. Second, it is silent; no server notice is generated in response to this command. Third, it can only be used by a U:Lined server or client (such as services).</p>
<p>Because this command can be dangerous in the hands of an abusive person, service implementations should avoid granting humans control over the reason parameter. In cases of commands where a person has control over such parameter, either use a regular KILL instead, or otherwise modify the reason so that operators can be held accountable if necessary.</p>
<h2><a name="S6_2"></a>6.2 SVSMODE, SVS2MODE - Force User Mode Change (TOKEN: n or v)</h2>
<p><b>Syntax (SVSMODE):</b> <tt>:<i>source</i> n <i>target</i> +<i>usermodes</i></tt></p>
<p><b>Syntax (SVS2MODE):</b> <tt>:<i>source</i> v <i>target</i> +<i>usermodes</i></tt></p>
<p>Judging by these commands alone, you'd think they are identical. Both commands force a usermode change to occur. This is typically used by services to set +r on a user who has successfully identified. They differ in that SVS2MODE also sends the mode change to the user, while SVSMODE does not (hidden mode change).</p>
<p>SVSMODE and SVS2MODE also give special treatment to usermode +d. Rather than setting the deaf mode like you might expect, SVS(2)MODE +d allows services to change a user's services stamp (which is given in the NICK message). This could allow services to set the service stamp to an easily identifiable value that could then be used to say "hey, this person identified already". The syntax of this is: +d <i>newservicestamp</i> and can be combined with setting other usermodes as well. The deaf mode <b>can</b> be set by using +d without the service stamp parameter; however, in this case you <b>cannot</b> set the service stamp in the same SVS(2)MODE message.</p>
<p><b>Note:</b> Do <b>NOT</b> use SVSMODE to remove IRCop status from a user. Use the SVSO command for that instead.</p>
<p>Alternatively, target can name a channel. In this case, the mode change parameter can consist of a - character, followed by any or all of: b, e, I, q, a, o, h, or v. These characters cause the corresponding lists to be cleared of all entries. For example: SVSMODE #channel -b removes ALL bans from #channel, and SVSMODE #channel -qaohv turns ALL users on #channel into normal users (removes all owner, admin, op, halfop, and voice status). In this case, the uplink will acknowledge with a MODE listing the bans, etc that were removed.</p>
<p>To completely clear a channel of all modes: MODE #channel -cfijklmnprstzACGMKLNOQRSTVu (plus any added by third-party module) followed by SVSMODE #channel -beIqaohv.</p>
<h2><a name="S6_3"></a>6.3 SVSSNO, SVS2SNO - Forced SNomask Change (TOKEN: BV or BW)</h2>
<p><b>Syntax (SVSSNO):</b> <tt>:<i>source</i> BV <i>target</i> +<i>snomasks</i></tt></p>
<p><b>Syntax (SVS2SNO):</b> <tt>:<i>source</i> BW <i>target</i> +<i>snomask</i></tt></p>
<p>Changes a user's snomasks. The difference between SVSSNO and SVS2SNO is the same as with SVSMODE versus SVS2MODE. If the user is not +s, you must add it via SVSMODE +s. For example:</p>
<pre>:OperServ v someuser +s
:OperServ BW someuser +ks</pre>
<h2><a name="S6_4"></a>6.4 SVSNICK - Forced Nick Change (TOKEN: e)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> e <i>target</i> <i>newnick</i> :<i>newtimestamp</i></tt></p>
<p>Forces the specified user to change his nick to newnick and also sets the nick timestamp to newtimestamp (so, for example, services could protect identified users from a nick collision by simply setting the nick timestamp to something way less than "now" - though currently this requires actually changing the nick too). SVSNICK requires the server to which the target is connected to acknowledge the nick change. If the user specified by newnick already exists, then target will be disconnected (even if it's something like a case-change).</p>
<h2><a name="S6_5"></a>6.5 SVSJOIN - Forced Join (TOKEN: BX)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> BX <i>target</i> <i>#channel</i></tt></p>
<p>This is identical to SAJOIN with a few exceptions: 1) It is U:Line-only. 2) No opernotice on use. 3) Bans and restricting modes are respected, a prior INVITE message must be sent to cause bans to be ignored.</p>
<h2><a name="S6_6"></a>6.6 SVSPART - Forced Part (TOKEN: BT)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> BT <i>target</i> <i>#channel</i> :<i>reason</i></tt></p>
<p>Also identical to SAPART with a few exceptions: no static prefix on the optional part reason, and no global notice, and requires a U:Line. Usage recommendation of SVSPART versus KICK is the same as for SVSKILL versus KILL.</p>
<h2><a name="S6_7"></a>6.7 SVSO - Oper Permissions (TOKEN: BB)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> BB <i>target</i> <i>flagchanges</i></tt></p>
<p>This allows a service to add or remove IRCop permission flags for a user. Flagchanges is formatted similar to that of MODE with the exception that operflags are used instead of usermodes. If the change string consists only of -, then all oper permissions, usermodes, and snomasks are removed (as if the user had himself typed MODE nick -Oo).</p>
<p>If you are granting IRCop permissions to a user who is not currently an IRCop, you should follow up with an SVSMODE +o or SVSMODE +O as appropriate. For example:</p>
<pre>:OperServ BB somenick +o
:OperServ BW somenick +cefknoqsSv
:OperServ AL somenick local.oper.somethinghere.net
:OperServ v somenick +Ohs </pre>
<h2><a name="S6_8"></a>6.8 SVSNOOP - Oper Lockdown (TOKEN: f)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> f <i>(op)</i><i>server.name</i></tt></p>
<p>The (op) parameter is either a + or - indicating if NOOP mode should be activated (+) or deactivated (-). When NOOP mode is activated, all IRCops on the server are deopered (including local operators) and the /oper command is disabled. IRCop privileges can still be granted through use of SVSO. On UnrealIRCd, it is not necessary to masskill all IRCops on the nooped server, as they are deopered automatically.</p>
<h2><a name="S6_9"></a>6.9 SVSNLINE - RealName Ban (TOKEN: BR)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> BR <i>op</i> <i>reason</i> :<i>realname mask</i></tt></p>
<p>Op is either + (add) or - (remove). In the case of +, reason is a space-escaped string (all space chars are encoded as _). If -, reason is ignored.</p>
<h2><a name="S6_10"></a>6.10 SVSFLINE - File Ban (TOKEN: BC)</h2>
<p><b>Syntax (add):</b> <tt>:<i>source</i> BC + <i>filemask</i> :<i>reason</i></tt></p>
<p><b>Syntax (remove):</b> <tt>:<i>source</i> BC - <i>filemask</i></tt></p>
<p><b>Syntax (clear):</b> <tt>:<i>source</i> BC *</tt></p>
<p>Adds or removes a DCCDENY item for the specified filemask on all servers. These DCCDENYs are hard dccdenies - the /dccallow command cannot override it. The last form removes all dccdenies added via SVSFLINE.</p>
<hr/>
<h1><a name="S7"></a>7 Messaging</h1>
<p>What good is Internet Relay <b>CHAT</b> if users cannot <b>CHAT</b>? This section addresses the commands through which arbitrary user messages are sent.</p>
<h2><a name="S7_1"></a>7.1 PRIVMSG, NOTICE - Simple Message Transmission (Token: ! or B)</h2>
<p><b>PRIVMSG Syntax:</b> <tt>:<i>source</i> ! <i>target</i> :<i>message</i></tt></p>
<p><b>NOTICE Syntax:</b> <tt>:<i>source</i> B <i>target</i> :<i>message</i></tt></p>
<p>Sends a messages to the given target. The target either names a single client, or identifies a list of clients in which the message is to be sent to. The available targets include:</p>
<ul>
<li><i>nickname</i>: Names a single user to whom the message is delivered.</li>
<li><i>nickname</i>@<i>servermask</i>: Also names a single user, but the message will only be delivered if the user is connected to a server matching the specified servermask. This is typically used for sending messages to services. The target must not be changed at any point along the path it must travel for delivery, even up to the final receipt of the message by the target. This allows the target to know it has been sent a message in this way.</li>
<li>#<i>channelname</i>: Sends a message to all users on the specified channel (except when channel is a moderated auditorium (+mu), in which case the wierd +mu sending behavior goes off).</li>
<li><i>modeprefix</i>#<i>channelname</i>: Sends a message to all users on the given channel having the given status or higher. For example: + means all voices, halfops, etc.</li>
<li>$<i>servermask</i>: Sends a message to ALL users on all servers matching the specified servermask (known as a server broadcast message). The RFC requirements of having a TLD with no wildcards is not applied to U:Lined clients.</li>
</ul>
<p>Unreal does not support the #hostmask format.</p>
<h2><a name="S7_2"></a>7.2 SENDUMODE, SMO - Usermode-based Delivery (TOKEN: AP or AU)</h2>
<p><b>Syntax:</b> <tt>@<i>servernumeric</i> AU <i>umode</i> :<i>message</i></tt></p>
<p>Sends the specified message to all users with the given mode. Only one usermode may be given. This is a server-only command if you can't tell from the sender prefix :) .</p>
<p>The message will be displayed as coming from the receiving client's own server. It may be appropriate to add a &quot;*** Notice (or other leader here) -- from blah:&quot; if you wish to clarify where the message is from.</p>
<h2><a name="S7_3"></a>7.3 SENDSNO - SNomask-based Delivery (TOKEN: Ss)</h2>
<p><b>Syntax:</b> <tt>@<i>servernumeric</i> Ss <i>snomask</i> :<i>message</i></tt></p>
<p>Sends the specified message to all users with the given snomask. Only one snomask may be given. This is a server-only command if you can't tell from the sender prefix :) .</p>
<p>The message will be displayed as coming from the receiving client's own server. It may be appropriate to add a &quot;*** Notice (or other leader here) -- from blah:&quot; if you wish to clarify where the message is from.</p>
<h2><a name="S7_4"></a>7.4 CHATOPS - IRCop Chat (TOKEN: p)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> p :<i>message</i></tt></p>
<p>Sends the message to all IRCops on all servers.</p>
<h2><a name="S7_5"></a>7.5 WALLOPS - Wallop Chat (TOKEN: =)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> = :<i>message</i></tt></p>
<p>Sends the message to all users with usermode +w, whether they are ircops or not.</p>
<h2><a name="S7_6"></a>7.6 GLOBOPS - FailOp Chat (TOKEN: ])</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> ] :<i>message</i></tt></p>
<p>Send the message to all IRCops with usermode +g.</p>
<h2><a name="S7_7"></a>7.7 ADCHAT - Admin Chat (TOKEN: x)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> x :<i>message</i></tt></p>
<p>Send the message to all Server and Network Admins (usermode +A).</p>
<h2><a name="S7_8"></a>7.8 NACHAT - NetAdmin Chat (TOKEN: AC)</h2>
<p><b>Syntax:</b> <tt>:<i>source</i> AC :<i>message</i></tt></p>
<p>Send the message to all Network Admins (usermode +N).</p>
<hr/>
<h1><a name="S8"></a>8 Ban Control</h1>
<p>Sometimes, you have the misfortune of encountering a user who has no purpose but to serve as an annoyance to your server or network. These commands transmit network-wide ban information amongst each other.</p>
<h2><a name="S8_1"></a>8.1 TKL - Master Ban Control (TOKEN: BD)</h2>
<p>The TKL command seems to have one oddity about it: the real ban source is included in the TKL command rather than in the sender prefix. Most likely this is done for synching reasons (so that the *line ban can be credited to the proper person even if he/she is offline). For this reason, the command syntax is given without any sender prefix at all. It is still permissible to use one, however.</p>
<h3><a name="S8_1_1"></a>8.1.1 GLINE - Network-wide user@host ban</h3>
<p><b>Add Syntax (TKL):</b> <tt>BD + G <i>userpart</i> <i>hostpart</i> <i>source</i> <i>expiretimestamp</i> <i>settimestamp</i> :<i>reason</i></tt></p>
<p><b>Remove Syntax (TKL):</b> <tt>BD - G <i>userpart</i> <i>hostpart</i> <i>source</i></tt></p>
<p>Adds and Removes Network-wide user@host bans, known as G:Lines. The GLINE command itself must not be used. The userpart and hostpart are the user portion and hostname portion of the ban mask. The expiretimestamp is 0 if the G:Line should not expire, otherwise it will expire at the given time. It is an absolute time, not relative, thus it's imperitive to have reasonably synchrnoized clocks or bans may be removed too early or even immediately!</p>
<h3><a name="S8_1_2"></a>8.1.2 GZLINE - Network-wide IP ban</h3>
<p><b>Add Syntax (TKL):</b> <tt>BD + Z * <i>ipmask</i> <i>source</i> <i>expiretimestamp</i> <i>settimestamp</i> :<i>reason</i></tt></p>
<p><b>Remove Syntax (TKL):</b> <tt>BD - Z * <i>ipmask</i> <i>source</i></tt></p>
<p>Adds and Removes Network-wide IP bans, known as Global Z:Lines. The GZLINE command itself must not be used. Ipmask permits CIDR notation as well as wildcard masks.</p>
<h3><a name="S8_1_3"></a>8.1.3 SQLINE, UNSQLINE - Network-wide Nickname ban (TOKEN: c or d)</h3>
<p><b>Add Syntax (TKL):</b> <tt>BD + Q <i>hold</i> <i>nickmask</i> <i>source</i> <i>expiretimestamp</i> <i>settimestamp</i> :<i>reason</i></tt></p>
<p><b>Add Syntax (SQLINE):</b> <tt>:<i>source</i> c <i>nickmask</i> :<i>reason</i></tt></p>
<p><b>Remove Syntax (TKL):</b> <tt>BD - Q <i>hold</i> <i>nickmask</i> <i>source</i></tt></p>
<p><b>Remove Syntax (UNSQLINE):</b> <tt>:<i>source</i> d <i>nickmask</i></tt></p>
<p>In the TKL syntax, the hold parameter is either a * to mark the qline as a nick ban, or an H to mark it as a services hold. A services hold does not trigger qline rejection notice, and is typically used by NickServ to reserve registered nicks until they are released by the owner. The (UN)SQLINE syntax can only be used by a server, but any user can be used as the source for the TKL syntax. Unlike G and GZ lines, Q:Lines do not cause existing matching users to be disconnected or otherwise affected.</p>
<p>The TKL syntax is preferred, since it is more flexible, but (UN)SQLINE is permitted for compatibility.</p>
<h3><a name="S8_1_4"></a>8.1.4 SPAMFILTER - Message Spam Filtration System</h3>
<p>Proper use of spamfilter in TKL commands requires use of PROTOCTL TKLEXT, which increases the number of parameters allowed in TKL.</p>
<p><b>Add Syntax (TKL):</b> <tt>BD + F <i>target(s)</i> <i>action</i> <i>source</i> 0 <i>settimestamp</i> <i>tklduration</i> <i>tklreason</i> :<i>regex</i></tt></p>
<p><b>Remove Syntax (TKL):</b> <tt>BD - F <i>target(s)</i> <i>action</i> <i>source</i> 0 <i>settimestap</i> :<i>regex</i></tt></p>
<p>Adds and Removes network-wide spamfilters. The SPAMFILTER command itself must not be used. See <a href="http://vulnscan.org/UnrealIrcd/unreal32docs.html#feature_spamfilter">http://vulnscan.org/UnrealIrcd/unreal32docs.html#feature_spamfilter</a> for a list of valid targets. For actions, a single character is used to identify the action to be taken:</p>
<ul>
<li>K (kill) - The user is simply disconnected, with the reason given.</li>
<li>S (tempshun) - A temporary shun is placed on the user. This shun is applied only to that user, and disappears if the user reconnects.</li>
<li>s (shun) - A regular shun on the user's IP address is added. This causes all users with the same hostname to be shunned, but they will also stay shunned if they reconnect.</li>
<li>k (kline) - A K:Line is added on the user's IP address.</li>
<li>z (zline) - A Z:Line is added on the user's IP address.</li>
<li>g (gline) - A G:Line is added on the user's IP address.</li>
<li>Z (gzline) - A Global Z:Line is added on the user's IP address.</li>
<li>b (block) - Messages (or users!) matching the filter are simply blocked.</li>
<li>d (dccblock) - The user is prevented from sending files using DCC for the remainder of his session (in other words, until he quits).</li>
<li>v (viruschan) - User is removed from all channels, joined to the viruschan as defined in conf, and cannot message anything but that channel.</li>
<li>w (warn) - No action on the user is taken. Only the Spamfilter notice is sent to opers with snomask +S.</li>
</ul>
<h1><a name="S9">9 Base64 Tables</a></h1>
<p>Unreal uses base64 encoding to allow saving bandwidth by encoding numbers in a more compact format. Unreal uses two different variations of base64, one used for the SJB64 PROTOCTL option (in NICK and SJOIN), and one used for NICKIP.</p>
<h2><a name="S9_1">9.1 Table for SJB64 (NICK and SJOIN).</a></h2>
<p>In NICK and SJOIN, remember that the timestamp will be prefixed with ! to signal a base64 timestamp.</p>
<p>Just like in base10, the least significant &quot;digit&quot; is last.</p>
<pre> 0 0 17 H 34 Y 51 p
1 1 18 I 35 Z 52 q
2 2 19 J 36 a 53 r
3 3 20 K 37 b 54 s
4 4 21 L 38 c 55 t
5 5 22 M 39 d 56 u
6 6 23 N 40 e 57 v
7 7 24 O 41 f 58 w
8 8 25 P 42 g 59 x
9 9 26 Q 43 h 60 y
10 A 27 R 44 i 61 z
11 B 28 S 45 j 62 {
12 C 29 T 46 k 63 }
13 D 30 U 47 l
14 E 31 V 48 m
15 F 32 W 49 n
16 G 33 X 50 o</pre>
<h2><a name="S9_2">9.2 Table for NICKIP.</a></h2>
<p>In this table, the IP is encoded in network byte order. In terms of IPs, this means the first byte of the address really is first. Each &quot;digit&quot; in the base64 encoded IP corresponds to 6 bits of the IP address.</p>
<p>An IPv4 address is 32 bits, so 6 base64 &quot;digits&quot; are needed. Since base64 requires values to come in multiples of 4 &quot;digits&quot;, padding characters (=) need to be added if a value comes up short. In the case of IPv4 addresses, two are needed.</p>
<p>IPv6 addresses are 128-bit. They therefore need 22 base64 &quot;digits&quot; plus 2 pad characters.</p>
<pre> 0 A 17 R 34 i 51 z
1 B 18 S 35 j 52 0
2 C 19 T 36 k 53 1
3 D 20 U 37 l 54 2
4 E 21 V 38 m 55 3
5 F 22 W 39 n 56 4
6 G 23 X 40 o 57 5
7 H 24 Y 41 p 58 6
8 I 25 Z 42 q 59 7
9 J 26 a 43 r 60 8
10 K 27 b 44 s 61 9
11 L 28 c 45 t 62 +
12 M 29 d 46 u 63 /
13 N 30 e 47 v
14 O 31 f 48 w (pad) =
15 P 32 g 49 x
16 Q 33 h 50 y</pre>
</body>
</html>
+120 -107
View File
@@ -1,109 +1,122 @@
Token List (c) 2002-2004 codemastr (Dominick Meglio) [codemastr@unrealircd.com]
Token List (c) 2002 codemastr (Dominick Meglio) [codemastr@unrealircd.com]
(As of Unreal3.2-beta11)
Command Token
Command Token
------------------------------------------------------------------------------------------------
PRIVMSG !
WHOIS #
NICK &
SERVER '
TOPIC )
INVITE *
VERSION +
QUIT ,
SQUIT -
KILL .
INFO /
LINKS 0
STATS 2
HELP 4
ERROR 5
AWAY 6
CONNECT 7
PING 8
PONG 9
PASS <
TIME >
ADMIN @
SETHOST AA
NACHAT AC
SETIDENT AD
SETNAME AE
LAG AF
SDESC AG
KNOCK AI
CREDITS AJ
LICENSE AK
CHGHOST AL
RPING AM
RPONG AN
NETINFO AO
SENDUMODE AP
ADDMOTD AQ
ADDOMOTD AR
SVSMOTD AS
SMO AU
OPERMOTD AV
TSCTL AW
SAJOIN AX
SAPART AY
CHGIDENT AZ
NOTICE B
SWHOIS BA
SVSO BB
SVSFLINE BC
TKL BD
VHOST BE
BOTMOTD BF
HTM BH
DCCDENY BI
UNDCCDENY BJ
CHGNAME BK
SHUN BL
CYCLE BP
MODULE BQ
SVSNLINE BR
SVSPART BT
SVSLUSERS BU
SVSSNO BV
SVS2SNO BW
SVSJOIN BX
SVSSILENCE Bs
SVSWATCH Bw
JOIN C
PART D
LUSERS E
EOS ES
MOTD F
MODE G
KICK H
REHASH O
RESTART P
CLOSE Q
SENDSNO Ss
DNS T
TEMPSHUN Tz
SILENCE U
AKILL V
UNKLINE X
RAKILL Y
GLOBOPS ]
LOCOPS ^
PROTOCTL _
WATCH `
TRACE b
SQLINE c
UNSQLINE d
SVSNICK e
SVSNOOP f
SVSKILL h
SVSMODE n
SAMODE o
CHATOPS p
UNZLINE r
RULES t
MAP u
SVS2MODE v
DALINFO w
ADMINCHAT x
UMODE2 |
SJOIN ~
PRIVMSG !
WHO \
WHOIS #
WHOWAS $
USER %
NICK &
SERVER '
LIST (
TOPIC )
INVITE *
VERSION +
QUIT ,
SQUIT -
KILL .
INFO /
LINKS 0
SUMMON 1
STATS 2
USERS 3
HELP 4
HELPOP 4
ERROR 5
AWAY 6
CONNECT 7
PING 8
PONG 9
OPER ;
PASS <
WALLOPS =
TIME >
NAMES ?
ADMIN @
NOTICE B
JOIN C
PART D
LUSERS E
MOTD F
MODE G
KICK H
USERHOST J
ISON K
REHASH O
RESTART P
CLOSE Q
DIE R
HASH S
DNS T
SILENCE U
AKILL V
KLINE W
UNKLINE X
RAKILL Y
GNOTICE Z
GOPER [
GLOBOPS ]
LOCOPS ^
PROTOCTL _
WATCH `
TRACE b
SQLINE c
UNSQLINE d
SVSNICK e
SVSNOOP f
SVSKILL h
SVSMODE n
SAMODE o
CHATOPS p
ZLINE q
UNZLINE r
RULES t
MAP u
SVS2MODE v
DALINFO w
ADCHAT x
MKPASSWD y
ADDLINE z
GLINE }
SETHOST AA
NACHAT AC
SETIDENT AD
SETNAME AE
LAG AF
SDESC AG
KNOCK AI
CREDITS AJ
LICENSE AK
CHGHOST AL
RPING AM
RPONG AN
NETINFO AO
SENDUMODE AP
ADDMODE AQ
ADDOMODE AR
SVSMODE AS
SMO AU
OPERMOTD AV
TSCTL AW
SAJOIN AX
SAPART AY
CHGIDENT AZ
SWHOIS BA
SVSO BB
SVSFLINE BC
TKL BD
VHOST BE
BOTMOTD BF
HTM BH
SHUN BL
SVSJOIN BR
SVSPART BT
SJOIN ~
UMODE2 |
+3 -7
View File
@@ -1,13 +1,9 @@
VL Information (c) 2002 codemastr (Dominick Meglio) [codemastr@unrealircd.com]
(As of Unreal3.2-beta11)
Protocol Version
------------------------------------------------------------------------------------------------
2308 3.2.5
2307 3.2.4
2306 3.2.3
2305 3.2.2
2304 3.2.1
2303 3.2-beta*, 3.2-RC*, 3.2
2303 3.2-Selene
2302 3.1.1-Darkshades, 3.1.2-Darkshades, 3.1.3-Komara, 3.1.4-Meadows
2301 3.1-Silverheart
2300 3.0-Morrigana
@@ -32,5 +28,5 @@ e SSL supported
O OperOverride enabled
o OperOverride without verify
Z Zip links supported
3 3rd party modules (were) loaded or unreal is any other way 'tainted' (eg: bad libs)
3 3rd party modules (were) loaded
E Extended channel modes supported
-48
View File
@@ -1,48 +0,0 @@
NOTE: For 3.3* we are not maintaining translated documents until reaching alpha or
beta1 status.
==[ Translations ]============================================================
Starting with the release of Unreal 3.2 we have begun accepting translated
documentation files. For now, only translations of unreal32docs.html and
example.conf are accepted. Other stuff might be translated later, but
this will probably be postponed to 3.3 (numerics/ircd text/help.conf/etc).
There a few requirements however:
- When you submit your translation it should be a translation of the
very latest doc... So be sure to translate the cvs version of
unreal32docs.html (www.vulnscan.org/UnrealIrcd/unreal32docs.html).
- Of course the translation should be correct.. So also 'technically',
it's therefore recommended that have some real experience with Unreal ;)
- If you are accepted and start working on it, it would be nice if you
could put your docs-in-progress online somewhere so we can see how
progress is going a bit.
- You should use a proper HTML editor, this especially excludes Microsoft
Word and Frontpage since it enlarges the .html file by (at least) 30%.
Don't worry, there are enough free&simple html editors out there that
work perfectly fine, you won't need to be an HTML expert at all!
- Someone, usually the person who translated it, needs to be willing
to actively maintain the docs. This is very important! If docs are
out of date (out-of-synch) there will be confusion among users.
Translators will receive once a week (and right before every release)
all changes that were made in unreal32docs.html. Then the translator
should update his/her doc and send it in (or commit it via cvs).
Count on an average of 15 minutes a week (it varies).
Now, we should tell you that the first-time translation of unreal32docs.html
is a LOT of work.. probably 20 hours or so. After that, the weekly updates
take really just 5, 10, 15 minutes a week, which is pretty much "no time".
Now why would you translate at all? Well, by translating UnrealIRCd
documentation you will help out your fellow citizens and/or other people
of that language, you will make Unreal a bit more 'internationalized',
and it's a worthwile contribution to the UnrealIRCd project.
Upon successful completion you will also receive an @unrealircd.org
forwarder email address, and of course your name will be in the docs.
If you want to start translating a document, please send an email to
coders@lists.unrealircd.org and mention the language you are willing
to translate to.. You will then receive an email back saying you can
go ahead (or not). This is mainly to avoid multiple persons working
on the same translation.
==============================================================================
+401 -1255
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+292 -761
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
+30 -7
View File
@@ -35,7 +35,12 @@ DLLFUNC int h_defizzer_connect(aClient *sptr);
static Hook *LocConnect = NULL;
ModuleInfo DefizzerModInfo;
ModuleHeader MOD_HEADER(defizzer)
#ifndef DYNAMIC_LINKING
ModuleHeader defizzer_Header
#else
#define defizzer_Header Mod_Header
ModuleHeader Mod_Header
#endif
= {
"defizzer", /* Name of module */
"$Id$", /* Version */
@@ -44,25 +49,43 @@ ModuleHeader MOD_HEADER(defizzer)
NULL
};
DLLFUNC int MOD_INIT(defizzer)(ModuleInfo *modinfo)
/* The purpose of these ifdefs, are that we can "static" link the ircd if we
* want to
*/
/* This is called on module init, before Server Ready */
#ifdef DYNAMIC_LINKING
DLLFUNC int Mod_Init(ModuleInfo *modinfo)
#else
int defizzer_Init(ModuleInfo *modinfo)
#endif
{
bcopy(modinfo,&DefizzerModInfo,modinfo->size);
LocConnect = HookAddEx(DefizzerModInfo.handle, HOOKTYPE_PRE_LOCAL_CONNECT, h_defizzer_connect);
return MOD_SUCCESS;
}
DLLFUNC int MOD_LOAD(defizzer)(int module_load)
/* Is first run when server is 100% ready */
#ifdef DYNAMIC_LINKING
DLLFUNC int Mod_Load(int module_load)
#else
int defizzer_Load(int module_load)
#endif
{
return MOD_SUCCESS;
}
DLLFUNC int MOD_UNLOAD(defizzer)(int module_unload)
/* Called when module is unloaded */
#ifdef DYNAMIC_LINKING
DLLFUNC int Mod_Unload(int module_unload)
#else
int defizzer_Unload(int module_unload)
#endif
{
HookDel(LocConnect);
return MOD_SUCCESS;
}
static void ban_fizzer(aClient *cptr)
{
int i;
@@ -125,4 +148,4 @@ DLLFUNC int h_defizzer_connect(aClient *sptr)
return exit_client(sptr, sptr, &me, "Fizzer client");
}
return 0;
}
}
Binary file not shown.
BIN
View File
Binary file not shown.
+97 -244
View File
@@ -25,29 +25,21 @@ help {
" ==-------------------------oOo--------------------------==";
};
/* note: indexes were generated by cat somecmds|sort|column -c 70
* along with tab->space conversion (tabwidth 8).
* Perhaps we should automate this step :). -- Syzop
*/
help Usercmds {
" Currently the following User commands are available.";
" Use /HELPOP <command name> to get more information about";
" a specific command.";
" -";
" ==-------------------------oOo-------------------------==";
" ADMIN LICENSE PART USERHOST";
" AWAY LINKS PING USERIP";
" CREDITS LIST PONG VERSION";
" CYCLE LUSERS PRIVMSG VHOST";
" DALINFO MAP QUIT WATCH";
" DCCALLOW MODE RULES WHO";
" INVITE MODULE SETNAME WHOIS";
" ISON MOTD SILENCE WHOWAS";
" JOIN NAMES STATS";
" KICK NICK TIME";
" KNOCK NOTICE TOPIC";
" ==-------------------------oOo-------------------------==";
" ==-----------------oOo-----------------==";
" ADMIN KICK MOTD QUIT VERSION";
" AWAY KNOCK NAMES RULES VHOST";
" CREDITS LICENSE NICK SETNAME WATCH";
" CYCLE LINKS NOTICE SILENCE WHO";
" DALINFO LIST PART STATS WHOIS";
" INVITE LUSERS PING TIME WHOWAS";
" ISON MAP PONG TOPIC";
" JOIN MODE PRIVMSG USERHOST";
" ==-----------------oOo-----------------==";
};
help Opercmds {
@@ -55,19 +47,16 @@ help Opercmds {
" Use /HELPOP <command name> to get more information about";
" a specific command.";
" -";
" ==-------------------------oOo-------------------------==";
" ADCHAT GLOBOPS OPERMOTD SPAMFILTER";
" CHATOPS GZLINE REHASH SQUIT";
" CHGHOST HTM RESTART TEMPSHUN";
" CHGIDENT KILL RPING TRACE";
" CHGNAME KLINE SAJOIN TSCTL";
" CLOSE LAG SAMODE UNDCCDENY";
" CONNECT LOCOPS SAPART WALLOPS";
" DCCDENY MKPASSWD SDESC ZLINE";
" DIE MODULE SETHOST";
" DNS NACHAT SETIDENT";
" GLINE OPER SHUN";
" ==-------------------------oOo-------------------------==";
" ==----------------oOo---------------==";
" OPER WALLOPS GLOBOPS CHATOPS LOCOPS DNS";
" ADCHAT NACHAT KILL KLINE ZLINE SPAMFILTER";
" GLINE SHUN GZLINE HTM TSCTL TEMPSHUN";
" REHASH RESTART DIE";
" LAG SETHOST SETIDENT CHGHOST CHGIDENT";
" CHGNAME SQUIT CONNECT DCCDENY UNDCCDENY";
" SAJOIN SAPART SAMODE RPING TRACE";
" OPERMOTD SDESC MKPASSWD CLOSE MODULE";
" ==----------------oOo---------------==";
};
help Svscmds {
@@ -78,13 +67,13 @@ help Svscmds {
" Use /HELPOP <command name> to get more information about";
" a specific command.";
" -";
" ==-------------------------oOo-------------------------==";
" SQLINE SVSKILL SVSNLINE SVSSNO";
" SVS2MODE SVSLUSERS SVSNOOP SVSWATCH";
" SVS2SNO SVSMODE SVSO SWHOIS";
" SVSFLINE SVSMOTD SVSPART UNSQLINE";
" SVSJOIN SVSNICK SVSSILENCE";
" ==-------------------------oOo-------------------------==";
" ==-----------oOo-----------==";
" SVSNICK SVSMODE SVSKILL SVSWATCH";
" SVSNOOP SVSJOIN SVSPART SVSSILENCE";
" SVSO SWHOIS SQLINE SVSNLINE";
" UNSQLINE SVS2MODE SVSFLINE SVSSNO";
" SVSMOTD SVS2SNO SVSLUSERS";
" ==-----------oOo-----------==";
};
help Umodes {
@@ -127,7 +116,7 @@ help Snomasks {
" server notices you will receive.";
" Usage: /MODE nick +s <snomask>";
" Ex: /MODE blah +s +cF-j";
" The parameter specifies which snomasks you want (or don't want).";
" The parameter specifies which snomasks you want (or don't want)."
" You can also remove all snomasks by simply doing /MODE nick -s.";
"-";
" Below is a list of possible snomasks:";
@@ -141,9 +130,7 @@ help Snomasks {
" k = View KILL notices";
" n = View nick changes on local server";
" N = View nick changes on remote servers";
" o = View oper-up notices";
" q = View rejected nick changes due to Q:lines";
" s = View general notices";
" S = View spamfilter matches";
" v = View usage of /VHOST command";
" ==-------------------------oOo------------------------==";
@@ -159,14 +146,12 @@ help Chmodes {
" a <nickname> = Gives Channel Admin to the user";
" q <nickname> = Gives Owner status to the user";
" -";
" b <nick!ident@host> = Bans the nick!ident@host from the channel";
" Extended bantypes (for more info see /HELPOP EXTBANS) [h]";
" b <nick!ident@host> = Bans the nick!ident@host from the channel [h]";
" c = Block messages containing mIRC color codes [o]";
" e <nick!ident@host> = Overrides a ban for matching users [h]";
" I <nick!ident@host> = Overrides +i for matching users [h]";
" f <floodparams> = Flood protection (for more info see /HELPOP CHMODEF) [o]";
" f [*]<lines>:<seconds> = Flood protection [o]";
" (Users will be kicked after saying <lines> in <seconds> and banned if * is specified)";
" i = A user must be invited to join the channel [h]";
" j <joins:sec> = Throttle joins per-user to 'joins' per 'sec' seconds [o]";
" k <key> = Users must specify <key> to join [h]";
" l <number of max users> = Channel may hold at most <number> of users [o]";
" m = Moderated channel (only +vhoaq users may speak) [h]";
@@ -179,7 +164,7 @@ help Chmodes {
" A = Server/Net Admin only channel (settable by Admins)";
" C = No CTCPs allowed in the channel [o]";
" G = Filters out all Bad words in messages with <censored> [o]";
" M = Must be using a registered nick (+r), or have voice access to talk [o]";
" M = Must be using a registered nick (+r) to talk [o]";
" K = /KNOCK is not allowed [o]";
" L <chan2> = Channel link (If +l is full, the next user will auto-join <chan2>) [q]";
" N = No Nickname changes are permitted in the channel [o]";
@@ -195,95 +180,39 @@ help Chmodes {
" ==------------------------------oOo----------------------------==";
};
help ExtBans {
" Extended bantypes: ";
" -";
" ==-Type--------Name---------------------------Explanation-----------------------==";
" | | People matching these bans can join but are unable to ";
" ~q | Quiet | speak, unless they have +v or higher. ";
" | | Example: ";
" | | +bb ~q:*!*@blah.blah.com ~q:nick*!*@* ";
"-----------------------------------------------------------------------------------";
" | | People matching these bans cannot change nicks, unless ";
" ~n | nickchange | they have +v or higher. ";
" | | Example: ";
" | | +bb ~n:*!*@*.aol.com ~n:nick*!*@* ";
"-----------------------------------------------------------------------------------";
" | | If the user is in this channel then (s)he is unable to ";
" | [prefix] | join. A prefix can also be specified (+/%/@/&/~) which ";
" ~c | channel | means that it will only match if the user has that ";
" | | rights or higher on the specified channel. ";
" | | Example: +b ~c:#lamers, +e ~c:@#trusted ";
"-----------------------------------------------------------------------------------";
" | | If the realname of a user matches this then (s)he is ";
" | | unable to join. ";
" ~r | realname | Example: +b ~r:*Stupid_bot_script* ";
" | | NOTE: an underscore ('_') matches both a space (' ') and";
" | | an underscore ('_'), so this ban would ";
" | | match 'Stupid bot script v1.4'. ";
" ==------------------------------------------------------------------------------==";
};
help Chmodef {
" The +f channel mode provides comprehensive flood protection for a channel.";
" This mode allows you to prevent join, nick change, CTCP, text, and knock";
" floods. The syntax for this mode's parameter is as follows:";
" -";
" +f [<amount><type>{#<action>}{,...}]:<seconds>";
" -";
" The amount specifies the number of times the specified flood must occur";
" before action is taken. Below are the available types:";
" -";
" ==-----Type-----Name--------Default Action---Other Actions-----==";
" c CTCP +C m, M";
" j Join +i R";
" k Knock +K";
" m Messages +m M";
" n Nickchange +N";
" t Text kick b";
" -";
" The difference between type m and t is that m is tallied for the entire";
" channel whereas t is tallied per user.";
" -";
" If you choose to specify an action for a mode, you may also specify a";
" time (in minutes) after which the specific action will be reversed.";
};
help Oflags {
" Here you will find the flags that can be placed inside of the O:Lines";
" -";
" ==-------------------------------oOo-----------------------------==";
" o (locop) Local Operator";
" O (globop) Global Operator";
" C (coadmin) Gets +C on oper up. Is Co Administrator";
" A (admin) Gets +A on oper up. Is Server Administrator";
" a (services-admin) Gets +a on oper up. Is Services Administrator";
" N (netadmin) Gets +N on oper up. Is Network Administrator";
" ==----------------------oOo--------------------==";
" o = Local Operator";
" O = Global Operator";
" a = Gets +a on oper up. Is Services Administrator";
" A = Gets +A on oper up. Is Server Administrator";
" C = Gets +C on oper up. Is Co Administrator";
" N = Gets +N on oper up. Is Network Administrator";
" -";
" r (can_rehash) Access to /REHASH server";
" R (can_restart) Access to /RESTART server";
" D (can_die) Access to /DIE server";
" h (helpop) Oper is marked as availiable for help is not away";
" g (can_globops) Oper can send /GLOBOPS";
" w (can_wallops) Oper can send /WALLOPS";
" n (can_localnotice) Oper can send Local Server Notices";
" G (can_globalnotice) Oper can send Global Server Notices";
" c (can_localroute) Access to do local /SQUITs and /CONNECTs";
" L (can_globalroute) Access to do global /SQUITs and /CONNECTs";
" k (can_localkill) Access to do local /KILLs";
" K (can_globalkill) Access to do global /KILLs";
" b (can_kline) Oper can /KLINE users from server";
" B (can_unkline) Oper can remove Klines";
" z (can_zline) Can add Z:Lines";
" Z (can_gzline) Can add global Z:Lines";
" t (can_gkline) Can use /GLINE, /SHUN and /SPAMFILTER";
" v (can_override) Can use OperOverride";
" q (can_setq) Can use +q";
" H (get_host) Gets +x on oper up";
" W (get_umodew) Gets +W on oper up";
" d (can_dccdeny) Can use /DCCDENY";
" ==-------------------------------oOo-----------------------------==";
" r = Access to /REHASH server";
" R = Access to /RESTART server";
" D = Access to /DIE server";
" h = Oper receives umode +h (helpop)";
" g = Oper can send /GLOBOPS";
" w = Oper can send /WALLOPS";
" n = Oper can send Local Server Notices";
" G = Oper can send Global Server Notices";
" c = Access to do local /SQUITs and /CONNECTs";
" L = Access to do global /SQUITs and /CONNECTs";
" k = Access to do local /KILLs";
" K = Access to do global /KILLs";
" b = Oper can /KLINE users from server";
" B = Oper can remove Klines";
" z = Can add Z:Lines";
" Z = Can add global Z:Lines";
" t = Can use /GLINE and /SHUN";
" v = Can use OperOverride";
" q = Can use +q";
" H = Gets +x on oper up";
" W = Gets +W on oper up";
" ==----------------------oOo--------------------==";
};
@@ -303,61 +232,31 @@ help Whois {
" -";
" Syntax: WHOIS <user>";
" Example: WHOIS hAtbLaDe";
" -";
" Status flags:";
" The list of channels shown in the WHOIS reply can include one or more";
" status flags to indicate information about the channel. These flags are";
" described below:";
" ~ - User is a Channel Owner (+q)";
" & - User is a Channel Admin (+a)";
" @ - User is a Channel Operator (+o)";
" % - User is a Halfop (+h)";
" + - User is Voiced (+v)";
" ! - User has channels hidden in whois (+p) and you are an IRC Operator";
" ? - The channel is secret (+s) and you are an IRC Operator";
};
help Who {
" Retrieves information about users";
" -";
" Syntax:";
" /WHO [+|-][acghimnsuMRI] [args]";
" /WHO [+|-][acghmnsuCM] [args]";
" Flags are specified like channel modes, the flags cgmnsu all have arguments";
" Flags are set to a positive check by +, a negative check by -";
" The flags available:";
" Flag a: user is away";
" Flag c <channel>: user is on <channel>, no wildcards accepted";
" Flag g <gcos/realname>: user has string <gcos> in his/her GCOS,";
" Flag g <gcos/realname>: user has string <gcos> in their GCOS,";
" wildcards accepted, oper only";
" Flag h <host>: user has string <host> in his/her hostname, wildcards are accepted";
" Flag i <ip>: user has string <ip> in his/her IP address";
" Flag m <usermodes>: user has <usermodes> set, only o/C/A/a/N for nonopers";
" Flag n <nick>: user has string <nick> in his/her nickname, wildcards accepted";
" Flag h <host>: user has string <host> in their hostname, wildcards are accepted";
" Flag m <usermodes>: user has <usermodes> set on them, only o/A/a for nonopers";
" Flag n <nick>: user has string <nick> in their nickname, wildcards accepted";
" Flag s <server>: user is on server <server>, wildcards not accepted";
" Flag u <user>: user has string <user> in his/her username, wildcards accepted";
" Flag u <user>: user has string <user> in their username, wildcards accepted";
" Behavior flags:";
" Flag C: show first visible channel user is in";
" Flag M: check for user in channels I am a member of";
" Flag R: show users' real hostnames";
" Flag I: show users' IP addresses";
" -";
" For backwards compatibility, /who 0 o still shows +o users";
" Example: WHO +m o";
" -";
" Status flags:";
" The who command shows several flags in the returned result to indicate";
" different information about the user. These flags are explained below:";
" G - User is /away (gone)";
" H - User is not /away (here)";
" r - User is using a registered nickname";
" B - User is a bot (+B)";
" * - User is an IRC Operator";
" ~ - User is a Channel Owner (+q)";
" & - User is a Channel Admin (+a)";
" @ - User is a Channel Operator (+o)";
" % - User is a Halfop (+h)";
" + - User is Voiced (+v)";
" ! - User is +H and you are an IRC Operator";
" ? - User is only visible because you are an IRC Operator";
};
help Whowas {
@@ -528,14 +427,6 @@ help Userhost {
" Example: USERHOST hAtbLaDe";
};
help Userip {
" Returns the userip of the user in question.";
" Usually used by scripts or bots.";
" -";
" Syntax: USERIP <nickname>";
" Example: USERIP codemastr";
};
help Topic {
" Sets/Changes the topic of the channel in question,";
" or just display the current Topic.";
@@ -548,14 +439,11 @@ help Topic {
help Invite {
" Sends a user an Invitation to join a particular channel.";
" If the channel is +i, you must be an Operator to use this";
" command, otherwise any user may use the command.";
" Invite without parameters lists the channels you have been";
" invited to.";
" You must be an Operator on the channel in order to";
" invite a user into it.";
" -";
" Syntax: INVITE [<user> <channel>]";
" Syntax: INVITE <user> <channel>";
" Example: INVITE hAtbLaDe #Support";
" Example: INVITE";
};
help Kick {
@@ -585,7 +473,7 @@ help Watch {
" -";
" Syntax: WATCH +nick1 +nick2 +nick3 (Add nicknames)";
" WATCH -nick (Delete nicknames)";
" WATCH (View which users are online)";
" WATCH (View the watchlist)";
};
help List {
@@ -614,11 +502,9 @@ help Privmsg {
" Send a message to a channel.";
" Ex: /PRIVMSG #room Hi all";
" /PRIVMSG <prefix><#channel> <text>";
" Send a message to users with <prefix> and higher in <#channel> only";
" Ex: /PRIVMSG @#room This goes to +oaq";
" /PRIVMSG +#room This goes to +vhoaq";
" NOTE: You need at least voice in order to send to +#chan/%#chan/@#chan";
" and at least ops to send to &#chan/~#chan.";
" Send a message to users with <prefix> in <#channel> only";
" Ex: /PRIVMSG @#room This goes to all ops";
" /PRIVMSG +%@#room This goes to all +v, +h and +o's.";
" /PRIVMSG $<mask> <text>";
" Send a message to all users on servers matching <mask> [Oper only]";
" This is shown in the status window by most clients.";
@@ -641,11 +527,9 @@ help Notice {
" Send a notice to a channel.";
" Ex: /NOTICE #room Hi all, this is annoying";
" /NOTICE <prefix><#channel> <text>";
" Send a notice to users with <prefix> and higher in <#channel> only";
" Ex: /NOTICE @#room This goes to +oaq";
" /NOTICE +#room This goes to +vhoaq";
" NOTE: You need at least voice in order to send to +#chan/%#chan/@#chan";
" and at least ops to send to &#chan/~#chan.";
" Send a notice to users with <prefix> in <#channel> only";
" Ex: /NOTICE @#room This goes to all ops";
" /NOTICE +%@#room This goes to all +v, +h and +o's.";
" /NOTICE $<mask> <text>";
" Send a notice to all users on servers matching <mask> [Oper only]";
" This is shown in the status window by most clients.";
@@ -781,10 +665,10 @@ help Nachat {
};
help Kill {
" Forcefully Disconnects users from an IRC Server.";
" Forcefully Disconnects a user from an IRC Server.";
" IRC Operator only command.";
" -";
" Syntax: KILL <user1>,<user2>,<user3>,... <reason>";
" Syntax: KILL <user> <reason>";
" Example: KILL Jack16 Cloning is not allowed";
};
@@ -901,8 +785,6 @@ help Rehash {
" -opermotd - Rehashes the OPERMOTD";
" -botmotd - Rehashes the BOTMOTD";
" -garbage - Force garbage collection";
" -ssl - Reload SSL certificate and primary key (if SSL enabled)";
" -dns - Reload DNS information (from resolv.conf/registry)";
};
help Restart {
@@ -912,7 +794,7 @@ help Restart {
" -";
" Syntax: RESTART";
" RESTART <password>";
" RESTART <password> <reason>";
" RESTART <server> <password>";
};
help Die {
@@ -978,8 +860,8 @@ help Squit {
" Usually used in routing of servers.";
" IRC Operator only command.";
" -";
" Syntax: SQUIT <server> [reason]";
" Example: SQUIT leaf.* Goodbye";
" Syntax: SQUIT <server>";
" Example: SQUIT leaf.*";
};
help Connect {
@@ -1021,10 +903,9 @@ help Sapart {
" Forces a user to part a channel.";
" Services Admin Command";
" -";
" Syntax: SAPART <nick> <channel>,[<channel2>..] [<comment>]";
" Syntax: SAPART <nick> <channel>,[<channel2>..]";
" Example: SAPART hAtbLaDe #OperHelp";
" SAPART hAtbLaDe #Support,#IRCHelp";
" SAPART hAtbLaDe #Support,#IRCHelp Go away";
};
help Samode {
@@ -1070,16 +951,13 @@ help Sdesc {
};
help Mkpasswd {
" This command will return a 'hash' of the string that has been specified,";
" you can use this hash for any encrypted passwords in your configuration file:";
" eg: for oper::password, vhost::password, etc.";
" Available types (in order of 'secureness'):";
" *NIX: crypt, md5, sha1 [*], ripemd160 [*]";
" Windows: crypt [*], md5, sha1, ripemd160 [*]";
" [*: only available if compiled with SSL support]";
" This command will Encrypt the string it has been given";
" So you can add it directly to the unrealircd.conf if you use";
" Encrypted passwords. Type can be crypt, sha1, or md5. Sha1";
" and md5 are only available when compiled with SSL support.";
" -";
" Syntax: MKPASSWD <method> <password>";
" Example: MKPASSWD md5 IamTeh1337";
" Example: MKPASSWD crypt mpsare";
};
help Module {
@@ -1163,7 +1041,7 @@ help Svskill {
};
help Svsnoop {
" Enables or disables whether IRCop functions";
" Enables or disables whether Global IRCop functions";
" exist on the server in question or not.";
" Must be sent through an U:Lined server.";
" -";
@@ -1175,7 +1053,7 @@ help Svsjoin {
" Forces a user to join a channel.";
" Must be sent through an U:Lined server.";
" -";
" Syntax: SVSJOIN <nick> <channel>[,<channel2>..] [key1[,key2[..]]]";
" Syntax: SVSJOIN <nick> <channel>[,<channel2>..]";
" Example: SVSJOIN hAtbLaDe #jail";
" SVSJOIN hAtbLaDe #jail,#zoo";
};
@@ -1184,10 +1062,9 @@ help Svspart {
" Forces a user to leave a channel.";
" Must be sent through an U:Lined server.";
" -";
" Syntax: SVSPART <nick> <channel>[,<channel2>..] [<comment>]";
" Syntax: SVSPART <nick> <channel>[,<channel2>..]";
" Example: SVSPART hAtbLaDe #Hanson";
" SVSPART hAtbLaDe #Hanson,#AOL";
" SVSPART hAtbLaDe #Hanson,#AOL You must leave";
};
help Svso {
@@ -1259,9 +1136,7 @@ help Svsnline {
" spaces are indicated by _, Unreal will internally";
" translate these to spaces";
" -";
" Syntax: SVSNLINE + <reason_for_ban> :<realname>";
" (adds realname ban for <realname>)";
" SVSNLINE - :<realname> (removes ban for <realname>)";
" Syntax: SVSNLINE +/- <reason_for_ban> :<realname>";
" Example: SVSNLINE + sub7_drone :*sub7*";
};
@@ -1277,18 +1152,18 @@ help Svslusers {
help Svswatch {
" Changes the WATCH list of a user.";
" Must be sent through an U:Lined server.";
" Must be sent trough an U:Lined server.";
" Syntax: SVSWATCH <nick> :<watch parameters>";
" Example: SVSWATCH Blah :+Blih!*@* +Bluh!*@* +Bleh!*@*.com";
};
help Svssilence {
" Changes the SILENCE list of a user.";
" Must be sent through an U:Lined server.";
" Must be sent trough an U:Lined server.";
" In contrast to the SILENCE command, you can add/remove";
" multiple entries in one line.";
" Syntax: SVSSILENCE <nick> :<silence parameters>";
" Example: SVSSILENCE Blah :+*!*@*.com +*!*@*.bla.co.uk";
" Example: SILENCE Blah :+*!*@*.com +*!*@*.bla.co.uk";
};
help Svssno {
@@ -1316,8 +1191,7 @@ help Spamfilter {
" Use: /spamfilter [add|del|remove|+|-] [type] [action] [tkltime] [reason] [regex]";
" [type] specifies the target type, you can specify multiple targets:";
" 'c' channel msg, 'p' private msg, 'n' private notice,";
" 'N' channel notice, 'P' part msg, 'q' quit msg, 'd' dcc,";
" 'a' away, 't' topic, 'u' user (nick!user@host:realname ban)";
" 'N' channel notice, 'P' part msg, 'q' quit msg, 'd' dcc";
" [action] specifies the action to be taken (only 1 action can be specified):";
" 'kill', 'tempshun' (only shun current session), 'shun',";
" 'kline', 'gline', 'zline', 'gzline', 'block' (blocks the msg),";
@@ -1351,24 +1225,3 @@ help Tempshun {
" Example: TEMPSHUN evilguy suspected infection";
" TEMPSHUN -niceguy";
};
help DccAllow {
" For help on the DCCALLOW system, type '/DCCALLOW HELP'";
/* It would be useless and bad to include it here since that
* stuff quickly gets out-of-synch.
*/
};
help Addmotd {
" Adds a line to the end of the MOTD ";
" -";
" Syntax: ADDMOTD <text>";
" Example: ADDMOTD Play nice!";
};
help Addomotd {
" Adds a line to the end of the OPERMOTD ";
" -";
" Syntax: ADDOMOTD <text>";
" Example: ADDOMOTD Abuse it and lose it!";
};
+5 -4
View File
@@ -30,14 +30,11 @@ typedef struct {
#define AUTHTYPE_SHA1 3
#define AUTHTYPE_SSL_CLIENTCERT 4
#define AUTHTYPE_RIPEMD160 5
#define AUTHTYPE_SSL_CERTFINGERPRINT_SHA1 6
/* md5 is always available and enabled as of Unreal3.2.1 */
#define AUTHENABLE_MD5
#ifdef USE_SSL
#define AUTHENABLE_MD5
#define AUTHENABLE_SHA1
#define AUTHENABLE_SSL_CLIENTCERT
#define AUTHENABLE_SSL_CERTFINGERPRINT
#define AUTHENABLE_RIPEMD160
/* OpenSSL provides a crypt() */
#ifndef AUTHENABLE_UNIXCRYPT
@@ -50,7 +47,11 @@ typedef struct {
#endif
#endif
#ifdef _WIN32
#ifndef AUTHENABLE_MD5
#define AUTHENABLE_MD5
#endif
#ifndef AUTHENABLE_SHA1
#define AUTHENABLE_SHA1
#endif
+1 -1
View File
@@ -6,7 +6,7 @@
#include <string.h>
#ifndef _WIN32
#include "pcreposix.h"
#include "tre/regex.h"
#else
#include "win32/regex.h"
#endif
+63
View File
@@ -0,0 +1,63 @@
/************************************************************************
* Unreal Internet Relay Chat Daemon, include/class.h
* Copyright (C) 1990 Darren Reed
*
* 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.
*
* $Id$
*/
#ifndef __class_include__
#define __class_include__
typedef struct Class {
int class;
int conFreq;
int pingFreq;
int maxLinks;
long maxSendq;
int links;
struct Class *next;
} aClass;
#define Class(x) ((x)->class)
#define ConFreq(x) ((x)->conFreq)
#define PingFreq(x) ((x)->pingFreq)
#define MaxLinks(x) ((x)->maxLinks)
#define MaxSendq(x) ((x)->maxSendq)
#define Links(x) ((x)->links)
#define ConfLinks(x) (Class(x)->links)
#define ConfMaxLinks(x) (Class(x)->maxLinks)
#define ConfClass(x) (Class(x)->class)
#define ConfConFreq(x) (Class(x)->conFreq)
#define ConfPingFreq(x) (Class(x)->pingFreq)
#define ConfSendq(x) (Class(x)->maxSendq)
#define FirstClass() classes
#define NextClass(x) ((x)->next)
extern aClass *classes;
extern aClass *find_class(int);
extern int get_conf_class(aConfItem *);
extern int get_client_class(aClient *);
extern int get_client_ping(aClient *);
extern int get_con_freq(aClass *);
extern void add_class(int, int, int, int, long);
extern void check_class(void);
extern void initclass(void);
#endif /* __class_include__ */
+68 -33
View File
@@ -36,7 +36,7 @@
#include <process.h>
#include <io.h>
#endif
#include "types.h"
//#include "dynconf.h"
#include "config.h"
#ifdef PARAMH
#include <sys/param.h>
@@ -96,12 +96,12 @@ void free();
#define TS time_t
extern int match(const char *, const char *);
extern int match(char *, char *);
#define mycmp(a,b) \
( (toupper(a[0])!=toupper(b[0])) || smycmp((a)+1,(b)+1) )
extern int smycmp(const char *, const char *);
extern int smycmp(char *, char *);
#ifndef GLIBC2_x
extern int myncmp(const char *, const char *, int);
extern int myncmp(char *, char *, int);
#endif
#ifdef NEED_STRTOK
@@ -125,15 +125,7 @@ extern char *inet_ntoa(struct IN_ADDR);
extern int inet_netof(struct IN_ADDR);
#endif
#ifndef HAVE_INET_NTOP
const char *inet_ntop(int, const void *, char *, size_t);
#endif
#ifndef HAVE_INET_PTON
int inet_pton(int af, const char *src, void *dst);
#endif
MODVAR int global_count, max_global_count;
int global_count, max_global_count;
extern char *myctime(time_t);
extern char *strtoken(char **, char *, char *);
@@ -148,11 +140,10 @@ extern char *strtoken(char **, char *, char *);
#define DupString(x,y) do{int l=strlen(y);x=MyMalloc(l+1);(void)memcpy(x,y, l+1);}while(0)
extern MODVAR u_char tolowertab[], touppertab[];
extern u_char tolowertab[], touppertab[];
#if defined(NICK_GB2312) || defined(NICK_GBK) || defined(NICK_GBK_JAP)
#if defined(CHINESE_NICK) || defined(JAPANESE_NICK)
#define USE_LOCALE
#include <ctype.h>
#endif
#ifndef USE_LOCALE
@@ -175,7 +166,7 @@ extern MODVAR u_char tolowertab[], touppertab[];
#undef isspace
#undef iscntrl
#endif
extern MODVAR unsigned char char_atribs[];
extern unsigned char char_atribs[];
#define PRINT 1
#define CNTRL 2
@@ -184,7 +175,6 @@ extern MODVAR unsigned char char_atribs[];
#define DIGIT 16
#define SPACE 32
#define ALLOW 64
#define ALLOWN 128
#ifndef KLINE_TEMP
#define KLINE_PERM 0
@@ -209,7 +199,6 @@ extern MODVAR unsigned char char_atribs[];
#define isgraph(c) ((char_atribs[(u_char)(c)]&PRINT) && ((u_char)(c) != 0x32))
#define ispunct(c) (!(char_atribs[(u_char)(c)]&(CNTRL|ALPHA|DIGIT)))
#endif
#define iswseperator(c) (!isalnum(c) && !((u_char)c >= 128))
#ifndef MALLOCD
#define MyFree free
@@ -230,6 +219,8 @@ static char *StsMalloc(size_t size, char *file, long line)
#endif
extern struct SLink *find_user_link( /* struct SLink *, struct Client * */ );
/*
* Protocol support text. DO NO CHANGE THIS unless you know what
* you are doing.
@@ -249,18 +240,66 @@ static char *StsMalloc(size_t size, char *file, long line)
#define EXPAR4 ""
#endif /* EXTCMODE */
#define PROTOCTL_CLIENT_1 \
"MAP" \
" KNOCK" \
" SAFELIST" \
" HCN" \
" MAXCHANNELS=%i" \
" MAXBANS=%i" \
" NICKLEN=%i" \
" TOPICLEN=%i" \
" KICKLEN=%i" \
" MAXTARGETS=%i" \
" AWAYLEN=%i" \
" :are supported by this server"
#define PROTOCTL_PARAMETERS_1 \
MAXCHANNELSPERUSER, \
MAXBANS, \
NICKLEN, \
TOPICLEN, \
TOPICLEN, \
MAXTARGETS, \
TOPICLEN
#ifdef PREFIX_AQ
#define CHPFIX "(qaohv)~&@%+"
#define CHPAR1 "beI"
#define CHPFIX "(qaohv)~&@%+"
#define CHPAR1 "be"
#else
#define CHPFIX "(ohv)@%+"
#define CHPAR1 "beIqa"
#define CHPFIX "(ohv)@%+"
#define CHPAR1 "beqa"
#endif /* PREFIX_AQ */
#define CHPAR2 "kfL"
#define CHPAR3 "l"
#define CHPAR4 "psmntirRcOAQKVCuzNSM"
#define CHPAR2 "kfL"
#define CHPAR3 "l"
#define CHPAR4 "psmntirRcOAQKVGCuzNSM"
#define PROTOCTL_CLIENT_2 \
"WALLCHOPS" \
" WATCH=%i" \
" SILENCE=%i" \
" MODES=%i" \
" CHANTYPES=%s" \
" PREFIX=%s" \
" CHANMODES=%s%s,%s%s,%s%s,%s%s" \
" NETWORK=%s" \
" CASEMAPPING=%s" \
" EXTBAN=~,%s" \
" :are supported by this server"
#define PROTOCTL_PARAMETERS_2 \
MAXWATCH, \
SILENCE_LIMIT, \
MAXMODEPARAMS, \
"#", \
CHPFIX, \
CHPAR1, EXPAR1, \
CHPAR2, EXPAR2, \
CHPAR3, EXPAR3, \
"psmntirRcOAQKVGCuzNSM", EXPAR4, \
ircnet005, \
"ascii", \
extbanstr
/* Server-Server PROTOCTL -Stskeeps
* Please check send_proto() for more. -- Syzop
@@ -275,8 +314,7 @@ static char *StsMalloc(size_t size, char *file, long line)
" SJ3" \
" NS" \
" SJB64" \
" TKLEXT" \
" NICKIP"
" TKLEXT"
#ifdef _WIN32
/*
@@ -284,6 +322,7 @@ static char *StsMalloc(size_t size, char *file, long line)
* Windows' internal strerror() function doesn't work with socket errors.
*/
extern int DisplayString(HWND hWnd, char *InBuf, ...);
#undef strerror
#else
typedef int SOCKET;
#define INVALID_SOCKET -1
@@ -297,9 +336,8 @@ extern int lu_noninv, lu_inv, lu_serv, lu_oper,
lu_unknown, lu_channel, lu_lu, lu_lulocal, lu_lserv,
lu_clu, lu_mlu, lu_cglobalu, lu_mglobalu;
MODVAR TS now;
TS now;
#ifndef _WIN32
#if defined(__STDC__)
#define __const const
#define __signed signed
@@ -322,9 +360,6 @@ MODVAR TS now;
#endif
#endif
#endif
#else
#define inline __inline
#endif
#define READBUF_SIZE 8192
+133 -82
View File
@@ -70,17 +70,17 @@
#undef NO_FDLIST
/*
* system have sockaddr_storage struct.
*/
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
/*
* Defining this will allow all ircops to see people in +s channels
* By default, only net/tech admins can see this
*/
#define SHOW_SECRET
/*
* This allows you to see modes in /list
*/
#define LIST_SHOW_MODES
/*
* Admin's chat...
*/
@@ -92,12 +92,24 @@
*/
#undef SECURECHANMSGSONLYGOTOSECURE
/*
* be compatible with older cloak keys? If you link to servers beta4 and
* earlier without this the cloak keys will produce diff results
* Not recommended, however, as beta4 and earlier 3.2 has an insecure
* cloak algo -griever
*/
#undef COMPAT_BETA4_KEYS
/*
If you want SHUN_NOTICES, define this
*/
#undef SHUN_NOTICES
/*
If you want to support chinese and/or japanese nicks
*/
#undef NICK_GB2312
#undef NICK_GBK
#undef NICK_GBK_JAP
#undef CHINESE_NICK
#undef JAPANESE_NICK
/*
Remote rehash
@@ -114,6 +126,39 @@
*/
#undef STRIPBADWORDS_CHAN_ALWAYS
/*
* NO_OPEROVERRIDE
* This will disable OperMode, OperTopic and Banwalks
*/
#undef NO_OPEROVERRIDE
/*
* OPEROVERRIDE_VERIFY
* This will prompt opers before permitting them to join +p/+s
* channels, decreasing the chances of someone "accidentally"
* entering a random channel.
*/
#undef OPEROVERRIDE_VERIFY
/*
* THROTTLING
* This will only allow 1 connection per ip in set::throttle::period time
*/
#define THROTTLING
/*
* NAZIISH_CHBAN_HANDLING (formerly ANNOYING_BAN_THING)
* Reject bans that are matched by existing bans, causes chanserv
* To flood-kick an akicked user if their akick is matched by another
* Ban, but if you don't mind, this can free up ban list space I guess
*/
#undef NAZIISH_CHBAN_HANDLING
/*
* Disable /sethost, /setident, /chgname, /chghost, /chgident
*/
#undef DISABLE_USERMOD
/*
* No spoof code
*
@@ -133,6 +178,13 @@
*/
#define HOSTILENAME /* [DO NOT CHANGE!] */
/*
* This makes topics include nick!user@host instead of nick in topic whoset,
* ALL servers must be Unreal3.2-beta12 or higher, and services may have some
* problems with this
*/
#undef TOPIC_NICK_IS_NUHOST
/*
* Use JOIN instead of SJOIN on every remotely sent JOIN
*/
@@ -189,60 +241,36 @@
* the maintainer.
*/
/* DEBUGMODE: This should only be used when tracing a problem. It creates
* an insane amount of log output which can be very useful for debugging.
* You should *NEVER* enable this setting on production servers.
*/
/* #undef DEBUGMODE */
/* #undef DEBUGMODE define DEBUGMODE to enable debugging mode.*/
/*
* Full pathnames and defaults of irc system's support files. Please note that
* these are only the recommened names and paths. Change as needed.
* You must define these to something, even if you don't really want them.
*/
#ifndef _WIN32
#define CPATH "unrealircd.conf" /* server configuration file */
#else
extern char CPATH[262];
#endif
#define MPATH "ircd.motd" /* server MOTD file */
#define SMPATH "ircd.smotd" /* short MOTD file */
#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 lPATH "ircd.log" /* server log file */
#define VPATH "ircd.svsmotd" /* Services MOTD append. */
#define BPATH "bot.motd" /* Bot MOTD */
#define IRCDTUNE "ircd.tune" /* tuning .. */
/* CHROOTDIR
*
* This enables running the IRCd chrooted (requires initial root privileges,
* but will be dropped to IRC_USER/IRC_GROUP privileges if those are defined).
* Define for value added security if you are a rooter.
*
* The directory to chroot to is simply DPATH (which is set via ./Config).
* All files you access must be in the directory you define as DPATH.
* (This may effect the PATH locations above, though you can symlink it)
*
* Usually you only simply need to enable this, and set IRC_USER and
* IRC_GROUP, you don't need to create a special chroot environment..
* UnrealIRCd will do that by itself (Unreal will create /dev/random,
* etc. etc.).
*
* Change to '#define CHROOTDIR' to enable...
* You may want to define IRC_UID and IRC_GID
*/
/* #define CHROOTDIR */
/*
* IRC_USER
*
* If you start the server as root but wish to have it run as another user,
* define IRC_USER to that user name. This should only be defined if you
* are running as root and even then perhaps not.
*/
/* #define IRC_USER "<user name>" */
/* #define IRC_GROUP "<group name>" */
/* SHOW_INVISIBLE_LUSERS
*
* As defined this will show the correct invisible count for anyone who does
@@ -258,25 +286,9 @@ extern char CPATH[262];
* that the 'new' access lets them. Note also that defining this is
* a major security hole if your ircd goes down and some other user
* starts up the server with a new conf file that has some extra
* O-lines.
* Naturally, for non-suid/sgid ircds, this setting does not matter,
* hence command line parameters are always permitted then.
* O-lines. So don't use this unless you're debugging.
*/
#undef CMDLINE_CONFIG
/** FAKELAG_CONFIGURABLE makes it possible to make certain classes exempted
* from 'fake lag' (that is, the artificial delay that is added by the ircd
* to prevent flooding, which causes the messages/commands of the user to
* slow down). Naturally, incorrect use of this feature can cause SEVERE
* issues, in fact it can easily bring your whole IRCd down if one of the
* users with class::options::nofakelag does a good flood at full speed.
* Hence, this is disabled by default, and you need to explicitly enable it
* here IF YOU KNOW WHAT YOU ARE DOING. People complaining their ircd
* ""crashed"" because of this setting will be shot. </DISCLAIMER>
* Common usage for this are: a trusted bot ran by an IRCOp, that you only
* want to give "flood access" and nothing else, and other such things.
*/
#undef FAKELAG_CONFIGURABLE
#undef CMDLINE_CONFIG /* allow conf-file to be specified on command line */
/*
* Size of the LISTEN request. Some machines handle this large
@@ -301,6 +313,19 @@ extern char CPATH[262];
#define BUFFERPOOL (18 * MAXSENDQLENGTH)
#endif
/*
* IRC_UID
*
* If you start the server as root but wish to have it run as another user,
* define IRC_UID to that UID. This should only be defined if you are running
* as root and even then perhaps not.
* use #define IRC_UID <uid>
* and #define IRC_GID <gid>
*/
#undef IRC_UID
#undef IRC_GID
/*
* CLIENT_FLOOD
*
@@ -318,13 +343,17 @@ extern char CPATH[262];
#define NO_FLOOD_AWAY
/* You can define the nickname of NickServ here (usually "NickServ").
* This is ONLY used for the ""infamous IDENTIFY feature"", which is:
* whenever a user connects with a server password but there isn't
* a server password set, the password is sent to NickServ in an
* 'IDENTIFY <pass>' message.
/*
* Define your network service names here.
*/
#define ChanServ "ChanServ"
#define MemoServ "MemoServ"
#define NickServ "NickServ"
#define OperServ "OperServ"
#define HelpServ "HelpServ"
#define StatServ "StatServ"
#define InfoServ "InfoServ"
#define BotServ "BotServ"
/*
* How many open targets can one nick have for messaging nicks and
@@ -345,13 +374,25 @@ extern char CPATH[262];
#define PORTNUM 6667 /* 6667 is default */
/*
* Maximum number of network connections your server will allow.
* This is usually configured via ./Config on *NIX,
* the setting mentioned below is the default for Windows.
* 2004-10-13: 1024 -> 4096
* Maximum number of network connections your server will allow. This should
* never exceed max. number of open file descrpitors and wont increase this.
* Should remain LOW as possible. Most sites will usually have under 30 or so
* connections. A busy hub or server may need this to be as high as 50 or 60.
* Making it over 100 decreases any performance boost gained from it being low.
* if you have a lot of server connections, it may be worth splitting the load
* over 2 or more servers.
* 1 server = 1 connection, 1 user = 1 connection.
* This should be at *least* 3: 1 listen port, 1 dns port + 1 client
*
* Note: this figure will be too high for most systems. If you get an
* fd-related error on compile, change this to 256.
*
* Windows users: This should be a fairly high number. Some operations
* will slow down because of this, but it is _required_ because of the way
* windows NT(and possibly 95) allocate fd handles. A good number is 16384.
*/
#ifndef MAXCONNECTIONS
#define MAXCONNECTIONS 4096
#define MAXCONNECTIONS 1024
#endif
/*
@@ -361,7 +402,7 @@ extern char CPATH[262];
* 8MB or less core memory : 500 (at least 1/4 of max users)
* 8MB-16MB core memory : 500-750 (1/4 -> 1/2 of max users)
* 16MB-32MB core memory : 750-1000 (1/2 -> 3/4 of max users)
* 32MB or more core memory : 1000+ (> 3/4 of max users)
* 32MB or more core memory : 1000+ (> 3/4 if max users)
* where max users is the expected maximum number of users.
* (100 nicks/users ~ 25k)
* NOTE: this is directly related to the amount of memory ircd will use whilst
@@ -376,7 +417,7 @@ extern char CPATH[262];
/*
* Time interval to wait and if no messages have been received, then check for
* pings, outgoing connects, events, and a couple of other things.
* PINGFREQUENCY and CONNECTFREQUENCY
* Imo this is quite useless nowdays, it only saves _some_ cpu on tiny networks
* with like 10 users all of them being inactive. On a normal network with >30
* users this value is completely irrelevant.
@@ -390,10 +431,15 @@ extern char CPATH[262];
* PINGFREQUENCY seconds, then the server will attempt to check for
* an active link with a PING message. If no reply is received within
* (PINGFREQUENCY * 2) seconds, then the connection will be closed.
* NOTE: This is simply the class::pingfreq for the default class, nothing fancy ;)
*/
#define PINGFREQUENCY 120 /* Recommended value: 120 */
/*
* If the connection to to uphost is down, then attempt to reconnect every
* CONNECTFREQUENCY seconds.
*/
#define CONNECTFREQUENCY 600 /* Recommended value: 600 */
/*
* Often net breaks for a short time and it's useful to try to
* establishing the same connection again faster than CONNECTFREQUENCY
@@ -426,14 +472,20 @@ extern char CPATH[262];
#define KILLCHASETIMELIMIT 90 /* Recommended value: 90 */
/*
* Forces Unreal to use compressed IPv6 addresses rather than expanding them
* Use much faster badwords replace routine (>100 times faster).
*/
#undef IPV6_COMPRESSED
#define FAST_BADWORD_REPLACE
/*
* Only important for people using IPv6 (default should be ok for now) -Onliner
* Because ip6.arpa is still not delegated for the 6bone (3ffe::/16)
* this options allows you to still resolve it using ip6.int.
*/
#define SIXBONE_HACK
/*
* Extended channel modes. This extends the channel modes with yet another
* 32 possible modes which can also be used in modules.
* This is now pretty much required.
*/
#define EXTCMODE
@@ -443,13 +495,6 @@ extern char CPATH[262];
*/
#define NEWCHFLOODPROT
/* JoinThrottle (chanmode +j): +j x:y throttles users to X joins per Y seconds (per-user).
* In peak situations (eg: just after a server restart with thousand clients joining
* hundreds of channels) it can use like ~200k, but in normal circumstances you should
* count on just ~10-50k.
*/
#define JOINTHROTTLE
/* ------------------------- END CONFIGURATION SECTION -------------------- */
#define MOTD MPATH
#define RULES RPATH
@@ -457,10 +502,6 @@ extern char CPATH[262];
#define CONFIGFILE CPATH
#define IRCD_PIDFILE PPATH
#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."
#endif
#ifdef __osf__
#define OSF
/* OSF defines BSD to be its version of BSD */
@@ -540,6 +581,16 @@ error You stuffed up config.h signals
* whatever else. -4 allows "safety" margin of 1 and space reserved.
*/
#define MAXCLIENTS (MAXCONNECTIONS-4)
#ifdef HAVECURSES
# define DOCURSES
#else
# undef DOCURSES
#endif
#ifdef HAVETERMCAP
# define DOTERMCAP
#else
# undef DOTERMCAP
#endif
# define stricmp strcasecmp
# define strnicmp strncasecmp
#if defined(CLIENT_FLOOD)
+25 -155
View File
@@ -19,7 +19,7 @@
* $Id$
*/
#ifndef DYNCONF_H
#define DYNCONF_H
/* config level */
#define DYNCONF_CONF_VERSION "1.5"
@@ -27,6 +27,10 @@
typedef struct zNetwork aNetwork;
struct zNetwork {
long key;
long key2;
long key3;
long keycrc;
unsigned x_inah:1;
char *x_ircnetwork;
char *x_ircnet005;
@@ -52,6 +56,13 @@ struct ChMode {
long extmodes;
char *extparams[EXTCMODETABLESZ];
#endif
#ifdef NEWCHFLOODPROT
ChanFloodProt floodprot;
#else
unsigned short msgs;
unsigned short per;
unsigned char kmode;
#endif
};
typedef struct _OperStat {
@@ -63,9 +74,9 @@ typedef struct zConfiguration aConfiguration;
struct zConfiguration {
unsigned som:1;
unsigned hide_ulines:1;
unsigned flat_map:1;
unsigned allow_chatops:1;
unsigned webtv_support:1;
unsigned no_oper_hiding:1;
unsigned ident_check:1;
unsigned fail_oper_warn:1;
unsigned show_connect_info:1;
@@ -73,16 +84,15 @@ struct zConfiguration {
unsigned use_ban_version:1;
unsigned mkpasswd_for_everyone:1;
unsigned allow_part_if_shunned:1;
unsigned check_target_nick_bans:1;
unsigned use_egd : 1;
unsigned use_egd;
long host_timeout;
int host_retries;
char *name_server;
char *dns_bindip;
#ifdef THROTTLING
long throttle_period;
char throttle_count;
#endif
char *kline_address;
char *gline_address;
long conn_modes;
long oper_modes;
char *oper_snomask;
@@ -92,7 +102,6 @@ struct zConfiguration {
char *oper_only_stats;
OperStat *oper_only_stats_ext;
int maxchannelsperuser;
int maxdccallow;
int anti_spam_quit_message_time;
char *egd_path;
char *static_quit;
@@ -100,22 +109,12 @@ struct zConfiguration {
#ifdef USE_SSL
char *x_server_cert_pem;
char *x_server_key_pem;
char *x_server_cipher_list;
char *x_dh_pem;
char *trusted_ca_file;
long ssl_options;
int ssl_renegotiate_bytes;
int ssl_renegotiate_timeout;
#elif defined(_WIN32)
void *bogus1, *bogus2, *bogus3, *bogus5, *bogus8;
long bogus4;
int bogus6, bogus7;
#endif
enum UHAllowed userhost_allowed;
char *restrict_usermodes;
char *restrict_channelmodes;
char *restrict_extendedbans;
char *channel_command_prefix;
long unknown_flood_bantime;
long unknown_flood_amount;
@@ -139,43 +138,32 @@ struct zConfiguration {
long spamfilter_ban_time;
char *spamfilter_ban_reason;
char *spamfilter_virus_help_channel;
char spamfilter_vchan_deny;
SpamExcept *spamexcept;
char *spamexcept_line;
int maxbans;
int maxbanlength;
int timesynch_enabled;
int timesynch_timeout;
char *timesynch_server;
int pingpong_warning;
aNetwork network;
int nicklen;
};
#ifndef DYNCONF_C
extern MODVAR aConfiguration iConf;
extern aConfiguration iConf;
#endif
#define KLINE_ADDRESS iConf.kline_address
#define GLINE_ADDRESS iConf.gline_address
#define KLINE_ADDRESS iConf.kline_address
#define CONN_MODES iConf.conn_modes
#define OPER_MODES iConf.oper_modes
#define OPER_SNOMASK iConf.oper_snomask
#define CONNECT_SNOMASK iConf.user_snomask
#define SHOWOPERMOTD iConf.som
#define HIDE_ULINES iConf.hide_ulines
#define FLAT_MAP iConf.flat_map
#define ALLOW_CHATOPS iConf.allow_chatops
#define MAXCHANNELSPERUSER iConf.maxchannelsperuser
#define MAXDCCALLOW iConf.maxdccallow
#define WEBTV_SUPPORT iConf.webtv_support
#define NO_OPER_HIDING iConf.no_oper_hiding
#define DONT_RESOLVE iConf.dont_resolve
#define AUTO_JOIN_CHANS iConf.auto_join_chans
#define OPER_AUTO_JOIN_CHANS iConf.oper_auto_join_chans
#define HOST_TIMEOUT iConf.host_timeout
#define HOST_RETRIES iConf.host_retries
#define NAME_SERVER iConf.name_server
#define DNS_BINDIP iConf.dns_bindip
#define IDENT_CHECK iConf.ident_check
#define FAILOPER_WARN iConf.fail_oper_warn
#define SHOWCONNECTINFO iConf.show_connect_info
@@ -203,14 +191,19 @@ extern MODVAR aConfiguration iConf;
#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 CLOAK_KEY1 iConf.network.key
#define CLOAK_KEY2 iConf.network.key2
#define CLOAK_KEY3 iConf.network.key3
#define CLOAK_KEYCRC iConf.network.keycrc
#define STATIC_QUIT iConf.static_quit
#define STATIC_PART iConf.static_part
#define UHOST_ALLOWED iConf.userhost_allowed
#define RESTRICT_USERMODES iConf.restrict_usermodes
#define RESTRICT_CHANNELMODES iConf.restrict_channelmodes
#define RESTRICT_EXTENDEDBANS iConf.restrict_extendedbans
#ifdef THROTTLING
#define THROTTLING_PERIOD iConf.throttle_period
#define THROTTLING_COUNT iConf.throttle_count
#endif
#define USE_BAN_VERSION iConf.use_ban_version
#define UNKNOWN_FLOOD_BANTIME iConf.unknown_flood_bantime
#define UNKNOWN_FLOOD_AMOUNT iConf.unknown_flood_amount
@@ -245,127 +238,4 @@ extern MODVAR aConfiguration iConf;
#define SPAMFILTER_BAN_TIME iConf.spamfilter_ban_time
#define SPAMFILTER_BAN_REASON iConf.spamfilter_ban_reason
#define SPAMFILTER_VIRUSCHAN iConf.spamfilter_virus_help_channel
#define SPAMFILTER_VIRUSCHANDENY iConf.spamfilter_vchan_deny
#define SPAMFILTER_EXCEPT iConf.spamexcept_line
#define CHECK_TARGET_NICK_BANS iConf.check_target_nick_bans
#define MAXBANS iConf.maxbans
#define MAXBANLENGTH iConf.maxbanlength
#define TIMESYNCH iConf.timesynch_enabled
#define TIMESYNCH_TIMEOUT iConf.timesynch_timeout
#define TIMESYNCH_SERVER iConf.timesynch_server
#define PINGPONG_WARNING iConf.pingpong_warning
/* Used for "is present?" and duplicate checking */
struct SetCheck {
unsigned has_show_opermotd:1;
unsigned has_hide_ulines:1;
unsigned has_flat_map:1;
unsigned has_allow_chatops:1;
unsigned has_webtv_support:1;
unsigned has_ident_check:1;
unsigned has_fail_oper_warn:1;
unsigned has_show_connect_info:1;
unsigned has_dont_resolve:1;
unsigned has_mkpasswd_for_everyone:1;
unsigned has_allow_part_if_shunned:1;
unsigned has_ssl_egd:1;
unsigned has_ssl_server_cipher_list :1;
unsigned has_dns_timeout:1;
unsigned has_dns_retries:1;
unsigned has_dns_nameserver:1;
unsigned has_dns_bind_ip:1;
unsigned has_throttle_period:1;
unsigned has_throttle_connections:1;
unsigned has_kline_address:1;
unsigned has_gline_address:1;
unsigned has_modes_on_connect:1;
unsigned has_modes_on_oper:1;
unsigned has_snomask_on_connect:1;
unsigned has_snomask_on_oper:1;
unsigned has_auto_join:1;
unsigned has_oper_auto_join:1;
unsigned has_check_target_nick_bans:1;
unsigned has_pingpong_warning:1;
unsigned has_oper_only_stats:1;
unsigned has_maxchannelsperuser:1;
unsigned has_maxdccallow:1;
unsigned has_anti_spam_quit_message_time:1;
unsigned has_egd_path:1;
unsigned has_static_quit:1;
unsigned has_static_part:1;
#ifdef USE_SSL
unsigned has_ssl_certificate:1;
unsigned has_ssl_key:1;
unsigned has_ssl_trusted_ca_file:1;
unsigned has_ssl_options:1;
unsigned has_ssl_dh:1;
unsigned has_renegotiate_timeout : 1;
unsigned has_renegotiate_bytes : 1;
#endif
unsigned has_allow_userhost_change:1;
unsigned has_restrict_usermodes:1;
unsigned has_restrict_channelmodes:1;
unsigned has_restrict_extendedbans:1;
unsigned has_channel_command_prefix:1;
unsigned has_anti_flood_unknown_flood_bantime:1;
unsigned has_anti_flood_unknown_flood_amount:1;
unsigned has_modes_on_join:1;
#ifdef NO_FLOOD_AWAY
unsigned has_anti_flood_away_count:1;
unsigned has_anti_flood_away_period:1;
#endif
unsigned has_anti_flood_nick_flood:1;
unsigned has_ident_connect_timeout:1;
unsigned has_ident_read_timeout:1;
unsigned has_default_bantime:1;
unsigned has_who_limit:1;
unsigned has_maxbans:1;
unsigned has_maxbanlength:1;
unsigned has_silence_limit:1;
#ifdef NEWCHFLOODPROT
unsigned has_modef_default_unsettime:1;
unsigned has_modef_max_unsettime:1;
#endif
unsigned has_ban_version_tkl_time:1;
unsigned has_spamfilter_ban_time:1;
unsigned has_spamfilter_ban_reason:1;
unsigned has_spamfilter_virus_help_channel:1;
unsigned has_spamfilter_virus_help_channel_deny:1;
unsigned has_spamfilter_except:1;
unsigned has_hosts_host_on_oper_up:1;
unsigned has_network_name:1;
unsigned has_default_server:1;
unsigned has_services_server:1;
unsigned has_hosts_global:1;
unsigned has_hosts_admin:1;
unsigned has_hosts_local:1;
unsigned has_hosts_servicesadmin:1;
unsigned has_hosts_netadmin:1;
unsigned has_hosts_coadmin:1;
unsigned has_hiddenhost_prefix:1;
unsigned has_prefix_quit:1;
unsigned has_help_channel:1;
unsigned has_stats_server:1;
unsigned has_cloak_keys:1;
unsigned has_options_webtv_support:1;
unsigned has_options_hide_ulines:1;
unsigned has_options_flat_map:1;
unsigned has_options_show_opermotd:1;
unsigned has_options_identd_check:1;
unsigned has_options_fail_oper_warn:1;
unsigned has_options_dont_resolve:1;
unsigned has_options_show_connect_info:1;
unsigned has_options_mkpasswd_for_everyone:1;
unsigned has_options_allow_part_if_shunned:1;
int cgiirc_type; /* cheat :( */
unsigned has_cgiirc_hosts:1;
unsigned has_cgiirc_webpass:1;
unsigned has_nicklen:1;
};
#endif
+1 -421
View File
@@ -2,7 +2,6 @@
#define _IRCD_DOG3_FDLIST
/* $Id$ */
#ifndef NEW_IO
typedef struct fdstruct {
int entry[MAXCONNECTIONS + 2];
@@ -14,428 +13,9 @@ void delfrom_fdlist(int a, fdlist * b);
void init_fdlist(fdlist * b);
#ifndef NO_FDLIST
extern MODVAR fdlist oper_fdlist;
extern fdlist oper_fdlist;
#endif
#else /* ifndef NEW_IO */
/* Hybrid Support Headers Begin */
#include <sys/resource.h>
#ifdef RLIMIT_FDMAX
# define RLIMIT_FD_MAX RLIMIT_FDMAX
#else
# ifdef RLIMIT_NOFILE
# define RLIMIT_FD_MAX RLIMIT_NOFILE
# else
# ifdef RLIMIT_OPEN_MAX
# define RLIMIT_FD_MAX RLIMIT_OPEN_MAX
# else
# warning No file descriptor limit was found
# endif
# endif
#endif
#define COMM_SELECT_READ 1
#define COMM_SELECT_WRITE 2
/* How long can comm_select() wait for network events [milliseconds] */
#define SELECT_DELAY 500
#define LOWEST_SAFE_FD 4 /* skip stdin, stdout, stderr, and profiler */
/* Path to /dev/null */
#define PATH_DEVNULL "/dev/null"
extern const unsigned char ToUpperTab[];
#define ToUpper(c) (ToUpperTab[(unsigned char)(c)])
/*
* NOTE: The following functions are NOT the same as strcasecmp
* and strncasecmp! These functions use the Finnish (RFC1459)
* character set. Do not replace!
*
* irccmp - case insensitive comparison of s1 and s2
*/
extern int irccmp(const char *, const char *);
typedef struct _dlink_node dlink_node;
typedef struct _dlink_list dlink_list;
struct _dlink_node
{
void *data;
dlink_node *prev;
dlink_node *next;
};
struct _dlink_list
{
dlink_node *head;
dlink_node *tail;
unsigned long length;
};
extern void dlinkAdd(void *data, dlink_node * m, dlink_list * list);
extern void dlinkAddBefore(dlink_node *b, void *data, dlink_node *m, dlink_list *list);
extern void dlinkAddTail(void *data, dlink_node *m, dlink_list *list);
extern void dlinkDelete(dlink_node *m, dlink_list *list);
extern void dlinkMoveList(dlink_list *from, dlink_list *to);
extern dlink_node *dlinkFind(dlink_list *m, void *data);
extern dlink_node *dlinkFindDelete(dlink_list *m, void *data);
#ifndef NDEBUG
void mem_frob(void *data, int len);
#else
#define mem_frob(x, y)
#endif
/* These macros are basically swiped from the linux kernel
* they are simple yet effective
*/
/*
* Walks forward of a list.
* pos is your node
* head is your list head
*/
#define DLINK_FOREACH(pos, head) for (pos = (head); pos != NULL; pos = pos->next)
/*
* Walks forward of a list safely while removing nodes
* pos is your node
* n is another list head for temporary storage
* head is your list head
*/
#define DLINK_FOREACH_SAFE(pos, n, head) for (pos = (head), n = pos ? pos->next : NULL; pos != NULL; pos = n, n = pos ? pos->next : NULL)
#define DLINK_FOREACH_PREV(pos, head) for (pos = (head); pos != NULL; pos = pos->prev)
/* Returns the list length */
#define dlink_list_length(list) (list)->length
/*
* The functions below are included for the sake of inlining
* hopefully this will speed up things just a bit
*
*/
/*
* dlink_ routines are stolen from squid, except for dlinkAddBefore,
* which is mine.
* -- adrian
*/
extern inline void dlinkAdd(void *data, dlink_node * m, dlink_list * list)
{
m->data = data;
m->prev = NULL;
m->next = list->head;
/* Assumption: If list->tail != NULL, list->head != NULL */
if (list->head != NULL)
list->head->prev = m;
else if (list->tail == NULL)
list->tail = m;
list->head = m;
list->length++;
}
extern inline void dlinkAddBefore(dlink_node *b, void *data, dlink_node *m, dlink_list *list)
{
/* Shortcut - if its the first one, call dlinkAdd only */
if (b == list->head)
dlinkAdd(data, m, list);
else {
m->data = data;
b->prev->next = m;
m->prev = b->prev;
b->prev = m;
m->next = b;
list->length++;
}
}
extern inline void dlinkAddTail(void *data, dlink_node *m, dlink_list *list)
{
m->data = data;
m->next = NULL;
m->prev = list->tail;
/* Assumption: If list->tail != NULL, list->head != NULL */
if (list->tail != NULL)
list->tail->next = m;
else if (list->head == NULL)
list->head = m;
list->tail = m;
list->length++;
}
/* Execution profiles show that this function is called the most
* often of all non-spontaneous functions. So it had better be
* efficient. */
extern inline void dlinkDelete(dlink_node *m, dlink_list *list)
{
/* Assumption: If m->next == NULL, then list->tail == m
* and: If m->prev == NULL, then list->head == m
*/
if (m->next)
m->next->prev = m->prev;
else {
assert(list->tail == m);
list->tail = m->prev;
}
if (m->prev)
m->prev->next = m->next;
else {
assert(list->head == m);
list->head = m->next;
}
/* Set this to NULL does matter */
m->next = m->prev = NULL;
list->length--;
}
/*
* dlinkFind
* inputs - list to search
* - data
* output - pointer to link or NULL if not found
* side effects - Look for ptr in the linked listed pointed to by link.
*/
extern inline dlink_node *dlinkFind(dlink_list *list, void *data)
{
dlink_node *ptr;
DLINK_FOREACH(ptr, list->head)
{
if (ptr->data == data)
return(ptr);
}
return(NULL);
}
extern inline void dlinkMoveList(dlink_list *from, dlink_list *to)
{
/* There are three cases */
/* case one, nothing in from list */
if (from->head == NULL)
return;
/* case two, nothing in to list */
/* actually if to->head is NULL and to->tail isn't, thats a bug */
if (to->head == NULL)
{
to->head = from->head;
to->tail = from->tail;
from->head = from->tail = NULL;
to->length = from->length;
from->length = 0;
return;
}
/* third case play with the links */
from->tail->next = to->head;
from->head->prev = to->head->prev;
to->head->prev = from->tail;
to->head = from->head;
from->head = from->tail = NULL;
to->length += from->length;
from->length = 0;
/* I think I got that right */
}
extern inline dlink_node *dlinkFindDelete(dlink_list *list, void *data)
{
dlink_node *m;
DLINK_FOREACH(m, list->head)
{
if (m->data == data)
{
if (m->next)
m->next->prev = m->prev;
else
{
assert(list->tail == m);
list->tail = m->prev;
}
if (m->prev)
m->prev->next = m->next;
else
{
assert(list->head == m);
list->head = m->next;
}
/* Set this to NULL does matter */
m->next = m->prev = NULL;
list->length--;
return(m);
}
}
return(NULL);
}
extern dlink_list callback_list; /* listing/debugging purposes */
typedef void *CBFUNC(va_list);
struct Callback
{
char *name;
dlink_list chain;
dlink_node node;
unsigned int called;
time_t last;
};
extern struct Callback *register_callback(const char *, CBFUNC *);
extern void *execute_callback(struct Callback *, ...);
extern struct Callback *find_callback(const char *);
extern dlink_node *install_hook(struct Callback *, CBFUNC *);
extern void uninstall_hook(struct Callback *, CBFUNC *);
extern void *pass_callback(dlink_node *, ...);
extern void stats_hooks(struct Client *);
#define is_callback_present(c) (!!dlink_list_length(&c->chain))
/* Hybrid Support Headers End */
/* tests show that about 7 fds are not registered by fdlist.c, these
* include std* descriptors + some others (by OpenSSL etc.). Note this is
* intentionally too high, we don't want to eat fds up to the last one */
#define LEAKED_FDS 10
/* how many (privileged) clients can exceed max_clients */
#define MAX_BUFFER 60
#define MAXCLIENTS_MAX (hard_fdlimit - LEAKED_FDS - MAX_BUFFER)
#define MAXCLIENTS_MIN 32
#define FD_DESC_SZ 128 /* hostlen + comment */
/* enums better then defines for debugging issue */
enum {
COMM_OK,
COMM_ERR_BIND,
COMM_ERR_DNS,
COMM_ERR_TIMEOUT,
COMM_ERR_CONNECT,
COMM_ERROR,
COMM_ERR_MAX
};
/* This is to get around the fact that some implementations have ss_len and
* others do not
*/
struct irc_ssaddr
{
struct sockaddr_storage ss;
unsigned char ss_len;
in_port_t ss_port;
};
/* For Callback functions arguments */
struct _fde;
/* Callback for completed IO events */
typedef void PF(struct _fde *, void *);
/* Callback for completed connections */
/* int fd, int status, void * */
typedef void CNCB(struct _fde *, int, void *);
typedef struct _fde {
/* New-school stuff, again pretty much ripped from squid */
/*
* Yes, this gives us only one pending read and one pending write per
* filedescriptor. Think though: when do you think we'll need more?
*/
int fd; /* So we can use the fde_t as a callback ptr */
int comm_index; /* where in the poll list we live */
int evcache; /* current fd events as set up by the underlying I/O */
char desc[FD_DESC_SZ];
PF *read_handler;
void *read_data;
PF *write_handler;
void *write_data;
PF *timeout_handler;
void *timeout_data;
time_t timeout;
PF *flush_handler;
void *flush_data;
time_t flush_timeout;
/* struct DNSQuery *dns_query; at hybrid 7.2.2 */
struct DNSReq *dns_query;
struct {
unsigned int open:1;
unsigned int is_socket:1;
#ifdef USE_SSL
unsigned int pending_read:1;
#endif
} flags;
struct {
/* We don't need the host here ? */
struct irc_ssaddr S;
struct irc_ssaddr hostaddr;
CNCB *callback;
void *data;
/* We'd also add the retry count here when we get to that -- adrian */
} connect;
#ifdef USE_SSL
SSL *ssl;
#endif
struct _fde *hnext;
} fde_t;
#define CLIENT_HEAP_SIZE 1024
#define FD_HASH_SIZE CLIENT_HEAP_SIZE
extern int number_fd;
extern int hard_fdlimit;
extern fde_t *fd_hash[];
extern fde_t *fd_next_in_loop;
extern struct Callback *fdlimit_cb;
extern void fdlist_init(void);
extern fde_t *lookup_fd(int);
extern void fd_open(fde_t *, int, int, const char *);
extern void fd_close(fde_t *);
extern void fd_dump(struct Client *);
#ifndef __GNUC__
extern void fd_note(fde_t *, const char *format, ...);
#else
extern void fd_note(fde_t *, const char *format, ...)
__attribute__((format (printf, 2, 3)));
#endif
extern void close_standard_fds(void);
extern void close_fds(fde_t *);
extern void recalc_fdlimit(void *);
#endif /* ifndef NEW_IO */
#ifndef TRUE
#define TRUE 1
+188 -286
View File
@@ -25,92 +25,94 @@
* Most of the externs and prototypes thrown in here to 'cleanup' things.
* -avalon
*/
#include "setup.h"
#ifndef NO_FDLIST
#include "fdlist.h"
#endif
extern MODVAR char *extraflags;
extern MODVAR int tainted;
extern char *extraflags;
extern int tainted;
/* for the new s_err.c */
extern char *getreply(int);
#define rpl_str(x) getreply(x)
#define err_str(x) getreply(x)
extern MODVAR Member *freemember;
extern MODVAR Membership *freemembership;
extern MODVAR MembershipL *freemembershipL;
extern MODVAR TS nextconnect, nextdnscheck, nextping;
extern MODVAR aClient *client, me, *local[];
extern MODVAR aChannel *channel;
extern MODVAR struct stats *ircstp;
extern MODVAR int bootopt;
extern MODVAR time_t TSoffset;
extern Member *freemember;
extern Membership *freemembership;
extern MembershipL *freemembershipL;
extern TS nextconnect, nextdnscheck, nextping;
extern aClient *client, me, *local[];
extern aChannel *channel;
extern struct stats *ircstp;
extern int bootopt;
extern time_t TSoffset;
/* Prototype added to force errors -- Barubary */
extern TS check_pings(TS now);
extern TS TS2ts(char *s);
extern MODVAR time_t timeofday;
extern time_t timeofday;
/* newconf */
#define get_sendq(x) ((x)->cclass ? (x)->cclass->sendq : MAXSENDQLENGTH)
#define get_sendq(x) ((x)->class ? (x)->class->sendq : MAXSENDQLENGTH)
/* get_recvq is only called in send.c for local connections */
#define get_recvq(x) ((x)->cclass->recvq ? (x)->cclass->recvq : CLIENT_FLOOD)
#define get_recvq(x) ((x)->class->recvq ? (x)->class->recvq : CLIENT_FLOOD)
#define CMD_FUNC(x) int (x) (aClient *cptr, aClient *sptr, int parc, char *parv[])
#ifndef NO_FDLIST
extern MODVAR float currentrate;
extern MODVAR float currentrate2; /* outgoing */
extern MODVAR float highest_rate;
extern MODVAR float highest_rate2;
extern MODVAR int lifesux;
extern MODVAR int LRV;
extern MODVAR time_t LCF;
extern MODVAR int currlife;
extern MODVAR int HTMLOCK;
extern MODVAR int noisy_htm;
extern MODVAR long lastsendK, lastrecvK;
extern float currentrate;
extern float currentrate2; /* outgoing */
extern float highest_rate;
extern float highest_rate2;
extern int lifesux;
extern int LRV;
extern time_t LCF;
extern int currlife;
extern int HTMLOCK;
extern int noisy_htm;
extern long lastsendK, lastrecvK;
#endif
/*
* Configuration linked lists
*/
extern MODVAR ConfigItem_me *conf_me;
extern MODVAR ConfigItem_class *conf_class;
extern MODVAR ConfigItem_class *default_class;
extern MODVAR ConfigItem_admin *conf_admin;
extern MODVAR ConfigItem_admin *conf_admin_tail;
extern MODVAR ConfigItem_drpass *conf_drpass;
extern MODVAR ConfigItem_ulines *conf_ulines;
extern MODVAR ConfigItem_tld *conf_tld;
extern MODVAR ConfigItem_oper *conf_oper;
extern MODVAR ConfigItem_listen *conf_listen;
extern MODVAR ConfigItem_allow *conf_allow;
extern MODVAR ConfigItem_except *conf_except;
extern MODVAR ConfigItem_vhost *conf_vhost;
extern MODVAR ConfigItem_link *conf_link;
extern MODVAR ConfigItem_ban *conf_ban;
extern MODVAR ConfigItem_badword *conf_badword_channel;
extern MODVAR ConfigItem_badword *conf_badword_message;
extern MODVAR ConfigItem_badword *conf_badword_quit;
extern MODVAR ConfigItem_deny_dcc *conf_deny_dcc;
extern MODVAR ConfigItem_deny_channel *conf_deny_channel;
extern MODVAR ConfigItem_deny_link *conf_deny_link;
extern MODVAR ConfigItem_allow_channel *conf_allow_channel;
extern MODVAR ConfigItem_allow_dcc *conf_allow_dcc;
extern MODVAR ConfigItem_deny_version *conf_deny_version;
extern MODVAR ConfigItem_log *conf_log;
extern MODVAR ConfigItem_alias *conf_alias;
extern MODVAR ConfigItem_include *conf_include;
extern MODVAR ConfigItem_help *conf_help;
extern MODVAR ConfigItem_offchans *conf_offchans;
extern ConfigItem_me *conf_me;
extern ConfigItem_class *conf_class;
extern ConfigItem_class *default_class;
extern ConfigItem_admin *conf_admin;
extern ConfigItem_admin *conf_admin_tail;
extern ConfigItem_drpass *conf_drpass;
extern ConfigItem_ulines *conf_ulines;
extern ConfigItem_tld *conf_tld;
extern ConfigItem_oper *conf_oper;
extern ConfigItem_listen *conf_listen;
extern ConfigItem_allow *conf_allow;
extern ConfigItem_except *conf_except;
extern ConfigItem_vhost *conf_vhost;
extern ConfigItem_link *conf_link;
extern ConfigItem_ban *conf_ban;
extern ConfigItem_badword *conf_badword_channel;
extern ConfigItem_badword *conf_badword_message;
extern ConfigItem_badword *conf_badword_quit;
extern ConfigItem_deny_dcc *conf_deny_dcc;
extern ConfigItem_deny_channel *conf_deny_channel;
extern ConfigItem_deny_link *conf_deny_link;
extern ConfigItem_allow_channel *conf_allow_channel;
extern ConfigItem_deny_version *conf_deny_version;
extern ConfigItem_log *conf_log;
extern ConfigItem_alias *conf_alias;
extern ConfigItem_include *conf_include;
extern ConfigItem_help *conf_help;
extern ConfigItem_offchans *conf_offchans;
extern int completed_connection(aClient *);
extern void clear_unknown();
extern EVENT(tkl_check_expire);
extern EVENT(e_unload_module_delayed);
#ifdef THROTTLING
extern EVENT(e_clean_out_throttling_buckets);
#endif
extern void module_loadall(int module_load);
extern long set_usermode(char *umode);
extern char *get_modestr(long umodes);
extern void tkl_stats(aClient *cptr, int type, char *para);
extern void config_error(char *format, ...) __attribute__((format(printf,1,2)));
extern MODVAR int config_verbose;
extern int config_verbose;
extern void config_progress(char *format, ...) __attribute__((format(printf,1,2)));
extern void ipport_seperate(char *string, char **ip, char **port);
ConfigItem_class *Find_class(char *name);
@@ -118,27 +120,28 @@ ConfigItem_deny_dcc *Find_deny_dcc(char *name);
ConfigItem_oper *Find_oper(char *name);
ConfigItem_listen *Find_listen(char *ipmask, int port);
ConfigItem_ulines *Find_uline(char *host);
ConfigItem_except *Find_except(aClient *, char *host, short type);
ConfigItem_except *Find_except(char *host, short type);
ConfigItem_tld *Find_tld(aClient *cptr, char *host);
ConfigItem_link *Find_link(char *username, char *hostname, char *ip, char *servername);
ConfigItem_cgiirc *Find_cgiirc(char *username, char *hostname, char *ip, CGIIRCType type);
ConfigItem_ban *Find_ban(aClient *, char *host, short type);
ConfigItem_ban *Find_banEx(aClient *,char *host, short type, short type2);
ConfigItem_ban *Find_ban(char *host, short type);
ConfigItem_ban *Find_banEx(char *host, short type, short type2);
ConfigItem_vhost *Find_vhost(char *name);
ConfigItem_deny_channel *Find_channel_allowed(char *name);
ConfigItem_alias *Find_alias(char *name);
ConfigItem_help *Find_Help(char *command);
int AllowClient(aClient *cptr, struct hostent *hp, char *sockhost, char *username);
int parse_netmask(const char *text, struct irc_netmask *netmask);
int match_ip(struct IN_ADDR addr, char *uhost, char *mask, struct irc_netmask *netmask);
ConfigItem_ban *Find_ban_ip(aClient *sptr);
extern MODVAR struct tm motd_tm, smotd_tm;
extern MODVAR Link *Servers;
int parse_netmask(const char *text, struct IN_ADDR *addr, int *b);
int match_ipv4(struct IN_ADDR *addr, struct IN_ADDR *mask, int b);
#ifdef INET6
int match_ipv6(struct IN_ADDR *addr, struct IN_ADDR *mask, int b);
#endif
extern struct tm motd_tm, smotd_tm;
extern Link *Servers;
void add_ListItem(ListStruct *, ListStruct **);
ListStruct *del_ListItem(ListStruct *, ListStruct **);
/* Remmed out for win32 compatibility.. as stated of 467leaf win32 port.. */
extern aClient *find_match_server(char *mask);
extern MODVAR LoopStruct loop;
extern LoopStruct loop;
extern int del_banid(aChannel *chptr, char *banid);
extern int del_exbanid(aChannel *chptr, char *banid);
#ifdef SHOWCONNECTINFO
@@ -152,11 +155,11 @@ extern int del_exbanid(aChannel *chptr, char *banid);
#define BREPORT_FIN_ID "NOTICE AUTH :*** Received identd response\r\n"
#define BREPORT_FAIL_ID "NOTICE AUTH :*** No ident response; username prefixed with ~\r\n"
extern MODVAR char REPORT_DO_DNS[256], REPORT_FIN_DNS[256], REPORT_FIN_DNSC[256],
extern char REPORT_DO_DNS[256], REPORT_FIN_DNS[256], REPORT_FIN_DNSC[256],
REPORT_FAIL_DNS[256], REPORT_DO_ID[256], REPORT_FIN_ID[256],
REPORT_FAIL_ID[256];
extern MODVAR int R_do_dns, R_fin_dns, R_fin_dnsc, R_fail_dns,
extern int R_do_dns, R_fin_dns, R_fin_dnsc, R_fail_dns,
R_do_id, R_fin_id, R_fail_id;
#endif
@@ -180,19 +183,12 @@ extern int del_silence(aClient *, char *);
extern void send_user_joins(aClient *, aClient *);
extern void clean_channelname(char *);
extern int do_nick_name(char *);
extern int do_remote_nick_name(char *);
extern int can_send(aClient *, aChannel *, char *, int);
extern long get_access(aClient *, aChannel *);
extern int is_chan_op(aClient *, aChannel *);
extern int has_voice(aClient *, aChannel *);
extern int is_chanowner(aClient *, aChannel *);
#ifndef DISABLE_EXTBAN_STACKING
extern int ban_check_mask(aClient *, aChannel *, char *, int, int);
extern int extban_is_ok_nuh_extban(aClient *, aChannel *, char *, int, int, int);
extern char* extban_conv_param_nuh_extban(char *);
#endif
extern Ban *is_banned(aClient *, aChannel *, int);
extern Ban *is_banned_with_nick(aClient *, aChannel *, int, char *);
extern int parse_help(aClient *, char *, char *);
extern void ircd_log(int, char *, ...) __attribute__((format(printf,2,3)));
@@ -209,36 +205,32 @@ extern int attach_conf(aClient *, aConfItem *);
extern void inittoken();
extern void reset_help();
extern MODVAR char *debugmode, *configfile, *sbrk0;
extern char *debugmode, *configfile, *sbrk0;
extern char *getfield(char *);
extern void get_sockhost(aClient *, char *);
#ifdef _WIN32
extern MODFUNC char *sock_strerror(int);
#endif
extern char *strerror(int);
extern int dgets(int, char *, int);
extern char *inetntoa(char *);
#ifndef HAVE_SNPRINTF
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
/* #ifndef _WIN32 XXX why was this?? -- Syzop. */
extern int snprintf (char *str, size_t count, const char *fmt, ...);
#endif
#ifndef HAVE_VSNPRINTF
extern int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
/* #endif */
#endif
#ifdef _WIN32
extern MODVAR int dbufalloc, dbufblocks, debuglevel;
#else
extern int dbufalloc, dbufblocks, debuglevel;
#else
extern int dbufalloc, dbufblocks, debuglevel, errno, h_errno;
#endif
extern MODVAR short LastSlot; /* last used index in local client array */
extern MODVAR int OpenFiles; /* number of files currently open */
extern MODVAR int debuglevel, debugtty, maxusersperchannel;
extern MODVAR int readcalls, udpfd, resfd;
#ifndef NEW_IO
extern short LastSlot; /* last used index in local client array */
extern int OpenFiles; /* number of files currently open */
extern int debuglevel, portnum, debugtty, maxusersperchannel;
extern int readcalls, udpfd, resfd;
extern aClient *add_connection(aClient *, int);
extern int add_listener(aConfItem *);
extern void add_local_domain(char *, int);
extern int check_client(aClient *, char *);
extern int check_server(aClient *, struct hostent *, aConfItem *,
aConfItem *, int);
@@ -250,16 +242,16 @@ extern void get_my_name(aClient *, char *, int);
extern int get_sockerr(aClient *);
extern int inetport(aClient *, char *, int);
extern void init_sys();
extern void init_modef();
#ifdef NO_FDLIST
extern int read_message(time_t);
#else
extern int read_message(time_t, fdlist *);
#endif
extern void report_error(char *, aClient *);
extern void set_non_blocking(int, aClient *);
#else /* ifndef NEW_IO */
#endif /* ifndef NEW_IO */
extern int setup_ping();
extern void start_auth(aClient *);
@@ -268,12 +260,15 @@ extern void send_authports(aClient *);
extern void restart(char *);
extern void send_channel_modes(aClient *, aChannel *);
extern void server_reboot(char *);
extern void terminate(), write_pidfile();
extern void *MyMallocEx(size_t size);
extern int advanced_check(char *userhost, int ipstat);
extern int send_queued(aClient *);
/* i know this is naughty but :P --stskeeps */
extern void send_channel_modes_sjoin(aClient *cptr, aChannel *chptr);
extern void send_channel_modes_sjoin3(aClient *cptr, aChannel *chptr);
extern void sendto_locfailops(char *pattern, ...) __attribute__((format(printf,1,2)));
extern void sendto_connectnotice(char *nick, anUser *user, aClient *sptr, int disconnect, char *comment);
extern void sendto_serv_butone_nickcmd(aClient *one, aClient *sptr, char *nick, int hopcount,
@@ -315,16 +310,22 @@ extern void sendto_opers(char *, ...) __attribute__((format(printf,1,2)));
extern void sendto_umode(int, char *, ...) __attribute__((format(printf,2,3)));
extern void sendto_umode_raw(int, char *, ...) __attribute__((format(printf,2,3)));
extern void sendto_snomask(int snomask, char *pattern, ...) __attribute__((format(printf,2,3)));
extern void sendto_snomask_global(int snomask, char *pattern, ...) __attribute__((format(printf,2,3)));
extern void sendto_snomask_normal(int snomask, char *pattern, ...) __attribute__((format(printf,2,3)));
extern void sendto_snomask_normal_global(int snomask, char *pattern, ...) __attribute__((format(printf,2,3)));
extern void sendnotice(aClient *to, char *pattern, ...) __attribute__((format(printf,2,3)));
extern MODVAR int writecalls, writeb[];
extern int writecalls, writeb[];
extern int deliver_it(aClient *, char *, int);
extern int check_for_chan_flood(aClient *cptr, aClient *sptr, aChannel *chptr);
extern int check_for_target_limit(aClient *sptr, void *target, const char *name);
extern char *stripbadwords_message(char *str, int *);
extern char *stripbadwords_channel(char *str, int *);
extern char *stripbadwords_quit(char *str, int *);
extern char *stripbadwords(char *, ConfigItem_badword *, int *);
extern unsigned char *StripColors(unsigned char *);
extern const char *StripControlCodes(unsigned char *text);
extern char *canonize(char *buffer);
extern ConfigItem_deny_dcc *dcc_isforbidden(aClient *sptr, char *filename);
extern ConfigItem_deny_dcc *dcc_isdiscouraged(aClient *sptr, char *filename);
extern int webtv_parse(aClient *sptr, char *string);
extern ConfigItem_deny_dcc *dcc_isforbidden(aClient *cptr, aClient *sptr, aClient *target, char *filename);
extern int check_registered(aClient *);
extern int check_registered_user(aClient *);
extern char *get_client_name(aClient *, int);
extern char *get_client_host(aClient *);
extern char *myctime(time_t), *date(time_t);
@@ -332,7 +333,6 @@ extern int exit_client(aClient *, aClient *, aClient *, char *);
extern void initstats(), tstats(aClient *, char *);
extern char *check_string(char *);
extern char *make_nick_user_host(char *, char *, char *);
extern inline char *make_nick_user_host_r(char *namebuf, char *nick, char *name, char *host);
extern char *make_user_host(char *, char *);
extern int parse(aClient *, char *, char *);
extern int do_numeric(int, aClient *, aClient *, int, char **);
@@ -340,6 +340,8 @@ extern int hunt_server(aClient *, aClient *, char *, int, int, char **);
extern int hunt_server_token(aClient *, aClient *, char *, char *, char *, int, int, char **);
extern int hunt_server_token_quiet(aClient *, aClient *, char *, char *, char *, int, int, char **);
extern aClient *next_client(aClient *, char *);
extern int m_umode(aClient *, aClient *, int, char **);
extern int m_names(aClient *, aClient *, int, char **);
extern int m_server_estab(aClient *);
extern void umode_init(void);
extern long umode_get(char, int, int (*)(aClient *, int));
@@ -356,12 +358,14 @@ extern void send_umode_out(aClient *, aClient *, long);
extern void free_client(aClient *);
extern void free_link(Link *);
extern void free_ban(Ban *);
extern void free_class(aClass *);
extern void free_user(anUser *, aClient *);
extern int find_str_match_link(Link *, char *);
extern void free_str_list(Link *);
extern Link *make_link();
extern Ban *make_ban();
extern anUser *make_user(aClient *);
extern aClass *make_class();
extern aServer *make_server();
extern aClient *make_client(aClient *, aClient *);
extern Link *find_user_link(Link *, aClient *);
@@ -375,7 +379,7 @@ extern struct hostent *get_res(char *);
extern struct hostent *gethost_byaddr(char *, Link *);
extern struct hostent *gethost_byname(char *, Link *);
extern void flush_cache();
extern void init_resolver(int firsttime);
extern int init_resolver(int);
extern time_t timeout_query_list(time_t);
extern time_t expire_cache(time_t);
extern void del_queries(char *);
@@ -387,7 +391,7 @@ extern int add_to_client_hash_table(char *, aClient *);
extern int del_from_client_hash_table(char *, aClient *);
extern int add_to_channel_hash_table(char *, aChannel *);
extern int del_from_channel_hash_table(char *, aChannel *);
extern int add_to_watch_hash_table(char *, aClient *, int);
extern int add_to_watch_hash_table(char *, aClient *);
extern int del_from_watch_hash_table(char *, aClient *);
extern int hash_check_watch(aClient *, int);
extern int hash_del_watch_list(aClient *);
@@ -406,57 +410,52 @@ extern time_t atime(char *xtime);
/* Mode externs
*/
extern MODVAR long UMODE_INVISIBLE; /* 0x0001 makes user invisible */
extern MODVAR long UMODE_OPER; /* 0x0002 Operator */
extern MODVAR long UMODE_WALLOP; /* 0x0004 send wallops to them */
extern MODVAR long UMODE_FAILOP; /* 0x0008 Shows some global messages */
extern MODVAR long UMODE_HELPOP; /* 0x0010 Help system operator */
extern MODVAR long UMODE_REGNICK; /* 0x0020 Nick set by services as registered */
extern MODVAR long UMODE_SADMIN; /* 0x0040 Services Admin */
extern MODVAR long UMODE_ADMIN; /* 0x0080 Admin */
extern MODVAR long UMODE_SERVNOTICE;/* 0x0100 server notices such as kill */
extern MODVAR long UMODE_LOCOP; /* 0x0200 Local operator -- SRB */
extern MODVAR long UMODE_RGSTRONLY; /* 0x0400 Only reg nick message */
extern MODVAR long UMODE_WEBTV; /* 0x0800 WebTV Client */
extern MODVAR long UMODE_SERVICES; /* 0x4000 services */
extern MODVAR long UMODE_HIDE; /* 0x8000 Hide from Nukes */
extern MODVAR long UMODE_NETADMIN; /* 0x10000 Network Admin */
extern MODVAR long UMODE_COADMIN; /* 0x80000 Co Admin */
extern MODVAR long UMODE_WHOIS; /* 0x100000 gets notice on /whois */
extern MODVAR long UMODE_KIX; /* 0x200000 usermode +q */
extern MODVAR long UMODE_BOT; /* 0x400000 User is a bot */
extern MODVAR long UMODE_SECURE; /* 0x800000 User is a secure connect */
extern MODVAR long UMODE_VICTIM; /* 0x8000000 Intentional Victim */
extern MODVAR long UMODE_DEAF; /* 0x10000000 Deaf */
extern MODVAR long UMODE_HIDEOPER; /* 0x20000000 Hide oper mode */
extern MODVAR long UMODE_SETHOST; /* 0x40000000 used sethost */
extern MODVAR long UMODE_STRIPBADWORDS; /* 0x80000000 */
extern MODVAR long UMODE_HIDEWHOIS; /* hides channels in /whois */
extern MODVAR long UMODE_NOCTCP; /* blocks all ctcp (except dcc and action) */
extern MODVAR long AllUmodes, SendUmodes;
extern long UMODE_INVISIBLE; /* 0x0001 makes user invisible */
extern long UMODE_OPER; /* 0x0002 Operator */
extern long UMODE_WALLOP; /* 0x0004 send wallops to them */
extern long UMODE_FAILOP; /* 0x0008 Shows some global messages */
extern long UMODE_HELPOP; /* 0x0010 Help system operator */
extern long UMODE_REGNICK; /* 0x0020 Nick set by services as registered */
extern long UMODE_SADMIN; /* 0x0040 Services Admin */
extern long UMODE_ADMIN; /* 0x0080 Admin */
extern long UMODE_SERVNOTICE;/* 0x0100 server notices such as kill */
extern long UMODE_LOCOP; /* 0x0200 Local operator -- SRB */
extern long UMODE_RGSTRONLY; /* 0x0400 Only reg nick message */
extern long UMODE_WEBTV; /* 0x0800 WebTV Client */
extern long UMODE_SERVICES; /* 0x4000 services */
extern long UMODE_HIDE; /* 0x8000 Hide from Nukes */
extern long UMODE_NETADMIN; /* 0x10000 Network Admin */
extern long UMODE_COADMIN; /* 0x80000 Co Admin */
extern long UMODE_WHOIS; /* 0x100000 gets notice on /whois */
extern long UMODE_KIX; /* 0x200000 usermode +q */
extern long UMODE_BOT; /* 0x400000 User is a bot */
extern long UMODE_SECURE; /* 0x800000 User is a secure connect */
extern long UMODE_VICTIM; /* 0x8000000 Intentional Victim */
extern long UMODE_DEAF; /* 0x10000000 Deaf */
extern long UMODE_HIDEOPER; /* 0x20000000 Hide oper mode */
extern long UMODE_SETHOST; /* 0x40000000 used sethost */
extern long UMODE_STRIPBADWORDS; /* 0x80000000 */
extern long UMODE_HIDEWHOIS; /* hides channels in /whois */
extern long UMODE_NOCTCP; /* blocks all ctcp (except dcc and action) */
extern long AllUmodes, SendUmodes;
extern MODVAR long SNO_KILLS;
extern MODVAR long SNO_CLIENT;
extern MODVAR long SNO_FLOOD;
extern MODVAR long SNO_FCLIENT;
extern MODVAR long SNO_JUNK;
extern MODVAR long SNO_VHOST;
extern MODVAR long SNO_EYES;
extern MODVAR long SNO_TKL;
extern MODVAR long SNO_NICKCHANGE;
extern MODVAR long SNO_FNICKCHANGE;
extern MODVAR long SNO_QLINE;
extern MODVAR long SNO_SNOTICE;
extern MODVAR long SNO_SPAMF;
extern MODVAR long SNO_OPER;
extern long SNO_KILLS;
extern long SNO_CLIENT;
extern long SNO_FLOOD;
extern long SNO_FCLIENT;
extern long SNO_JUNK;
extern long SNO_VHOST;
extern long SNO_EYES;
extern long SNO_TKL;
extern long SNO_NICKCHANGE;
extern long SNO_FNICKCHANGE;
extern long SNO_QLINE;
extern long SNO_SNOTICE;
extern long SNO_SPAMF;
#ifdef EXTCMODE
/* Extended chanmodes... */
extern MODVAR Cmode_t EXTMODE_NONOTICE;
#ifdef STRIPBADWORDS
extern MODVAR Cmode_t EXTMODE_STRIPBADWORDS;
#endif
extern MODVAR Cmode_t EXTMODE_JOINTHROTTLE;
extern Cmode_t EXTMODE_NONOTICE;
#endif
#ifndef HAVE_STRLCPY
@@ -475,8 +474,8 @@ extern int dopacket(aClient *, char *, int);
extern void debug(int, char *, ...);
#if defined(DEBUGMODE)
extern void send_usage(aClient *, char *);
extern void send_listinfo(aClient *, char *);
extern void count_memory(aClient *, char *);
extern int checkprotoflags(aClient *, int, char *, int);
#endif
#ifdef INET6
@@ -496,8 +495,8 @@ char *Inet_ia2pNB(struct IN_ADDR *ia, int compressed);
/*
* CommandHash -Stskeeps
*/
extern MODVAR aCommand *CommandHash[256];
extern MODVAR aCommand *TokenHash[256];
extern aCommand *CommandHash[256];
extern aCommand *TokenHash[256];
extern void init_CommandHash(void);
extern aCommand *add_Command_backend(char *cmd, int (*func)(), unsigned char parameters, unsigned char token, int flags);
extern void add_Command(char *cmd, char *token, int (*func)(), unsigned char parameters);
@@ -539,9 +538,14 @@ extern aClient *find_server_b64_or_real(char *name);
extern aClient *find_server_by_base64(char *b64);
extern int is_chanownprotop(aClient *cptr, aChannel *chptr);
extern int is_skochanop(aClient *cptr, aChannel *chptr);
extern char *make_virthost(aClient *sptr, char *curr, char *newhost, int mode);
extern char *make_virthost(char *curr, char *new, int mode);
extern int channel_canjoin(aClient *sptr, char *name);
extern char *collapse(char *pattern);
extern void send_list(aClient *cptr, int numsend);
extern int find_tkline_match_zap(aClient *cptr);
extern int find_shun(aClient *cptr);
extern aTKline *find_qline(aClient *cptr, char *nick, int *ishold);
extern void tkl_synch(aClient *sptr);
extern void dcc_sync(aClient *sptr);
extern void report_flines(aClient *sptr);
extern void report_network(aClient *sptr);
@@ -564,7 +568,6 @@ extern void flag_del(char ch);
extern void init_dynconf(void);
extern char *pretty_time_val(long);
extern int init_conf(char *filename, int rehash);
extern int global_test();
extern void validate_configuration(void);
extern void run_configuration(void);
extern void rehash_motdrules();
@@ -574,17 +577,15 @@ extern CMD_FUNC(m_server_remote);
extern void send_proto(aClient *, ConfigItem_link *);
extern char *xbase64enc(long i);
extern void unload_all_modules(void);
#ifndef NEW_IO
extern void flush_fdlist_connections(fdlist * listp);
#else /* ifndef NEW_IO */
#endif /* ifndef NEW_IO */
extern int set_blocking(int fd);
extern void set_sock_opts(int fd, aClient *cptr);
extern void iCstrip(char *line);
extern time_t rfc2time(char *s);
extern char *rfctime(time_t t, char *buf);
extern void *MyMallocEx(size_t size);
#ifdef USE_SSL
extern MODFUNC char *ssl_get_cipher(SSL *ssl);
extern char *ssl_get_cipher(SSL *ssl);
#endif
extern long config_checkval(char *value, unsigned short flags);
extern void config_status(char *format, ...) __attribute__((format(printf,1,2)));
@@ -592,32 +593,35 @@ extern void init_random();
extern u_char getrandom8();
extern u_int16_t getrandom16();
extern u_int32_t getrandom32();
extern MODVAR char trouble_info[1024];
extern char trouble_info[1024];
#define EVENT_DRUGS BASE_VERSION
extern void rejoin_doparts(aClient *sptr, char did_parts[]);
extern void rejoin_dojoinandmode(aClient *sptr, char did_parts[]);
extern void rejoin_doparts(aClient *sptr);
extern void rejoin_dojoinandmode(aClient *sptr);
extern void ident_failed(aClient *cptr);
extern MODVAR char extchmstr[4][64];
extern MODVAR char extbanstr[EXTBANTABLESZ+1];
extern char extchmstr[4][64];
extern char extbanstr[EXTBANTABLESZ+1];
#ifdef EXTCMODE
extern int extcmode_default_requirechop(aClient *, aChannel *, char *, int, int);
extern int extcmode_default_requirehalfop(aClient *, aChannel *, char *, int, int);
extern Cmode_t extcmode_get(Cmode *);
extern void extcmode_init(void);
extern void *extcmode_get_struct(aChannel *, char);
extern CmodeParam *extcmode_get_struct(CmodeParam *, char);
extern void make_extcmodestr();
extern void extcmode_duplicate_paramlist(void **xi, void **xo);
extern void extcmode_free_paramlist(void **ar);
extern CmodeParam *extcmode_duplicate_paramlist(CmodeParam *);
extern void extcmode_free_paramlist(CmodeParam *);
#endif
extern int do_chanflood(ChanFloodProt *, int);
extern void do_chanflood_action(aChannel *, int, char *);
extern char *channel_modef_string(ChanFloodProt *);
extern void chmode_str(struct ChMode, char *, char *);
extern char *get_cptr_status(aClient *);
extern char *get_snostr(long);
#ifdef _WIN32
extern void InitDebug(void);
extern int InitwIRCD(int argc, char **);
#endif
extern void SocketLoop(void *);
#endif
#ifdef STATIC_LINKING
extern int l_commands_Init(ModuleInfo *);
extern int l_commands_Test(ModuleInfo *);
@@ -625,24 +629,23 @@ extern int l_commands_Load(int);
#endif
extern void sendto_chmodemucrap(aClient *, aChannel *, char *);
extern void verify_opercount(aClient *, char *);
extern int place_host_ban(aClient *sptr, int action, char *reason, long time);
extern int valid_host(char *host);
extern int count_oper_sessions(char *);
extern int file_exists(char* file);
extern char *unreal_mktemp(char *dir, char *suffix);
extern char *unreal_getpathname(char *filepath, char *path);
extern char *unreal_getfilename(char *path);
extern int unreal_copyfile(char *src, char *dest);
extern int unreal_copyfileex(char *src, char *dest, int tryhardlink);
extern time_t unreal_getfilemodtime(char *filename);
extern void unreal_setfilemodtime(char *filename, time_t mtime);
extern void DeleteTempModules(void);
extern MODVAR Extban *extbaninfo;
extern Extban *extbaninfo;
extern Extban *findmod_by_bantype(char c);
extern Extban *ExtbanAdd(Module *reserved, ExtbanInfo req);
extern void ExtbanDel(Extban *);
extern void extban_init(void);
extern char *trim_str(char *str, int len);
extern MODVAR char *ban_realhost, *ban_virthost, *ban_ip;
extern char *ban_realhost, *ban_virthost, *ban_ip;
extern void join_channel(aChannel *chptr, aClient *cptr, aClient *sptr, int flags);
extern char *unreal_checkregex(char *s, int fastsupport, int check_broadness);
extern int banact_stringtoval(char *s);
extern char *banact_valtostring(int val);
@@ -651,135 +654,34 @@ extern char banact_valtochar(int val);
extern int spamfilter_gettargets(char *s, aClient *sptr);
extern char *spamfilter_target_inttostring(int v);
extern Spamfilter *unreal_buildspamfilter(char *s);
extern int dospamfilter(aClient *sptr, char *str_in, int type, char *target);
extern char *our_strcasestr(char *haystack, char *needle);
extern int spamfilter_getconftargets(char *s);
extern void remove_oper_snomasks(aClient *sptr);
extern char *spamfilter_inttostring_long(int v);
extern int check_channelmask(aClient *, aClient *, char *);
extern aChannel *get_channel(aClient *cptr, char *chname, int flag);
extern MODVAR char backupbuf[];
extern char backupbuf[];
extern void add_invite(aClient *, aChannel *);
extern void channel_modes(aClient *, char *, char *, aChannel *);
extern MODVAR char modebuf[BUFSIZE], parabuf[BUFSIZE];
extern char modebuf[BUFSIZE], parabuf[BUFSIZE];
extern int op_can_override(aClient *sptr);
extern aClient *find_chasing(aClient *sptr, char *user, int *chasing);
extern MODVAR long opermode;
extern long opermode;
extern void do_mode(aChannel *, aClient *, aClient *, int, char **, time_t, int);
extern void set_mode(aChannel *, aClient *, int, char **, u_int *,
char[MAXMODEPARAMS][MODEBUFLEN + 3], int);
extern void add_user_to_channel(aChannel *chptr, aClient *who, int flags);
extern int add_banid(aClient *, aChannel *, char *);
extern int add_exbanid(aClient *cptr, aChannel *chptr, char *banid);
extern void sub1_from_channel(aChannel *);
extern MODVAR aCtab cFlagTab[];
extern aCtab cFlagTab[];
extern char *unreal_encodespace(char *s);
extern char *unreal_decodespace(char *s);
extern MODVAR Link *helpign;
extern MODVAR aMotd *rules;
#ifndef NEW_IO
extern MODVAR fdlist default_fdlist, busycli_fdlist, serv_fdlist, oper_fdlist;
#else /* ifndef NEW_IO */
#endif /* ifndef NEW_IO */
extern void DCCdeny_add(char *filename, char *reason, int type, int type2);
extern Link *helpign;
extern aMotd *rules;
extern fdlist default_fdlist, busycli_fdlist, serv_fdlist, oper_fdlist;
extern void DCCdeny_add(char *filename, char *reason, int type);
extern void DCCdeny_del(ConfigItem_deny_dcc *deny);
extern void dcc_wipe_services(void);
extern void reread_motdsandrules();
extern MODVAR int SVSNOOP;
extern int callbacks_check(void);
extern void callbacks_switchover(void);
extern int efunctions_check(void);
extern void efunctions_switchover(void);
extern char *encode_ip(u_char *);
extern char *decode_ip(char *);
extern void sendto_fconnectnotice(char *nick, anUser *user, aClient *sptr, int disconnect, char *comment);
extern void sendto_one_nickcmd(aClient *cptr, aClient *sptr, char *umodes);
extern int on_dccallow_list(aClient *to, aClient *from);
extern int add_dccallow(aClient *sptr, aClient *optr);
extern int del_dccallow(aClient *sptr, aClient *optr);
extern void delete_linkblock(ConfigItem_link *link_ptr);
extern void delete_classblock(ConfigItem_class *class_ptr);
extern void del_async_connects(void);
extern void make_extbanstr(void);
extern void isupport_init(void);
extern int do_cmd(aClient *cptr, aClient *sptr, char *cmd, int parc, char *parv[]);
extern void create_snomask(aClient *sptr, anUser *user, char *snomask);
extern MODVAR char *me_hash;
extern MODVAR int dontspread;
/* Efuncs */
extern MODVAR int (*do_join)(aClient *, aClient *, int, char **);
extern MODVAR void (*join_channel)(aChannel *chptr, aClient *cptr, aClient *sptr, int flags);
extern MODVAR int (*can_join)(aClient *cptr, aClient *sptr, aChannel *chptr, char *key, char *link, char *parv[]);
extern MODVAR void (*do_mode)(aChannel *chptr, aClient *cptr, aClient *sptr, int parc, char *parv[], time_t sendts, int samode);
extern MODVAR void (*set_mode)(aChannel *chptr, aClient *cptr, int parc, char *parv[], u_int *pcount,
char pvar[MAXMODEPARAMS][MODEBUFLEN + 3], int bounce);
extern MODVAR int (*m_umode)(aClient *, aClient *, int, char **);
extern MODVAR int (*register_user)(aClient *cptr, aClient *sptr, char *nick, char *username, char *umode, char *virthost, char *ip);
extern MODVAR int (*tkl_hash)(unsigned int c);
extern MODVAR char (*tkl_typetochar)(int type);
extern MODVAR aTKline *(*tkl_add_line)(int type, char *usermask, char *hostmask, char *reason, char *setby,
TS expire_at, TS set_at, TS spamf_tkl_duration, char *spamf_tkl_reason);
extern MODVAR aTKline *(*tkl_del_line)(aTKline *tkl);
extern MODVAR void (*tkl_check_local_remove_shun)(aTKline *tmp);
extern MODVAR aTKline *(*tkl_expire)(aTKline * tmp);
extern MODVAR EVENT((*tkl_check_expire));
extern MODVAR int (*find_tkline_match)(aClient *cptr, int xx);
extern MODVAR int (*find_shun)(aClient *cptr);
extern MODVAR int (*find_spamfilter_user)(aClient *sptr, int flags);
extern MODVAR aTKline *(*find_qline)(aClient *cptr, char *nick, int *ishold);
extern MODVAR int (*find_tkline_match_zap)(aClient *cptr);
extern MODVAR int (*find_tkline_match_zap_ex)(aClient *cptr, aTKline **rettk);
extern MODVAR void (*tkl_stats)(aClient *cptr, int type, char *para);
extern MODVAR void (*tkl_synch)(aClient *sptr);
extern MODVAR int (*m_tkl)(aClient *cptr, aClient *sptr, int parc, char *parv[]);
extern MODVAR int (*place_host_ban)(aClient *sptr, int action, char *reason, long duration);
extern MODVAR int (*dospamfilter)(aClient *sptr, char *str_in, int type, char *target, int flags, aTKline **rettk);
extern MODVAR int (*dospamfilter_viruschan)(aClient *sptr, aTKline *tk, int type);
extern MODVAR void (*send_list)(aClient *cptr, int numsend);
extern MODVAR char *(*stripbadwords)(char *str, ConfigItem_badword *start_bw, int *blocked);
extern MODVAR unsigned char *(*StripColors)(unsigned char *text);
extern MODVAR const char *(*StripControlCodes)(unsigned char *text);
extern MODVAR void (*spamfilter_build_user_string)(char *buf, char *nick, aClient *acptr);
extern MODVAR int (*is_silenced)(aClient *sptr, aClient *acptr);
/* /Efuncs */
extern MODVAR aMotd *opermotd, *svsmotd, *motd, *botmotd, *smotd;
extern MODVAR int max_connection_count;
extern int add_listmode(Ban **list, aClient *cptr, aChannel *chptr, char *banid);
extern int del_listmode(Ban **list, aChannel *chptr, char *banid);
extern int Halfop_mode(long mode);
extern char *clean_ban_mask(char *, int, aClient *);
extern int find_invex(aChannel *chptr, aClient *sptr);
extern void DoMD5(unsigned char *mdout, unsigned char *src, unsigned long n);
#ifdef JOINTHROTTLE
aJFlood *cmodej_addentry(aClient *cptr, aChannel *chptr);
void cmodej_delentry(aJFlood *e);
void cmodej_deluserentries(aClient *cptr);
void cmodej_delchannelentries(aChannel *chptr);
#endif
extern void charsys_reset(void);
extern void charsys_addmultibyterange(char s1, char e1, char s2, char e2);
extern void charsys_addallowed(char *s);
extern void charsys_reset(void);
extern MODVAR char langsinuse[4096];
extern MODVAR aTKline *tklines[TKLISTLEN];
extern char *cmdname_by_spamftarget(int target);
extern int isipv6(struct IN_ADDR *addr);
extern void inet4_to_inet6(const void *src_in, void *dst_in);
extern void unrealdns_delreq_bycptr(aClient *cptr);
extern void inet6_to_inet4(const void *src, void *dst);
extern void sendtxtnumeric(aClient *to, char *pattern, ...) __attribute__((format(printf,2,3)));;
extern void unrealdns_gethostbyname_link(char *name, ConfigItem_link *conf);
extern void unrealdns_delasyncconnects(void);
extern int is_autojoin_chan(char *chname);
extern void unreal_free_hostent(struct hostent *he);
extern int match_esc(const char *mask, const char *name);
extern int iplist_onlist(IPList *iplist, char *ip);
extern struct hostent *unreal_create_hostent(char *name, struct IN_ADDR *addr);
extern char *unreal_time_synch_error(void);
extern int unreal_time_synch(int timeout);
extern int extban_is_banned_helper(char *buf);
extern char *getcloak(aClient *sptr);
extern unsigned char param_to_slot_mapping[256];
extern char *cm_getparameter(aChannel *chptr, char mode);
extern void cm_putparameter(aChannel *chptr, char mode, char *str);
extern void cm_freeparameter(aChannel *chptr, char mode);
extern char *cm_getparameter_ex(void **p, char mode);
extern void cm_putparameter_ex(void **p, char mode, char *str);
extern void cm_freeparameter_ex(void **p, char mode, char *str);
extern void kick_insecure_users(aChannel *);
extern void free_motd(aMotd *m);
+2
View File
@@ -63,7 +63,9 @@ typedef struct hashentry {
/*
* Throttling
*/
#ifdef THROTTLING
#define THROTTLING_HASH_SIZE 1019 /* prime number */
#endif
#define NullChn ((aChannel *)0)
-30
View File
@@ -30,9 +30,6 @@
#define __u_l unsigned long
#endif
extern int inet_pton(int af, const char *src, void *dst);
extern const char *inet_ntop(int af, const void *src, char *dst, size_t cnt);
#ifdef __STDC__
# ifndef _WIN32
extern __u_l inet_addr(char *);
@@ -57,30 +54,3 @@ extern __u_l inet_network();
extern __u_l inet_lnaof();
#endif
#undef __u_l
#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
#ifdef SOCKADDR_IN_HAS_LEN /* BSD style sockaddr_storage for BSD style
sockaddr_in */
struct sockaddr_storage {
unsigned char ss_len;
sa_family_t ss_family;
char __ss_pad1[((sizeof(int64_t)) - sizeof(unsigned char) -
sizeof(sa_family_t) )];
int64_t __ss_align;
char __ss_pad2[(128 - sizeof(unsigned char) - sizeof(sa_family_t) -
((sizeof(int64_t)) - sizeof(unsigned char) -
sizeof(sa_family_t)) - (sizeof(int64_t)))];
};
#else /* Linux style for everything else (for now) */
struct sockaddr_storage
{
sa_family_t ss_family;
u_int32_t __ss_align;
char __ss_padding[(128 - (2 * sizeof (u_int32_t)))];
};
#endif /* SOCKADDR_IN_HAS_LEN */
#endif /* HAVE_STRUCT_SOCKADDR_STORAGE */
#ifndef INADDR_NONE
#define INADDR_NONE 0xffffffff
#endif
-37
View File
@@ -1,37 +0,0 @@
/************************************************************************
* Unreal Internet Relay Chat Daemon, include/macros.h
* Copyright (c) 2004 Dominick Meglio & 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.
*
* $Id$
*/
#include "setup.h"
/* Calculate the size of an array */
#define ARRAY_SIZEOF(x) (sizeof((x))/sizeof((x)[0]))
/* Allocate a dynamic local variable */
#if defined(HAVE_C99_VARLEN_ARRAY)
#define DYN_LOCAL(type, name, size) type name[size]
#define DYN_FREE(name)
#elif defined(HAVE_ALLOCA)
#define DYN_LOCAL(type, name, size) type *name = (size ? alloca(size) : NULL)
#define DYN_FREE(name)
#else
#define DYN_LOCAL(type, name, size) type *name = (size ? malloc(size) : NULL)
#define DYN_FREE(name) (name ? free(name) : 0)
#endif
-28
View File
@@ -1,28 +0,0 @@
/*
* This is an OpenSSL-compatible implementation of the RSA Data Security,
* Inc. MD5 Message-Digest Algorithm.
*
* Written by Solar Designer <solar@openwall.com> in 2001, and placed in
* the public domain. See md5.c for more information.
*/
#if defined(USE_SSL)
#include <openssl/md5.h>
#elif !defined(_MD5_H)
#define _MD5_H
/* Any 32-bit or wider unsigned integer data type will do */
typedef unsigned long MD5_u32plus;
typedef struct {
MD5_u32plus lo, hi;
MD5_u32plus a, b, c, d;
unsigned char buffer[64];
MD5_u32plus block[16];
} MD5_CTX;
extern void MD5_Init(MD5_CTX *ctx);
extern void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size);
extern void MD5_Final(unsigned char *result, MD5_CTX *ctx);
#endif
+69 -240
View File
@@ -21,51 +21,40 @@
#ifndef MODULES_H
#define MODULES_H
#include "types.h"
#define MOD_VERSION "3.2-b5-1"
#define MOD_WE_SUPPORT "3.2-b5*"
#define MAXCUSTOMHOOKS 30
#define MAXHOOKTYPES 150
#define MAXCALLBACKS 30
#define MAXEFUNCTIONS 100
#define MAXHOOKTYPES 70
#if defined(_WIN32)
#define MOD_EXTENSION "dll"
#define DLLFUNC _declspec(dllexport)
#define irc_dlopen(x,y) LoadLibrary(x)
#define irc_dlclose FreeLibrary
#define irc_dlsym(x,y,z) z = (void *)GetProcAddress(x,y)
#define irc_dlerror our_dlerror
#define DLLFUNC _declspec(dllexport)
#define irc_dlopen(x,y) LoadLibrary(x)
#define irc_dlclose FreeLibrary
#define irc_dlsym(x,y,z) z = (void *)GetProcAddress(x,y)
#undef irc_dlerror
#elif defined(HPUX)
#define MOD_EXTENSION "so"
#define irc_dlopen(x,y) shl_load(x,y,0L)
#define irc_dlsym(x,y,z) shl_findsym(x,y,z)
#define irc_dlclose shl_unload
#define irc_dlerror() strerror(errno)
#define irc_dlopen(x,y) shl_load(x,y,0L)
#define irc_dlsym(x,y,z) shl_findsym(x,y,z)
#define irc_dlclose shl_unload
#define irc_dlerror() strerror(errno)
#else
#define MOD_EXTENSION "so"
#define irc_dlopen dlopen
#define irc_dlclose dlclose
#if defined(UNDERSCORE)
#define irc_dlsym(x,y,z) z = obsd_dlsym(x,y)
#else
#define irc_dlsym(x,y,z) z = dlsym(x,y)
#endif
#define irc_dlerror dlerror
#define DLLFUNC
#define irc_dlopen dlopen
#define irc_dlclose dlclose
#if defined(UNDERSCORE)
#define irc_dlsym(x,y,z) z = obsd_dlsym(x,y)
#else
#define irc_dlsym(x,y,z) z = dlsym(x,y)
#endif
#define irc_dlerror dlerror
#define DLLFUNC
#endif
#define EVENT(x) void (x) (void *data)
/* Casts to int, void, void *, and char * function pointers */
#define TO_INTFUNC(x) (int (*)())(x)
#define TO_VOIDFUNC(x) (void (*)())(x)
#define TO_PVOIDFUNC(x) (void *(*)())(x)
#define TO_PCHARFUNC(x) (char *(*)())(x)
typedef struct _mod_symboltable Mod_SymbolDepTable;
typedef struct _event Event;
typedef struct _eventinfo EventInfo;
typedef struct _irchook Hook;
typedef struct _hooktype Hooktype;
typedef struct _irccallback Callback;
typedef struct _ircefunction Efunction;
/*
* Module header that every module must include, with the name of
@@ -98,18 +87,15 @@ typedef struct {
} ModuleInfo;
#define MOBJ_EVENT 0x0001
#define MOBJ_HOOK 0x0002
#define MOBJ_COMMAND 0x0004
#define MOBJ_HOOKTYPE 0x0008
#define MOBJ_VERSIONFLAG 0x0010
#define MOBJ_SNOMASK 0x0020
#define MOBJ_UMODE 0x0040
#define MOBJ_CMDOVERRIDE 0x0080
#define MOBJ_EXTBAN 0x0100
#define MOBJ_CALLBACK 0x0200
#define MOBJ_ISUPPORT 0x0400
#define MOBJ_EFUNCTION 0x0800
#define MOBJ_EVENT 0x0001
#define MOBJ_HOOK 0x0002
#define MOBJ_COMMAND 0x0004
#define MOBJ_HOOKTYPE 0x0008
#define MOBJ_VERSIONFLAG 0x0010
#define MOBJ_SNOMASK 0x0020
#define MOBJ_UMODE 0x0040
#define MOBJ_CMDOVERRIDE 0x0080
#define MOBJ_EXTBAN 0x0100
typedef struct {
long mode;
@@ -135,7 +121,6 @@ typedef struct {
#define EXSJ_SAME 0 /* Parameters are the same */
#define EXSJ_WEWON 1 /* We won! w00t */
#define EXSJ_THEYWON 2 /* They won :( */
#define EXSJ_MERGE 3 /* Merging of modes.. neither won nor lost (merged params are in 'our' on return) */
/* return values for EXCHK_ACCESS*: */
#define EX_DENY 0 /* Disallowed, except in case of operoverride */
@@ -150,6 +135,13 @@ typedef struct {
*/
typedef unsigned long Cmode_t;
#define EXTCM_PAR_HEADER struct _CmodeParam *prev, *next; char flag;
typedef struct _CmodeParam {
EXTCM_PAR_HEADER
/** other fields are placed after this header in your own paramstruct */
} CmodeParam;
typedef struct {
/** mode character (like 'Z') */
char flag;
@@ -175,40 +167,36 @@ typedef struct {
/** Store parameter in memory for channel.
* aExtCMtableParam *: the list (usually chptr->mode.extmodeparams).
* char *: the parameter.
* RETURNS: nothing! ;p
* return value: the head of the list, RTFS if you wonder why.
* design notes: only alloc a new paramstruct if you need to, search for
* any current one first (like in case of mode +y 5 and then +y 6 later without -y).
*/
void *(*put_param)(void *, char *);
CmodeParam * (*put_param)(CmodeParam *, char *);
/** Get readable string version" of the stored parameter.
* void *: the param data
* aExtCMtableParam *: the list (usually chptr->mode.extmodeparams).
* return value: a pointer to the string (temp. storage)
*/
char * (*get_param)(void *);
char * (*get_param)(CmodeParam *);
/** Convert input parameter to output.
* Like +l "1aaa" becomes "1".
* char *: the input parameter.
* aClient *: the client that the mode request came from:
* 1. Can be NULL (eg: if called for set::modes-on-join
* 2. Probably only used in rare cases, see also next remark
* 3. ERRORS SHOULD NOT BE SENT BY conv_param BUT BY is_ok!
* return value: pointer to output string (temp. storage)
*/
char * (*conv_param)(char *, aClient *);
char * (*conv_param)(char *);
/** free and remove parameter from list.
* aExtCMtableParam *: the list (usually chptr->mode.extmodeparams).
*/
void (*free_param)(void *);
void (*free_param)(CmodeParam *);
/** duplicate a struct and return a pointer to duplicate.
* This is usually just a malloc + memcpy.
* aExtCMtableParam *: source struct itself (no list).
* return value: pointer to newly allocated struct.
*/
void * (*dup_struct)(void *);
CmodeParam * (*dup_struct)(CmodeParam *);
/** Compares 2 parameters and decides who wins the sjoin fight.
* When syncing channel modes (m_sjoin) a parameter conflict may occur, things like
@@ -219,43 +207,20 @@ typedef struct {
* aExtCMtableParam *: our parameter
* aExtCMtableParam *: their parameter
*/
int (*sjoin_check)(aChannel *, void *, void *);
/* Slot#.. Can be used instead of GETPARAMSLOT() */
int slot;
int (*sjoin_check)(aChannel *, CmodeParam *, CmodeParam *);
} Cmode;
typedef struct {
char flag;
int paracount;
int (*is_ok)(aClient *,aChannel *, char *para, int, int);
void * (*put_param)(void *, char *);
char * (*get_param)(void *);
char * (*conv_param)(char *, aClient *);
void (*free_param)(void *);
void * (*dup_struct)(void *);
int (*sjoin_check)(aChannel *, void *, void *);
CmodeParam * (*put_param)(CmodeParam *, char *);
char * (*get_param)(CmodeParam *);
char * (*conv_param)(char *);
void (*free_param)(CmodeParam *);
CmodeParam * (*dup_struct)(CmodeParam *);
int (*sjoin_check)(aChannel *, CmodeParam *, CmodeParam *);
} CmodeInfo;
/* Get a slot# for a param.. eg... GETPARAMSLOT('k') ;p */
#define GETPARAMSLOT(x) param_to_slot_mapping[x]
/* Get a cmode handler by slot.. for example for [dont use this]: GETPARAMHANDLERBYSLOT(5)->get_param(chptr) */
#define GETPARAMHANDLERBYSLOT(slotid) ParamTable[slotid]
/* Same as GETPARAMHANDLERBYSLOT but then by letter.. like [dont use this]: GETPARAMHANDLERBYSLOT('k')->get_param(chptr) */
#define GETPARAMHANDLERBYLETTER(x) ParamTable[GETPARAMSLOT(x)]
/* Get paramter data struct.. for like: ((aModejEntry *)GETPARASTRUCT(chptr, 'j'))->t */
#define GETPARASTRUCT(mychptr, mychar) chptr->mode.extmodeparams[GETPARAMSLOT(mychar)]
#define GETPARASTRUCTEX(v, mychar) v[GETPARAMSLOT(mychar)]
#define CMP_GETSLOT(x) GETPARAMSLOT(x)
#define CMP_GETHANDLERBYSLOT(x) GETPARAMHANDLERBYSLOT(x)
#define CMP_GETHANDLERBYLETTER(x) GETPARAMHANDLERBYLETTER(x)
#define CMP_GETSTRUCT(x,y) GETPARASTRUCT(x,y)
#endif
/*** Extended bans ***/
@@ -269,17 +234,12 @@ typedef struct {
#define EXTBANTABLESZ 32
typedef enum ExtbanOptions { EXTBOPT_CHSVSMODE=0x1 } ExtbanOptions;
typedef struct {
/** extbans module */
Module *owner;
/** extended ban character */
char flag;
/** extban options */
ExtbanOptions options;
/** access checking [optional].
* aClient *: the client
* aChannel *: the channel
@@ -314,9 +274,8 @@ typedef struct {
typedef struct {
char flag;
ExtbanOptions options;
int (*is_ok)(aClient *, aChannel *, char *para, int, int, int);
char * (*conv_param)(char *);
char * (*conv_param)(char *);
int (*is_banned)(aClient *, aChannel *, char *, int);
} ExtbanInfo;
@@ -332,13 +291,6 @@ typedef struct _versionflag {
ModuleChild *parents;
} Versionflag;
typedef struct _isupport {
struct _isupport *prev, *next;
char *token;
char *value;
Module *owner;
} Isupport;
typedef struct _ModuleObject {
struct _ModuleObject *prev, *next;
short type;
@@ -352,9 +304,6 @@ typedef struct _ModuleObject {
Umode *umode;
Cmdoverride *cmdoverride;
Extban *extban;
Callback *callback;
Efunction *efunction;
Isupport *isupport;
} object;
} ModuleObject;
@@ -369,39 +318,6 @@ struct _irchook {
Module *owner;
};
struct _irccallback {
Callback *prev, *next;
short type;
union {
int (*intfunc)();
void (*voidfunc)();
char *(*pcharfunc)();
} func;
Module *owner;
char willberemoved; /* will be removed on next rehash? (eg the 'old'/'current' one) */
};
/* Definition of an efunction: a MANDATORY Extern Function (in a module),
* for things like do_join, join_channel, etc.
* The difference between callbacks and efunctions are:
* - efunctions are mandatory, while callbacks can be optional (depends!)
* - efunctions are ment for internal usage, so 3rd party modules are not allowed
* to add them.
* - all efunctions are declared as function pointers in modules.c
*/
struct _ircefunction {
Efunction *prev, *next;
short type;
union {
int (*intfunc)();
void (*voidfunc)();
void *(*pvoidfunc)();
char *(*pcharfunc)();
} func;
Module *owner;
char willberemoved; /* will be removed on next rehash? (eg the 'old'/'current' one) */
};
struct _hooktype {
short id;
char *string;
@@ -440,8 +356,7 @@ struct _Module
unsigned char options;
unsigned char errorcode;
char *tmp_file;
unsigned long mod_sys_version;
unsigned int compiler_version;
unsigned char compilecheck; /* feel free to rename this mess, but mod->flags sucks :[. */
};
/*
* Symbol table
@@ -510,10 +425,8 @@ void EventStatus(aClient *sptr);
void SetupEvents(void);
void LockEventSystem(void);
void UnlockEventSystem(void);
extern MODVAR Hook *Hooks[MAXHOOKTYPES];
extern MODVAR Hooktype Hooktypes[MAXCUSTOMHOOKS];
extern MODVAR Callback *Callbacks[MAXCALLBACKS], *RCallbacks[MAXCALLBACKS];
extern MODVAR Efunction *Efunctions[MAXEFUNCTIONS];
extern Hook *Hooks[MAXHOOKTYPES];
extern Hooktype Hooktypes[MAXCUSTOMHOOKS];
void Module_Init(void);
char *Module_Create(char *path);
@@ -532,11 +445,6 @@ void *obsd_dlsym(void *handle, char *symbol);
Versionflag *VersionflagAdd(Module *module, char flag);
void VersionflagDel(Versionflag *vflag, Module *module);
Isupport *IsupportAdd(Module *module, const char *token, const char *value);
void IsupportSetValue(Isupport *isupport, const char *value);
void IsupportDel(Isupport *isupport);
Isupport *IsupportFind(const char *token);
#define add_Hook(hooktype, func) HookAddMain(NULL, hooktype, func, NULL, NULL)
#define HookAdd(hooktype, func) HookAddMain(NULL, hooktype, func, NULL, NULL)
#define HookAddEx(module, hooktype, func) HookAddMain(module, hooktype, func, NULL, NULL)
@@ -547,7 +455,6 @@ Isupport *IsupportFind(const char *token);
#define add_HookX(hooktype, func1, func2, func3) HookAddMain(NULL, hooktype, func1, func2, func3)
Hook *HookAddMain(Module *module, int hooktype, int (*intfunc)(), void (*voidfunc)(), char *(*pcharfunc)());
Hook *HookAddCfg(Module *module, int hooktype, int (*intfunc)(ConfigFile *cf, ConfigEntry *ce, int type, int *errs));
Hook *HookDel(Hook *hook);
Hooktype *HooktypeAdd(Module *module, char *string, int *type);
@@ -585,26 +492,7 @@ void HooktypeDel(Hooktype *hooktype, Module *module);
#define RunHook6(hooktype,a,b,c,d,e,f) do { Hook *h; for (h = Hooks[hooktype]; h; h = h->next) (*(h->func.intfunc))(a,b,c,d,e,f); } while(0)
#define RunHook7(hooktype,a,b,c,d,e,f,g) do { Hook *h; for (h = Hooks[hooktype]; h; h = h->next) (*(h->func.intfunc))(a,b,c,d,e,f,g); } while(0)
#define CallbackAdd(cbtype, func) CallbackAddMain(NULL, cbtype, func, NULL, NULL)
#define CallbackAddEx(module, cbtype, func) CallbackAddMain(module, cbtype, func, NULL, NULL)
#define CallbackAddVoid(cbtype, func) CallbackAddMain(NULL, cbtype, NULL, func, NULL)
#define CallbackAddVoidEx(module, cbtype, func) CallbackAddMain(module, cbtype, NULL, func, NULL)
#define CallbackAddPChar(cbtype, func) CallbackAddMain(NULL, cbtype, NULL, NULL, func)
#define CallbackAddPCharEx(module, cbtype, func) CallbackAddMain(module, cbtype, NULL, NULL, func)
extern Callback *CallbackAddMain(Module *module, int cbtype, int (*intfunc)(), void (*voidfunc)(), char *(*pcharfunc)());
extern Callback *CallbackDel(Callback *cb);
#define EfunctionAdd(module, cbtype, func) EfunctionAddMain(module, cbtype, func, NULL, NULL, NULL)
#define EfunctionAddVoid(module, cbtype, func) EfunctionAddMain(module, cbtype, NULL, func, NULL, NULL)
#define EfunctionAddPVoid(module, cbtype, func) EfunctionAddMain(module, cbtype, NULL, NULL, func, NULL)
#define EfunctionAddPChar(module, cbtype, func) EfunctionAddMain(module, cbtype, NULL, NULL, NULL, func)
extern Efunction *EfunctionAddMain(Module *module, int eftype, int (*intfunc)(), void (*voidfunc)(), void *(*pvoidfunc)(), char *(*pcharfunc)());
extern Efunction *EfunctionDel(Efunction *cb);
Command *CommandAdd(Module *module, char *cmd, char *tok, int (*func)(aClient*, aClient*, int, char**), unsigned char params, int flags);
Command *CommandAdd_Alias(Module *module, char *cmd, char *tok, int (*func)(aClient*, aClient*, int, char**, char *sentcmd), unsigned char params, int flags);
Command *CommandAdd(Module *module, char *cmd, char *tok, int (*func)(), unsigned char params, int flags);
void CommandDel(Command *command);
int CommandExists(char *name);
Cmdoverride *CmdoverrideAdd(Module *module, char *cmd, iFP function);
@@ -651,69 +539,12 @@ int CallCmdoverride(Cmdoverride *ovr, aClient *cptr, aClient *sptr, int parc, ch
#define HOOKTYPE_UMODE_CHANGE 36
#define HOOKTYPE_TOPIC 37
#define HOOKTYPE_REHASH_COMPLETE 38
#define HOOKTYPE_TKL_ADD 39
#define HOOKTYPE_TKL_DEL 40
#define HOOKTYPE_LOCAL_KILL 41
#define HOOKTYPE_LOG 42
#define HOOKTYPE_REMOTE_JOIN 43
#define HOOKTYPE_REMOTE_PART 44
#define HOOKTYPE_REMOTE_KICK 45
#define HOOKTYPE_LOCAL_SPAMFILTER 46
#define HOOKTYPE_SILENCED 47
#define HOOKTYPE_CAN_JOIN 48
#define HOOKTYPE_CAN_SEND 49
#define HOOKTYPE_CLEANUP_CLIENT 50
#define HOOKTYPE_CLEANUP_USER 51
#define HOOKTYPE_CLEANUP_USER2 52
#define HOOKTYPE_PRE_CHANMSG 53
#define HOOKTYPE_KNOCK 54
#define HOOKTYPE_MODECHAR_FIXME 55
#define HOOKTYPE_CAN_KICK 56
/* Hook return values */
#define HOOK_CONTINUE 0
#define HOOK_ALLOW -1
#define HOOK_DENY 1
/* Callback types */
#define CALLBACKTYPE_CLOAK 1
#define CALLBACKTYPE_CLOAKKEYCSUM 2
#define CALLBACKTYPE_CLOAK_EX 3
/* Efunction types */
#define EFUNC_DO_JOIN 1
#define EFUNC_JOIN_CHANNEL 2
#define EFUNC_CAN_JOIN 3
#define EFUNC_DO_MODE 4
#define EFUNC_SET_MODE 5
#define EFUNC_M_UMODE 6
#define EFUNC_REGISTER_USER 7
#define EFUNC_TKL_HASH 8
#define EFUNC_TKL_TYPETOCHAR 9
#define EFUNC_TKL_ADD_LINE 10
#define EFUNC_TKL_DEL_LINE 11
#define EFUNC_TKL_CHECK_LOCAL_REMOVE_SHUN 12
#define EFUNC_TKL_EXPIRE 13
#define EFUNC_TKL_CHECK_EXPIRE 14
#define EFUNC_FIND_TKLINE_MATCH 15
#define EFUNC_FIND_SHUN 16
#define EFUNC_FIND_SPAMFILTER_USER 17
#define EFUNC_FIND_QLINE 18
#define EFUNC_FIND_TKLINE_MATCH_ZAP 19
#define EFUNC_TKL_STATS 20
#define EFUNC_TKL_SYNCH 21
#define EFUNC_M_TKL 22
#define EFUNC_PLACE_HOST_BAN 23
#define EFUNC_DOSPAMFILTER 24
#define EFUNC_DOSPAMFILTER_VIRUSCHAN 25
#define EFUNC_FIND_TKLINE_MATCH_ZAP_EX 26
#define EFUNC_SEND_LIST 27
#define EFUNC_STRIPBADWORDS 28
#define EFUNC_STRIPCOLORS 29
#define EFUNC_STRIPCONTROLCODES 30
#define EFUNC_SPAMFILTER_BUILD_USER_STRING 31
#define EFUNC_IS_SILENCED 32
/* Module flags */
#define MODFLAG_NONE 0x0000
#define MODFLAG_LOADED 0x0001 /* Fully loaded */
@@ -732,27 +563,25 @@ int CallCmdoverride(Cmdoverride *ovr, aClient *cptr, aClient *sptr, int parc, ch
#define CONFIG_EXCEPT 4
#define CONFIG_DENY 5
#define CONFIG_ALLOW 6
#define CONFIG_CLOAKKEYS 7
#ifdef DYNAMIC_LINKING
#define MOD_HEADER(name) Mod_Header
#define MOD_TEST(name) Mod_Test
#define MOD_INIT(name) Mod_Init
#define MOD_LOAD(name) Mod_Load
#define MOD_UNLOAD(name) Mod_Unload
#define MOD_HEADER(name) Mod_Header
#define MOD_TEST(name) Mod_Test
#define MOD_INIT(name) Mod_Init
#define MOD_LOAD(name) Mod_Load
#define MOD_UNLOAD(name) Mod_Unload
#else
#define MOD_HEADER(name) name##_Header
#define MOD_TEST(name) name##_Test
#define MOD_INIT(name) name##_Init
#define MOD_LOAD(name) name##_Load
#define MOD_UNLOAD(name) name##_Unload
#define MOD_HEADER(name) name##_Header
#define MOD_TEST(name) name##_Test
#define MOD_INIT(name) name##_Init
#define MOD_LOAD(name) name##_Load
#define MOD_UNLOAD(name) name##_Unload
#endif
#define CLOAK_KEYCRC RCallbacks[CALLBACKTYPE_CLOAKKEYCSUM]->func.pcharfunc()
#ifdef DYNAMIC_LINKING
#include "modversion.h"
/* ugly alert!!!! */
#include "version.h"
char Mod_Version[] = BASE_VERSION PATCH1 PATCH2 PATCH3 PATCH4 PATCH5 PATCH6 PATCH7 PATCH8 PATCH9;
#endif
#endif
-104
View File
@@ -1,104 +0,0 @@
/************************************************************************
* Unreal Internet Relay Chat Daemon, include/modversion.h
* (C) 2004-2005 Bram Matthys 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.
*
* $Id$
*/
#include "version.h"
/* What all this is for? Well, it's simple...
* Example: When someone compiles a module with zip support, but the
* core was not compiled with zip support, then the module will read
* things incorrect in the struct because the module sees an extra
* field half-way the struct but in the core that field does not exist,
* hence all data is shifted 4 bytes causing all kinds of odd crashes,
* memory corruption, and weird problems.
* This is an attempt to prevent this a bit, but there are a lot more
* options that cause binary incompatability (eg: changing nicklen),
* we just take the most common ones...
*
* NOTE: On win32 we allow ssl and zip inconsistencies because we
* explicitly use "padding" in the structs: we add a useless
* placeholder so everything is still aligned correctly.
* In the process of doing so, we waste several bytes per-user,
* but this prevents (most) binary incompatability problems
* making it easier for module coders to ship dll's.
*/
#if defined(USE_SSL) && !defined(_WIN32)
#define MYTOKEN_SSL "/SSL"
#else
#define MYTOKEN_SSL ""
#endif
#if defined(ZIP_LINKS) && !defined(_WIN32)
#define MYTOKEN_ZIP "/ZIP"
#else
#define MYTOKEN_ZIP ""
#endif
#if defined(NOSPOOF)
#define MYTOKEN_NOSPOOF "/NOSPF"
#else
#define MYTOKEN_NOSPOOF ""
#endif
#if !defined(EXTCMODE)
#define MYTOKEN_EXTCMODE "/NOEXTC"
#else
#define MYTOKEN_EXTCMODE ""
#endif
#if !defined(JOINTHROTTLE)
#define MYTOKEN_JOINTHROTTLE "/NOJTHR"
#else
#define MYTOKEN_JOINTHROTTLE ""
#endif
#if !defined(NO_FLOOD_AWAY)
#define MYTOKEN_NOFLDAWAY "/NONFA"
#else
#define MYTOKEN_NOFLDAWAY ""
#endif
#if !defined(NEWCHFLOODPROT)
#define MYTOKEN_NEWCHF "/NOCHF"
#else
#define MYTOKEN_NEWCHF ""
#endif
#ifdef INET6
#define MYTOKEN_INET6 "/IPV6"
#else
#define MYTOKEN_INET6 ""
#endif
#ifdef __GNUC__
#if defined(__GNUC_PATCHLEVEL__)
#define GCCVER ((__GNUC__ << 16) + (__GNUC_MINOR__ << 8) + __GNUC_PATCHLEVEL__)
#else
#define GCCVER ((__GNUC__ << 16) + (__GNUC_MINOR__ << 8))
#endif
#else
#define GCCVER 0
#endif
#ifdef UNREALCORE
char our_mod_version[] = BASE_VERSION PATCH1 PATCH2 PATCH3 PATCH4 PATCH6 PATCH7 PATCH8 PATCH9 \
MYTOKEN_SSL MYTOKEN_ZIP MYTOKEN_NOSPOOF MYTOKEN_EXTCMODE MYTOKEN_JOINTHROTTLE \
MYTOKEN_NOFLDAWAY MYTOKEN_NEWCHF MYTOKEN_INET6;
unsigned int our_compiler_version = GCCVER;
#else
DLLFUNC char Mod_Version[] = BASE_VERSION PATCH1 PATCH2 PATCH3 PATCH4 PATCH6 PATCH7 PATCH8 PATCH9 \
MYTOKEN_SSL MYTOKEN_ZIP MYTOKEN_NOSPOOF MYTOKEN_EXTCMODE MYTOKEN_JOINTHROTTLE \
MYTOKEN_NOFLDAWAY MYTOKEN_NEWCHF MYTOKEN_INET6;
DLLFUNC unsigned int compiler_version = GCCVER;
#endif
+12 -2
View File
@@ -239,6 +239,7 @@
#define MSG_TSCTL "TSCTL"
#define TOK_TSCTL "AW"
#define MSG_SVSJOIN "SVSJOIN"
#define TOK_SVSJOIN "BR"
#define MSG_SAJOIN "SAJOIN"
#define TOK_SAJOIN "AX"
#define MSG_SVSPART "SVSPART"
@@ -299,14 +300,23 @@
#define MAXPARA 15
extern int m_error();
extern int m_join(), m_part(), m_mode();
extern int m_nick(), m_error();
extern int m_dns();
extern int m_tkl();
extern int m_motd(), m_user();
extern int m_info(), m_summon();
extern int m_users(), m_version();
extern int m_names();
extern int m_lusers(), m_umode();
extern int m_motd();
extern int m_service(), m_watch();
extern int m_dalinfo();
extern int m_credits();
extern int m_license();
extern int m_module(), m_alias();
extern int m_botmotd();
extern int m_opermotd();
extern int m_module(), m_alias(), m_tkl(), m_opermotd();
extern int m_rehash(), m_die(), m_restart();
#endif
+4 -33
View File
@@ -33,11 +33,11 @@
#define RPL_YOURHOST 002
#define RPL_CREATED 003
#define RPL_MYINFO 004
#define RPL_ISUPPORT 005
#define RPL_PROTOCTL 005
#define RPL_REDIR 10
#define RPL_REMOTEISUPPORT 105
#define RPL_REMOTEPROTOCTL 105
/*
* Errors are in the range from 400-599 currently and are grouped by what
@@ -84,7 +84,6 @@
#define ERR_SUMMONDISABLED 445
#define ERR_USERSDISABLED 446
#define ERR_NONICKCHANGE 447
#define ERR_FORBIDDENCHANNEL 448
#define ERR_NOTREGISTERED 451
@@ -128,9 +127,6 @@
#define ERR_NOOPERHOST 491
#define ERR_NOCTCP 492
#define ERR_CHANOWNPRIVNEEDED 499
#define ERR_TOOMANYJOINS 500
#define ERR_UMODEUNKNOWNFLAG 501
#define ERR_USERSDONTMATCH 502
@@ -138,9 +134,6 @@
#define ERR_TOOMANYWATCH 512
#define ERR_NEEDPONG 513
#define ERR_TOOMANYDCC 514
#define ERR_DISABLED 517
#define ERR_NOINVITE 518
#define ERR_ADMONLY 519
#define ERR_OPERONLY 520
@@ -185,12 +178,8 @@
#define RPL_TOPIC 332
#define RPL_TOPICWHOTIME 333
#define RPL_INVITELIST 336
#define RPL_ENDOFINVITELIST 337
#define RPL_LISTSYNTAX 334
#define RPL_WHOISBOT 335
#define RPL_USERIP 340
#define RPL_INVITING 341
#define RPL_SUMMONING 342
@@ -200,8 +189,8 @@
#define RPL_ENDOFWHO 315
#define RPL_NAMREPLY 353
#define RPL_ENDOFNAMES 366
#define RPL_INVEXLIST 346
#define RPL_ENDOFINVEXLIST 347
#define RPL_INVITELIST 346
#define RPL_ENDOFINVITELIST 347
#define RPL_EXLIST 348
#define RPL_ENDOFEXLIST 349
@@ -275,7 +264,6 @@
#define RPL_STATSVLINE 227
#define RPL_STATSBANVER 228
#define RPL_STATSSPAMF 229
#define RPL_STATSEXCEPTTKL 230
#define RPL_SERVICEINFO 231
#define RPL_RULES 232
#define RPL_SERVICE 233
@@ -317,7 +305,6 @@
#define RPL_HELPFWD 294
#define RPL_HELPIGN 295
/*
* New /MAP format.
*/
@@ -337,8 +324,6 @@
* These are also in the range 600-799.
*/
#define RPL_GONEAWAY 598
#define RPL_NOTAWAY 599
#define RPL_LOGON 600
#define RPL_LOGOFF 601
#define RPL_WATCHOFF 602
@@ -347,22 +332,8 @@
#define RPL_NOWOFF 605
#define RPL_WATCHLIST 606
#define RPL_ENDOFWATCHLIST 607
#define RPL_CLEARWATCH 608
#define RPL_NOWISAWAY 609
#define RPL_DCCSTATUS 617
#define RPL_DCCLIST 618
#define RPL_ENDOFDCCLIST 619
#define RPL_DCCINFO 620
#define RPL_DUMPING 640
#define RPL_DUMPRPL 641
#define RPL_EODUMP 642
#define RPL_SPAMCMDFWD 659
#define RPL_WHOISSECURE 671
#define ERR_CANNOTDOCOMMAND 972
#define ERR_CANNOTCHANGECHANMODE 974
#define ERR_NUMERICERR 999
+7
View File
@@ -26,6 +26,9 @@
int sendmodeto_one(aClient *cptr, char *from, char *name, char *mode, char *param, TS creationtime);
void make_cmodestr(void);
/* lusers.c */
void init_ircstats(void);
/* match.c */
char *collapse(char *pattern);
@@ -52,6 +55,10 @@ EVENT(loop_event);
/* support.c */
char *my_itoa(int i);
/* s_kline.c */
int find_tkline_match(aClient *cptr, int xx);
extern EVENT(tkl_check_expire);
/* s_serv.c */
void load_tunefile(void);
extern EVENT(save_tunefile);
+73 -81
View File
@@ -1,82 +1,74 @@
/* OMG... OMG! WHAT AN INCLUDE HORROR !!! */
#undef strcasecmp
#undef strncasecmp
#ifdef WIN32
#include <win32/ares/setup.h>
/*
* ircd/res_def.h (C)opyright 1992 Darren Reed.
*/
#define RES_INITLIST 1
#define RES_CALLINIT 2
#define RES_INITSOCK 4
#define RES_INITDEBG 8
#define RES_INITCACH 16
#define MAXPACKET 1024
#define MAXALIASES 35
#define MAXADDRS 35
#define AR_TTL 300 /* minimum TTL in seconds for dns cache entries */
struct hent {
char *h_name; /* official name of host */
char *h_aliases[MAXALIASES]; /* alias list */
int h_addrtype; /* host address type */
int h_length; /* length of address */
/* list of addresses from name server */
struct IN_ADDR h_addr_list[MAXADDRS];
#define h_addr h_addr_list[0] /* address, for backward compatiblity */
};
typedef struct reslist {
int id;
int sent; /* number of requests sent */
int srch;
time_t ttl;
char type;
char retries; /* retry counter */
char sends; /* number of sends (>1 means resent) */
char resend; /* send flag. 0 == dont resend */
time_t sentat;
time_t timeout;
struct IN_ADDR addr;
char *name;
struct reslist *next;
Link cinfo;
struct hent he;
} ResRQ;
typedef struct cache {
time_t expireat;
time_t ttl;
struct hostent he;
struct cache *hname_next, *hnum_next, *list_next;
} aCache;
typedef struct cachetable {
aCache *num_list;
aCache *name_list;
} CacheTable;
#define ARES_CACSIZE 101
#define MAXCACHED 81
#ifdef _WIN32
typedef unsigned short u_int16_t;
#endif
#include <ares.h>
#include <ares_version.h>
#undef strcasecmp
#undef strncasecmp
#ifndef GOT_STRCASECMP
#define strcasecmp mycmp
#define strncasecmp myncmp
#endif
typedef enum {
DNSREQ_CLIENT = 1,
DNSREQ_LINKCONF = 2,
DNSREQ_CONNECT = 3
} DNSReqType;
typedef struct _dnsreq DNSReq;
/* Depending on the request type, some fields are filled in:
* cptr: DNSREQ_CLIENT, DNSREQ_CONNECT
* link: DNSREQ_LINKCONF, DNSREQ_CONNECT
*/
struct _dnsreq {
DNSReq *prev, *next;
char *name; /**< Name being resolved (only for DNSREQ_LINKCONF and DNSREQ_CONNECT) */
char ipv6; /**< Resolving for ipv6 or ipv4? */
DNSReqType type; /**< DNS Request type (DNSREQ_*) */
aClient *cptr; /**< Client the request is for, NULL if client died OR unavailable */
ConfigItem_link *linkblock; /**< Linkblock */
};
typedef struct _dnscache DNSCache;
struct _dnscache {
DNSCache *prev, *next; /**< Previous and next in linked list */
DNSCache *hprev, *hnext; /**< Previous and next in hash list */
char *name; /**< The hostname */
struct IN_ADDR addr; /**< Stored IP address */
time_t expires; /**< When record expires */
};
typedef struct _dnsstats DNSStats;
struct _dnsstats {
unsigned int cache_hits;
unsigned int cache_misses;
unsigned int cache_adds;
};
/** Time to keep cache records. */
#define DNSCACHE_TTL 600
/** Size of the hash table (prime!).
* Consumes <this>*4 on ia32 and <this>*4 on 64 bit
* 241 seems a good bet.. which ~1k on ia32 and ~2k on ia64.
*/
#define DNS_HASH_SIZE 241
/** Max # of entries we want in our cache.
* This:
* a) prevents us from using too much memory, and
* b) prevents us from keeping useless cache records
*
* A dnscache item is roughly ~80 bytes in size (slightly more on x86),
* so 241*80=~20k, which seems reasonable ;).
*/
#define DNS_MAX_ENTRIES DNS_HASH_SIZE
extern ares_channel resolver_channel;
extern void init_resolver(int);
struct hostent *unrealdns_doclient(aClient *cptr);
extern struct __res_state ircd_res;
extern int ircd_res_init();
extern u_int ircd_res_randomid();
extern u_int16_t ircd_getshort(const u_char *msgp);
extern u_int32_t ircd_getlong(const u_char *msgp);
extern void ircd__putshort(register u_int16_t s, register u_char *msgp);
extern void ircd__putlong(register u_int32_t l,register u_char *msgp);
extern int ircd_dn_expand(const u_char *msg, const u_char *eom, const u_char *src, char *dst, int dstsiz);
extern int __ircd_dn_skipname(const u_char *ptr, const u_char *eom);
extern int ircd_dn_comp(const char *src, u_char *dst, int dstsiz, u_char **dnptrs, u_char **lastdnptr);
extern int ircd_res_mkquery(int op, const char *dname, int class, int type, const u_char *data,
int datalen, const u_char *newrr_in, u_char *buf, int buflen);
+15 -39
View File
@@ -183,6 +183,12 @@
/* Define if you have crypt */
#undef HAVE_CRYPT
/* Local hostname of the server */
#undef DOMAINNAME
/* The OS name and version of the server */
#undef MYOSNAME
/* The default permissions for configuration files */
#undef DEFAULT_PERMISSIONS
@@ -219,30 +225,18 @@
/* Define if you want IPv6 enabled */
#undef INET6
/* Define if you want modes shown in /list */
#undef LIST_SHOW_MODES
/* Define if you want nick!user@host shown for the topic setter */
#undef TOPIC_NICK_IS_NUHOST
/* Define if you want users to be notified when their shun is removed */
#undef SHUN_NOTICES
/* Define if you want OperOverride disabled */
#undef NO_OPEROVERRIDE
/* Define if you want opers to have to use /invite to join +s/+p channels */
#undef OPEROVERRIDE_VERIFY
/* Define if you want to disable /set* and /chg* */
#undef DISABLE_USERMOD
/* Define to disable extended ban stacking (~q:~c:#chan, etc) */
#undef DISABLE_STACKED_EXTBANS
/* Define if your system prepends an underscore to symbols */
#undef UNDERSCORE
/* Define if you have gethostbyname_r with 3 parameters */
#undef HAVE_GETHOSTBYNAME_R_3
/* Define if you have gethostbyname_r with 5 parameters */
#undef HAVE_GETHOSTBYNAME_R_5
/* Define if you have gethostbyname_r with 6 parameters */
#undef HAVE_GETHOSTBYNAME_R_6
/* Define if rlim_t is long long */
#undef LONG_LONG_RLIM_T
@@ -260,21 +254,3 @@
/* Define if you have strlncat */
#undef HAVE_STRLNCAT
/* Define if you have inet_pton */
#undef HAVE_INET_PTON
/* Define if you have inet_ntop */
#undef HAVE_INET_NTOP
/* Define if you have a compiler with C99 variable length array support */
#undef HAVE_C99_VARLEN_ARRAY
/* Define if you have alloca.h */
#undef HAVE_ALLOCA_H
/* Define if you have alloca */
#undef HAVE_ALLOCA
/* Define to 1 if your system has no in6addr_any. */
#undef NO_IN6ADDR_ANY
+1 -1
View File
@@ -30,7 +30,7 @@ struct SynchList {
aSynchList *next, *prev;
};
MODVAR aSynchList *SJSynchList = NULL;
aSynchList *SJSynchList = NULL;
aSynchList *make_synchlist()
{
+3
View File
@@ -23,6 +23,9 @@
* $Id$
*
* $Log$
* Revision 1.1.1.1.6.1.2.1 2000/07/14 20:22:57 stskeeps
* +- Indentation and more SJ3 fixes
*
* Revision 1.1.1.1.6.1 2000/05/28 08:55:24 cmunk
* Import of Unreal3.1-beta3
*
+122 -265
View File
@@ -37,8 +37,6 @@
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/rand.h>
#include <openssl/md5.h>
#include <openssl/ripemd.h>
#endif
#include "common.h"
#include "sys.h"
@@ -52,7 +50,6 @@
#ifdef STDDEFH
# include <stddef.h>
#endif
#include "md5.h"
#ifdef HAVE_SYSLOG
# include <syslog.h>
@@ -65,19 +62,15 @@
#endif
#include "auth.h"
#ifndef _WIN32
#include "pcreposix.h"
#include "tre/regex.h"
#else
#include "win32/regex.h"
#endif
#include "channel.h"
#if defined(_WIN32) && !defined(NOSPOOF)
#error "Compiling win32 without nospoof is VERY insecure and NOT supported"
#endif
extern MODVAR int sendanyways;
extern int sendanyways;
typedef struct aloopStruct LoopStruct;
@@ -105,11 +98,9 @@ typedef struct _configitem_listen ConfigItem_listen;
typedef struct _configitem_allow ConfigItem_allow;
typedef struct _configflag_allow ConfigFlag_allow;
typedef struct _configitem_allow_channel ConfigItem_allow_channel;
typedef struct _configitem_allow_dcc ConfigItem_allow_dcc;
typedef struct _configitem_vhost ConfigItem_vhost;
typedef struct _configitem_except ConfigItem_except;
typedef struct _configitem_link ConfigItem_link;
typedef struct _configitem_cgiirc ConfigItem_cgiirc;
typedef struct _configitem_ban ConfigItem_ban;
typedef struct _configitem_badword ConfigItem_badword;
typedef struct _configitem_deny_dcc ConfigItem_deny_dcc;
@@ -138,16 +129,17 @@ typedef struct Server aServer;
typedef struct SLink Link;
typedef struct SBan Ban;
typedef struct SMode Mode;
typedef struct SChanFloodProt ChanFloodProt;
typedef struct SRemoveFld RemoveFld;
typedef struct ListOptions LOpts;
typedef struct FloodOpt aFloodOpt;
typedef struct MotdItem aMotd;
typedef struct trecord aTrecord;
typedef struct IRCCommand aCommand;
typedef struct Command aCommand;
typedef struct _cmdoverride Cmdoverride;
typedef struct SMember Member;
typedef struct SMembership Membership;
typedef struct SMembershipL MembershipL;
typedef struct JFlood aJFlood;
#ifdef ZIP_LINKS
typedef struct Zdata aZdata;
@@ -158,6 +150,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#endif
#ifndef VMSP
#include "class.h"
#include "dbuf.h" /* THIS REALLY SHOULDN'T BE HERE!!! --msa */
#endif
@@ -169,12 +162,14 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define REALLEN 50
#define TOPICLEN 307
#define CHANNELLEN 32
#define PASSWDLEN 48 /* was 20, then 32, now 48. */
#define PASSWDLEN 32 /* orig. 20, changed to 32 for nickpasswords */
#define KEYLEN 23
#define LINKLEN 32
#define BUFSIZE 512 /* WARNING: *DONT* CHANGE THIS!!!! */
#define MAXRECIPIENTS 20
#define MAXKILLS 20
#define MAXBANS 60
#define MAXBANLENGTH 1024
#define MAXSILELENGTH NICKLEN+USERLEN+HOSTLEN+10
#define UMODETABLESZ (sizeof(long) * 8)
/*
@@ -188,7 +183,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
/* NOTE: this must be down here so the stuff from struct.h IT uses works */
#include "whowas.h"
/* Logging types */
/* Loggin types */
#define LOG_ERROR 0x0001
#define LOG_KILL 0x0002
#define LOG_TKL 0x0004
@@ -199,7 +194,6 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define LOG_SACMDS 0x0080
#define LOG_CHGCMDS 0x0100
#define LOG_OVERRIDE 0x0200
#define LOG_SPAMFILTER 0x0400
/*
@@ -265,8 +259,6 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define SetClient(x) ((x)->status = STAT_CLIENT)
#define SetLog(x) ((x)->status = STAT_LOG)
#define IsSynched(x) (x->serv->flags.synced)
/* opt.. */
#define OPT_SJOIN 0x0001
#define OPT_NOT_SJOIN 0x0002
@@ -284,17 +276,13 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define OPT_NOT_VHP 0x2000
#define OPT_TKLEXT 0x4000
#define OPT_NOT_TKLEXT 0x8000
#define OPT_NICKIP 0x10000
#define OPT_NOT_NICKIP 0x20000
#define OPT_CLK 0x10000
#define OPT_NOT_CLK 0x20000
/* client->flags (32 bits): 28 used, 4 free */
#define FLAGS_PINGSENT 0x0001 /* Unreplied ping sent */
#define FLAGS_DEADSOCKET 0x0002 /* Local socket is dead--Exiting soon */
#define FLAGS_KILLED 0x0004 /* Prevents "QUIT" from being sent for this */
#define FLAGS_BLOCKED 0x0008 /* socket is in a blocked condition */
#define FLAGS_OUTGOING 0x0010 /* outgoing connection, do not touch cptr->listener->clients */
#define FLAGS_UNOCCUP1 0x0010 /* [FREE] */
#define FLAGS_CLOSING 0x0020 /* set when closing to suppress errors */
#define FLAGS_LISTEN 0x0040 /* used to mark clients which we listen() on */
#define FLAGS_CHKACCESS 0x0080 /* ok to check clients access if set */
@@ -305,7 +293,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define FLAGS_GOTID 0x1000 /* successful ident lookup achieved */
#define FLAGS_DOID 0x2000 /* I-lines say must use ident return */
#define FLAGS_NONL 0x4000 /* No \n in buffer */
#define FLAGS_CGIIRC 0x8000 /* CGI IRC host: flag set = ip/host data has been filled in already */
#define FLAGS_TS8 0x8000 /* Why do you want to know? */
#define FLAGS_ULINE 0x10000 /* User/server is considered U-lined */
#define FLAGS_SQUIT 0x20000 /* Server has been /squit by an oper */
#define FLAGS_PROTOCTL 0x40000 /* Received a PROTOCTL message */
@@ -317,14 +305,14 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#ifdef ZIP_LINKS
#define FLAGS_ZIP 0x1000000
#endif
#define FLAGS_DCCNOTICE 0x2000000 /* Has the user seen a notice on how to use DCCALLOW already? */
#define FLAGS_UNOCCUP2 0x2000000 /* [FREE] */
#define FLAGS_SHUNNED 0x4000000
#define FLAGS_VIRUS 0x8000000 /* tagged by spamfilter */
#ifdef USE_SSL
#define FLAGS_SSL 0x10000000
#endif
#define FLAGS_NOFAKELAG 0x20000000 /* Exception from fake lag */
#define FLAGS_DCCBLOCK 0x40000000 /* Block all DCC send requests */
#define FLAGS_UNOCCUP4 0x20000000 /* [FREE] */
#define FLAGS_DCCBLOCK 0x40000000
#define FLAGS_MAP 0x80000000 /* Show this entry in /map */
/* Dec 26th, 1997 - added flags2 when I ran out of room in flags -DuffJ */
@@ -333,7 +321,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
* -DuffJ
*/
#define SNO_DEFOPER "+kscfvGqo"
#define SNO_DEFOPER "+kscfvGq"
#define SNO_DEFUSER "+ks"
#define SEND_UMODES (SendUmodes)
@@ -355,10 +343,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define PROTO_VHP 0x0400 /* Send hostnames in NICKv2 even if not sethosted */
#define PROTO_SJB64 0x0800
#define PROTO_TKLEXT 0x1000 /* TKL extension: 10 parameters instead of 8 (3.2RC2) */
#define PROTO_NICKIP 0x2000 /* Send IP addresses in the NICK command */
#define PROTO_NAMESX 0x4000 /* Send all rights in NAMES output */
#define PROTO_CLK 0x8000 /* Send cloaked host in the NICK command (regardless of +x/-x) */
#define PROTO_UHNAMES 0x10000 /* Send n!u@h in NAMES */
/* note: client->proto is currently a 'short' (max is 0x8000) */
/*
* flags macros.
@@ -401,17 +386,16 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define IsDead(x) ((x)->flags & FLAGS_DEADSOCKET)
#define GotProtoctl(x) ((x)->flags & FLAGS_PROTOCTL)
#define IsBlocked(x) ((x)->flags & FLAGS_BLOCKED)
#define IsOutgoing(x) ((x)->flags & FLAGS_OUTGOING)
#define GotNetInfo(x) ((x)->flags & FLAGS_NETINFO)
#define SetNetInfo(x) ((x)->flags |= FLAGS_NETINFO)
#define IsCGIIRC(x) ((x)->flags & FLAGS_CGIIRC)
#define IsShunned(x) ((x)->flags & FLAGS_SHUNNED)
#define SetShunned(x) ((x)->flags |= FLAGS_SHUNNED)
#define ClearShunned(x) ((x)->flags &= ~FLAGS_SHUNNED)
#define IsVirus(x) ((x)->flags & FLAGS_VIRUS)
#define SetVirus(x) ((x)->flags |= FLAGS_VIRUS)
#define ClearVirus(x) ((x)->flags &= ~FLAGS_VIRUS)
#define ClearVirus(x) ((x)->flags |= FLAGS_VIRUS)
#ifdef USE_SSL
#define IsSecure(x) ((x)->flags & FLAGS_SSL)
#else
@@ -426,16 +410,10 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define IsZipStart(x) (0)
#endif
/* Fake lag exception */
#define IsNoFakeLag(x) ((x)->flags & FLAGS_NOFAKELAG)
#define SetNoFakeLag(x) ((x)->flags |= FLAGS_NOFAKELAG)
#define ClearNoFakeLag(x) ((x)->flags &= ~FLAGS_NOFAKELAG)
#define IsHybNotice(x) ((x)->flags & FLAGS_HYBNOTICE)
#define SetHybNotice(x) ((x)->flags |= FLAGS_HYBNOTICE)
#define ClearHybNotice(x) ((x)->flags &= ~FLAGS_HYBNOTICE)
#define IsHidden(x) ((x)->umodes & UMODE_HIDE)
#define IsSetHost(x) ((x)->umodes & UMODE_SETHOST)
#define IsHideOper(x) ((x)->umodes & UMODE_HIDEOPER)
#ifdef USE_SSL
#define IsSSL(x) IsSecure(x)
@@ -447,7 +425,6 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#endif
#define GetHost(x) (IsHidden(x) ? (x)->user->virthost : (x)->user->realhost)
#define GetIP(x) ((x->user && x->user->ip_str) ? x->user->ip_str : (MyConnect(x) ? Inet_ia2p(&x->ip) : NULL))
#define SetKillsF(x) ((x)->user->snomask |= SNO_KILLS)
#define SetClientF(x) ((x)->user->snomask |= SNO_CLIENT)
@@ -466,12 +443,8 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define DoingDNS(x) ((x)->flags & FLAGS_DOINGDNS)
#define SetAccess(x) ((x)->flags |= FLAGS_CHKACCESS); Debug((DEBUG_DEBUG, "SetAccess(%s)", (x)->name))
#define SetBlocked(x) ((x)->flags |= FLAGS_BLOCKED)
#define SetOutgoing(x) do { x->flags |= FLAGS_OUTGOING; } while(0)
#define SetCGIIRC(x) do { x->flags |= FLAGS_CGIIRC; } while(0)
#define DoingAuth(x) ((x)->flags & FLAGS_AUTH)
#define NoNewLine(x) ((x)->flags & FLAGS_NONL)
#define IsDCCNotice(x) ((x)->flags & FLAGS_DCCNOTICE)
#define SetDCCNotice(x) do { x->flags |= FLAGS_DCCNOTICE; } while(0)
#define SetRegNick(x) ((x)->umodes & UMODE_REGNICK)
#define SetHidden(x) ((x)->umodes |= UMODE_HIDE)
#define SetHideOper(x) ((x)->umodes |= UMODE_HIDEOPER)
@@ -505,27 +478,17 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
/*
* ProtoCtl options
*/
#ifndef DEBUGMODE
#define CHECKPROTO(x,y) ((x)->proto & y)
#else
#define CHECKPROTO(x,y) (checkprotoflags(x, y, __FILE__, __LINE__))
#endif
#define DontSendQuit(x) (CHECKPROTO(x, PROTO_NOQUIT))
#define IsToken(x) (CHECKPROTO(x, PROTO_TOKEN))
#define SupportSJOIN(x) (CHECKPROTO(x, PROTO_SJOIN))
#define SupportNICKv2(x) (CHECKPROTO(x, PROTO_NICKv2))
#define SupportNICKIP(x) (CHECKPROTO(x, PROTO_NICKIP))
#define SupportSJOIN2(x) (CHECKPROTO(x, PROTO_SJOIN2))
#define SupportUMODE2(x) (CHECKPROTO(x, PROTO_UMODE2))
#define SupportNS(x) (CHECKPROTO(x, PROTO_NS))
#define SupportVL(x) (CHECKPROTO(x, PROTO_VL))
#define SupportSJ3(x) (CHECKPROTO(x, PROTO_SJ3))
#define SupportVHP(x) (CHECKPROTO(x, PROTO_VHP))
#define SupportTKLEXT(x) (CHECKPROTO(x, PROTO_TKLEXT))
#define SupportNAMESX(x) (CHECKPROTO(x, PROTO_NAMESX))
#define SupportCLK(x) (CHECKPROTO(x, PROTO_CLK))
#define SupportUHNAMES(x) (CHECKPROTO(x, PROTO_UHNAMES))
#define DontSendQuit(x) ((x)->proto & PROTO_NOQUIT)
#define IsToken(x) ((x)->proto & PROTO_TOKEN)
#define SupportSJOIN(x) ((x)->proto & PROTO_SJOIN)
#define SupportNICKv2(x) ((x)->proto & PROTO_NICKv2)
#define SupportSJOIN2(x) ((x)->proto & PROTO_SJOIN2)
#define SupportUMODE2(x) ((x)->proto & PROTO_UMODE2)
#define SupportNS(x) ((x)->proto & PROTO_NS)
#define SupportVL(x) ((x)->proto & PROTO_VL)
#define SupportSJ3(x) ((x)->proto & PROTO_SJ3)
#define SupportVHP(x) ((x)->proto & PROTO_VHP)
#define SupportTKLEXT(x) ((x)->proto & PROTO_TKLEXT)
#define SetSJOIN(x) ((x)->proto |= PROTO_SJOIN)
#define SetNoQuit(x) ((x)->proto |= PROTO_NOQUIT)
@@ -538,9 +501,6 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define SetSJ3(x) ((x)->proto |= PROTO_SJ3)
#define SetVHP(x) ((x)->proto |= PROTO_VHP)
#define SetTKLEXT(x) ((x)->proto |= PROTO_TKLEXT)
#define SetNAMESX(x) ((x)->proto |= PROTO_NAMESX)
#define SetCLK(x) ((x)->proto |= PROTO_CLK)
#define SetUHNAMES(x) ((x)->proto |= PROTO_UHNAMES)
#define ClearSJOIN(x) ((x)->proto &= ~PROTO_SJOIN)
#define ClearNoQuit(x) ((x)->proto &= ~PROTO_NOQUIT)
@@ -572,7 +532,6 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define OFLAG_LNOTICE 0x00004000 /* Oper can send local serv notices */
#define OFLAG_GNOTICE 0x00008000 /* Oper can send global notices */
#define OFLAG_ADMIN 0x00010000 /* Admin */
/* 0x00020000 is free, previously addline */
#define OFLAG_ZLINE 0x00080000 /* Oper can use /zline and /unzline */
#define OFLAG_NETADMIN 0x00200000 /* netadmin gets +N */
#define OFLAG_COADMIN 0x00800000 /* co admin gets +C */
@@ -585,7 +544,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define OFLAG_UMODEQ 0x80000000 /* can set +q */
#define OFLAG_LOCAL (OFLAG_REHASH|OFLAG_HELPOP|OFLAG_GLOBOP|OFLAG_WALLOP|OFLAG_LOCOP|OFLAG_LROUTE|OFLAG_LKILL|OFLAG_KLINE|OFLAG_UNKLINE|OFLAG_LNOTICE)
#define OFLAG_GLOBAL (OFLAG_LOCAL|OFLAG_GROUTE|OFLAG_GKILL|OFLAG_GNOTICE)
#define OFLAG_ISGLOBAL (OFLAG_GROUTE|OFLAG_GKILL|OFLAG_GNOTICE|OFLAG_TKL|OFLAG_GZL|OFLAG_OVERRIDE)
#define OFLAG_ISGLOBAL (OFLAG_GROUTE|OFLAG_GKILL|OFLAG_GNOTICE)
#define OFLAG_NADMIN (OFLAG_NETADMIN | OFLAG_SADMIN | OFLAG_ADMIN | OFLAG_GLOBAL | OFLAG_UMODEQ | OFLAG_DCCDENY)
#define OFLAG_ADMIN_ (OFLAG_ADMIN | OFLAG_GLOBAL | OFLAG_DCCDENY)
#define OFLAG_COADMIN_ (OFLAG_COADMIN | OFLAG_GLOBAL | OFLAG_DCCDENY)
@@ -617,11 +576,6 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define OPIsNetAdmin(x) ((x)->oflag & OFLAG_NETADMIN)
#define OPIsCoAdmin(x) ((x)->oflag & OFLAG_COADMIN)
#define OPIsWhois(x) ((x)->oflag & OFLAG_WHOIS)
#ifdef SHOW_SECRET
#define OPCanSeeSecret(x) IsAnOper(x)
#else
#define OPCanSeeSecret(x) IsNetAdmin(x)
#endif
#define OPSetRehash(x) ((x)->oflag |= OFLAG_REHASH)
#define OPSetDie(x) ((x)->oflag |= OFLAG_DIE)
@@ -679,23 +633,12 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define DEBUG_MALLOC 9 /* malloc/free calls */
#define DEBUG_LIST 10 /* debug list use */
/* blah */
#define IsSkoAdmin(sptr) (IsAdmin(sptr) || IsNetAdmin(sptr) || IsSAdmin(sptr))
/* Dcc deny types (see src/s_extra.c) */
#define DCCDENY_HARD 0
#define DCCDENY_SOFT 1
/* Linked list dcc flags */
#define DCC_LINK_ME 1 /* My dcc allow */
#define DCC_LINK_REMOTE 2 /* I need to remove dccallows from these clients when I die */
struct irc_netmask
{
short int type;
struct IN_ADDR mask;
short int bits;
};
/*
* defines for curses in client
*/
#define DUMMY_TERM 0
#define CURSES_TERM 1
#define TERMCAP_TERM 2
struct FloodOpt {
unsigned short nmsg;
@@ -710,9 +653,7 @@ struct MotdItem {
struct aloopStruct {
unsigned do_garbage_collect : 1;
unsigned ircd_booted : 1;
unsigned do_bancheck : 1; /* perform *line bancheck? */
unsigned do_bancheck_spamf_user : 1; /* perform 'user' spamfilter bancheck */
unsigned do_bancheck_spamf_away : 1; /* perform 'away' spamfilter bancheck */
unsigned do_bancheck : 1;
unsigned ircd_rehashing : 1;
unsigned tainted : 1;
aClient *rehash_save_cptr, *rehash_save_sptr;
@@ -743,14 +684,12 @@ struct User {
Membership *channel; /* chain of channel pointer blocks */
Link *invited; /* chain of invite pointer blocks */
Link *silence; /* chain of silence pointer blocks */
Link *dccallow; /* chain of dccallowed entries */
char *away; /* pointer to away message */
u_int32_t servicestamp; /* Services' time stamp variable */
signed char refcnt; /* Number of times this block is referenced */
unsigned short joined; /* number of channels joined */
char username[USERLEN + 1];
char realhost[HOSTLEN + 1];
char cloakedhost[HOSTLEN + 1]; /* cloaked host (masked host for caching). NOT NECESSARILY THE SAME AS virthost. */
char *virthost;
char *server;
char *swhois; /* special whois thing */
@@ -760,7 +699,6 @@ struct User {
#ifdef LIST_DEBUG
aClient *bcptr;
#endif
char *ip_str; /* The IP in string form */
char *operlogin; /* Only used if person is/was opered, used for oper::maxlogins */
struct {
time_t nick_t;
@@ -770,10 +708,6 @@ struct User {
unsigned char away_c; /* number of times away has been set */
#endif
} flood;
#ifdef JOINTHROTTLE
aJFlood *jflood;
#endif
TS lastaway;
};
struct Server {
@@ -801,7 +735,6 @@ struct Server {
#define M_ALIAS 0x0020
#define M_RESETIDLE 0x0040
#define M_VIRUS 0x0080
#define M_ANNOUNCE 0x0100
/* tkl:
@@ -825,12 +758,6 @@ struct Server {
#define SPAMF_PART 0x0010 /* P */
#define SPAMF_QUIT 0x0020 /* q */
#define SPAMF_DCC 0x0040 /* d */
#define SPAMF_USER 0x0080 /* u */
#define SPAMF_AWAY 0x0100 /* a */
#define SPAMF_TOPIC 0x0200 /* t */
/* Other flags only for function calls: */
#define SPAMFLAG_NOWARN 0x0001
struct _spamfilter {
unsigned short action; /* see BAN_ACT* */
@@ -843,10 +770,7 @@ struct t_kline {
aTKline *prev, *next;
int type;
unsigned short subtype; /* subtype (currently spamfilter only), see SPAMF_* */
union {
Spamfilter *spamf;
struct irc_netmask *netmask;
} ptr;
Spamfilter *spamf;
char usermask[USERLEN + 3];
char *hostmask, *reason, *setby;
TS expire_at, set_at;
@@ -870,19 +794,19 @@ typedef struct ircstatsx {
int global_max; /* global max */
} ircstats;
extern MODVAR ircstats IRCstats;
extern ircstats IRCstats;
#include "modules.h"
extern MODVAR Umode *Usermode_Table;
extern MODVAR short Usermode_highest;
extern Umode *Usermode_Table;
extern short Usermode_highest;
extern MODVAR Snomask *Snomask_Table;
extern MODVAR short Snomask_highest;
extern Snomask *Snomask_Table;
extern short Snomask_highest;
#ifdef EXTCMODE
extern MODVAR Cmode *Channelmode_Table;
extern MODVAR unsigned short Channelmode_highest;
extern Cmode *Channelmode_Table;
extern unsigned short Channelmode_highest;
#endif
extern Umode *UmodeAdd(Module *module, char ch, int options, int (*allowed)(aClient *sptr, int what), long *mode);
@@ -896,15 +820,12 @@ extern Cmode *CmodeAdd(Module *reserved, CmodeInfo req, Cmode_t *mode);
extern void CmodeDel(Cmode *cmode);
#endif
typedef struct {
unsigned short num;
unsigned short t;
} aModejEntry;
#define LISTENER_NORMAL 0x000001
#define LISTENER_CLIENTSONLY 0x000002
#define LISTENER_SERVERSONLY 0x000004
#define LISTENER_REMOTEADMIN 0x000008
#define LISTENER_JAVACLIENT 0x000010
#define LISTENER_MASK 0x000020
#define LISTENER_SSL 0x000040
#define LISTENER_BOUND 0x000080
@@ -958,19 +879,15 @@ struct Client {
#ifdef NOSPOOF
u_int32_t nospoof; /* Anti-spoofing random number */
#endif
int proto; /* ProtoCtl options */
short proto; /* ProtoCtl options */
long sendM; /* Statistics: protocol messages send */
long sendK; /* Statistics: total k-bytes send */
long receiveM; /* Statistics: protocol messages received */
#ifdef ZIP_LINKS
struct Zdata *zip; /* zip data */
#elif defined(_WIN32)
void *zip_NOTUSED; /* (win32 binary compatability) */
#endif
#ifdef USE_SSL
SSL *ssl;
#elif defined(_WIN32)
void *ssl_NOTUSED; /* (win32 binary compatability) */
#endif
#ifndef NO_FDLIST
long lastrecvM; /* to check for activity --Mika */
@@ -980,7 +897,7 @@ struct Client {
u_short sendB; /* counters to count upto 1-k lots of bytes */
u_short receiveB; /* sent and received. */
aClient *listener;
ConfigItem_class *cclass; /* Configuration record associated */
ConfigItem_class *class; /* Configuration record associated */
int authfd; /* fd for rfc931 authentication */
short slot; /* my offset in the local fd table */
struct IN_ADDR ip; /* keep real ip# too */
@@ -1074,7 +991,6 @@ struct _configflag_tld
#define BAN_ACT_BLOCK 8
#define BAN_ACT_DCCBLOCK 9
#define BAN_ACT_VIRUSCHAN 10
#define BAN_ACT_WARN 11
#define CRULE_ALL 0
@@ -1100,20 +1016,12 @@ struct _configitem_admin {
ConfigFlag flag;
char *line;
};
#ifdef FAKELAG_CONFIGURABLE
#define CLASS_OPT_NOFAKELAG 0x1
#endif
#define CLASS_OPT_NOTARGETLAG 0x2
struct _configitem_class {
ConfigItem *prev, *next;
ConfigFlag flag;
char *name;
int pingfreq, connfreq, maxclients, sendq, recvq, clients;
int xrefcount; /* EXTRA reference count, 'clients' also acts as a reference count but
* link blocks also refer to classes so a 2nd ref. count was needed.
*/
unsigned int options;
};
struct _configflag_allow {
@@ -1121,7 +1029,6 @@ struct _configflag_allow {
unsigned useip :1;
unsigned ssl :1;
unsigned nopasscont :1;
unsigned wrongpasscont :1;
};
struct _configitem_allow {
@@ -1131,8 +1038,7 @@ struct _configitem_allow {
anAuthStruct *auth;
unsigned short maxperip;
int port;
ConfigItem_class *cclass;
struct irc_netmask *netmask;
ConfigItem_class *class;
ConfigFlag_allow flags;
};
@@ -1141,9 +1047,8 @@ struct _configitem_oper {
ConfigFlag flag;
char *name, *swhois, *snomask;
anAuthStruct *auth;
ConfigItem_class *cclass;
ConfigItem_class *class;
ConfigItem *from;
unsigned long modes;
long oflags;
int maxlogins;
};
@@ -1152,7 +1057,6 @@ struct _configitem_oper_from {
ConfigItem *prev, *next;
ConfigFlag flag;
char *name;
struct irc_netmask *netmask;
};
struct _configitem_drpass {
@@ -1172,10 +1076,9 @@ struct _configitem_ulines {
struct _configitem_tld {
ConfigItem *prev, *next;
ConfigFlag_tld flag;
char *mask, *motd_file, *rules_file, *smotd_file;
char *botmotd_file, *opermotd_file, *channel;
char *mask, *motd_file, *rules_file, *smotd_file, *channel;
struct tm motd_tm, smotd_tm;
aMotd *rules, *motd, *smotd, *botmotd, *opermotd;
aMotd *rules, *motd, *smotd;
u_short options;
};
@@ -1204,60 +1107,41 @@ struct _configitem_link {
u_short port, options;
unsigned char leafdepth;
int refcount;
ConfigItem_class *cclass;
ConfigItem_class *class;
struct IN_ADDR ipnum;
time_t hold;
#ifdef USE_SSL
char *ciphers;
#elif defined(_WIN32)
void *ciphers_NOTUSED;
#endif
#ifdef ZIP_LINKS
int compression_level;
#endif
};
typedef enum {
CGIIRC_PASS=1, CGIIRC_WEBIRC=2
} CGIIRCType;
struct _configitem_cgiirc {
ConfigItem *prev, *next;
ConfigFlag flag;
CGIIRCType type;
char *username;
char *hostname;
anAuthStruct *auth;
};
struct _configitem_except {
ConfigItem *prev, *next;
ConfigFlag_except flag;
int type;
char *mask;
struct irc_netmask *netmask;
};
struct _configitem_ban {
ConfigItem *prev, *next;
ConfigFlag_ban flag;
char *mask, *reason;
struct irc_netmask *netmask;
struct IN_ADDR netmask;
int bits;
short masktype;
unsigned short action;
};
typedef struct _iplist IPList;
struct _iplist {
IPList *prev, *next;
char *mask;
/* struct irc_netmask *netmask; */
};
#ifdef FAST_BADWORD_REPLACE
#define BADW_TYPE_INVALID 0x0
#define BADW_TYPE_FAST 0x1
#define BADW_TYPE_FAST_L 0x2
#define BADW_TYPE_FAST_R 0x4
#define BADW_TYPE_REGEX 0x8
#endif
#define BADWORD_REPLACE 1
#define BADWORD_BLOCK 2
@@ -1266,7 +1150,9 @@ struct _configitem_badword {
ConfigItem *prev, *next;
ConfigFlag flag;
char *word, *replace;
#ifdef FAST_BADWORD_REPLACE
unsigned short type;
#endif
char action;
regex_t expr;
};
@@ -1302,19 +1188,12 @@ struct _configitem_allow_channel {
char *channel;
};
struct _configitem_allow_dcc {
ConfigItem *prev, *next;
ConfigFlag_ban flag;
char *filename;
};
struct _configitem_log {
ConfigItem *prev, *next;
ConfigFlag flag;
char *file;
long maxsize;
int flags;
int logfd;
};
struct _configitem_unknown {
@@ -1332,25 +1211,24 @@ struct _configitem_unknown_ext {
ConfigEntry *ce_entries;
};
typedef enum {
ALIAS_SERVICES=1, ALIAS_STATS, ALIAS_NORMAL, ALIAS_COMMAND, ALIAS_CHANNEL, ALIAS_REAL
} AliasType;
#define ALIAS_SERVICES 1
#define ALIAS_STATS 2
#define ALIAS_NORMAL 3
#define ALIAS_COMMAND 4
struct _configitem_alias {
ConfigItem *prev, *next;
ConfigFlag flag;
ConfigItem_alias_format *format;
char *alias, *nick;
AliasType type;
unsigned int spamfilter:1;
short type;
};
struct _configitem_alias_format {
ConfigItem *prev, *next;
ConfigFlag flag;
char *nick;
AliasType type;
short type;
char *format, *parameters;
regex_t expr;
};
@@ -1367,7 +1245,6 @@ struct _configitem_include {
#ifdef USE_LIBCURL
char *url;
char *errorbuf;
char *bind_ip;
#endif
};
@@ -1453,22 +1330,36 @@ struct ListOptions {
#define NUMFLD 6 /* 6 flood types */
/* Number of maximum paramter modes to allow.
* Don't set it unnecessarily high.. we only use k, l, L, j and f at the moment. (FIXME)
*/
#define MAXPARAMMODES 12
struct SRemoveFld {
struct SRemoveFld *prev, *next;
aChannel *chptr;
char m; /* mode to be removed */
time_t when; /* scheduled at */
};
struct SChanFloodProt {
unsigned short per; /* setting: per <XX> seconds */
time_t t[NUMFLD]; /* runtime: timers */
unsigned short c[NUMFLD]; /* runtime: counters */
unsigned short l[NUMFLD]; /* setting: limit */
unsigned char a[NUMFLD]; /* setting: action */
unsigned char r[NUMFLD]; /* setting: remove-after <this> minutes */
unsigned long timer_flags; /* if a "-m timer" is running this is & MODE_MODERATED etc.. */
};
/* mode structure for channels */
struct SMode {
long mode;
#ifdef EXTCMODE
Cmode_t extmode;
void *extmodeparams[MAXPARAMMODES+1];
CmodeParam *extmodeparam;
#endif
int limit;
char key[KEYLEN + 1];
char link[LINKLEN + 1];
#if 0
#ifdef NEWCHFLOODPROT
ChanFloodProt *floodprot;
#else
/* x:y */
unsigned short msgs; /* x */
unsigned short per; /* y */
@@ -1524,10 +1415,6 @@ struct Channel {
Link *invites;
Ban *banlist;
Ban *exlist; /* exceptions */
Ban *invexlist; /* invite list */
#ifdef JOINTHROTTLE
aJFlood *jflood;
#endif
char chname[1];
};
@@ -1592,9 +1479,8 @@ struct liststruct {
#define CHFL_BAN 0x0020 /* ban channel flag */
#define CHFL_CHANOWNER 0x0040 /* channel owner */
#define CHFL_CHANPROT 0x0080 /* chan op protection */
#define CHFL_HALFOP 0x0100 /* halfop */
#define CHFL_EXCEPT 0x0200 /* phase this out ? +e */
#define CHFL_INVEX 0x0400 /* invite exception */
#define CHFL_HALFOP 0x0100 /* halfop */
#define CHFL_EXCEPT 0x0200 /* phase this out ? +e */
#define CHFL_OVERLAP (CHFL_CHANOWNER|CHFL_CHANPROT|CHFL_CHANOP|CHFL_VOICE|CHFL_HALFOP)
@@ -1603,29 +1489,33 @@ struct liststruct {
#define MODE_CHANOP CHFL_CHANOP
#define MODE_VOICE CHFL_VOICE
#define MODE_PRIVATE 0x0004
#define MODE_SECRET 0x0008
#define MODE_SECRET 0x0008
#define MODE_MODERATED 0x0010
#define MODE_TOPICLIMIT 0x0020
#define MODE_CHANOWNER 0x0040
#define MODE_CHANPROT 0x0080
#define MODE_HALFOP 0x0100
#define MODE_EXCEPT 0x0200
#define MODE_BAN 0x0400
#define MODE_HALFOP 0x0100
#define MODE_EXCEPT 0x0200
#define MODE_BAN 0x0400
#define MODE_INVITEONLY 0x0800
#define MODE_NOPRIVMSGS 0x1000
#define MODE_KEY 0x2000
#define MODE_LIMIT 0x4000
#define MODE_RGSTR 0x8000
#define MODE_RGSTRONLY 0x10000
#define MODE_LINK 0x20000
#define MODE_KEY 0x2000
#define MODE_LIMIT 0x4000
#define MODE_RGSTR 0x8000
#define MODE_RGSTRONLY 0x10000
#define MODE_LINK 0x20000
#define MODE_NOCOLOR 0x40000
#define MODE_OPERONLY 0x80000
#define MODE_ADMONLY 0x100000
#define MODE_NOKICKS 0x200000
#define MODE_STRIP 0x400000
#define MODE_NOKNOCK 0x800000
#define MODE_NOINVITE 0x1000000
#define MODE_FLOODLIMIT 0x2000000
#define MODE_MODREG 0x4000000
#define MODE_INVEX 0x8000000
#ifdef STRIPBADWORDS
#define MODE_STRIPBADWORDS 0x8000000
#endif
#define MODE_NOCTCP 0x10000000
#define MODE_AUDITORIUM 0x20000000
#define MODE_ONLYSECURE 0x40000000
@@ -1635,7 +1525,7 @@ struct liststruct {
/*
* mode flags which take another parameter (With PARAmeterS)
*/
#define MODE_WPARAS (MODE_HALFOP|MODE_CHANOP|MODE_VOICE|MODE_CHANOWNER|MODE_CHANPROT|MODE_BAN|MODE_KEY|MODE_LINK|MODE_LIMIT|MODE_EXCEPT|MODE_INVEX)
#define MODE_WPARAS (MODE_HALFOP|MODE_CHANOP|MODE_VOICE|MODE_CHANOWNER|MODE_CHANPROT|MODE_BAN|MODE_KEY|MODE_LINK|MODE_LIMIT|MODE_EXCEPT)
/*
* Undefined here, these are used in conjunction with the above modes in
* the source.
@@ -1663,15 +1553,14 @@ struct liststruct {
#define BadPtr(x) (!(x) || (*(x) == '\0'))
/** Is valid character in nick? [not for external usage, use do_check_nickname instead!] */
#define isvalid(c) (char_atribs[(u_char)(c)]&ALLOWN)
#define isvalid(c) (((c) >= 'A' && (c) <= '~') || isdigit(c) || (c) == '-')
/* remote fds are set to -256, else its a local fd (a local fd
* can get -1 or -2 in case it has been closed). -- Syzop
*/
#define MyConnect(x) ((x)->fd != -256)
#define MyClient(x) (MyConnect(x) && IsClient(x))
#define MyOper(x) (MyConnect(x) && IsAnOper(x))
#define MyOper(x) (MyConnect(x) && IsOper(x))
#ifdef CLEAN_COMPILE
#define TStime() (time(NULL) + TSoffset)
@@ -1718,23 +1607,20 @@ struct liststruct {
/* misc variable externs */
extern MODVAR char *version, *infotext[], *dalinfotext[], *unrealcredits[];
extern MODVAR char *generation, *creation;
extern MODVAR char *gnulicense[];
extern char *version, *infotext[], *dalinfotext[], *unrealcredits[];
extern char *generation, *creation;
extern char *gnulicense[];
/* misc defines */
#define FLUSH_BUFFER -2
#define COMMA ","
#define PARTFMT ":%s PART %s"
#define PARTFMT2 ":%s PART %s :%s"
#ifdef USE_SSL
#include "ssl.h"
#endif
#define EVENT_HASHES EVENT_DRUGS
#include "events.h"
struct IRCCommand {
struct Command {
aCommand *prev, *next;
char *cmd;
int (*func) ();
@@ -1743,7 +1629,7 @@ struct IRCCommand {
unsigned parameters : 5;
unsigned long bytes;
Module *owner;
aCommand *partner; /* cmd if token, token if cmd */
aCommand *friend; /* cmd if token, token if cmd */
Cmdoverride *overriders;
Cmdoverride *overridetail;
#ifdef DEBUGMODE
@@ -1759,6 +1645,8 @@ struct _cmdoverride {
int (*func)();
};
#ifdef THROTTLING
struct ThrottlingBucket
{
struct ThrottlingBucket *prev, *next;
@@ -1774,55 +1662,24 @@ typedef struct {
unsigned parameters : 1;
} aCtab;
#ifdef JOINTHROTTLE
/** A jointhrottle item, this is a double linked list.
* prev_u Previous entry of user
* next_u Next entry of user
* prev_c Previous entry of channel
* next_c Next entry of channel
* chptr The channel this entry applies to
* cptr The user this entry applies to
* firstjoin Timestamp of "first join" (since last timer reset)
* numjoin Number of joins since that period
* CLARIFICATION:
* Why a double linked list? Well, the following operations need to be performed:
* - if user quits, entry must be removed
* - if channel is destroyed, entry must be removed
* (and of course, more, but these are the most important ones affecting this decision)
* While it would be possible to have a linked list only by user (for example),
* that would mean that upon channel destroy ALL entries would have to be searched
* trough, which might mean for example 800*8=6400 entries in a peak situation
* (such as after a server restart and hundreds of clients connecting&joining).
* For obvious reasons, that would be a very bad idea :).
* So this costs us 2 pointers (8b on ia32) per entry, but in case of channel destroy
* it means we only have for example 20 entries to scan trough rather than 2000.
* Worth the extra memory :). -- Syzop
* Note that in normal situations it won't be that bad since we will try to
* regulary free up some entries.
*/
struct JFlood {
aJFlood *prev_u, *next_u;
aJFlood *prev_c, *next_c;
aChannel *chptr;
aClient *cptr;
time_t firstjoin;
unsigned short numjoins;
};
#endif
void init_throttling_hash();
int hash_throttling(struct IN_ADDR *in);
struct ThrottlingBucket *find_throttling_bucket(struct IN_ADDR *in);
void add_throttling_bucket(struct IN_ADDR *in);
void del_throttling_bucket(struct ThrottlingBucket *bucket);
int throttle_can_connect(aClient *, struct IN_ADDR *in);
int throttle_can_connect(struct IN_ADDR *in);
#endif
#define VERIFY_OPERCOUNT(clnt,tag) { if (IRCstats.operators < 0) verify_opercount(clnt,tag); } while(0)
#define MARK_AS_OFFICIAL_MODULE(modinf) do { if (modinf && modinf->handle) ModuleSetOptions(modinfo->handle, MOD_OPT_OFFICIAL); } while(0)
/* old.. please don't use anymore */
#define CHANOPPFX "@"
#ifdef PREFIX_AQ
#define CHANOPPFX "~&@"
#else
#define CHANOPPFX "@"
#endif
/* used for is_banned type field: */
#define BANCHK_JOIN 0 /* checking if a ban forbids the person from joining */
+4 -25
View File
@@ -21,25 +21,6 @@
#ifndef __sys_include__
#define __sys_include__
/* alloca stuff */
#ifdef _WIN32
# include <malloc.h>
# define alloca _alloca
#else /* _WIN32 */
# ifdef HAVE_ALLOCA
# if defined(_AIX) && !defined(__GNUC__)
#pragma alloca
# endif /* _AIX */
# if defined(HAVE_ALLOCA_H)
# include <alloca.h>
# endif /* HAVE_ALLOCA_H */
# if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) && !defined(alloca)
# define alloca __builtin_alloca
# endif /* __GNUC__ */
# endif /* HAVE_ALLOCA */
#endif /* !_WIN32 */
#ifdef ISC202
#include <net/errno.h>
#else
@@ -143,9 +124,9 @@ typedef unsigned long u_long;
typedef unsigned int u_int;
#endif
#ifdef _WIN32
#define MYOSNAME OSName
extern char OSName[256];
#ifdef _WIN32
#define PATH_MAX MAX_PATH
#endif
#ifdef DEBUGMODE
@@ -161,9 +142,6 @@ typedef unsigned short u_int16_t;
* IPv4 or IPv6 structures?
*/
# define MYDUMMY_SIZE 128
#ifdef INET6
# define AND16(x) ((x)[0]&(x)[1]&(x)[2]&(x)[3]&(x)[4]&(x)[5]&(x)[6]&(x)[7]&(x)[8]&(x)[9]&(x)[10]&(x)[11]&(x)[12]&(x)[13]&(x)[14]&(x)[15])
@@ -182,6 +160,7 @@ typedef unsigned short u_int16_t;
//# define uint32_t __u32
// # endif
# define MYDUMMY_SIZE 128
char mydummy[MYDUMMY_SIZE];
char mydummy2[MYDUMMY_SIZE];
@@ -191,7 +170,7 @@ char mydummy2[MYDUMMY_SIZE];
# endif
# endif
# if defined(linux) && defined(NO_IN6ADDR_ANY)
# if defined(linux)
static const struct in6_addr in6addr_any = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0
};
@@ -253,7 +232,7 @@ static const struct in6_addr in6addr_any = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
#define CLOSE_SOCK(fd) closesocket(fd)
#define IOCTL(x, y, z) ioctlsocket((x), (y), (z))
#define ERRNO WSAGetLastError()
#define STRERROR(x) sock_strerror(x)
#define STRERROR(x) nt_strerror(x)
#define SET_ERRNO(x) WSASetLastError(x)
/* Error constant portability */
#define P_EMFILE WSAEMFILE
+1 -17
View File
@@ -1,5 +1,5 @@
/*
* Unreal Internet Relay Chat Daemon, include/types.h
* Unreal Internet Relay Chat Daemon, src/url.c
* (C) 2003 The UnrealIRCd Team
*
* This program is free software; you can redistribute it and/or modify
@@ -24,20 +24,4 @@ typedef void (*vFP)(); /* Void function pointer */
typedef int (*iFP)(); /* Integer function pointer */
typedef char (*cFP)(); /* char * function pointer */
#ifndef MODVAR
#if defined(MODULE_COMPILE) && defined(_WIN32)
#define MODVAR __declspec(dllimport)
#else
#define MODVAR
#endif
#endif
#ifndef MODFUNC
#ifdef _WIN32
#define MODFUNC __declspec(dllexport)
#else
#define MODFUNC
#endif
#endif
#endif
+6 -7
View File
@@ -1,12 +1,11 @@
#ifndef URL_H
#define URL_H
#include "types.h"
int MODFUNC url_is_valid(char *);
char MODFUNC *url_getfilename(char *);
char MODFUNC *download_file(char *, char **, char *);
void MODFUNC download_file_async(char *, time_t, vFP, char *);
void MODFUNC url_do_transfers_async(void);
void MODFUNC url_init(void);
int url_is_valid(char *);
char *url_getfilename(char *);
char *download_file(char *, char **);
void download_file_async(char *, time_t, vFP);
void url_do_transfers_async(void);
void url_init(void);
#endif
+5 -27
View File
@@ -23,35 +23,13 @@
#endif
/**/
#define COMPILEINFO DEBUGMODESET DEBUGSET
/* Version info follows, current: Unreal3.2.3
* Please be sure to update ALL fields when changing the version.
* Also don't forget to bump the protocol version every release.
/*
* Version Unreal3.2
*/
/** These UNREAL_VERSION_* macros can be used so (3rd party) modules
* can easily distinguish versions.
*/
/** The generation version number (eg: 3 for Unreal3*) */
#define UNREAL_VERSION_GENERATION 3
/** The major version number (eg: 3 for Unreal3.2*) */
#define UNREAL_VERSION_MAJOR 3
/** The minor version number (eg: 1 for Unreal3.2.1), negative numbers for unstable/alpha/beta */
#define UNREAL_VERSION_MINOR -99
/** Year + week of the year (with Monday as first day of the week).
* Can be useful if the above 3 versionids are insufficient for you (eg: you want to support CVS).
* This is updated automatically on the CVS server every Monday. so don't touch it.
*/
#define UNREAL_VERSION_TIME 200631
#define UnrealProtocol 2308
#define UnrealProtocol 2303
#define PATCH1 "3"
#define PATCH2 ".3"
#define PATCH3 "-willneverbereleased"
#define PATCH2 ".2"
#define PATCH3 ""
#define PATCH4 ""
#define PATCH5 ""
#define PATCH6 ""
-189
View File
@@ -1,189 +0,0 @@
/* $Id$ */
/* Copyright 1998 by the Massachusetts Institute of Technology.
*
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
* fee is hereby granted, provided that the above copyright
* notice appear in all copies and that both that copyright
* notice and this permission notice appear in supporting
* documentation, and that the name of M.I.T. not be used in
* advertising or publicity pertaining to distribution of the
* software without specific, written prior permission.
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is"
* without express or implied warranty.
*/
#ifndef ARES__H
#define ARES__H
#include <sys/types.h>
#if defined(_AIX) || defined(NETWARE)
/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
libc5-based Linux systems. Only include it on system that are known to
require it! */
#include <sys/select.h>
#endif
#if defined(WATT32)
#include <netinet/in.h>
#include <sys/socket.h>
#include <tcp.h>
#elif defined(WIN32)
#include <winsock.h>
#include <windows.h>
#else
#include <netinet/in.h>
#include <sys/socket.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define ARES_SUCCESS 0
/* Server error codes (ARES_ENODATA indicates no relevant answer) */
#define ARES_ENODATA 1
#define ARES_EFORMERR 2
#define ARES_ESERVFAIL 3
#define ARES_ENOTFOUND 4
#define ARES_ENOTIMP 5
#define ARES_EREFUSED 6
/* Locally generated error codes */
#define ARES_EBADQUERY 7
#define ARES_EBADNAME 8
#define ARES_EBADFAMILY 9
#define ARES_EBADRESP 10
#define ARES_ECONNREFUSED 11
#define ARES_ETIMEOUT 12
#define ARES_EOF 13
#define ARES_EFILE 14
#define ARES_ENOMEM 15
#define ARES_EDESTRUCTION 16
#define ARES_EBADSTR 17
/* ares_getnameinfo error codes */
#define ARES_EBADFLAGS 18
/* Flag values */
#define ARES_FLAG_USEVC (1 << 0)
#define ARES_FLAG_PRIMARY (1 << 1)
#define ARES_FLAG_IGNTC (1 << 2)
#define ARES_FLAG_NORECURSE (1 << 3)
#define ARES_FLAG_STAYOPEN (1 << 4)
#define ARES_FLAG_NOSEARCH (1 << 5)
#define ARES_FLAG_NOALIASES (1 << 6)
#define ARES_FLAG_NOCHECKRESP (1 << 7)
/* Option mask values */
#define ARES_OPT_FLAGS (1 << 0)
#define ARES_OPT_TIMEOUT (1 << 1)
#define ARES_OPT_TRIES (1 << 2)
#define ARES_OPT_NDOTS (1 << 3)
#define ARES_OPT_UDP_PORT (1 << 4)
#define ARES_OPT_TCP_PORT (1 << 5)
#define ARES_OPT_SERVERS (1 << 6)
#define ARES_OPT_DOMAINS (1 << 7)
#define ARES_OPT_LOOKUPS (1 << 8)
/* Nameinfo flag values */
#define ARES_NI_NOFQDN (1 << 0)
#define ARES_NI_NUMERICHOST (1 << 1)
#define ARES_NI_NAMEREQD (1 << 2)
#define ARES_NI_NUMERICSERV (1 << 3)
#define ARES_NI_DGRAM (1 << 4)
#define ARES_NI_TCP 0
#define ARES_NI_UDP ARES_NI_DGRAM
#define ARES_NI_SCTP (1 << 5)
#define ARES_NI_DCCP (1 << 6)
#define ARES_NI_NUMERICSCOPE (1 << 7)
#define ARES_NI_LOOKUPHOST (1 << 8)
#define ARES_NI_LOOKUPSERVICE (1 << 9)
/* Reserved for future use */
#define ARES_NI_IDN (1 << 10)
#define ARES_NI_ALLOW_UNASSIGNED (1 << 11)
#define ARES_NI_USE_STD3_ASCII_RULES (1 << 12)
struct ares_options {
int flags;
int timeout;
int tries;
int ndots;
unsigned short udp_port;
unsigned short tcp_port;
struct in_addr *servers;
int nservers;
char **domains;
int ndomains;
char *lookups;
};
/** Public available config (readonly) interface for ares_get_config(). */
struct ares_config_info {
int timeout;
int tries;
int numservers;
char **servers;
};
struct hostent;
struct timeval;
struct sockaddr;
struct ares_channeldata;
typedef struct ares_channeldata *ares_channel;
typedef void (*ares_callback)(void *arg, int status, unsigned char *abuf,
int alen);
typedef void (*ares_host_callback)(void *arg, int status,
struct hostent *hostent);
typedef void (*ares_nameinfo_callback)(void *arg, int status,
char *node, char *service);
int ares_init(ares_channel *channelptr);
int ares_init_options(ares_channel *channelptr, struct ares_options *options,
int optmask);
void ares_destroy(ares_channel channel);
void ares_cancel(ares_channel channel);
void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen,
ares_callback callback, void *arg);
void ares_query(ares_channel channel, const char *name, int dnsclass,
int type, ares_callback callback, void *arg);
void ares_search(ares_channel channel, const char *name, int dnsclass,
int type, ares_callback callback, void *arg);
void ares_gethostbyname(ares_channel channel, const char *name, int family,
ares_host_callback callback, void *arg);
void ares_gethostbyaddr(ares_channel channel, const void *addr, int addrlen,
int family, ares_host_callback callback, void *arg);
void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa,
socklen_t salen, int flags, ares_nameinfo_callback callback,
void *arg);
int ares_fds(ares_channel channel, fd_set *read_fds, fd_set *write_fds);
struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv,
struct timeval *tv);
void ares_process(ares_channel channel, fd_set *read_fds, fd_set *write_fds);
int ares_mkquery(const char *name, int dnsclass, int type, unsigned short id,
int rd, unsigned char **buf, int *buflen);
int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf,
int alen, char **s, long *enclen);
int ares_expand_string(const unsigned char *encoded, const unsigned char *abuf,
int alen, unsigned char **s, long *enclen);
int ares_parse_a_reply(const unsigned char *abuf, int alen,
struct hostent **host);
int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
struct hostent **host);
int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
int addrlen, int family, struct hostent **host);
void ares_free_string(void *str);
void ares_free_hostent(struct hostent *host);
const char *ares_strerror(int code);
int ares_get_config(struct ares_config_info *d, ares_channel c);
#ifdef __cplusplus
}
#endif
#endif /* ARES__H */
-17
View File
@@ -1,17 +0,0 @@
/* $Id$ */
#ifndef ARES__VERSION_H
#define ARES__VERSION_H
#define ARES_VERSION_MAJOR 1
#define ARES_VERSION_MINOR 3
#define ARES_VERSION_PATCH 0
#define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
(ARES_VERSION_MINOR<<8)|\
(ARES_VERSION_PATCH))
#define ARES_VERSION_STR "1.3.0"
const char *ares_version(int *version);
#endif
-82
View File
@@ -1,82 +0,0 @@
#ifndef ARES_SETUP_H
#define ARES_SETUP_H
/* Copyright (C) 2004 - 2005 by Daniel Stenberg et al
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of M.I.T. not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. M.I.T. makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#else
/* simple work-around for now, for systems without configure support */
#define ssize_t int
#define socklen_t int
#endif
/* Recent autoconf versions define these symbols in config.h. We don't want
them (since they collide with the libcurl ones when we build
--enable-debug) so we undef them again here. */
#undef PACKAGE_STRING
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
#undef VERSION
#undef PACKAGE
/* now typedef our socket type */
#if defined(WIN32) && !defined(WATT32)
#include <winsock.h>
typedef SOCKET ares_socket_t;
#define ARES_SOCKET_BAD INVALID_SOCKET
#else
typedef int ares_socket_t;
#define ARES_SOCKET_BAD -1
#endif
/* Assume a few thing unless they're set by configure
*/
#if !defined(HAVE_SYS_TIME_H) && !defined(_MSC_VER)
#define HAVE_SYS_TIME_H
#endif
#if !defined(HAVE_UNISTD_H) && !defined(_MSC_VER)
#define HAVE_UNISTD_H 1
#endif
#if !defined(HAVE_SYS_UIO_H) && !defined(WIN32) && !defined(MSDOS)
#define HAVE_SYS_UIO_H
#endif
#if (defined(WIN32) || defined(WATT32)) && \
!(defined(__MINGW32__) || defined(NETWARE))
/* protos for the functions we provide in windows_port.c */
int ares_strncasecmp(const char *s1, const char *s2, int n);
int ares_strcasecmp(const char *s1, const char *s2);
/* use this define magic to prevent us from adding symbol names to the library
that is a high-risk to collide with another libraries' attempts to do the
same */
#define strncasecmp(a,b,c) ares_strncasecmp(a,b,c)
#define strcasecmp(a,b) ares_strcasecmp(a,b)
#endif
/* IPv6 compatibility */
#if !defined(HAVE_AF_INET6)
#if defined(HAVE_PF_INET6)
#define AF_INET6 PF_INET6
#else
#define AF_INET6 AF_MAX+1
#endif
#endif
#endif /* ARES_SETUP_H */
+34 -93
View File
@@ -1,7 +1,7 @@
/*
regex.h - POSIX.2 compatible regexp interface and TRE extensions
Copyright (C) 2001-2004 Ville Laurikari <vl@iki.fi>.
Copyright (C) 2001-2003 Ville Laurikari <vl@iki.fi>.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 (June
@@ -27,10 +27,6 @@
#include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */
#ifdef HAVE_LIBUTF8_H
#include <libutf8.h>
#endif /* HAVE_LIBUTF8_H */
#ifdef TRE_USE_SYSTEM_REGEX_H
/* Include the system regex.h to make TRE ABI compatible with the
system regex. */
@@ -51,17 +47,6 @@ extern "C" {
typedef int reg_errcode_t;
#endif /* !HAVE_REG_ERRCODE_T */
#if !defined(REG_NOSPEC) && !defined(REG_LITERAL)
#define REG_LITERAL 0x1000
#endif
/* Extra regcomp() flags. */
#define REG_RIGHT_ASSOC (REG_LITERAL << 1)
/* Extra regexec() flags. */
#define REG_APPROX_MATCHER 0x1000
#define REG_BACKTRACKING_MATCHER (REG_APPROX_MATCHER << 1)
#else /* !TRE_USE_SYSTEM_REGEX_H */
/* If the we're not using system regex.h, we need to define the
@@ -70,7 +55,7 @@ typedef int reg_errcode_t;
typedef int regoff_t;
typedef struct {
size_t re_nsub; /* Number of parenthesized subexpressions. */
void *value; /* For internal use only. */
void *value; /* For internal use only. */
} regex_t;
typedef struct {
@@ -80,50 +65,45 @@ typedef struct {
typedef enum {
REG_OK = 0, /* No error. */
REG_OK = 0, /* No error. */
/* POSIX regcomp() return error codes. (In the order listed in the
standard.) */
REG_NOMATCH, /* No match. */
REG_BADPAT, /* Invalid regexp. */
REG_ECOLLATE, /* Unknown collating element. */
REG_ECTYPE, /* Unknown character class name. */
REG_EESCAPE, /* Trailing backslash. */
REG_ESUBREG, /* Invalid back reference. */
REG_EBRACK, /* "[]" imbalance */
REG_EPAREN, /* "\(\)" or "()" imbalance */
REG_EBRACE, /* "\{\}" or "{}" imbalance */
REG_BADBR, /* Invalid content of {} */
REG_ERANGE, /* Invalid use of range operator */
REG_ESPACE, /* Out of memory. */
standard.) */
REG_NOMATCH, /* No match. */
REG_BADPAT, /* Invalid regexp. */
REG_ECOLLATE, /* Unknown collating element. */
REG_ECTYPE, /* Unknown character class name. */
REG_EESCAPE, /* Trailing backslash. */
REG_ESUBREG, /* Invalid back reference. */
REG_EBRACK, /* "[]" imbalance */
REG_EPAREN, /* "\(\)" or "()" imbalance */
REG_EBRACE, /* "\{\}" or "{}" imbalance */
REG_BADBR, /* Invalid content of {} */
REG_ERANGE, /* Invalid use of range operator */
REG_ESPACE, /* Out of memory. */
REG_BADRPT
} reg_errcode_t;
/* POSIX regcomp() flags. */
#define REG_EXTENDED 1
#define REG_ICASE (REG_EXTENDED << 1)
#define REG_NEWLINE (REG_ICASE << 1)
#define REG_NOSUB (REG_NEWLINE << 1)
#define REG_EXTENDED 1
#define REG_ICASE (REG_EXTENDED << 1)
#define REG_NEWLINE (REG_ICASE << 1)
#define REG_NOSUB (REG_NEWLINE << 1)
/* Extra regcomp() flags. */
#define REG_BASIC 0
#define REG_LITERAL (REG_NOSUB << 1)
#define REG_RIGHT_ASSOC (REG_LITERAL << 1)
#define REG_BASIC 0
#define REG_LITERAL (REG_NOSUB << 1)
/* POSIX regexec() flags. */
#define REG_NOTBOL 1
#define REG_NOTEOL (REG_NOTBOL << 1)
/* Extra regexec() flags. */
#define REG_APPROX_MATCHER (REG_NOTEOL << 1)
#define REG_BACKTRACKING_MATCHER (REG_APPROX_MATCHER << 1)
#endif /* !TRE_USE_SYSTEM_REGEX_H */
/* REG_NOSPEC and REG_LITERAL mean the same thing. */
#ifdef REG_LITERAL
#define REG_NOSPEC REG_LITERAL
#if defined(REG_LITERAL)
#define REG_NOSPEC REG_LITERAL
#elif defined(REG_NOSPEC)
#define REG_LITERAL REG_NOSPEC
#define REG_LITERAL REG_NOSPEC
#endif /* defined(REG_NOSPEC) */
/* The maximum number of iterations in a bound expression. */
@@ -164,24 +144,24 @@ int regwnexec(const regex_t *preg, const wchar_t *string, size_t len,
/* Approximate matching parameter struct. */
typedef struct {
int cost_ins; /* Default cost of an inserted character. */
int cost_del; /* Default cost of a deleted character. */
int cost_ins; /* Default cost of an inserted character. */
int cost_del; /* Default cost of a deleted character. */
int cost_subst; /* Default cost of a substituted character. */
int max_cost; /* Maximum allowed cost of a match. */
int max_cost; /* Maximum allowed cost of a match. */
int max_ins; /* Maximum allowed number of inserts. */
int max_del; /* Maximum allowed number of deletes. */
int max_ins; /* Maximum allowed number of inserts. */
int max_del; /* Maximum allowed number of deletes. */
int max_subst; /* Maximum allowed number of substitutes. */
int max_err; /* Maximum allowed number of errors total. */
int max_err; /* Maximum allowed number of errors total. */
} regaparams_t;
/* Approximate matching result struct. */
typedef struct {
size_t nmatch; /* Length of pmatch[] array. */
regmatch_t *pmatch; /* Submatch data. */
int cost; /* Cost of the match. */
int num_ins; /* Number of inserts in the match. */
int num_del; /* Number of deletes in the match. */
int cost; /* Cost of the match. */
int num_ins; /* Number of inserts in the match. */
int num_del; /* Number of deletes in the match. */
int num_subst; /* Number of substitutes in the match. */
} regamatch_t;
@@ -203,45 +183,6 @@ int regawnexec(const regex_t *preg, const wchar_t *string, size_t len,
void regaparams_default(regaparams_t *params);
#endif /* TRE_APPROX */
#ifdef TRE_WCHAR
typedef wchar_t tre_char_t;
#else /* !TRE_WCHAR */
typedef unsigned char tre_char_t;
#endif /* !TRE_WCHAR */
typedef struct {
int (*get_next_char)(tre_char_t *c, unsigned int *pos_add, void *context);
void (*rewind)(size_t pos, void *context);
int (*compare)(size_t pos1, size_t pos2, size_t len, void *context);
void *context;
} tre_str_source;
int reguexec(const regex_t *preg, const tre_str_source *string,
size_t nmatch, regmatch_t pmatch[], int eflags);
/* Returns the version string. The returned string is static. */
char *tre_version(void);
/* Returns the value for a config parameter. The type to which `result'
must point to depends of the value of `query', see documentation for
more details. */
int tre_config(int query, void *result);
enum {
TRE_CONFIG_APPROX,
TRE_CONFIG_WCHAR,
TRE_CONFIG_MULTIBYTE,
TRE_CONFIG_SYSTEM_ABI,
TRE_CONFIG_VERSION
};
/* Returns 1 if the compiled pattern has back references, 0 if not. */
int tre_have_backrefs(const regex_t *preg);
/* Returns 1 if the compiled pattern uses approximate matching features,
0 if not. */
int tre_have_approx(const regex_t *preg);
#ifdef __cplusplus
}
#endif
+2 -8
View File
@@ -30,6 +30,7 @@
#undef SYSSYSLOGH
#define NOINDEX
#define NOBCOPY
#define NEED_STRERROR
#define NEED_STRTOKEN
#undef NEED_STRTOK
#undef NEED_INET_ADDR
@@ -42,17 +43,10 @@
#undef POSIX_SIGNALS
#undef TIMES_2
#undef GETRUSAGE_2
#define HAVE_ALLOCA
/* vc 2005 */
#if defined(_MSC_VER) && _MSC_VER >= 1400
# define HAVE_VSNPRINTF
# define HAVE_SNPRINTF
# define snprintf _snprintf
#endif
#define SPATH "."
#define DPATH "."
#define DOMAINNAME "irc.net"
#define NO_U_TYPES
#define NEED_U_INT32_T
#define PREFIX_AQ
#define LIST_SHOW_MODES
#endif
+3 -29
View File
@@ -1,15 +1,5 @@
/* tre-config.h. This file defines all compile time definitions
that are needed in `regex.h' for Win32. */
#ifndef HAVE_ALLOCA
/* Define to 1 if you have `alloca', as a function or macro. */
#define HAVE_ALLOCA 1
#endif
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
#define HAVE_ALLOCA_H 1
/* Define to 1 if you have the <libutf8.h> header file. */
/* #undef HAVE_LIBUTF8_H */
/* Define to 1 if the system has the type `reg_errcode_t'. */
/* #undef HAVE_REG_ERRCODE_T */
@@ -26,27 +16,11 @@
/* Define to enable multibyte character set support. */
#undef TRE_MULTIBYTE
/* Define to the absolute path to the system regex.h */
/* #undef TRE_SYSTEM_REGEX_H_PATH */
/* Define if you want TRE to use alloca() instead of malloc() when allocating
memory needed for regexec operations. */
#define TRE_USE_ALLOCA 1
/* Define to include the system regex.h from TRE regex.h */
/* #undef TRE_USE_SYSTEM_REGEX_H */
/* Define to the absolute path to the system regex.h */
/* #undef TRE_SYSTEM_REGEX_H_PATH */
/* Define to enable wide character (wchar_t) support. */
#undef TRE_WCHAR
/* TRE version string. */
#define TRE_VERSION "0.7.2"
/* TRE version level 1. */
#define TRE_VERSION_1 0
/* TRE version level 2. */
#define TRE_VERSION_2 7
/* TRE version level 3. */
#define TRE_VERSION_3 2
+4 -4
View File
@@ -54,7 +54,7 @@ struct Zdata {
#endif /* ZIP_LINKS */
extern MODFUNC int zip_init(struct Client *, int);
extern MODFUNC void zip_free(struct Client *);
extern MODFUNC char *unzip_packet(struct Client *, char *, int *);
extern MODFUNC char *zip_buffer(struct Client *, char *, int *, int);
extern int zip_init(struct Client *, int);
extern void zip_free(struct Client *);
extern char *unzip_packet(struct Client *, char *, int *);
extern char *zip_buffer(struct Client *, char *, int *, int);
+1 -1
View File
@@ -22,7 +22,7 @@
# These values shouldn't need to be changed
# The path to the ircd binary
ircdexe="@BINDIR@/ircd"
ircdexe="@BINDIR@"
# The path to the ircd pid file
ircdname="@IRCDDIR@/ircd.pid"
+8 -3
View File
@@ -1,6 +1,6 @@
/*
* IRC - Internet Relay Chat, src/modules/%FILE%
* (C) 2005 The UnrealIRCd Team
* (C) 2004 The UnrealIRCd Team
*
* See file AUTHORS in IRC package for additional names of
* the programmers.
@@ -44,7 +44,7 @@
#include "version.h"
#endif
DLLFUNC CMD_FUNC(m_%COMMAND%);
DLLFUNC int m_%COMMAND%(aClient *cptr, aClient *sptr, int parc, char *parv[]);
#define MSG_%UCOMMAND% "%UCOMMAND%"
#define TOK_%UCOMMAND% "%TOKEN%"
@@ -60,7 +60,7 @@ ModuleHeader MOD_HEADER(m_%COMMAND%)
DLLFUNC int MOD_INIT(m_%COMMAND%)(ModuleInfo *modinfo)
{
CommandAdd(modinfo->handle, MSG_%UCOMMAND%, TOK_%UCOMMAND%, m_%COMMAND%, %MAXPARA%, M_USER|M_SERVER);
add_Command(MSG_%UCOMMAND%, TOK_%UCOMMAND%, m_%COMMAND%, %MAXPARA%);
MARK_AS_OFFICIAL_MODULE(modinfo);
return MOD_SUCCESS;
}
@@ -72,6 +72,11 @@ DLLFUNC int MOD_LOAD(m_%COMMAND%)(int module_load)
DLLFUNC int MOD_UNLOAD(m_%COMMAND%)(int module_unload)
{
if (del_Command(MSG_%UCOMMAND%, TOK_%UCOMMAND%, m_%COMMAND%) < 0)
{
sendto_realops("Failed to delete commands when unloading %s",
MOD_HEADER(m_%COMMAND%).name);
}
return MOD_SUCCESS;
}
+345 -479
View File
@@ -54,19 +54,11 @@ RC=rc
#
######### END SSL ########
###### _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
###### RELEASE BUILD #####
#To make a release build comment out the next line a release build
#does not contain debugging symbols and can not be used to locate
#the source of a crash or bug
DEBUG=1
#
#
#### END RELEASE BUILD ###
@@ -108,138 +100,74 @@ OPENSSL_LIB=/LIBPATH:"$(OPENSSL_LIB_DIR)"
!ENDIF
!ENDIF
!IFDEF DEBUGEXTRA
DBGCFLAG=/MDd /Zi /Od
DBGLFLAG=/debug
MODDBGCFLAG=/LDd /MDd /Zi
!IFDEF DEBUG
DBGCFLAG=/MTd /Zi
DBGLFLAG=/debug /debugtype:BOTH
!ELSE
DBGCFLAG=/MD /Zi
DBGLFLAG=/debug
MODDBGCFLAG=/LDd /MD /Zi
DBGCFLAG=/MT /O2 /G5
!ENDIF
FD_SETSIZE=/D FD_SETSIZE=16384
CFLAGS=$(DBGCFLAG) $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) /J /I ./INCLUDE /I ./INCLUDE/WIN32/ARES /Fosrc/ /nologo \
$(ZIPCFLAGS) $(CURLCFLAGS) $(FD_SETSIZE) $(SSLCFLAGS) $(NS_ADDRESS) /D NOSPOOF=1 /c /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _USE_32BIT_TIME_T
CFLAGS=$(DBGCFLAG) $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) /I ./INCLUDE /Fosrc/ /nologo \
$(ZIPCFLAGS) $(CURLCFLAGS) $(FD_SETSIZE) $(SSLCFLAGS) $(NS_ADDRESS) /D STATIC_LINKING \
/D NOSPOOF=1 /c
LFLAGS=kernel32.lib user32.lib gdi32.lib shell32.lib ws2_32.lib advapi32.lib \
dbghelp.lib oldnames.lib comctl32.lib comdlg32.lib $(ZLIB_LIB) $(ZIPLIB) \
$(OPENSSL_LIB) $(SSLLIBS) $(LIBCURL_LIB) $(CURLLIB) /def:wircd.def /implib:wircd.lib \
/nologo $(DBGLFLAG) /out:WIRCD.EXE
MODCFLAGS=$(MODDBGCFLAG) $(SSLCFLAGS) $(ZIPCFLAGS) $(CURLCFLAGS) /J /Fesrc/modules/ \
/Fosrc/modules/ /nologo $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) /I ./INCLUDE /D \
DYNAMIC_LINKING /D NOSPOOF /D MODULE_COMPILE /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _USE_32BIT_TIME_T
MODLFLAGS=/link /def:src/modules/module.def wircd.lib $(OPENSSL_LIB) $(SSLLIBS) \
$(ZLIB_LIB) $(ZIPLIB) $(LIBCURL_LIB) $(CURLLIB)
dbghelp.lib oldnames.lib libcmt.lib comctl32.lib comdlg32.lib $(ZLIB_LIB) $(ZIPLIB) \
$(OPENSSL_LIB) $(SSLLIBS) $(LIBCURL_LIB) $(CURLLIB) /nodefaultlib /nologo $(DBGLFLAG) \
/out:WIRCD.EXE
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 \
OBJ_FILES=SRC/CHANNEL.OBJ SRC/SEND.OBJ SRC/SOCKET.OBJ \
SRC/S_CONF.OBJ SRC/FDLIST.OBJ SRC/DBUF.OBJ \
SRC/CLOAK.OBJ SRC/HASH.OBJ SRC/PARSE.OBJ SRC/IRCD.OBJ \
SRC/S_NUMERIC.OBJ SRC/WHOWAS.OBJ SRC/S_AUTH.OBJ \
SRC/HELP.OBJ SRC/S_MISC.OBJ SRC/MATCH.OBJ SRC/CRULE.OBJ \
SRC/S_DEBUG.OBJ SRC/SUPPORT.OBJ SRC/LIST.OBJ \
SRC/S_ERR.OBJ SRC/PACKET.OBJ SRC/S_BSD.OBJ \
SRC/S_SERV.OBJ SRC/S_USER.OBJ SRC/CHARSYS.OBJ \
SRC/VERSION.OBJ SRC/S_KLINE.OBJ SRC/S_EXTRA.OBJ SRC/IRCSPRINTF.OBJ \
SRC/SCACHE.OBJ SRC/ALN.OBJ SRC/RES.OBJ SRC/MODULES.OBJ \
SRC/S_SERV.OBJ SRC/S_USER.OBJ SRC/WIN32GUI.OBJ \
SRC/VERSION.OBJ SRC/RES_INIT.OBJ SRC/RES_COMP.OBJ SRC/RES_MKQUERY.OBJ SRC/RES_SKIPNAME.OBJ \
SRC/S_KLINE.OBJ SRC/S_EXTRA.OBJ SRC/IRCSPRINTF.OBJ SRC/LUSERS.OBJ \
SRC/SCACHE.OBJ SRC/ALN.OBJ SRC/BADWORDS.OBJ SRC/WEBTV.OBJ SRC/RES.OBJ SRC/MODULES.OBJ \
SRC/S_SVS.OBJ SRC/EVENTS.OBJ SRC/UMODES.OBJ SRC/AUTH.OBJ SRC/CIDR.OBJ SRC/SSL.OBJ \
SRC/RANDOM.OBJ SRC/EXTCMODES.OBJ SRC/MD5.OBJ SRC/API-ISUPPORT.OBJ SRC/API-COMMAND.OBJ \
SRC/EXTBANS.OBJ SRC/TIMESYNCH.OBJ $(ZIPOBJ) $(CURLOBJ)
SRC/SERVICE.OBJ SRC/DEBUG.OBJ SRC/RANDOM.OBJ SRC/EXTCMODES.OBJ \
SRC/EXTBANS.OBJ $(ZIPOBJ) $(CURLOBJ)
OBJ_FILES=$(EXP_OBJ_FILES) SRC/GUI.OBJ SRC/SERVICE.OBJ SRC/DEBUG.OBJ SRC/RTF.OBJ \
SRC/EDITOR.OBJ SRC/WIN32.OBJ
MOD_FILES=SRC/L_COMMANDS.OBJ SRC/M_CHGHOST.OBJ SRC/M_SDESC.OBJ SRC/M_SETIDENT.OBJ \
SRC/M_SETNAME.OBJ SRC/M_SETHOST.OBJ SRC/M_CHGIDENT.OBJ SRC/M_SVSMOTD.OBJ \
SRC/M_SVSNLINE.OBJ SRC/M_WHO.OBJ SRC/M_SWHOIS.OBJ SRC/M_SVSMODE.OBJ \
SRC/M_AWAY.OBJ SRC/M_SVSNOOP.OBJ SRC/M_MKPASSWD.OBJ SRC/M_SVSO.OBJ SRC/M_SVSNICK.OBJ \
SRC/M_ADMINCHAT.OBJ SRC/M_AKILL.OBJ SRC/M_CHGNAME.OBJ SRC/M_GUEST.OBJ SRC/M_HTM.OBJ \
SRC/M_LAG.OBJ SRC/M_MESSAGE.OBJ SRC/M_NACHAT.OBJ SRC/M_OPER.OBJ \
SRC/M_PINGPONG.OBJ SRC/M_QUIT.OBJ SRC/M_RAKILL.OBJ SRC/M_RPING.OBJ SRC/M_SENDUMODE.OBJ \
SRC/M_SQLINE.OBJ SRC/M_KILL.OBJ SRC/M_TSCTL.OBJ SRC/M_UNKLINE.OBJ \
SRC/M_UNSQLINE.OBJ SRC/M_UNZLINE.OBJ SRC/M_WHOIS.OBJ \
SRC/M_TKL.OBJ SRC/M_VHOST.OBJ \
SRC/M_CYCLE.OBJ SRC/M_SVSJOIN.OBJ SRC/M_SVSPART.OBJ SRC/M_SVSLUSERS.OBJ \
SRC/M_SVSWATCH.OBJ SRC/M_SVSSILENCE.OBJ SRC/M_SENDSNO.OBJ SRC/M_SVSSNO.OBJ \
SRC/M_SAJOIN.OBJ SRC/M_SAPART.OBJ SRC/M_SAMODE.OBJ SRC/M_KICK.OBJ SRC/M_TOPIC.OBJ \
SRC/M_INVITE.OBJ SRC/M_LIST.OBJ SRC/M_TIME.OBJ SRC/M_SVSKILL.OBJ SRC/M_KNOCK.OBJ \
SRC/M_UMODE2.OBJ SRC/M_SQUIT.OBJ SRC/M_PROTOCTL.OBJ SRC/M_SJOIN.OBJ SRC/M_PASS.OBJ \
SRC/M_USERHOST.OBJ SRC/M_ISON.OBJ SRC/M_SILENCE.OBJ SRC/M_ADDLINE.OBJ SRC/M_ADDMOTD.OBJ \
SRC/M_ADDOMOTD.OBJ SRC/M_WALLOPS.OBJ SRC/M_GLOBOPS.OBJ SRC/M_LOCOPS.OBJ SRC/M_CHATOPS.OBJ \
SRC/M_ADMIN.OBJ SRC/M_TRACE.OBJ SRC/M_NETINFO.OBJ SRC/M_LINKS.OBJ SRC/M_HELP.OBJ \
SRC/M_RULES.OBJ SRC/M_CLOSE.OBJ SRC/M_MAP.OBJ SRC/M_EOS.OBJ SRC/M_SERVER.OBJ \
SRC/M_STATS.OBJ SRC/M_SVSFLINE.OBJ SRC/M_DCCDENY.OBJ SRC/M_UNDCCDENY.OBJ \
SRC/M_WHOWAS.OBJ SRC/M_CONNECT.OBJ
MOD_FILES=SRC/MODULES/L_COMMANDS.C SRC/MODULES/M_CHGHOST.C SRC/MODULES/M_SDESC.C \
SRC/MODULES/M_SETIDENT.C SRC/MODULES/M_SETNAME.C SRC/MODULES/M_SETHOST.C \
SRC/MODULES/M_CHGIDENT.C SRC/MODULES/M_SVSMOTD.C SRC/MODULES/M_SVSNLINE.C \
SRC/MODULES/M_WHO.C SRC/MODULES/M_SWHOIS.C SRC/MODULES/M_SVSMODE.C SRC/MODULES/M_AWAY.C \
SRC/MODULES/M_SVSNOOP.C SRC/MODULES/M_MKPASSWD.C SRC/MODULES/M_SVSO.C \
SRC/MODULES/M_SVSNICK.C SRC/MODULES/M_ADMINCHAT.C SRC/MODULES/M_AKILL.C \
SRC/MODULES/M_CHGNAME.C SRC/MODULES/M_GUEST.C SRC/MODULES/M_HTM.C SRC/MODULES/M_LAG.C \
SRC/MODULES/M_MESSAGE.C SRC/MODULES/WEBTV.C SRC/MODULES/M_NACHAT.C SRC/MODULES/M_OPER.C \
SRC/MODULES/M_PINGPONG.C SRC/MODULES/M_QUIT.C SRC/MODULES/M_RAKILL.C SRC/MODULES/M_RPING.C \
SRC/MODULES/M_SENDUMODE.C SRC/MODULES/M_SQLINE.C SRC/MODULES/M_KILL.C \
SRC/MODULES/M_TSCTL.C SRC/MODULES/M_UNKLINE.C SRC/MODULES/M_UNSQLINE.C \
SRC/MODULES/M_UNZLINE.C SRC/MODULES/M_WHOIS.C SRC/MODULES/M_TKL.C SRC/MODULES/M_VHOST.C \
SRC/MODULES/M_CYCLE.C SRC/MODULES/M_SVSJOIN.C SRC/MODULES/M_SVSPART.C \
SRC/MODULES/M_SVSLUSERS.C SRC/MODULES/M_SVSWATCH.C SRC/MODULES/M_SVSSILENCE.C \
SRC/MODULES/M_SENDSNO.C SRC/MODULES/M_SVSSNO.C SRC/MODULES/M_SAJOIN.C \
SRC/MODULES/M_SAPART.C SRC/MODULES/M_SAMODE.C SRC/MODULES/M_KICK.C SRC/MODULES/M_TOPIC.C \
SRC/MODULES/M_INVITE.C SRC/MODULES/M_LIST.C SRC/MODULES/M_TIME.C SRC/MODULES/M_SVSKILL.C \
SRC/MODULES/M_KNOCK.C SRC/MODULES/M_UMODE2.C SRC/MODULES/M_SQUIT.C \
SRC/MODULES/M_PROTOCTL.C SRC/MODULES/M_SJOIN.C SRC/MODULES/M_PASS.C \
SRC/MODULES/M_USERHOST.C SRC/MODULES/M_ISON.C SRC/MODULES/M_SILENCE.C \
SRC/MODULES/M_ADDMOTD.C SRC/MODULES/M_ADDOMOTD.C \
SRC/MODULES/M_WALLOPS.C SRC/MODULES/M_GLOBOPS.C SRC/MODULES/M_LOCOPS.C \
SRC/MODULES/M_CHATOPS.C SRC/MODULES/M_ADMIN.C SRC/MODULES/M_TRACE.C \
SRC/MODULES/M_NETINFO.C SRC/MODULES/M_LINKS.C SRC/MODULES/M_HELP.C \
SRC/MODULES/M_RULES.C SRC/MODULES/M_CLOSE.C SRC/MODULES/M_MAP.C SRC/MODULES/M_EOS.C \
SRC/MODULES/M_SERVER.C SRC/MODULES/M_STATS.C SRC/MODULES/M_SVSFLINE.C \
SRC/MODULES/M_DCCDENY.C SRC/MODULES/M_UNDCCDENY.C SRC/MODULES/M_WHOWAS.C \
SRC/MODULES/M_CONNECT.C SRC/MODULES/M_DCCALLOW.C SRC/MODULES/M_USERIP.C \
SRC/MODULES/M_NICK.C SRC/MODULES/M_USER.C SRC/MODULES/M_MODE.C \
SRC/MODULES/M_WATCH.C SRC/MODULES/M_PART.C SRC/MODULES/M_JOIN.C \
SRC/MODULES/M_MOTD.C SRC/MODULES/M_OPERMOTD.C SRC/MODULES/M_BOTMOTD.C \
SRC/MODULES/M_LUSERS.C SRC/MODULES/M_NAMES.C SRC/MODULES/M_SVSNOLAG.C
DLL_FILES=SRC/MODULES/M_CHGHOST.DLL SRC/MODULES/M_SDESC.DLL SRC/MODULES/M_SETIDENT.DLL \
SRC/MODULES/M_SETNAME.DLL SRC/MODULES/M_SETHOST.DLL SRC/MODULES/M_CHGIDENT.DLL \
SRC/MODULES/M_SVSMOTD.DLL SRC/MODULES/M_SVSNLINE.DLL SRC/MODULES/M_WHO.DLL \
SRC/MODULES/M_SWHOIS.DLL SRC/MODULES/M_SVSMODE.DLL SRC/MODULES/M_AWAY.DLL \
SRC/MODULES/M_SVSNOOP.DLL SRC/MODULES/M_MKPASSWD.DLL SRC/MODULES/M_SVSO.DLL \
SRC/MODULES/M_SVSNICK.DLL SRC/MODULES/M_ADMINCHAT.DLL SRC/MODULES/M_AKILL.DLL \
SRC/MODULES/M_CHGNAME.DLL SRC/MODULES/M_GUEST.DLL SRC/MODULES/M_HTM.DLL \
SRC/MODULES/M_LAG.DLL SRC/MODULES/M_MESSAGE.DLL SRC/MODULES/M_NACHAT.DLL \
SRC/MODULES/M_OPER.DLL SRC/MODULES/M_PINGPONG.DLL SRC/MODULES/M_QUIT.DLL \
SRC/MODULES/M_RAKILL.DLL SRC/MODULES/M_RPING.DLL SRC/MODULES/M_SENDUMODE.DLL \
SRC/MODULES/M_SQLINE.DLL SRC/MODULES/M_KILL.DLL SRC/MODULES/M_TSCTL.DLL \
SRC/MODULES/M_UNKLINE.DLL SRC/MODULES/M_UNSQLINE.DLL SRC/MODULES/M_UNZLINE.DLL \
SRC/MODULES/M_WHOIS.DLL SRC/MODULES/M_TKL.DLL SRC/MODULES/M_VHOST.DLL \
SRC/MODULES/M_CYCLE.DLL SRC/MODULES/M_SVSJOIN.DLL SRC/MODULES/M_SVSPART.DLL \
SRC/MODULES/M_SVSLUSERS.DLL SRC/MODULES/M_SVSWATCH.DLL SRC/MODULES/M_SVSSILENCE.DLL \
SRC/MODULES/M_SENDSNO.DLL SRC/MODULES/M_SVSSNO.DLL SRC/MODULES/M_SAJOIN.DLL \
SRC/MODULES/M_SAPART.DLL SRC/MODULES/M_SAMODE.DLL SRC/MODULES/M_KICK.DLL \
SRC/MODULES/M_TOPIC.DLL SRC/MODULES/M_INVITE.DLL SRC/MODULES/M_LIST.DLL \
SRC/MODULES/M_TIME.DLL SRC/MODULES/M_SVSKILL.DLL SRC/MODULES/M_KNOCK.DLL \
SRC/MODULES/M_UMODE2.DLL SRC/MODULES/M_SQUIT.DLL SRC/MODULES/M_PROTOCTL.DLL \
SRC/MODULES/M_SJOIN.DLL SRC/MODULES/M_PASS.DLL SRC/MODULES/M_USERHOST.DLL \
SRC/MODULES/M_ISON.DLL SRC/MODULES/M_SILENCE.DLL \
SRC/MODULES/M_ADDMOTD.DLL SRC/MODULES/M_ADDOMOTD.DLL SRC/MODULES/M_WALLOPS.DLL \
SRC/MODULES/M_GLOBOPS.DLL SRC/MODULES/M_LOCOPS.DLL SRC/MODULES/M_CHATOPS.DLL \
SRC/MODULES/M_ADMIN.DLL SRC/MODULES/M_TRACE.DLL SRC/MODULES/M_NETINFO.DLL \
SRC/MODULES/M_LINKS.DLL SRC/MODULES/M_HELP.DLL SRC/MODULES/M_RULES.DLL \
SRC/MODULES/M_CLOSE.DLL SRC/MODULES/M_MAP.DLL SRC/MODULES/M_EOS.DLL \
SRC/MODULES/M_SERVER.DLL SRC/MODULES/M_STATS.DLL SRC/MODULES/M_SVSFLINE.DLL \
SRC/MODULES/M_DCCDENY.DLL SRC/MODULES/M_UNDCCDENY.DLL SRC/MODULES/M_WHOWAS.DLL \
SRC/MODULES/M_CONNECT.DLL SRC/MODULES/M_DCCALLOW.DLL SRC/MODULES/M_USERIP.DLL \
SRC/MODULES/M_NICK.DLL SRC/MODULES/M_USER.DLL SRC/MODULES/M_MODE.DLL \
SRC/MODULES/M_WATCH.DLL SRC/MODULES/M_PART.DLL SRC/MODULES/M_JOIN.DLL \
SRC/MODULES/M_MOTD.DLL SRC/MODULES/M_OPERMOTD.DLL SRC/MODULES/M_BOTMOTD.DLL \
SRC/MODULES/M_LUSERS.DLL SRC/MODULES/M_NAMES.DLL SRC/MODULES/M_SVSNOLAG.DLL \
SRC/MODULES/CLOAK.DLL
ALL: CONF UNREAL.EXE WIRCD.EXE src/modules/commands.dll MODULES
ALL: CONF UNREAL.EXE WIRCD.EXE
CLEAN:
-@erase src\*.obj >NUL
-@erase src\win32.res >NUL
-@erase src\version.c >NUL
-@erase src\win32\*.obj >NUL
-@erase src\modules\*.obj >NUL
-@erase src\modules\*.dll >NUL
-@erase .\*.exe >NUL
-@erase wircd.lib >NUL
-@erase src\modules\*.exp >NUL
-@erase src\modules\*.lib >NUL
-@erase src\modules\*.pdb >NUL
-@erase src\modules\*.ilk >NUL
./UNREAL.EXE: SRC/UNREAL.OBJ SRC/WIN32/UNREAL.RES
$(LINK) $(DBGLFLAG) advapi32.lib src/unreal.obj src/win32/unreal.res
$(LINK) advapi32.lib src/unreal.obj src/win32/unreal.res
CONF:
-@copy include\win32\setup.h include\setup.h >NUL
@@ -248,23 +176,27 @@ CONF:
./WIRCD.EXE: $(OBJ_FILES) SRC/win32/WIN32.RES
$(LINK) $(LFLAGS) $(OBJ_FILES) SRC/win32/WIN32.RES SRC/WIN32/TRE.LIB SRC/WIN32/ARESLIB.LIB /MAPINFO:LINES /MAP
./WIRCD.EXE: $(OBJ_FILES) $(MOD_FILES) SRC/win32/WIN32.RES
$(LINK) $(LFLAGS) $(OBJ_FILES) $(MOD_FILES) SRC/win32/WIN32.RES SRC/WIN32/TRE.LIB /MAPINFO:LINES /MAP
-@erase src\win32\win32.res
!IFNDEF DEBUGEXTRA
@echo Standard version built
!IFNDEF DEBUG
@echo Non Debug version built
!ELSE
@echo Extra-Debug version built ...
@echo Debug version built ...
!ENDIF
#Source files
src/version.obj: src/version.c
$(CC) $(CFLAGS) src/version.c
src/parse.obj: src/parse.c $(INCLUDES)
$(CC) $(CFLAGS) src/parse.c
src/badwords.obj: src/badwords.c $(INCLUDES)
$(CC) $(CFLAGS) src/badwords.c
src/webtv.obj: src/webtv.c $(INCLUDES)
$(CC) $(CFLAGS) src/webtv.c
src/socket.obj: src/socket.c $(INCLUDES)
$(CC) $(CFLAGS) src/socket.c
@@ -296,6 +228,12 @@ src/support.obj: src/support.c $(INCLUDES)
src/channel.obj: src/channel.c $(INCLUDES) ./include/channel.h
$(CC) $(CFLAGS) src/channel.c
src/class.obj: src/class.c $(INCLUDES) ./include/class.h
$(CC) $(CFLAGS) src/class.c
src/lusers.obj: src/lusers.c $(INCLUDES)
$(CC) $(CFLAGS) src/lusers.c
src/aln.obj: src/aln.c $(INCLUDES)
$(CC) $(CFLAGS) src/aln.c
@@ -308,8 +246,11 @@ src/list.obj: src/list.c $(INCLUDES)
src/res.obj: src/res.c $(INCLUDES)
$(CC) $(CFLAGS) src/res.c
src/timesynch.obj: src/timesynch.c $(INCLUDES)
$(CC) $(CFLAGS) src/timesynch.c
src/res_mkquery.obj: src/res_mkquery.c $(INCLUDES)
$(CC) $(CFLAGS) src/res_mkquery.c
src/res_skipname.obj: src/res_skipname.c $(INCLUDES)
$(CC) $(CFLAGS) src/res_skipname.c
src/s_bsd.obj: src/s_bsd.c $(INCLUDES)
$(CC) $(CFLAGS) src/s_bsd.c
@@ -345,10 +286,6 @@ src/s_user.obj: src/s_user.c $(INCLUDES) ./include/dbuf.h \
./include/channel.h ./include/whowas.h
$(CC) $(CFLAGS) src/s_user.c
src/charsys.obj: src/charsys.c $(INCLUDES) ./include/dbuf.h \
./include/channel.h ./include/whowas.h
$(CC) $(CFLAGS) src/charsys.c
src/s_extra.obj: src/s_extra.c $(INCLUDES) ./include/dbuf.h \
./include/channel.h ./include/whowas.h
$(CC) $(CFLAGS) src/s_extra.c
@@ -368,35 +305,32 @@ src/hash.obj: src/hash.c $(INCLUDES) ./include/hash.h
src/crule.obj: src/crule.c $(INCLUDES)
$(CC) $(CFLAGS) src/crule.c
src/gui.obj: src/win32/gui.c $(INCLUDES) ./include/resource.h
$(CC) $(CFLAGS) src/win32/gui.c
src/rtf.obj: src/win32/rtf.c $(INCLUDES) ./src/win32/win32.h
$(CC) $(CFLAGS) src/win32/rtf.c
src/editor.obj: src/win32/editor.c $(INCLUDES) ./include/resource.h ./src/win32/win32.h
$(CC) $(CFLAGS) src/win32/editor.c
src/win32gui.obj: src/win32/win32gui.c $(INCLUDES) ./include/resource.h
$(CC) $(CFLAGS) src/win32/win32gui.c
src/service.obj: src/win32/service.c $(INCLUDES)
$(CC) $(CFLAGS) src/win32/service.c
src/unreal.obj: src/win32/unreal.c $(INCLUDES)
$(CC) $(CFLAGS) src/win32/unreal.c
src/debug.obj: src/win32/debug.c $(INCLUDES)
$(CC) $(CFLAGS) src/win32/debug.c
src/win32.obj: src/win32/win32.c $(INCLUDES)
$(CC) $(CFLAGS) src/win32/win32.c
src/res_comp.obj: src/res_comp.c $(INCLUDES)
$(CC) $(CFLAGS) src/res_comp.c
src/unreal.obj: src/win32/unreal.c $(INCLUDES)
$(CC) $(CFLAGS) src/win32/unreal.c
src/res_init.obj: src/res_init.c $(INCLUDES)
$(CC) $(CFLAGS) src/res_init.c
src/help.obj: src/help.c $(INCLUDES)
$(CC) $(CFLAGS) src/help.c
src/modules.obj: src/modules.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules.c
$(CC) $(CFLAGS) src/modules.c
src/events.obj: src/events.c $(INCLUDES)
$(CC) $(CFLAGS) src/events.c
$(CC) $(CFLAGS) src/events.c
src/umodes.obj: src/umodes.c $(INCLUDES)
$(CC) $(CFLAGS) src/umodes.c
@@ -413,27 +347,285 @@ src/random.obj: src/random.c $(INCLUDES)
src/extcmodes.obj: src/extcmodes.c $(INCLUDES)
$(CC) $(CFLAGS) src/extcmodes.c
src/md5.obj: src/md5.c $(INCLUDES)
$(CC) $(CFLAGS) src/md5.c
src/url.obj: src/url.c $(INCLUDES) ./include/url.h
$(CC) $(CFLAGS) src/url.c
src/extbans.obj: src/extbans.c $(INCLUDES)
$(CC) $(CFLAGS) src/extbans.c
src/api-isupport.obj: src/api-isupport.c $(INCLUDES)
$(CC) $(CFLAGS) src/api-isupport.c
src/api-command.obj: src/api-command.c $(INCLUDES)
$(CC) $(CFLAGS) src/api-command.c
src/zip.obj: src/zip.c $(INCLUDES)
$(CC) $(CFLAGS) src/zip.c
src/ssl.obj: src/ssl.c $(INCLUDES)
$(CC) $(CFLAGS) src/ssl.c
src/l_commands.obj: src/modules/l_commands.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/l_commands.c
src/m_chghost.obj: src/modules/m_chghost.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_chghost.c
src/m_chgident.obj: src/modules/m_chgident.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_chgident.c
src/m_sdesc.obj: src/modules/m_sdesc.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_sdesc.c
src/m_sethost.obj: src/modules/m_sethost.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_sethost.c
src/m_setident.obj: src/modules/m_setident.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_setident.c
src/m_setname.obj: src/modules/m_setname.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_setname.c
src/m_svsmotd.obj: src/modules/m_svsmotd.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svsmotd.c
src/m_svsmode.obj: src/modules/m_svsmode.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svsmode.c
src/m_tkl.obj: src/modules/m_tkl.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_tkl.c
src/m_swhois.obj: src/modules/m_swhois.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_swhois.c
src/m_svsnline.obj: src/modules/m_svsnline.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svsnline.c
src/m_who.obj: src/modules/m_who.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_who.c
src/m_away.obj: src/modules/m_away.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_away.c
src/m_mkpasswd.obj: src/modules/m_mkpasswd.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_mkpasswd.c
src/m_svsnoop.obj: src/modules/m_svsnoop.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svsnoop.c
src/m_svso.obj: src/modules/m_svso.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svso.c
src/m_svsnick.obj: src/modules/m_svsnick.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svsnick.c
src/m_adminchat.obj: src/modules/m_adminchat.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_adminchat.c
src/m_akill.obj: src/modules/m_akill.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_akill.c
src/m_chgname.obj: src/modules/m_chgname.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_chgname.c
src/m_guest.obj: src/modules/m_guest.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_guest.c
src/m_htm.obj: src/modules/m_htm.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_htm.c
src/m_kill.obj: src/modules/m_kill.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_kill.c
src/m_lag.obj: src/modules/m_lag.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_lag.c
src/m_message.obj: src/modules/m_message.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_message.c
src/m_nachat.obj: src/modules/m_nachat.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_nachat.c
src/m_oper.obj: src/modules/m_oper.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_oper.c
src/m_pingpong.obj: src/modules/m_pingpong.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_pingpong.c
src/m_quit.obj: src/modules/m_quit.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_quit.c
src/m_rakill.obj: src/modules/m_rakill.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_rakill.c
src/m_rping.obj: src/modules/m_rping.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_rping.c
src/m_sendumode.obj: src/modules/m_sendumode.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_sendumode.c
src/m_sqline.obj: src/modules/m_sqline.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_sqline.c
src/m_tsctl.obj: src/modules/m_tsctl.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_tsctl.c
src/m_unkline.obj: src/modules/m_unkline.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_unkline.c
src/m_unsqline.obj: src/modules/m_unsqline.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_unsqline.c
src/m_unzline.obj: src/modules/m_unzline.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_unzline.c
src/m_whois.obj: src/modules/m_whois.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_whois.c
src/m_vhost.obj: src/modules/m_vhost.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_vhost.c
src/m_cycle.obj: src/modules/m_cycle.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_cycle.c
src/m_svsjoin.obj: src/modules/m_svsjoin.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svsjoin.c
src/m_svspart.obj: src/modules/m_svspart.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svspart.c
src/m_svslusers.obj: src/modules/m_svslusers.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svslusers.c
src/m_svswatch.obj: src/modules/m_svswatch.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svswatch.c
src/m_svssilence.obj: src/modules/m_svssilence.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svssilence.c
src/m_sendsno.obj: src/modules/m_sendsno.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_sendsno.c
src/m_svssno.obj: src/modules/m_svssno.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svssno.c
src/m_sajoin.obj: src/modules/m_sajoin.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_sajoin.c
src/m_sapart.obj: src/modules/m_sapart.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_sapart.c
src/m_samode.obj: src/modules/m_samode.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_samode.c
src/m_kick.obj: src/modules/m_kick.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_kick.c
src/m_topic.obj: src/modules/m_topic.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_topic.c
src/m_invite.obj: src/modules/m_invite.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_invite.c
src/m_list.obj: src/modules/m_list.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_list.c
src/m_time.obj: src/modules/m_time.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_time.c
src/m_svskill.obj: src/modules/m_svskill.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svskill.c
src/m_sjoin.obj: src/modules/m_sjoin.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_sjoin.c
src/m_pass.obj: src/modules/m_pass.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_pass.c
src/m_userhost.obj: src/modules/m_userhost.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_userhost.c
src/m_ison.obj: src/modules/m_ison.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_ison.c
src/m_silence.obj: src/modules/m_silence.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_silence.c
src/m_knock.obj: src/modules/m_knock.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_knock.c
src/m_umode2.obj: src/modules/m_umode2.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_umode2.c
src/m_squit.obj: src/modules/m_squit.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_squit.c
src/m_protoctl.obj: src/modules/m_protoctl.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_protoctl.c
src/m_addline.obj: src/modules/m_addline.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_addline.c
src/m_addmotd.obj: src/modules/m_addmotd.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_addmotd.c
src/m_addomotd.obj: src/modules/m_addomotd.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_addomotd.c
src/m_wallops.obj: src/modules/m_wallops.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_wallops.c
src/m_admin.obj: src/modules/m_admin.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_admin.c
src/m_globops.obj: src/modules/m_globops.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_globops.c
src/m_locops.obj: src/modules/m_locops.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_locops.c
src/m_chatops.obj: src/modules/m_chatops.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_chatops.c
src/m_trace.obj: src/modules/m_trace.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_trace.c
src/m_netinfo.obj: src/modules/m_netinfo.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_netinfo.c
src/m_links.obj: src/modules/m_links.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_links.c
src/m_help.obj: src/modules/m_help.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_help.c
src/m_rules.obj: src/modules/m_rules.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_rules.c
src/m_close.obj: src/modules/m_close.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_close.c
src/m_map.obj: src/modules/m_map.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_map.c
src/m_eos.obj: src/modules/m_eos.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_eos.c
src/m_server.obj: src/modules/m_server.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_server.c
src/m_stats.obj: src/modules/m_stats.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_stats.c
src/m_svsfline.obj: src/modules/m_svsfline.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svsfline.c
src/m_dccdeny.obj: src/modules/m_dccdeny.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_dccdeny.c
src/m_undccdeny.obj: src/modules/m_undccdeny.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_undccdeny.c
src/m_whowas.obj: src/modules/m_whowas.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_whowas.c
src/m_connect.obj: src/modules/m_connect.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_connect.c
src/win32/win32.res: src/win32/win32gui.rc
$(RC) /l 0x409 /fosrc/win32/win32.res /i ./include /i ./src \
/d NDEBUG src/win32/win32gui.rc
@@ -442,332 +634,6 @@ src/win32/unreal.res: src/win32/unreal.rc
$(RC) /l 0x409 /fosrc/win32/unreal.res /i ./include /i ./src \
/d NDEBUG src/win32/unreal.rc
################# Modules #################
CUSTOMMODULE: src/modules/$(MODULEFILE).c
$(CC) $(MODCFLAGS) src/modules/$(MODULEFILE).c $(MODLFLAGS) \
/OUT:src/modules/$(MODULEFILE).dll $(EXLIBS)
SYMBOLFILE:
$(CC) src/win32/def-clean.c
dlltool --output-def wircd.def.in --export-all-symbols $(EXP_OBJ_FILES)
def-clean wircd.def.in wircd.def
MODULES: $(DLL_FILES)
src/modules/commands.dll: $(MOD_FILES) $(INCLUDES)
$(CC) $(MODDBGCFLAG) $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) /nologo \
$(SSLCFLAGS) $(ZIPCFLAGS) $(CURLCFLAGS) /Fosrc/modules/ \
/I ./INCLUDE /D NOSPOOF /D MODULE_COMPILE /D _CRT_SECURE_NO_DEPRECATE \
/D _USE_32BIT_TIME_T $(MOD_FILES) \
$(MODLFLAGS) src/win32/tre.lib /OUT:src/modules/commands.dll
src/modules/m_chghost.dll: src/modules/m_chghost.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_chghost.c $(MODLFLAGS)
src/modules/m_chgident.dll: src/modules/m_chgident.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_chgident.c $(MODLFLAGS)
src/modules/m_sdesc.dll: src/modules/m_sdesc.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_sdesc.c $(MODLFLAGS)
src/modules/m_sethost.dll: src/modules/m_sethost.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_sethost.c $(MODLFLAGS)
src/modules/m_setident.dll: src/modules/m_setident.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_setident.c $(MODLFLAGS)
src/modules/m_setname.dll: src/modules/m_setname.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_setname.c $(MODLFLAGS)
src/modules/m_svsmotd.dll: src/modules/m_svsmotd.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svsmotd.c $(MODLFLAGS)
src/modules/m_svsmode.dll: src/modules/m_svsmode.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svsmode.c $(MODLFLAGS)
src/modules/m_tkl.dll: src/modules/m_tkl.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_tkl.c $(MODLFLAGS) src/win32/tre.lib
src/modules/m_swhois.dll: src/modules/m_swhois.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_swhois.c $(MODLFLAGS)
src/modules/m_svsnline.dll: src/modules/m_svsnline.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svsnline.c $(MODLFLAGS)
src/modules/m_who.dll: src/modules/m_who.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_who.c $(MODLFLAGS)
src/modules/m_away.dll: src/modules/m_away.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_away.c $(MODLFLAGS)
src/modules/m_mkpasswd.dll: src/modules/m_mkpasswd.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_mkpasswd.c $(MODLFLAGS)
src/modules/m_svsnoop.dll: src/modules/m_svsnoop.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svsnoop.c $(MODLFLAGS)
src/modules/m_svso.dll: src/modules/m_svso.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svso.c $(MODLFLAGS)
src/modules/m_svsnick.dll: src/modules/m_svsnick.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svsnick.c $(MODLFLAGS)
src/modules/m_adminchat.dll: src/modules/m_adminchat.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_adminchat.c $(MODLFLAGS)
src/modules/m_akill.dll: src/modules/m_akill.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_akill.c $(MODLFLAGS)
src/modules/m_chgname.dll: src/modules/m_chgname.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_chgname.c $(MODLFLAGS)
src/modules/m_guest.dll: src/modules/m_guest.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_guest.c $(MODLFLAGS)
src/modules/m_htm.dll: src/modules/m_htm.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_htm.c $(MODLFLAGS)
src/modules/m_kill.dll: src/modules/m_kill.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_kill.c $(MODLFLAGS)
src/modules/m_lag.dll: src/modules/m_lag.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_lag.c $(MODLFLAGS)
src/modules/m_message.dll: src/modules/m_message.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_message.c src/modules/webtv.c $(MODLFLAGS) src/win32/tre.lib
src/modules/m_nachat.dll: src/modules/m_nachat.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_nachat.c $(MODLFLAGS)
src/modules/m_oper.dll: src/modules/m_oper.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_oper.c $(MODLFLAGS)
src/modules/m_pingpong.dll: src/modules/m_pingpong.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_pingpong.c $(MODLFLAGS)
src/modules/m_quit.dll: src/modules/m_quit.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_quit.c $(MODLFLAGS)
src/modules/m_rakill.dll: src/modules/m_rakill.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_rakill.c $(MODLFLAGS)
src/modules/m_rping.dll: src/modules/m_rping.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_rping.c $(MODLFLAGS)
src/modules/m_sendumode.dll: src/modules/m_sendumode.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_sendumode.c $(MODLFLAGS)
src/modules/m_sqline.dll: src/modules/m_sqline.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_sqline.c $(MODLFLAGS)
src/modules/m_tsctl.dll: src/modules/m_tsctl.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_tsctl.c $(MODLFLAGS)
src/modules/m_unkline.dll: src/modules/m_unkline.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_unkline.c $(MODLFLAGS)
src/modules/m_unsqline.dll: src/modules/m_unsqline.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_unsqline.c $(MODLFLAGS)
src/modules/m_unzline.dll: src/modules/m_unzline.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_unzline.c $(MODLFLAGS)
src/modules/m_whois.dll: src/modules/m_whois.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_whois.c $(MODLFLAGS)
src/modules/m_vhost.dll: src/modules/m_vhost.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_vhost.c $(MODLFLAGS)
src/modules/m_cycle.dll: src/modules/m_cycle.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_cycle.c $(MODLFLAGS)
src/modules/m_svsjoin.dll: src/modules/m_svsjoin.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svsjoin.c $(MODLFLAGS)
src/modules/m_svspart.dll: src/modules/m_svspart.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svspart.c $(MODLFLAGS)
src/modules/m_svslusers.dll: src/modules/m_svslusers.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svslusers.c $(MODLFLAGS)
src/modules/m_svswatch.dll: src/modules/m_svswatch.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svswatch.c $(MODLFLAGS)
src/modules/m_svssilence.dll: src/modules/m_svssilence.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svssilence.c $(MODLFLAGS)
src/modules/m_sendsno.dll: src/modules/m_sendsno.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_sendsno.c $(MODLFLAGS)
src/modules/m_svssno.dll: src/modules/m_svssno.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svssno.c $(MODLFLAGS)
src/modules/m_sajoin.dll: src/modules/m_sajoin.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_sajoin.c $(MODLFLAGS)
src/modules/m_sapart.dll: src/modules/m_sapart.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_sapart.c $(MODLFLAGS)
src/modules/m_samode.dll: src/modules/m_samode.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_samode.c $(MODLFLAGS)
src/modules/m_kick.dll: src/modules/m_kick.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_kick.c $(MODLFLAGS)
src/modules/m_topic.dll: src/modules/m_topic.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_topic.c $(MODLFLAGS)
src/modules/m_invite.dll: src/modules/m_invite.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_invite.c $(MODLFLAGS)
src/modules/m_list.dll: src/modules/m_list.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_list.c $(MODLFLAGS)
src/modules/m_time.dll: src/modules/m_time.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_time.c $(MODLFLAGS)
src/modules/m_svskill.dll: src/modules/m_svskill.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svskill.c $(MODLFLAGS)
src/modules/m_sjoin.dll: src/modules/m_sjoin.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_sjoin.c $(MODLFLAGS)
src/modules/m_pass.dll: src/modules/m_pass.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_pass.c $(MODLFLAGS)
src/modules/m_userhost.dll: src/modules/m_userhost.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_userhost.c $(MODLFLAGS)
src/modules/m_ison.dll: src/modules/m_ison.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_ison.c $(MODLFLAGS)
src/modules/m_silence.dll: src/modules/m_silence.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_silence.c $(MODLFLAGS)
src/modules/m_knock.dll: src/modules/m_knock.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_knock.c $(MODLFLAGS)
src/modules/m_umode2.dll: src/modules/m_umode2.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_umode2.c $(MODLFLAGS)
src/modules/m_squit.dll: src/modules/m_squit.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_squit.c $(MODLFLAGS)
src/modules/m_protoctl.dll: src/modules/m_protoctl.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_protoctl.c $(MODLFLAGS)
src/modules/m_addmotd.dll: src/modules/m_addmotd.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_addmotd.c $(MODLFLAGS)
src/modules/m_addomotd.dll: src/modules/m_addomotd.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_addomotd.c $(MODLFLAGS)
src/modules/m_wallops.dll: src/modules/m_wallops.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_wallops.c $(MODLFLAGS)
src/modules/m_admin.dll: src/modules/m_admin.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_admin.c $(MODLFLAGS)
src/modules/m_globops.dll: src/modules/m_globops.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_globops.c $(MODLFLAGS)
src/modules/m_locops.dll: src/modules/m_locops.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_locops.c $(MODLFLAGS)
src/modules/m_chatops.dll: src/modules/m_chatops.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_chatops.c $(MODLFLAGS)
src/modules/m_trace.dll: src/modules/m_trace.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_trace.c $(MODLFLAGS)
src/modules/m_netinfo.dll: src/modules/m_netinfo.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_netinfo.c $(MODLFLAGS)
src/modules/m_links.dll: src/modules/m_links.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_links.c $(MODLFLAGS)
src/modules/m_help.dll: src/modules/m_help.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_help.c $(MODLFLAGS)
src/modules/m_rules.dll: src/modules/m_rules.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_rules.c $(MODLFLAGS)
src/modules/m_close.dll: src/modules/m_close.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_close.c $(MODLFLAGS)
src/modules/m_map.dll: src/modules/m_map.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_map.c $(MODLFLAGS)
src/modules/m_eos.dll: src/modules/m_eos.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_eos.c $(MODLFLAGS)
src/modules/m_server.dll: src/modules/m_server.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_server.c $(MODLFLAGS)
src/modules/m_stats.dll: src/modules/m_stats.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_stats.c $(MODLFLAGS)
src/modules/m_svsfline.dll: src/modules/m_svsfline.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svsfline.c $(MODLFLAGS)
src/modules/m_dccdeny.dll: src/modules/m_dccdeny.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_dccdeny.c $(MODLFLAGS)
src/modules/m_undccdeny.dll: src/modules/m_undccdeny.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_undccdeny.c $(MODLFLAGS)
src/modules/m_whowas.dll: src/modules/m_whowas.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_whowas.c $(MODLFLAGS)
src/modules/m_connect.dll: src/modules/m_connect.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_connect.c $(MODLFLAGS)
src/modules/m_dccallow.dll: src/modules/m_dccallow.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_dccallow.c $(MODLFLAGS)
src/modules/m_userip.dll: src/modules/m_userip.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_userip.c $(MODLFLAGS)
src/modules/m_nick.dll: src/modules/m_nick.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_nick.c $(MODLFLAGS)
src/modules/m_user.dll: src/modules/m_user.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_user.c $(MODLFLAGS)
src/modules/m_mode.dll: src/modules/m_mode.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_mode.c $(MODLFLAGS)
src/modules/m_watch.dll: src/modules/m_watch.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_watch.c $(MODLFLAGS)
src/modules/m_part.dll: src/modules/m_part.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_part.c $(MODLFLAGS)
src/modules/m_join.dll: src/modules/m_join.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_join.c $(MODLFLAGS)
src/modules/m_motd.dll: src/modules/m_motd.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_motd.c $(MODLFLAGS)
src/modules/m_opermotd.dll: src/modules/m_opermotd.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_opermotd.c $(MODLFLAGS)
src/modules/m_botmotd.dll: src/modules/m_botmotd.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_botmotd.c $(MODLFLAGS)
src/modules/m_lusers.dll: src/modules/m_lusers.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_lusers.c $(MODLFLAGS)
src/modules/m_names.dll: src/modules/m_names.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_names.c $(MODLFLAGS)
src/modules/cloak.dll: src/modules/cloak.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/cloak.c $(MODLFLAGS)
src/modules/m_svsnolag.dll: src/modules/m_svsnolag.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svsnolag.c $(MODLFLAGS)
dummy:
+28
View File
@@ -0,0 +1,28 @@
/*
* AwesomeChristians Chat Network (irc.awesomechristians.com) Network Configuration File
* --------------------------------------------------
* Added-at: 31 December 2001 15:25
* Author: ChildLikeFaith
* Email: childlikefaith@awesomechristians.com
* -----------------------------------------
*/
set {
network-name "AwesomeChristians Chat Network";
default-server "irc.awesomechristians.com";
services-server "services.awesomechristians.com";
stats-server "services.awesomechristians.com";
help-channel "#operhelp";
hiddenhost-prefix "awesome";
prefix-quit "Quit:";
hosts {
local "ircop.awesomechristians.net";
global "ircop.awesomechristians.net";
coadmin "co.admin.awesomechristians.net";
admin "admin.awesomechristians.net";
servicesadmin "services.admin.awesomechristians.net";
netadmin "network.admin.awesomechristians.net";
host-on-oper-up "on";
};
};
+23
View File
@@ -0,0 +1,23 @@
/*
* AXEnet (irc.axenet.org) Network Configuration File
* --------------------------------------------------
*/
set {
network-name "Axenet";
default-server "irc.axenet.org";
services-server "services.axenet.org";
stats-server "stats.axenet.org";
help-channel "#axenethelp";
hiddenhost-prefix "axe";
prefix-quit "Quit:";
hosts {
local "locop.axenet.org";
global "ircop.axenet.org";
coadmin "coadmin.axenet.org";
admin "admin.axenet.org";
servicesadmin "csop.axenet.org";
netadmin "netadmin.axenet.org";
host-on-oper-up "on";
};
};
+28
View File
@@ -0,0 +1,28 @@
/*
* Bunker7.net Network Configuration File
* -----------------------------------------
* Added-at: 17 August 1999 12:34 CT
* Author: Rogue
* E-Mail: rogue@bunker7.net
* $Id$
*-----------------------------------------
*/
set {
network-name "bunker7";
default-server "irc.bunker7.net";
services-server "services.bunker7.net";
stats-server "stats.bunker7.net";
help-channel "#bunker7";
hiddenhost-prefix "bunker7";
prefix-quit "Quit:";
hosts {
local "local.bunker7.net";
global "global.bunker7.net";
coadmin "coadmin.bunker7.net";
admin "admin.bunker7.net";
servicesadmin "sadm.bunker7.net";
netadmin "netadmin.bunker7.net";
host-on-oper-up "off";
};
};
+27
View File
@@ -0,0 +1,27 @@
/*
* BuRnNET (irc.burncycl.net) Network Configuration File
* --------------------------------------------------
* Added-at: 03 April 2001 03:31
* Author: BuRnCycL
* Email: burncycl@burncycl.net
* -----------------------------------------
*/
set {
network-name "BuRnNET";
default-server "irc.burncycl.net";
services-server "services.burncycl.net";
stats-server "stats.burncycl.net";
help-channel "#help";
hiddenhost-prefix "hide";
prefix-quit "Quit:";
hosts {
local "locop.burncycl.net";
global "oper.burncycl.net";
coadmin "coadmin.burncycl.net";
admin "admin.burncycl.net";
servicesadmin "csop.burncycl.net";
netadmin "netadmin.burncycl.net";
host-on-oper-up "on";
};
};
+27
View File
@@ -0,0 +1,27 @@
/*
* CaboNet (irc.cabonet.org) Network Configuration File
* --------------------------------------------------
* Added-at: 03 February 2001 15:38
* Author: Nandin
* Email: nandin@cabonet.org
* -----------------------------------------
*/
set {
network-name "CaboNet";
default-server "irc.cabonet.org";
services-server "services.cabonet.org";
stats-server "stats.cabonet.org";
help-channel "#cabonet";
hiddenhost-prefix "cnet";
prefix-quit "Quit:";
hosts {
local "local.cabonet.org";
global "oper.cabonet.org";
coadmin "coadmin.cabonet.org";
admin "admin.cabonet.org";
servicesadmin "csop.cabonet.org";
netadmin "netadmin.cabonet.org";
host-on-oper-up "on";
};
};
+25
View File
@@ -0,0 +1,25 @@
/*
* Added-at: 25 november 2000 17:35 GMT
* Author: Highlander (J.S. Morrison)
* E-Mail: highlander@chatcrap.com
* $Id$
*/
set {
network-name "ChatCrap";
default-server "irc.chatcrap.com";
services-server "services.cabonet.org";
stats-server "stats.chatcrap.com";
help-channel "#operhelp";
hiddenhost-prefix "chatcrap";
prefix-quit "Quit:";
hosts {
local "locop.chatcrap.com";
global "ircop.chatcrap.com";
coadmin "coadmin.chatcrap.com";
admin "admin.chatcrap.com";
servicesadmin "serviceop.chatcrap.com";
netadmin "netadmin.chatcrap.com";
host-on-oper-up "on";
};
};
+27
View File
@@ -0,0 +1,27 @@
/*
* ChatUniverse (irc.chatuniverse.net) Network Configuration File
* --------------------------------------------------
* Added-at: 16 March 2001 13:02
* Author: PeTrArChY
* Email: bradbury@rebeldev.net
* -----------------------------------------
*/
set {
network-name "ChatUniverse";
default-server "irc.chatuniverse.net";
services-server "services.chatuniverse.net";
stats-server "stats.chatuniverse.net";
help-channel "#chatuniverse";
hiddenhost-prefix "CU";
prefix-quit "Quit:";
hosts {
local "locop.chatuniverse.net";
global "oper.chatuniverse.net";
coadmin "coadmin.chatuniverse.net";
admin "admin.chatuniverse.net";
servicesadmin "csop.chatuniverse.net";
netadmin "netadmin.chatuniverse.net";
host-on-oper-up "on";
};
};
+26
View File
@@ -0,0 +1,26 @@
/*
* CTCP Networks (irc.ctcp.net) Network Configuration File
*
* Added-at: 12 February 2002 19:54
* Author: Mark
* Email: mark@ctcp.net
*/
set {
network-name "CTCP Networks";
default-server "irc.ctcp.net";
services-server "services.ctcp.net";
stats-server "stats.ctcp.net";
help-channel "#opers";
hiddenhost-prefix "ctcp";
hosts {
local "locop.ctcp.net";
global "oper.ctcp.net";
coadmin "coadmin.ctcp.net";
admin "admin.ctcp.net";
servicesadmin "csop.ctcp.net";
netadmin "netadmin.ctcp.net";
host-on-oper-up yes;
};
};
+26
View File
@@ -0,0 +1,26 @@
/*
* Dark Kaos Network (irc.darkkaos.net) Network Configuration File
*
* Added-at: 04 February 2002 03:15
* Author: ka0t1c_m4n
* Email: drk_kaos@yahoo.com
*/
set {
network-name "Dark Kaos Network";
default-server "irc.darkkaos.net";
services-server "services.darkkaos.net";
stats-server "stats.darkkaos.net";
help-channel "#help";
hiddenhost-prefix "hide";
hosts {
local "localop.darkkaos.net";
global "would.u.like.to.be.me.com";
coadmin "ircop.darkkaos.net";
admin "i.hate.terr.oists.net";
servicesadmin "Csop.darkkaos.net";
netadmin "netadmin.darkkaos.net";
host-on-oper-up yes;
};
};
+18
View File
@@ -0,0 +1,18 @@
set {
network-name "DigitalIRC.Net";
default-server "irc.digitalirc.net";
services-server "Services.DigitalIRC.Net";
stats-server "Statistics.DigitalIRC.com";
help-channel "#Digitalirc";
hiddenhost-prefix "NN";
prefix-quit "Quit:";
hosts {
local "LocOper.DigitalIRC.Net";
global "Oper.DigitalIRC.Net";
coadmin "NetAdmin.DigitalIRC.Net";
admin "Admin.DigitalIRC.Net";
servicesadmin "ServicesOp.DigitalIRC.Net";
netadmin "NetAdmin.DigitalIRC.Net";
host-on-oper-up "off";
};
};
+26
View File
@@ -0,0 +1,26 @@
/*
* Discussioni.Org (IRC.Discussioni.Org) Network Configuration File
*
* Added-at: 17 January 2002 22:39
* Author: Jollino
* Email: jollino@discussioni.org
*/
set {
network-name "Discussioni.Org";
default-server "IRC.Discussioni.Org";
services-server "Services.Discussioni.Org";
stats-server "Stats.Discussioni.Org";
help-channel "#help";
hiddenhost-prefix "DISCUSSIONI";
hosts {
local "LocOp.Discussioni.Org";
global "Oper.Discussioni.Org";
coadmin "Co-Admin.Discussioni.Org";
admin "Admin.Discussioni.Org";
servicesadmin "ServOper.Discussioni.Org";
netadmin "NetAdmin.Discussioni.Org";
host-on-oper-up yes;
};
};
+18
View File
@@ -0,0 +1,18 @@
set {
network-name "DragonWings";
default-server "irc.dragonwings.org";
services-server "saturn.dragonwings.org";
stats-server "stats.dragonwings.org";
help-channel "#DragonWings";
hiddenhost-prefix "dw";
prefix-quit "Quit:";
hosts {
local "locop.dragonwings.org";
global "ircop.dragonwings.org";
coadmin "coadmin.dragonwings.org";
admin "admin.dragonwings.org";
servicesadmin "serviceop.dragonwings.org";
netadmin "netadmin.dragonwings.org";
host-on-oper-up "off";
};
};
+26
View File
@@ -0,0 +1,26 @@
/*
* GamesCafe (irc.gamerscafe.net) Network Configuration File
*
* Added-at: 22 August 2001 01:17
* Author: Osiris
* Email: daniel@linux.ws
*/
set {
network-name "GamesCafe";
default-server "irc.gamerscafe.net";
services-server "Services.GamersCafe.Net";
stats-server "Services.GamersCafe.Net";
help-channel "#GamersCafe";
hiddenhost-prefix "GC";
hosts {
local "localoper.gamerscafe.net";
global "oper.gamerscafe.net";
coadmin "coadmin.gamerscafe.net";
admin "admin.gamerscafe.net";
servicesadmin "csop.gamerscafe.net";
netadmin "network-admin.gamerscafe.net";
host-on-oper yes;
};
};
+23
View File
@@ -0,0 +1,23 @@
/*
* German-Elite (irc.german-elite.net) Network Configuration File
* -----------------------------------------
*/
set {
network-name "German-Elite";
default-server "irc.german-elite.net";
services-server "services.german-elite.net";
stats-server "stats.german-elite.net";
help-channel "#german-elite";
hiddenhost-prefix "GE";
prefix-quit "Quit:";
hosts {
local "locop.german-elite.net";
global "ircop.german-elite.net";
coadmin "coadmin.german-elite.net";
admin "admin.german-elite.net";
servicesadmin "csop.german-elite.net";
netadmin "netadmin.german-elite.net";
host-on-oper-up "on";
};
};
+27
View File
@@ -0,0 +1,27 @@
/*
* Network Configuration File Template
* -----------------------------------------
* Added-at: August 2000
* Author: Anonymos
* E-Mail: Anonymos@Global-IRC.de
* $Id$
*/
set {
network-name "Global";
default-server "IRC.Global-IRC.de";
services-server "Service.Global-IRC.de";
stats-server "Stats.Global-IRC.de";
help-channel "#Global-IRC-World";
hiddenhost-prefix "GL-IRC";
prefix-quit "Quit:";
hosts {
local "Local-IRC-OP.Global-IRC.de";
global "Global-IRC-OP.Global-IRC.de";
coadmin "CoAdmin.Global-IRC.de";
admin "ServerAdmin.Global-IRC.de";
servicesadmin "ServiceAdmin.Global-IRC.de";
netadmin "NetworkAdmin.Global-IRC.de";
host-on-oper-up "on";
};
};

Some files were not shown because too many files have changed in this diff Show More