1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-25 03:56:39 +02:00

19 Commits

Author SHA1 Message Date
Bram Matthys af1c845d09 ahem! typo ;p... and a bad one... horrible resolverbug on ipv6 ;) 2005-10-01 22:18:07 +00:00
Bram Matthys 59e09d1672 resolver fixed:
- c99 // comments removed
- fixed severe link block problem, would probably crash on unresolved hostname
- made 'cannot resolve' msgs for link blocks the same (in 1) failure and 2) bad response)
- fixed OOB read on 64bit systems with IPv6 enabled (in cacher)
- some reorganizing of the source or when we free things, to make things cleaner :)
- I think that was it.
This is was all done thanks to a manual source code audit I did on the printed out source ;). oldscool ^_^
2005-10-01 20:40:57 +00:00
Bram Matthys aee36057b6 read-after-free fixes 2005-09-28 22:17:03 +00:00
Bram Matthys 8eb85bc81c retry & timeout set :) 2005-09-27 22:26:23 +00:00
Bram Matthys 3510bad641 win32 stuff ATTEMPT #2 2005-09-27 22:08:06 +00:00
Bram Matthys a26180b5d1 seems c-ares now works fine on windows too... :) 2005-09-27 21:57:56 +00:00
Bram Matthys 8f6b70b260 hm! ipv6 seems to work with new resolver :) 2005-09-27 20:18:41 +00:00
Bram Matthys 342eb1bf7e ok at least ipv6 does not crash, but gotto fix byte order now ;) 2005-09-22 00:45:04 +00:00
Bram Matthys 2f876f353f ipv6 fixes 2005-09-22 00:41:41 +00:00
Bram Matthys 780655c886 dumdeedum 2005-09-22 00:03:44 +00:00
Bram Matthys 6a81fc54aa more || exit 1 <-- for TRE library ;) 2005-09-21 23:55:11 +00:00
Bram Matthys 5ff71d369d added || exit 1 <--- is this legal? 2005-09-21 23:52:40 +00:00
Bram Matthys 0234dfeae6 added .tar.gz of c-ares (ehm.. 1.3.0 I think) 2005-09-21 23:50:10 +00:00
Bram Matthys fed77b386d current makefile / configure work 2005-09-21 23:46:29 +00:00
Bram Matthys ec1fa23dad refcount bug (also in 3.2.3-cvs) 2005-09-12 18:22:42 +00:00
Bram Matthys 0f4443efd0 fixed reference count bug (also comitted to unreal3_2_fixes). 2005-09-12 16:34:42 +00:00
Bram Matthys f31b959ff5 /connect (and autoconnect????) now work as well. still need to fix up ipv6, AND fixing a reference count problem (but that one is also present in core unreal ;p) regarding link blocks + rehash. 2005-09-11 19:21:12 +00:00
Bram Matthys 97bd2d7a48 c-ares stuff... only linkblocks/configstuff is left. AND test all ipv6 stuff... 2005-09-08 23:40:08 +00:00
cvs2hg 329639f9f1 fixup commit for branch 'c-ares_resolver' 2005-09-04 22:10:07 +00:00
199 changed files with 27994 additions and 58327 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
\___/|_| |_|_| \___|\__,_|_|\___/\_| \_| \____/\__,_|
Configuration Program
for Unreal3.2.9-RC2
for Unreal3.2.3
This program will help you to compile your IRC server, and ask you
questions regarding the compile-time settings of it during the process.
+97 -98
View File
@@ -1,117 +1,116 @@
Unreal3.2.9-RC2 Release Notes
============================
Unreal3.2.3 Release Notes
==========================
==[ GENERAL INFORMATION ]==
- If you are upgrading on *NIX, make sure you run 'make clean' and './Config'
first, before doing 'make'
first 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/
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/
- When upgrading a network, we assume you are upgrading from the previous
version (3.2.8/3.2.8.1). Upgrading from 3.2.6 or 3.2.7 should also be no problem.
- The purpose of the sections below (NEW, CHANGED, MINOR, etc) is to be a SUMMARY
of the changes in this release. There have been 160+ changes, twice as much
as usual for a release, hence this summary is a bit long too.
For the FULL list of changes, see the Changelog.
- If you previously used CVS to access the development version of UnrealIRCd,
you now need to use Mercurial, see see http://www.unrealircd.com/hgmove
version (3.2.2). If you got a net running with servers that are several
versions behind (eg: 3.2.1) then you might experience (desynch) problems.
Also, if you try to use the new features, some might not work properly
until all your servers are upgraded. It is therefore recommended to
upgrade all servers in a 'short' time span (x day[s], not weeks).
==[ NEW ]==
- Extban ~j: this only prevents a user from joining, once in he can speak freely.
- Extban ~R:<nick>: this ban only matches if <nick> is a registered user (has
identified to services). Especially useful in cases like: +e ~R:TrustedUser.
- Stacked Extended Bans:
- Extbans are now split in two groups:
- Ones that specify which user actions are affected (group 1):
~q (quiet), ~n (nick change), ~j (join)
- Ones that introduce new criteria that can be used (group 2):
~c (channel), ~r (realname), ~R (registered)
- With stacked extbans you can combine an extban of the first group with the second
For example: ~q:~c:#lamers would quiet all users who are also in #lamers
- Extended Invex: very much like extended bans, but for +I (Invite Exception).
Currently supported are: ~c (channel, ~r (realname) and ~R (registered) [=group 2]
Possible useful uses are setting a channel +i (invite only) and then setting
+I ~c:#trustedchan (or even: +I ~c:+#trustedchan) while still retaining the ability
to easily ban users through +b.
- Channel Mode +Z: indicates whether a channel is 'secure' or not.
This channel mode works in conjunction with +z (lower case z).
While +z (normally) prevents new non-SSL users from joining, sometimes they
can still join, like when after a netsplit the channels merge again.
When all users on the channel are connected through SSL, the channel is set +Z
by the server. Whenever an insecure user joins, the channel is put -Z.
- Remote MOTD support: you can now specify an URL instead of a file
- Automatic installation of curl (w/c-ares) if you answer 'Yes' to remote includes
- One can now rehash ALL servers with the command '/REHASH -global'. This can be
particularly useful if you use remote includes or MOTD's. NetAdmin only command.
- files { } block by which you can configure the location of the tune file, pid, etc
- STARTTLS: On an IRCd compiled with SSL support this allows a client to start a SSL
session on a regular non-SSL port (like 6667). Only supported by a few IRC clients.
Can be disabled by setting set::ssl::options::no-starttls
- set::uhnames: this allows one to turn UHNAMES off ('no'), which can be a good idea
if you have channels with more than 1000 users, as otherwise the nicklist can take
several seconds to load. Defaults to on ('yes').
- IPv6 clones detection support: allow::ipv6-clone-mask determines the number of bits
used when comparing two IPv6 addresses to determine if allow::maxperip is exceeded.
This allows an admin to recognize that most IPv6 blocks are allocated to individuals,
who might each get a /64 IPv6 block. set::default-ipv6-clone-mask defaults to 64 and
provides default value for the allow blocks.
- The m_nopost module is now part of Unreal: this defends against the Firefox/
Javascript 'XPS attack' which uses HTTP POST to create dummy IRC bots.
- There have also been some behavior changes, which can be considered NEW, see
next section (CHANGED).
- Channel mode +I (invex, invite exceptions). Users on this list can join +i channels
without needing an /invite.
- Channel mode +j (jointhrottle). If you set +j X:Y you limit each user (individually)
to X joins per Y seconds to the channel.
- Nick Character System: this allows you to choose which additional characters to
allow in nicknames by language (and codepage). Currently available are:
catalan, dutch, french, german, swiss-german, icelandic, italian, spanish,
swedish, hungarian, polish, romanian, slovak, czech, greek, turkish, russian,
hebrew and chinese. There are also several 'groups' available, for more info see:
http://www.vulnscan.org/UnrealIrcd/unreal32docs.html#feature_nickchars
- *NIX: ./Config -advanced, allows you to choose more options
- tld::botmotd and tld::opermotd
- Using /INVITE with no parameters will a list of channels you are invited to
but have not yet joined.
- set::gline-address, works just like set::kline-address but then for glines.
- Added a basic regex tutorial in unreal32docs.html
- /SAJOIN now supports multiple channels (and '0') again.
- Spamfilter topic support ('t' in spamfilter, 'topic' in conf).
- Added a feature to +b/+e ~c: ~c:[prefix]<#channel>. This can be used if you for
example trust all ops of #leet: mode #x +e ~c:@#leet.
- Various translated documents in doc/: unreal32docs.gr.html (Greek), help.fr.conf
and example.fr.conf (French), help.de.conf & example.de.conf (German), and
example.hu.conf (Hungarian).
==[ CHANGED ]==
- Channel Mode +z: due to the +z/+Z changes, some things have changed:
- +z can now be set even when insecure users are present
(the channel will then be set +Z when the last insecure user leaves)
- An oper previously had to invite himself and then join the channel
with the key 'override' to set -z. This is no longer needed.
The channel stays +z, but will be set -Z when the oper joins.
- Remote includes: if a remote include fails to load (eg: webserver down) then
the most recent (cached) version of that remote include will be used, and the
IRCd will still boot and be able to REHASH. This means it is now 'safe' to
use remote includes on a network, without risking problems like unable to
rehash in case of webserver problems.
- set::level-on-join now supports voice/halfop/protect/owner
- Backslashes (\) in MOTD/RULES files are no longer considered special, this
might mean that you have to change some escaped backslashes (\\) to \.
- '/REHASH -motd' really rehashes ALL MOTD/OPERMOTD/BOTMOTD/RULES files, both
the 'normal' files and the ones in tld { } blocks.
- The 'Compile as hub/leaf' choice is now gone, as it didn't do anything.
- Better document 'sslclientcert' in the Oper Block documentation.
This allows one to authenticate against a SSL certificate for /OPER, instead
of using a password.
- Updated auspice.conf
- The usual doc updates, help.conf, spamfilter.conf, dccallow.conf, etc.
- The config parser got (mostly) recoded. This makes it rehash much faster,
additionally "duplicate item" checking is now available.
- Added a 'B' flag to /who output for bots. Also normal users can now /who +m B.
- Support in configfiles for \\ (= a \)
- set::dns::bind::ip, hardly useful for anyone
- If a user is +b on a channel, and set::allow-userhost-change force-rejoin is
in use, then a part/join is not sent in order to prevent flooding.
- OperOverride INVITE notices are now sent out globally to all +s +e users.
- User mode 'g' is now operonly, it hardly did anything for non-opers.
- Made CIDR no longer accept bitmasks with less than 16bits for /*line commands.
- Modulized a lot of commands (~5000 lines of code).
- Made channel modes +c/+S deal with RGB color codes.
- If no log { } block is present, then a warning will be printed and we will log
by default to ircd.log (errors only).
- If an invalid character is found in a nick then the whole nick is rejected now.
- Changed numeric&text of 'is a Secure Connection' to 'is using a Secure Connection',
client coders are encouraged to add support for this new numeric 671. Until then,
in-window-/whois's will probably be broken.
- A locops with can_override/can_gkline/can_gzline is now automatically converted
to a globop, just like we do with can_globalroute/can_gkline. These privileges
are GLOBAL and therefore are not meant to be granted to locops.
- A warning is now sent to an oper if (s)he tries to use /(G)ZLINE on a host.
(G)ZLINES should be placed on *@ipmasks because they are processed before any
ident and host lookups.
- Made (fast) badwords work better with word boundaries, in practice this means
blocking of words with accents/umlauts/es-zett/etc now works properly.
- Made it so halfops can now -h themselves and chanadmins can -a themselves.
- Made spamfilter 'u' also check nickchanges.
==[ MAJOR BUGS FIXED ]==
- If you have autoconnect with a low connfreq, previously you often risked getting
'Server exists' errors and 'breaking' the network. Now, the server handshake has
been redesigned which means this will no longer happen. You can now safely have
a low connfreq of - for example - 10 seconds.
- Windows: 'Permission denied' errors when starting Unreal
- A crash on some new Linux systems when replacing .so files
- Solaris & QNX: Compile problems
- IPv6: admins no longer have to tweak sysctl, like on FreeBSD & newer Linux systems
- IPv6: IPv4 ip's in link::bind-ip did not work properly which made the IRCd either
not bind to the correct IP, or - like on FreeBSD - made it unable to link at all.
- A very rare crash on outgoing connect
- Serious crashbug [this is the same fix that was fixed by the hotfix/3.2.2b]
- TRE mem corruption- & crash-bugs (eg: in backreferences).
==[ MINOR BUGS FIXED ]==
- autoconnect not working if TS offset was negative (for the duration of the offset)
- CGI:IRC & IPv6: sometimes a users' IP was incorrectly formatted, causing 'ghosts'
- Mac OS X: permission problems
- Several installation issues with curl
- SSL: No more 'Underlying syscall error', the actual error is now shown
- And many more... see Changelog
- Made kline/shun/zline/gzline without parameters report the correct stats(flag).
- Made a few more errors send out to all opers, such as link::bind-ip problems.
- A few missing operflags in /STATS O (and SVSO)
- DCC Spamfilter was not always working correctly
- OperOverriding to, for example, a +zi channel did not print the special join notice.
- Servers behind ulines were not properly ulined, one effect that had was causing
an odd view in /MAP if you had flat-map + hide ulines + a juped server in services.
- Made SVSMODE -b/-e remove bans/excepts placed on IPs
- The set::htm::incoming-rate config item was not working correctly
- If a user was +R then remote server notices were accidently also filtered.
- A locop setting MODE #CHAN +O caused a desynch
- Resolver sometimes incorrectly aliased names, causing incorect TTLs etc.
- Fixed SVSNOOP not removing ALL oper status properly.
- 'shun' target was not working for spamfilter and ban version { }
- Removing of shuns placed on IP's did not take effect immediately (had to reconnect).
- Fixed a bug in mode skipping (eg: '+qk a b' if not +q) and error msgs.
- Chanmode +f #t (per-user text limit) now no longer affects halfops.
- Opers w/can_override can now +qa/-qa if they are not netadmins, also affected +L/+u.
Be sure you upgrade all servers to 3.2.3 if using these new abilities, or else you
will get desynch issues.
- Fixed several /SAMODE bugs as well, regarding non-netadmins, being halfop'ed, etc.
- /GZLINE [nick] was placing a *line on *@host instead of *@IP, fixed.
- alias::format in combination with ::type 'command' caused a crash
- zlib upgraded to 1.2.2, curl upgraded to 7.13.1, both fix various issues.
- Win32 installer now also installs doc\technical\*.*
- Desynch issues regarding +s/+p and +c/+S
- /SAMODE causing a 'fishy timestamp' if a cmode with a digit parameter was used.
==[ KNOWN ISSUES ]==
- Regexes: Be careful with backreferences (\1, etc), certain regexes can slow the
IRCd down considerably and even bring it to a near-halt. In the spamfilter user
target it's usually safe though. Slow spamfilter detection can help prevent the
slowdown/freeze, but might not work in worst-case scenario's.
- Regexes: Possessive quantifiers such as, for example, "++" (not to be confused
with "+") are not safe to use, they can easily freeze the IRCd.
==[ REMOVED ]==
- NAZIISH_CHBAN_HANDLING (did not work at all)
- The 'oldcloak' cloaking module is now removed, since this old algorithm got broken
8 months ago, nobody should be using it anymore.
==[ ADDITIONAL INFO ]==
* See Changelog for more details
+6
View File
@@ -0,0 +1,6 @@
ircdcron/ircd.cron
ircdcron/ircdchk
src/modules/Makefile
src/ssl.rnd
src/win32/devel/StackTrace.lib
src/win32/gnu_regex.lib
-16
View File
@@ -1,16 +0,0 @@
[repository]
native = LF
[patterns]
.RELEASE.NOTES = native
README = native
Unreal.nfo = native
makefile.win32 = native
Changes = native
**.c = native
**.h = native
**.conf = native
**.html = native
**.txt = native
**.bat = native
**.iss = native
-22
View File
@@ -1,22 +0,0 @@
syntax: regexp
# particular targets
^ircdcron/ircdchk$
^ircdcron/ircd\.cron$
^src/ircd$
^src/include$
^src/version\.c$
^unreal$
# General
\.(o|so|orig|rej)$
~$
# autotools
^config\.(status|log)$
# not quite autotools
^config\.settings$
^include/setup\.h$
^Makefile$
^src/modules/Makefile$
-1448
View File
File diff suppressed because it is too large Load Diff
+86 -220
View File
@@ -20,7 +20,7 @@
RUN_CONFIGURE () {
ARG=" "
ARG=""
# Do this even if we're not in advanced mode
if [ "$SHOWLISTMODES" = "1" ] ; then
ARG="$ARG--with-showlistmodes "
@@ -41,12 +41,12 @@ fi
if [ "$OPEROVERRIDEVERIFY" = "1" ] ; then
ARG="$ARG--with-operoverride-verify "
fi
if [ "$DISABLEEXTBANSTACKING" = "1" ]; then
ARG="$ARG--with-disable-extendedban-stacking ";
fi
if [ "$NOSPOOF" = "1" ] ; then
ARG="$ARG--enable-nospoof "
fi
if [ "$NOSPOOF" != "1" ] ; then
ARG="$ARG--disable-nospoof "
if [ -n "$HUB" ] ; then
ARG="$ARG--enable-hub "
fi
if [ "$CRYPTOIRCD" = "1" ] ; then
if test x"$SSLDIR" = "x" ; then
@@ -68,8 +68,8 @@ fi
if [ "$INET6" = "1" ] ; then
ARG="$ARG--enable-inet6 "
fi
if [ "$PREFIXAQ" != "1" ]; then
ARG="$ARG--disable-prefixaq "
if [ "$PREFIXAQ" = "1" ]; then
ARG="$ARG--enable-prefixaq "
fi
ARG="$ARG--with-listen=$LISTEN_SIZE "
ARG="$ARG--with-dpath=$DPATH "
@@ -77,17 +77,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"
if [ "x$INSTALLCURL" = "x1" ]; then
./curlinstall || exit 1
fi
echo $CONF
$CONF || exit 1
cd "$UNREALCWD"
$CONF
if [ "$CRYPTOIRCD" = "1" ] ; then
if [ ! -f server.req.pem ]; then
export OPENSSLPATH
@@ -277,42 +274,14 @@ while [ -z "$TEST" ] ; do
esac
done
TEST=""
while [ -z "$TEST" ] ; do
if [ "$DISABLEEXTBANSTACKING" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Do you want to disable extended ban stacking (~q:~c:#test, etc) support?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
DISABLEEXTBANSTACKING="1"
;;
[Nn]*)
DISABLEEXTBANSTACKING="0"
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
done
}
c=""
n=""
UNREALCWD="`pwd`"
NOSPOOF="1"
NOSPOOF=""
DPATH="`pwd`"
SPATH="`pwd`/src/ircd"
HUB="1"
DOMAINNAME=`hostname`
DEFPERM="0600"
CRYPTOIRCD=""
SSLDIR=""
@@ -326,14 +295,13 @@ MAXCONNECTIONS="1024"
INET6=""
REMOTEINC=""
CURLDIR=""
PREFIXAQ="1"
PREFIXAQ=""
SHOWLISTMODES="1"
TOPICNICKISNUH=""
SHUNNOTICES=""
NOOPEROVERRIDE=""
DISABLEUSERMOD=""
OPEROVERRIDEVERIFY=""
DISABLEEXTBANSTACKING=""
EXTRAPARA=""
if [ "`eval echo -n 'a'`" = "-n a" ] ; then
c="\c"
@@ -368,7 +336,6 @@ while [ $# -ge 1 ] ; do
. ./config.settings
fi
RUN_CONFIGURE
cd "$UNREALCWD"
exit 0
elif [ $1 = "-clean" -o $1 = "-C" ] ; then
CLEAN="1"
@@ -418,10 +385,8 @@ while [ -z "$TEST" ] ; do
echo "Many older operating systems have an insecure TCP/IP stack"
echo "which may be vulnerable to IP spoofing attacks, if you run"
echo "an operating system that is vulnerable to such attacks"
echo "enable this option."
echo "This option also prevents blind proxies (eg: HTTP POST proxies)"
echo "and other blind clients from connecting (eg: protects against"
echo "the Firefox XPS IRC Attack)."
echo "enable this option. This option can also be useful to prevent"
echo "blind proxies from connecting (eg: HTTP POST proxies)."
echo ""
echo "Do you want to enable the server anti-spoof protection?"
echo $n "[$TEST] -> $c"
@@ -455,28 +420,58 @@ else
DPATH=`eval echo $cc` # modified
fi
TEST="$SPATH"
echo ""
echo "What is the path to the ircd binary including the name of the binary?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
SPATH=$TEST
else
SPATH=`eval echo $cc` # modified
fi
TEST=""
SAVEME="$SPATH"
while [ -z "$TEST" ] ; do
TEST="$SAVEME"
if [ "$HUB" = "1" ] ; then
TEST="Hub"
else
TEST="Leaf"
fi
echo ""
echo "What is the path to the ircd binary including the name of the binary?"
echo "Would you like to compile as a hub or as a leaf?"
echo "Type Hub to select hub and Leaf to select leaf."
echo $n "[$TEST] -> $c"
read cc
read cc
if [ -z "$cc" ] ; then
SPATH=$TEST
else
SPATH=`eval echo $cc` # modified
fi
if [ "$SPATH" = "$DPATH" ]; then
echo ""
echo "You need to specify the path to the BINARY, not to a directory."
echo "The answer to this question can never be identical to the previous one."
echo "HINT: perhaps you want $DPATH/ircd ?"
TEST=""
cc=$TEST
fi
case "$cc" in
[Hh]*)
HUB="1"
;;
[Ll]*)
HUB=""
;;
*)
echo ""
echo "You must enter either Hub or Leaf"
TEST=""
;;
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"
@@ -532,14 +527,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 (in most cases it will be detected automatically)."
echo "leave this blank"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
SSLDIR="$TEST"
SSLDIR=""
else
SSLDIR=`eval echo $cc` # modified
fi
@@ -604,14 +599,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
@@ -626,8 +621,6 @@ while [ -z "$TEST" ] ; do
fi
echo ""
echo "Do you want to enable remote includes?"
echo "This allows stuff like this in your configuration file:"
echo "include \"http://www.somesite.org/files/opers.conf\";"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
@@ -650,144 +643,20 @@ while [ -z "$TEST" ] ; do
done
if [ "$REMOTEINC" = "1" ] ; then
if [ ! -d "$CURLDIR" ]; then
# Reset any previous CURLDIR if it doesn't exist (anymore)
CURLDIR=""
fi
INSTALLCURL="0"
if [ "x$CURLDIR" = "x" ]; then
# There is no reason to support this:
if [ -d "/usr/local/include/curl" ]; then
CURLDIR="/usr/local"
TEST=""
while [ -z "$TEST" ] ; do
TEST="$CURLDIR"
echo ""
echo "Specify the directory you installed libcurl to"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
else
TEST=$cc
CURLDIR=`eval echo $cc` # modified
fi
# Zeroeth, let's act SANE
if [ -d "/usr/include/curl" ]; then
CURLDIR="/usr"
fi
# First, let's make shell admins happy...
if [ -d "/usr/share/unreal-curl" ]; then
CURLDIR="/usr/share/unreal-curl"
fi
GOTASYNC=0
if [ "x$CURLDIR" != "x" ]; then
# Check if it's of any use: a curl without async dns (cares) hangs the entire ircd..
# normally this is done in ./configure but now we're forced to do it also here..
if "$CURLDIR"/bin/curl-config --features | grep -q -e AsynchDNS; then
GOTASYNC="1"
fi
if [ "$GOTASYNC" != "1" ]; then
PREVCURLDIR="$CURLDIR"
CURLDIR=""
fi
fi
# Second, use the local curl if it exists (overrides above)
if [ -d "$HOME/curl" ]; then
CURLDIR="$HOME/curl"
# Check if it's recent enough...
# But first, check if curl-config can be trusted at all: it depends
# on 'bc' for some reason and not all systems have that installed!
echo "1+1"|bc 1>/dev/null 2>&1
if [ "$?" = 0 ]; then
"$CURLDIR"/bin/curl-config --checkfor 7.21.0
if [ "$?" != 0 ]; then
echo ""
echo "Your self-compiled CURL library in $CURLDIR is slightly outdated."
echo "This probably means you had the library from a previous installation of UnrealIRCd."
echo "Because previous versions may be linked to a previous version to c-ares which"
echo "were not ABI compatible it is highly recommended to remove the version"
echo "and recompile it. We now have an automatic downloader and installer to compile"
echo "and install curl for you (in $CURLDIR). You can choose to do so in the question"
echo "after this one."
TEST=""
while [ -z "$TEST" ] ; do
TEST="Yes"
echo "Shall I rename $CURLDIR to $CURLDIR.old so it can be rebuild later on?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
rm -rf "$CURLDIR".old
mv "$CURLDIR" "$CURLDIR".old
CURLDIR=""
GOTASYNC=1
# wow the GOTASYNC=1 is hackish, but we need to prevent the error from later on
;;
[Nn]*)
echo "Uh, ok... I hope you know what you are doing..."
echo ""
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
done
fi
fi
fi
# Need to output it here, as the HOME check from above may cause this to be no longer relevant.
if [ "x$CURLDIR" = "x" -a "$GOTASYNC" != "1" ]; then
echo "Curl library was found in $PREVCURLDIR, but it does not support Asynchronous DNS (not compiled with c-ares)"
echo "so it's of no use to us."
fi
fi
if [ "x$CURLDIR" = "x" ]; then
# Still empty?
TEST=""
while [ -z "$TEST" ] ; do
TEST="Yes"
echo ""
echo "Do you want me to automatically download and install curl for you?"
echo "(will install in $HOME/curl)"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
INSTALLCURL="1"
CURLDIR="$HOME/curl"
;;
[Nn]*)
INSTALLCURL="0"
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
done
fi
if [ "$INSTALLCURL" != "1" ]; then
TEST=""
while [ -z "$TEST" ] ; do
TEST="$CURLDIR"
echo ""
echo "Specify the directory you installed libcurl to"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
else
TEST=$cc
CURLDIR=`eval echo $cc` # modified
fi
done
fi
done
fi
@@ -801,8 +670,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
@@ -946,16 +815,11 @@ done
if [ -n "$ADVANCED" ] ; then
RUN_ADVANCED
fi
TEST="$EXTRAPARA"
echo ""
echo "Would you like to pass any custom parameters to configure?"
echo "See \`./configure --help' and write them here:"
echo $n "[$TEST] -> $c"
echo "Would you like any more parameters to configure?"
echo "Write them here:"
echo $n "[]-> $c"
read EXTRAPARA
if [ -z "$EXTRAPARA" ]; then
EXTRAPARA="$TEST"
fi
rm -f config.settings
cat > config.settings << __EOF__
@@ -970,6 +834,8 @@ MAXSENDQLENGTH="$MAXSENDQLENGTH"
BUFFERPOOL="$BUFFERPOOL"
MAXCONNECTIONS="$MAXCONNECTIONS"
NICKNAMEHISTORYLENGTH="$NICKNAMEHISTORYLENGTH"
HUB="$HUB"
DOMAINNAME="$DOMAINNAME"
DEFPERM="$DEFPERM"
CRYPTOIRCD="$CRYPTOIRCD"
SSLDIR="$SSLDIR"
@@ -983,12 +849,10 @@ SHUNNOTICES="$SHUNNOTICES"
NOOPEROVERRIDE="$NOOPEROVERRIDE"
DISABLEUSERMOD="$DISABLEUSERMOD"
OPEROVERRIDEVERIFY="$OPEROVERRIDEVERIFY"
DISABLEEXTBANSTACKING="$DISABLEEXTBANSTACKING"
EXTRAPARA="$EXTRAPARA"
ADVANCED="$ADVANCED"
__EOF__
RUN_CONFIGURE
cd "$UNREALCWD"
cat << __EOF__
_______________________________________________________________________
@@ -1004,6 +868,8 @@ cat << __EOF__
|_______________________________________________________________________|
| - The UnrealIRCd Team - |
| |
| * Stskeeps stskeeps@unrealircd.com |
| * codemastr codemastr@unrealircd.com |
| * Syzop syzop@unrealircd.com |
|_______________________________________________________________________|
__EOF__
+22 -8
View File
@@ -1,18 +1,32 @@
UnrealIRCd is a free program, but we do put a lot of time, effort, and money
into creating and maintaining Unreal. To make it easier for users to show their
into creating and maintaining Unreal. To make it easier for user's to show their
appreciation, the Unreal team has decided to accept donations through PayPal. If
you like Unreal, and you'd like to see it continue to exist, please consider making
a donation. We're not asking for anything huge, whatever you can afford is fine.
PayPal Donation Link: http://unrealircd.com/donate.php
PayPal Donation Link:
<https://www.paypal.com/xclick/business=donation%40unrealircd.org&
item_name=UnrealIRCd+Donation&no_shipping=1&cn=Comments&tax=0&currency_code=USD>
If you don't want to use PayPal, or you want to donate something other than money,
contact Syzop (syzop@unrealircd.com).
Or simply send a payment through PayPal to:
donation@unrealircd.org
All those who donate at least a certain minimum amount will have their name
and/or company listed in /CREDITS.
Additionally, all donators will be listed on the website (regardless of the amount).
Please check the website for details.
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
your donation to:
UnrealIRCd Project
C/O Carsten Munk
P.O.Box 52
7400 Herning
Denmark
All those who donate at least $10 USD will have their name and/or company listed in /credits.
Additionally, all donators will be listed on the website (regardless of the amount). To make
this possible, please include along with your donation the name (or nickname) you want to
appear in the list as well as the company name (or IRC server) to list.
Thank you for your support,
The UnrealIRCd Team
[ $Id$ ]
+7 -17
View File
@@ -34,11 +34,11 @@ FROMDOS=/home/cmunk/bin/4dos
#
#XCFLAGS=-O -g -export-dynamic
IRCDLIBS=@IRCDLIBS@ @TRE_LIBS@ @CARES_LIBS@
IRCDLIBS=@IRCDLIBS@ @TRELIBS@ @CARESLIBS@
CRYPTOLIB=@CRYPTOLIB@
OPENSSLINCLUDES=
XCFLAGS=@TRE_CFLAGS@ @CARES_CFLAGS@ @CFLAGS@
XCFLAGS=-I@TREINCDIR@ -I@CARESINCDIR@ @CFLAGS@
#
# use the following on MIPS:
#CFLAGS= -systype bsd43 -DSYSTYPE_BSD43 -I$(INCLUDEDIR)
@@ -104,11 +104,9 @@ URL=@URL@
STRTOUL=@STRTOUL@
# [CHANGEME]
# If you get crashes around a specific number of clients, and that
# client load comes close or a little over the system-defined value of
# FD_SETSIZE, override it here and see what happens. You may override
# the system FD_SETSIZE by setting the FD_SETSIZE Makefile variable to
# -DFD_SETSIZE=<some number>.
# If you get crashes around a specific number of clients, and that client
# load comes close or a little over the system-defined value of FD_SETSIZE,
# override it here and see what happens.
FD_SETSIZE=@FD_SETSIZE@
# Where is your openssl binary
@@ -133,11 +131,9 @@ MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'IRCDLIBS=${IRCDLIBS}' \
'RM=${RM}' 'CP=${CP}' 'TOUCH=${TOUCH}' \
'SHELL=${SHELL}' 'STRTOUL=${STRTOUL}' \
'CRYPTOLIB=${CRYPTOLIB}' \
'CRYPTOINCLUDES=${CRYPTOINCLUDES}' \
'URL=${URL}'
'CRYPTOINCLUDES=${CRYPTOINCLUDES}' 'URL=${URL}'
custommodule:
@if test -z "${MODULEFILE}"; then echo "Please set MODULEFILE when calling \`\`make custommodule''. For example, \`\`make custommodule MODULEFILE=callerid''." >&2; exit 1; fi
cd src; ${MAKE} ${MAKEARGS} MODULEFILE=${MODULEFILE} 'EXLIBS=${EXLIBS}' custommodule
server:
@@ -206,7 +202,7 @@ depend:
install: all
$(INSTALL) -m 0700 -d $(IRCDDIR)
$(INSTALL) -m 0700 src/ircd $(BINDIR) 2>/dev/null || { $(INSTALL) -m 0700 -d "$$(dirname '$(BINDIR)')"; $(INSTALL) -m 0700 src/ircd $(BINDIR); }
$(INSTALL) -m 0700 src/ircd $(BINDIR)
$(INSTALL) -m 0700 -d $(IRCDDIR)/networks
$(INSTALL) -m 0600 networks/*.network $(IRCDDIR)/networks
$(INSTALL) -m 0700 networks/makenet $(IRCDDIR)/networks
@@ -222,12 +218,6 @@ install: all
$(INSTALL) -m 0700 unreal $(IRCDDIR)
$(INSTALL) -m 0700 -d $(IRCDDIR)/modules
$(INSTALL) -m 0700 src/modules/*.so $(IRCDDIR)/modules
$(INSTALL) -m 0700 -d $(IRCDDIR)/ircdcron
$(INSTALL) -m 0600 ircdcron/ircd.cron $(IRCDDIR)/ircdcron
$(INSTALL) -m 0700 ircdcron/ircdchk $(IRCDDIR)/ircdcron
-@if [ ! -f "$(IRCDDIR)/curl-ca-bundle.crt" ] ; then \
$(INSTALL) -m 0700 curl-ca-bundle.crt $(IRCDDIR) ; \
fi
pem: src/ssl.cnf
@echo "Generating certificate request .. "
+53 -57
View File
@@ -1,74 +1,70 @@
===============================================
= UnrealIRCd v3.2.9-RC2 =
= UnrealIRCd v3.2.3 =
===============================================
This release was brought to you by:
Was brought to you by:
Head coder:
The core team:
==============
* Stskeeps <stskeeps@tspre.org>
* codemastr <codemastr@unrealircd.com>
* Syzop <syzop@unrealircd.org>
* Luke <luke@unrealircd.com>
Contributors
============
* Syzop
* 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>
Coders:
========
* binki
Contributors:
=============
* Bock
* goldenwolf
* katsklaw
* Stealth
RC Testers:
===========
LqidSkin, goldenwolf, katsklaw, nph, selten, Simplicity
Previous coders:
================
* Stskeeps
* codemastr
* Many more..
Internet Presence:
* http://www.unrealircd.com/
Precenses on the Internet:
* http://www.unrealircd.com
UnrealIRCd Bugtracker (Where to report bugs, make suggestions, and submit patches)
===================================================================================
http://bugs.unrealircd.org/
CVS
====
To get anonymous access: (read only)
"cvs -d :pserver:anonymous@cvs.ircsystems.net:/home/cmunk/ircsystems/cvsroot login"
press enter when asked for password
Then, choose the appropiate branch you want:
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: http://unrealircd.com/unreal32docs.html)
* check the FAQ (http://vulnscan.org/UnrealIrcd/faq/)
* read the docs (doc/unreal32docs.html or online: www.unrealircd.com/unreal32docs.html)
* check the FAQ (www.vulnscan.org/UnrealIrcd/faq/)
Means of support:
* IRC: /server irc.unrealircd.com 6667 - /join #unreal-support
[Note: Follow the bot's instructions in order to get voice.
Please be patient after asking questions, we may be busy
or we're away. Don't repeat questions, we will have heard
you first time.
READ THE TOPIC before you ask anything. We give support
on a free basis. We are volunteering to help you, but we
are humans like you. We sometimes just need some peace.]
* 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
or we're away. Don't repeat questions, we heard you first time,
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).
Development version
====================
To access the latest development version of UnrealIRCd you need to use mercurial (hg).
Note that because you are accessing a development version it may not compile, the
server may crash, or other problems can occur since the code is likely to be only
lightly tested (or not at all). On the other hand, using the development version may
help you to get rid of that single nasty bug that is haunting you, plus if you test
it and give us feedback (report bugs) then you actually help us with developing Unreal.
The command to grab the development version is:
hg clone http://hg.unrealircd.org/unreal
If you get something like 'hg: command not found' then you need to install mercurial.
Most *NIX systems have such a 'mercurial' package, but if you don't, or you are on
Windows or Mac OS X, then see http://mercurial.selenic.com/
UnrealIRCd Bugtracker (Where to report bugs or make suggestions)
==================================================================
http://bugs.unrealircd.org
Want to discuss, chat, etc?
=============================
* IRC: /server irc.unrealircd.com 6667 - /join #chat
(NOT for support! If you want support then use #unreal-support instead!)
* IRC: /server irc.ircsystems.net 6667 - /join #UnrealIRCd
+2 -2
View File
@@ -4,8 +4,8 @@ alias nickserv { type services; };
alias ns { target 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 memoserv { type services; };
alias ms { target memoserv; type services; };
alias operserv { type services; };
alias os { target operserv; type services; };
alias helpserv { type services; };
-26
View File
@@ -1,26 +0,0 @@
/* Atheme Aliases */
alias nickserv { type services; };
alias ns { target 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 operserv { type services; };
alias os { target operserv; type services; };
alias helpserv { type services; };
alias botserv { type services; };
alias bs { target botserv; type services; };
alias hostserv { type services; };
alias hs { target hostserv; type services; };
alias saslserv { type services; };
alias sss { target saslserv; type services; };
alias gameserv { type services; };
alias gms { target gameserv; type services; };
alias groupserv { type services; };
alias grs { target groupserv; type services; };
alias alis { type services; };
alias ls { target alis; type services; };
include "aliases/aliases.conf";
+2 -2
View File
@@ -21,8 +21,8 @@ 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 memoserv { type services; };
alias ms { target memoserv; type services; };
alias nickserv { type services; };
alias ns { target nickserv; type services; };
alias operserv { type services; };
+2 -2
View File
@@ -4,8 +4,8 @@ alias nickserv { type services; };
alias ns { target 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 memoserv { type services; };
alias ms { target memoserv; type services; };
alias rootserv { type services; };
alias rs { target rootserv; type services; };
+2 -2
View File
@@ -4,8 +4,8 @@ alias nickserv { type services; };
alias ns { target 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 memoserv { type services; };
alias ms { target memoserv; type services; };
alias operserv { type services; };
alias os { target operserv; type services; };
alias helpserv { type services; };
+2 -2
View File
@@ -4,8 +4,8 @@ alias nickserv { type services; };
alias ns { target 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 memoserv { type services; };
alias ms { target memoserv; type services; };
alias operserv { type services; };
alias os { target operserv; type services; };
alias helpserv { type services; };
+2 -2
View File
@@ -4,8 +4,8 @@ alias nickserv { type services; };
alias ns { target 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 memoserv { type services; };
alias ms { target memoserv; type services; };
alias operserv { type services; };
alias os { target operserv; type services; };
alias helpserv { type services; };
+141
View File
@@ -0,0 +1,141 @@
dnl aclocal.m4 generated automatically by aclocal 1.4-p4
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
dnl Macro: unet_CHECK_TYPE_SIZES
dnl
dnl Check the size of several types and define a valid int16_t and int32_t.
dnl
AC_DEFUN(unreal_CHECK_TYPE_SIZES,
[dnl Check type sizes
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
if test "$ac_cv_sizeof_int" = 2 ; then
AC_CHECK_TYPE(int16_t, int)
AC_CHECK_TYPE(u_int16_t, unsigned int)
elif test "$ac_cv_sizeof_short" = 2 ; then
AC_CHECK_TYPE(int16_t, short)
AC_CHECK_TYPE(u_int16_t, unsigned short)
else
AC_MSG_ERROR([Cannot find a type with size of 16 bits])
fi
if test "$ac_cv_sizeof_int" = 4 ; then
AC_CHECK_TYPE(int32_t, int)
AC_CHECK_TYPE(u_int32_t, unsigned int)
elif test "$ac_cv_sizeof_short" = 4 ; then
AC_CHECK_TYPE(int32_t, short)
AC_CHECK_TYPE(u_int32_t, unsigned short)
elif test "$ac_cv_sizeof_long" = 4 ; then
AC_CHECK_TYPE(int32_t, long)
AC_CHECK_TYPE(u_int32_t, unsigned long)
else
AC_MSG_ERROR([Cannot find a type with size of 32 bits])
fi
AC_CHECK_SIZEOF(rlim_t)
if test "$ac_cv_sizeof_rlim_t" = 8 ; then
AC_DEFINE(LONG_LONG_RLIM_T)
fi
])
AC_DEFUN(CHECK_LIBCURL,
[
AC_ARG_ENABLE(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 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"
URL="url.o"
AC_SUBST(URL)
])
])
dnl the following 2 macros are based on CHECK_SSL by Mark Ethan Trostler <trostler@juniper.net>
AC_DEFUN([CHECK_SSL],
[
AC_ARG_ENABLE(ssl,
[AC_HELP_STRING([--enable-ssl=],[enable ssl will check /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr])],
[
AC_MSG_CHECKING(for openssl)
for dir in $enableval /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr; do
ssldir="$dir"
if test -f "$dir/include/openssl/ssl.h"; then
AC_MSG_RESULT(found in $ssldir/include/openssl)
found_ssl="yes";
if test ! "$ssldir" = "/usr" ; then
CFLAGS="$CFLAGS -I$ssldir/include";
fi
break;
fi
if test -f "$dir/include/ssl.h"; then
AC_MSG_RESULT(found in $ssldir/include)
found_ssl="yes";
if test ! "$ssldir" = "/usr" ; then
CFLAGS="$CFLAGS -I$ssldir/include";
fi
break
fi
done
if test x_$found_ssl != x_yes; then
AC_MSG_RESULT(not found)
AC_WARN(disabling ssl support)
else
CRYPTOLIB="-lssl -lcrypto";
if test ! "$ssldir" = "/usr" ; then
LDFLAGS="$LDFLAGS -L$ssldir/lib";
fi
AC_DEFINE(USE_SSL)
fi
],
)
])
AC_DEFUN([CHECK_ZLIB],
[
AC_ARG_ENABLE(ziplinks,
[AC_HELP_STRING([--enable-ziplinks],[enable ziplinks will check /usr/local /usr /usr/pkg])],
[
AC_MSG_CHECKING(for zlib)
for dir in $enableval /usr/local /usr /usr/pkg; do
zlibdir="$dir"
if test -f "$dir/include/zlib.h"; then
AC_MSG_RESULT(found in $zlibdir)
found_zlib="yes";
if test "$zlibdir" = "/usr" ; then
CFLAGS="$CFLAGS -DZIP_LINKS";
else
CFLAGS="$CFLAGS -I$zlibdir/include -DZIP_LINKS";
fi
break;
fi
done
if test x_$found_zlib != x_yes; then
AC_MSG_RESULT(not found)
AC_WARN(disabling ziplink support)
else
IRCDLIBS="$IRCDLIBS -lz";
if test "$zlibdir" != "/usr" ; then
LDFLAGS="$LDFLAGS -L$zlibdir/lib";
fi
HAVE_ZLIB=yes
fi
AC_SUBST(HAVE_ZLIB)
],
)
])
+492
View File
@@ -0,0 +1,492 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/ircd.c)
if test $# = 0; then
echo "You might want to run ./Config or provide some parameters to this script."
echo "./configure --help for information about this script"
exit 0
fi
AC_CONFIG_HEADER(include/setup.h)
AC_PROG_CC
if test "$ac_cv_prog_gcc" = "yes"; then
CFLAGS="$CFLAGS -funsigned-char"
AC_CACHE_CHECK(if gcc has a working -pipe, ac_cv_pipe, [
save_cflags="$CFLAGS"
CFLAGS="$CFLAGS -pipe"
AC_TRY_COMPILE(,, ac_cv_pipe="yes", ac_cv_pipe="no")
CFLAGS="$save_cflags"
])
if test "$ac_cv_pipe" = "yes"; then
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 "`gcc -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 "`gcc -v --help 2>&1`" in
*-Wpointer-sign* ) CFLAGS="$CFLAGS -Wno-pointer-sign" ;;
esac
AC_PATH_PROG(RM,rm)
AC_PATH_PROG(CP,cp)
AC_PATH_PROG(TOUCH,touch)
AC_PATH_PROG(OPENSSLPATH,openssl)
AC_PATH_PROG(INSTALL,install)
AC_CHECK_PROG(MAKER, gmake, gmake, make)
AC_PATH_PROG(GMAKE,gmake)
AC_PATH_PROG(GUNZIP, gunzip)
AC_PATH_PROG(PKGCONFIG, pkg-config)
dnl Checks for libraries.
AC_CHECK_LIB(descrypt, crypt, [AC_DEFINE(HAVE_CRYPT) IRCDLIBS="$IRCDLIBS-ldescrypt " MKPASSWDLIBS="-ldescrypt"],
AC_CHECK_LIB(crypt, crypt,[ AC_DEFINE(HAVE_CRYPT) IRCDLIBS="$IRCDLIBS-lcrypt " MKPASSWDLIBS="-lcrypt"]))
AC_CHECK_LIB(socket, socket,IRCDLIBS="$IRCDLIBS-lsocket " SOCKLIB="-lsocket")
AC_CHECK_LIB(nsl, inet_ntoa,IRCDLIBS="$IRCDLIBS-lnsl " INETLIB="-lnsl")
AC_SUBST(IRCDLIBS)
AC_SUBST(MKPASSWDLIBS)
dnl module checking based on Hyb7's module checking code
AC_DEFUN(AC_ENABLE_DYN,
[
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"
AC_CACHE_CHECK(if we need the -export-dynamic flag, ac_cv_export_dynamic, [
AC_TRY_LINK(, [int i];, ac_cv_export_dynamic=yes, ac_cv_export_dynamic=no)])
if test "$ac_cv_export_dynamic" = "no"; then
CFLAGS=$hold_cflags
fi
AC_CACHE_CHECK(for compiler option to produce PIC,ac_cv_pic,[
if test "$ac_cv_prog_gcc" = "yes"; then
ac_cv_pic="-fPIC -DPIC -shared"
case `uname -s` in
Darwin*[)]
ac_cv_pic="-bundle -flat_namespace -undefined suppress"
;;
HP-UX*[)]
ac_cv_pic="-fPIC"
;;
esac
else
case `uname -s` in
SunOS*[)]
ac_cv_pic="-KPIC -DPIC -G"
;;
esac
fi
])
AC_CACHE_CHECK(if your system prepends an underscore on symbols,ac_cv_underscore,[
cat >uscore.c << __EOF__
int main() {
return 0;
}
__EOF__
$CC -o uscore $CFLAGS uscore.c 1>&5
if test -z "`strings -a uscore |grep '^_main$'`"; then
ac_cv_underscore=no
else
ac_cv_underscore=yes
fi
rm -f uscore uscore.c
])
if test "$ac_cv_underscore" = "yes"; then
AC_DEFINE(UNDERSCORE)
fi
MODULEFLAGS=$ac_cv_pic
AC_DEFINE(DYNAMIC_LINKING)
])
AC_DEFUN(AC_ENABLE_INET6,[
AC_CACHE_CHECK(if your system has IPv6 support, ac_cv_ip6, [
save_libs="$LIBS"
LIBS="$LIBS $SOCKLIB"
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/socket.h>
int main() {
if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
exit(1);
exit(0);
}
], ac_cv_ip6=yes, ac_cv_ip6=no)
])
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))
AC_CHECK_HEADER(sys/syslog.h,AC_DEFINE(SYSSYSLOGH))
AC_CHECK_HEADER(unistd.h,AC_DEFINE(UNISTDH))
AC_CHECK_HEADER(string.h,AC_DEFINE(STRINGH))
AC_CHECK_HEADER(strings.h,AC_DEFINE(STRINGSH))
AC_CHECK_HEADER(malloc.h,AC_DEFINE(MALLOCH,<malloc.h>))
AC_CHECK_HEADER(sys/rusage.h,AC_DEFINE(RUSAGEH))
AC_CHECK_HEADER(glob.h,AC_DEFINE(GLOBH))
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_TYPE_UID_T
unreal_CHECK_TYPE_SIZES
AC_CACHE_CHECK(what kind of nonblocking sockets you have, ac_cv_nonblocking,[
save_libs="$LIBS"
LIBS="$LIBS $SOCKLIB"
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/file.h>
#include <signal.h>
alarmed() {
exit(1);
}
int main() {
#ifdef O_NONBLOCK
char b[12], x[32];
int f, l = sizeof(x);
f = socket(AF_INET, SOCK_DGRAM, 0);
if (f >= 0 && !(fcntl(f, F_SETFL, O_NONBLOCK))) {
signal(SIGALRM, alarmed);
alarm(3);
recvfrom(f, b, 12, 0, (struct sockaddr *)x, &l);
alarm(0);
exit(0);
}
#endif
exit(1);
}
],ac_cv_nonblocking=O_NONBLOCK,[
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/file.h>
#include <signal.h>
alarmed() {
exit(0);
}
int main() {
#ifdef O_NDELAY
char b[12], x[32];
int f, l = sizeof(x);
f = socket(AF_INET, SOCK_DGRAM, 0);
if (f >= 0 && !(fcntl(f, F_SETFL, O_NDELAY))) {
signal(SIGALRM, alarmed);
alarm(3);
recvfrom(f, b, 12, 0, (struct sockaddr *)x, &l);
alarm(0);
exit(0);
}
#endif
exit(1);
}],ac_cv_nonblocking=O_NDELAY,[
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/file.h>
#include <signal.h>
alarmed() {
exit(1);
}
int main() {
#ifdef FIONBIO
char b[12], x[32];
int f, l = sizeof(x);
f = socket(AF_INET, SOCK_DGRAM, 0);
if (f >= 0 && !(fcntl(f, F_SETFL, FIONBIO))) {
signal(SIGALRM, alarmed);
alarm(3);
recvfrom(f, b, 12, 0, (struct sockaddr *)x, &l);
alarm(0);
exit(0);
}
#endif
exit(1);
], ac_cv_nonblocking=FIONBIO,ac_cv_nonblocking=none)])])])
if test "$ac_cv_nonblocking" = "O_NONBLOCK"; then
AC_DEFINE(NBLOCK_POSIX)
elif test "$ac_cv_nonblocking" = "O_NDELAY"; then
AC_DEFINE(NBLOCK_BSD)
elif test "$ac_cv_nonblocking" = "FIONBIO"; then
AC_DEFINE(NBLOCK_SYSV)
fi
LIBS="$save_libs"
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>
#include <sys/resource.h>
#include <unistd.h>
int main() {
struct rlimit corelim;
corelim.rlim_cur = corelim.rlim_max = RLIM_INFINITY;
if (setrlimit(RLIMIT_CORE, &corelim))
exit(1);
exit(0);
}
],ac_cv_force_core=yes,ac_cv_force_core=no)
])
if test "$ac_cv_force_core" = "yes"; then
AC_DEFINE(FORCE_CORE)
fi
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(gettimeofday,AC_DEFINE(GETTIMEOFDAY),[AC_CHECK_FUNCS(lrand48,AC_DEFINE(LRADN48))])
AC_CHECK_FUNCS(getrusage,AC_DEFINE(GETRUSAGE_2),[AC_CHECK_FUNCS(times,AC_DEFINE(TIMES_2))])
AC_CHECK_FUNCS(setproctitle,AC_DEFINE(HAVE_SETPROCTITLE),[
AC_CHECK_LIB(util,setproctitle,AC_DEFINE(HAVE_SETPROCTITLE) IRCDLIBS="$IRCDLIBS-lutil",[
AC_EGREP_HEADER([#define.*PS_STRINGS.*],sys/exec.h,AC_DEFINE(HAVE_PSSTRINGS),[
AC_CHECK_FUNCS(pstat,AC_DEFINE(HAVE_PSTAT))
])
])
])
AC_CACHE_CHECK(what type of signals you have, ac_cv_sigtype, [
AC_TRY_RUN([
#include <signal.h>
int main() {
sigaction(SIGTERM, (struct sigaction *)0L, (struct sigaction *)0L);
}
], ac_cv_sigtype=POSIX, [
AC_TRY_RUN([
#include <signal.h>
int calls = 0;
void handler()
{
if (calls)
return;
calls++;
kill(getpid(), SIGTERM);
sleep(1);
}
int main() {
signal(SIGTERM, handler);
kill(getpid(), SIGTERM);
exit(0);
}
], ac_cv_sigtype=BSD,ac_cv_sigtype=SYSV)])])
if test "$ac_cv_sigtype" = "POSIX"; then
AC_DEFINE(POSIX_SIGNALS)
elif test "$ac_cv_sigtype" = "BSD"; then
AC_DEFINE(BSD_RELIABLE_SIGNALS)
else
AC_DEFINE(SYSV_UNRELIABLE_SIGNALS)
fi
AC_CHECK_FUNCS(strtoken,,AC_DEFINE(NEED_STRTOKEN))
AC_CHECK_FUNCS(strtok,,AC_DEFINE(NEED_STRTOK))
AC_CHECK_FUNCS(strerror,,AC_DEFINE(NEED_STRERROR))
AC_CHECK_FUNCS(index,,AC_DEFINE(NOINDEX))
AC_CHECK_FUNCS(strtoul,,STRTOUL="strtoul.o")
AC_CHECK_FUNCS(bcopy,,AC_DEFINE(NEED_BCOPY))
AC_CHECK_FUNCS(bcmp,,AC_DEFINE(NEED_BCMP))
AC_CHECK_FUNCS(bzero,,AC_DEFINE(NEED_BZERO))
AC_CHECK_FUNCS(strcasecmp,AC_DEFINE(GOT_STRCASECMP))
save_libs="$LIBS"
LIBS="$LIBS $SOCKLIB $INETLIB"
AC_CHECK_FUNCS(inet_addr,,AC_DEFINE(NEED_INET_ADDR))
AC_CHECK_FUNCS(inet_ntoa,,AC_DEFINE(NEED_INET_NTOA))
AC_CHECK_FUNCS(inet_netof,,AC_DEFINE(NEED_INET_NETOF))
LIBS="$save_libs"
AC_CHECK_FUNCS(syslog,AC_DEFINE(HAVE_SYSLOG))
AC_CHECK_FUNCS(vsyslog,AC_DEFINE(HAVE_VSYSLOG))
AC_SUBST(STRTOUL)
AC_SUBST(CRYPTOLIB)
AC_SUBST(MODULEFLAGS)
AC_ARG_WITH(listen, [AC_HELP_STRING([--with-listen=backlog],[Specify the listen backlog value])],
AC_DEFINE_UNQUOTED(LISTEN_SIZE,$withval),AC_DEFINE(LISTEN_SIZE,5))
AC_ARG_WITH(nick-history, [AC_HELP_STRING([--with-nick-history=length],[Specify the length of the nickname history])],
AC_DEFINE_UNQUOTED(NICKNAMEHISTORYLENGTH,$withval), AC_DEFINE(NICKNAMEHISTORYLENGTH,2000))
AC_ARG_WITH(sendq, [AC_HELP_STRING([--with-sendq=maxsendq],[Specify the max sendq for the server])],
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_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") 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))
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_SUBST(IRCDDIR)
AC_SUBST(BINDIR)
AC_MSG_CHECKING(if FD_SETSIZE is large enough to allow $ac_fd file descriptors)
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/time.h>
int main() {
if (FD_SETSIZE >= $ac_fd)
exit(0);
exit(1);
}
], AC_MSG_RESULT(yes), [
FD_SETSIZE="-DFD_SETSIZE=$ac_fd"
AC_MSG_RESULT(no)
])
AC_SUBST(FD_SETSIZE)
case `uname -s` in
*SunOS*)
CFLAGS="$CFLAGS -D_SOLARIS"
IRCDLIBS="$IRCDLIBS -lresolv "
;;
*solaris*)
CFLAGS="$CFLAGS -D_SOLARIS"
IRCDLIBS="$IRCDLIBS -lresolv "
;;
esac
dnl REMEMBER TO CHANGE WITH A NEW TRE RELEASE!
tre_version="0.7.2"
AC_MSG_RESULT(extracting TRE regex library)
cur_dir=`pwd`
cd extras
dnl remove old tre directory to force a recompile...
rm -rf tre-$tre_version
if test "x$ac_cv_path_GUNZIP" = "x" ; then
tar xfz tre.tar.gz
else
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 TRE regex library)
cd tre-$tre_version
./configure --disable-agrep --disable-shared --disable-system-abi --disable-wchar --disable-multibyte --prefix=$cur_dir/extras/regexp || exit 1
AC_MSG_RESULT(compiling TRE regex library)
$ac_cv_prog_MAKER || exit 1
AC_MSG_RESULT(installing TRE regex library)
$ac_cv_prog_MAKER install || exit 1
TREINCDIR="$cur_dir/extras/regexp/include"
AC_SUBST(TREINCDIR)
if test "x$ac_cv_path_PKGCONFIG" = "x" ; then
TRELIBS="-L../extras/regexp/lib -ltre"
else
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.3.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)
CARESLIBS="-L../extras/c-ares/lib -lcares"
AC_SUBST(CARESLIBS)
cd $cur_dir
AC_OUTPUT(Makefile src/modules/Makefile unreal ircdcron/ircdchk)
chmod 0700 unreal
chmod 0700 ircdcron/ircdchk
-253
View File
@@ -1,253 +0,0 @@
#serial 1
dnl Macro: unreal_CHECK_TYPE_SIZES
dnl originally called unet_CHECK_TYPE_SIZES
dnl
dnl Check the size of several types and define a valid int16_t and int32_t.
dnl
AC_DEFUN([unreal_CHECK_TYPE_SIZES],
[dnl Check type sizes
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
if test "$ac_cv_sizeof_int" = 2 ; then
AC_CHECK_TYPE(int16_t, int)
AC_CHECK_TYPE(u_int16_t, unsigned int)
elif test "$ac_cv_sizeof_short" = 2 ; then
AC_CHECK_TYPE(int16_t, short)
AC_CHECK_TYPE(u_int16_t, unsigned short)
else
AC_MSG_ERROR([Cannot find a type with size of 16 bits])
fi
if test "$ac_cv_sizeof_int" = 4 ; then
AC_CHECK_TYPE(int32_t, int)
AC_CHECK_TYPE(u_int32_t, unsigned int)
elif test "$ac_cv_sizeof_short" = 4 ; then
AC_CHECK_TYPE(int32_t, short)
AC_CHECK_TYPE(u_int32_t, unsigned short)
elif test "$ac_cv_sizeof_long" = 4 ; then
AC_CHECK_TYPE(int32_t, long)
AC_CHECK_TYPE(u_int32_t, unsigned long)
else
AC_MSG_ERROR([Cannot find a type with size of 32 bits])
fi
AC_CHECK_SIZEOF(rlim_t)
if test "$ac_cv_sizeof_rlim_t" = 8 ; then
AC_DEFINE([LONG_LONG_RLIM_T], [], [Define if rlim_t is long long])
fi
])
AC_DEFUN([CHECK_LIBCURL],
[
AC_ARG_ENABLE(libcurl,
[AC_HELP_STRING([--enable-libcurl=DIR],[enable libcurl (remote include) support])],
[enable_curl=$enableval],
[enable_curl=no])
AS_IF([test "x$enable_curl" != "xno"],
[
dnl sane, default directory for Operating System-managed libcURL
dnl (when --enable-libcurl is passed without any arguments). On
dnl systems with stuff in /usr/local, /usr/local/bin should already
dnl be in PATH. On sane systems, this will invoke the curl-config
dnl installed by the package manager.
CURLCONFIG="curl-config"
AS_IF([test "x$enable_curl" != "xyes"],
[CURLCONFIG="$enable_curl/bin/curl-config"])
AC_MSG_CHECKING([$CURLCONFIG])
AS_IF([$CURLCONFIG --version 2>/dev/null >/dev/null],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_FAILURE([Could not find curl-config, try editing --enable-libcurl])])
CURLCFLAG="`$CURLCONFIG --cflags`"
CURLLIBS="`$CURLCONFIG --libs`"
dnl This test must be this way because of #3981
AS_IF([$CURLCONFIG --features | grep -q -e AsynchDNS],
[CURLUSESCARES="1"],
[CURLUSESCARES="0"])
AS_IF([test "$CURLUSESCARES" = "0"],
[AC_MSG_WARN([cURL seems compiled without c-ares support. Your IRCd will possibly stall when REHASHing!])])
dnl sanity warnings
AS_IF([test -z "${CURLLIBS}"],
[AC_MSG_WARN([CURLLIBS is empty, that probably means that I could not find $enable_curl/bin/curl-config])])
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. -- Syzop
dnl
dnl It is dangerous to mix and match cURL with potentially ABI-incompatible versions of
dnl c-ares, just use --with-system-cares.
dnl Thus, make sure to use --with-system-cares when using system-cURL. If the user
dnl wants bundled c-ares + system libcURL, then we should filter out c-ares
dnl flags. _Only_ in that case should we mess with the flags. -- ohnobinki
AS_IF([test "x$with_system_cares" = "xno" && test "x$HOME/curl" != "x$enable_curl" && test "x/usr/share/unreal-curl" != "x$enable_curl" && test "$CURLUSESCARES" != "0" ],
[
AC_MSG_ERROR([[
You have decided to build unrealIRCd with libcURL (remote includes) support.
However, you have disabled system-installed c-ares support (--with-system-cares).
Because UnrealIRCd will use a bundled copy of c-ares which may be incompatible
with the system-installed libcURL, this is a bad idea which may result in error
messages looking like:
\`\`[error] unrealircd.conf:9: include: error downloading '(http://example.net/ex.conf)': Could not resolve host: example.net (Successful completion)''
Or UnrealIRCd might even crash.
Please build UnrealIRCd with --with-system-cares when enabling --enable-libcurl
]])
])
AS_IF([test "x`echo $CURLLIBS |grep ares`" != x && test "x$with_system_cares" = "xno"],
[
dnl Attempt one: Linux sed
XCURLLIBS="`echo "$CURLLIBS"|sed -r 's/(@<:@^ @:>@+ @<:@^ @:>@+ )(@<:@^ @:>@+ @<:@^ @:>@+ )(.+)/\1\3/g' 2>/dev/null`"
AS_IF([test "x$XCURLLIBS" = "x"],
[
dnl Attempt two: FreeBSD (and others?) sed
XCURLLIBS="`echo "$CURLLIBS"|sed -E 's/(@<:@^ @:>@+ @<:@^ @:>@+ )(@<:@^ @:>@+ @<:@^ @:>@+ )(.+)/\1\3/g' 2>/dev/null`"
AS_IF([test x"$XCURLLIBS" = x],
[
AC_MSG_ERROR([sed appears to be broken. It is needed for a remote includes compile hack.])
])
])
CURLLIBS="$XCURLLIBS"
IRCDLIBS_CURL_CARES="$CARES_LIBS"
CFLAGS_CURL_CARES="$CARES_CFLAGS"
])
dnl Make sure that linking against cURL works rather than letting the user
dnl find out after compiling most of his program. ~ohnobinki
IRCDLIBS="$IRCDLIBS $CURLLIBS"
CFLAGS="$CFLAGS $CURLCFLAG"
AC_DEFINE([USE_LIBCURL], [], [Define if you have libcurl installed to get remote includes and MOTD support])
AC_MSG_CHECKING([curl_easy_init() in $CURLLIBS])
LIBS_SAVEDA="$LIBS"
CFLAGS_SAVEDA="$CFLAGS"
LIBS="$IRCDLIBS $IRCDLIBS_CURL_CARES"
CFLAGS="$CFLAGS $CFLAGS_CURL_CARES"
AC_LINK_IFELSE(
[
AC_LANG_PROGRAM(
[[#include <curl/curl.h>]],
[[CURL *curl = curl_easy_init();]])
],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_FAILURE([You asked for libcURL (remote includes) support, but it can't be found at $enable_curl])
])
LIBS="$LIBS_SAVEDA"
CFLAGS="$CFLAGS_SAVEDA"
URL="url.o"
AC_SUBST(URL)
]) dnl AS_IF(enable_curl)
])
dnl the following 2 macros are based on CHECK_SSL by Mark Ethan Trostler <trostler@juniper.net>
AC_DEFUN([CHECK_SSL],
[
AC_ARG_ENABLE(ssl,
[AC_HELP_STRING([--enable-ssl=],[enable ssl will check /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/sfw /usr/local /usr])],
[],
[enable_ssl=no])
AS_IF([test $enable_ssl != "no"],
[
AC_MSG_CHECKING([for openssl])
for dir in $enable_ssl /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/sfw /usr/local /usr; do
ssldir="$dir"
if test -f "$dir/include/openssl/ssl.h"; then
AC_MSG_RESULT([found in $ssldir/include/openssl])
found_ssl="yes";
if test ! "$ssldir" = "/usr" ; then
CFLAGS="$CFLAGS -I$ssldir/include";
fi
break
fi
if test -f "$dir/include/ssl.h"; then
AC_MSG_RESULT([found in $ssldir/include])
found_ssl="yes";
if test ! "$ssldir" = "/usr" ; then
CFLAGS="$CFLAGS -I$ssldir/include";
fi
break
fi
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 " (or pass --disable-ssl to ./configure)"
echo ""
exit 1
else
CRYPTOLIB="-lssl -lcrypto";
if test ! "$ssldir" = "/usr" ; then
LDFLAGS="$LDFLAGS -L$ssldir/lib";
fi
AC_DEFINE([USE_SSL], [], [Define if you want to allow SSL connections])
fi
])
])
AC_DEFUN([CHECK_ZLIB],
[
AC_ARG_ENABLE([ziplinks],
[AC_HELP_STRING([--enable-ziplinks=DIR],[enable ziplinks. will check /usr/local /usr /usr/pkg. Note that SSL does its own compression, so you won't need this for SSL links.])],
[],
[enable_ziplinks=no])
AS_IF([test $enable_ziplinks != "no"],
[
AC_MSG_CHECKING([for zlib])
for dir in $enable_ziplinks /usr/local /usr /usr/pkg; do
zlibdir="$dir"
if test -f "$dir/include/zlib.h"; then
AC_MSG_RESULT(found in $zlibdir)
found_zlib="yes";
if test "$zlibdir" != "/usr" ; then
CFLAGS="$CFLAGS -I$zlibdir/include";
fi
AC_DEFINE([ZIP_LINKS], [], [Define if you have zlib and want zip links support.])
break
fi
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
else
IRCDLIBS="$IRCDLIBS -lz"
if test "$zlibdir" != "/usr" ; then
LDFLAGS="$LDFLAGS -L$zlibdir/lib"
fi
HAVE_ZLIB=yes
fi
AC_SUBST([HAVE_ZLIB])
])
])
-9
View File
@@ -1,9 +0,0 @@
#!/bin/bash
cd "$(dirname "${0}")"
ACLOCAL_AMFLAGS=(-I autoconf/m4)
aclocal "${ACLOCAL_AMFLAGS[@]}"
autoconf
autoheader
Vendored
+9326 -5905
View File
File diff suppressed because it is too large Load Diff
-667
View File
@@ -1,667 +0,0 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT([unrealircd], [3.2.8.1], [http://bugs.unrealircd.org/], [], [http://unrealircd.org/])
AC_CONFIG_SRCDIR([src/ircd.c])
AC_CONFIG_HEADER([include/setup.h])
AC_CONFIG_AUX_DIR([autoconf])
AC_CONFIG_MACRO_DIR([autoconf/m4])
if test "x$enable_dynamic_linking" = "x"; then
echo "Please use ./Config instead of ./configure"
exit 1
fi
AC_PROG_CC
if test "$ac_cv_prog_gcc" = "yes"; then
CFLAGS="$CFLAGS -funsigned-char"
AC_CACHE_CHECK(if gcc has a working -pipe, ac_cv_pipe, [
save_cflags="$CFLAGS"
CFLAGS="$CFLAGS -pipe"
AC_TRY_COMPILE(,, ac_cv_pipe="yes", ac_cv_pipe="no")
CFLAGS="$save_cflags"
])
if test "$ac_cv_pipe" = "yes"; then
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_PATH_PROG(RM,rm)
AC_PATH_PROG(CP,cp)
AC_PATH_PROG(TOUCH,touch)
AC_PATH_PROG(OPENSSLPATH,openssl)
AC_PATH_PROG(INSTALL,install)
AC_CHECK_PROG(MAKER, gmake, gmake, make)
AC_PATH_PROG(GMAKE,gmake)
AC_PATH_PROG(GUNZIP, gunzip)
AC_PATH_PROG(PKGCONFIG, pkg-config)
dnl Checks for libraries.
AC_CHECK_LIB(descrypt, crypt,
[AC_DEFINE([HAVE_CRYPT], [], [Define if you have crypt])
IRCDLIBS="$IRCDLIBS-ldescrypt "
MKPASSWDLIBS="-ldescrypt"],
[AC_CHECK_LIB(crypt, crypt,
[AC_DEFINE([HAVE_CRYPT], [], [Define if you have crypt])
IRCDLIBS="$IRCDLIBS-lcrypt "
MKPASSWDLIBS="-lcrypt"])])
AC_CHECK_LIB(socket, socket,
[IRCDLIBS="$IRCDLIBS-lsocket "
SOCKLIB="-lsocket"])
AC_CHECK_LIB(nsl, inet_ntoa,
[IRCDLIBS="$IRCDLIBS-lnsl "
INETLIB="-lnsl"])
AC_SUBST(IRCDLIBS)
AC_SUBST(MKPASSWDLIBS)
dnl module checking based on Hyb7's module checking code
AC_DEFUN([AC_ENABLE_DYN],
[
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"
AC_CACHE_CHECK(if we need the -export-dynamic flag, ac_cv_export_dynamic, [
AC_TRY_LINK(, [int i];, ac_cv_export_dynamic=yes, ac_cv_export_dynamic=no)])
if test "$ac_cv_export_dynamic" = "no"; then
CFLAGS=$hold_cflags
fi
AC_CACHE_CHECK(for compiler option to produce PIC,ac_cv_pic,[
if test "$ac_cv_prog_gcc" = "yes"; then
ac_cv_pic="-fPIC -DPIC -shared"
case `uname -s` in
Darwin*[)]
ac_cv_pic="-bundle -flat_namespace -undefined suppress"
;;
HP-UX*[)]
ac_cv_pic="-fPIC"
;;
esac
else
case `uname -s` in
SunOS*[)]
ac_cv_pic="-KPIC -DPIC -G"
;;
esac
fi
])
AC_CACHE_CHECK(if your system prepends an underscore on symbols,ac_cv_underscore,[
cat >uscore.c << __EOF__
int main() {
return 0;
}
__EOF__
$CC -o uscore $CFLAGS uscore.c 1>&5
if test -z "`strings -a uscore |grep '^_main$'`"; then
ac_cv_underscore=no
else
ac_cv_underscore=yes
fi
rm -f uscore uscore.c
])
dnl libtool has built-in tests that determine proper underscorage
if test "$ac_cv_underscore" = "yes"; then
AC_DEFINE([UNDERSCORE], [], [Define if your system prepends an underscore to symbols])
fi
MODULEFLAGS=$ac_cv_pic
dnl DYNAMIC_LINKING is not meant to be defined in include/setup.h, it's
dnl defined in the Makefiles using -D. Having it defined globally will
dnl only cause braindamage and symbol collisions :-D.
dnl AC_DEFINE([DYNAMIC_LINKING], [], [Link dynamically as opposed to statically. (Dynamic linking is the only supported method of linking atm)])
])
AC_DEFUN([AC_ENABLE_INET6],[
AC_CACHE_CHECK([if your system has IPv6 support], [ac_cv_ip6], [
save_libs="$LIBS"
LIBS="$LIBS $SOCKLIB"
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/socket.h>
int main() {
if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
exit(1);
exit(0);
}
],
[ac_cv_ip6=yes],
[ac_cv_ip6=no])
])
if test "$ac_cv_ip6" = "no"; then
AC_MSG_ERROR([Your system does not support IPv6 so it will not be enabled])
else
AC_DEFINE([INET6], [], [Define if you want IPv6 enabled])
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], [1], [Define to 1 if your system has no in6addr_any.])
]
)
fi
LIBS="$save_libs"
])
AC_CHECK_HEADER(sys/param.h,
AC_DEFINE([PARAMH], [], [Define if you have the <sys/param.h> header file.]))
AC_CHECK_HEADER(stdlib.h,
AC_DEFINE([STDLIBH], [], [Define if you have the <stdlib.h> header file.]))
AC_CHECK_HEADER(stddef.h,
AC_DEFINE([STDDEFH], [], [Define if you have the <stddef.h> header file.]))
AC_CHECK_HEADER(sys/syslog.h,
AC_DEFINE([SYSSYSLOGH], [], [Define if you have the <sys/syslog.h> header file.]))
AC_CHECK_HEADER(unistd.h,
AC_DEFINE([UNISTDH], [], [Define if you have the <unistd.h> header file.]))
AC_CHECK_HEADER(string.h,
AC_DEFINE([STRINGH], [], [Define if you have the <string.h> header file.]))
AC_CHECK_HEADER(strings.h,
AC_DEFINE([STRINGSH], [], [Define if you have the <strings.h> header file.]))
AC_CHECK_HEADER(malloc.h,
AC_DEFINE([MALLOCH], [<malloc.h>], [Define to <malloc.h> you need malloc.h.]))
AC_CHECK_HEADER(sys/rusage.h,
AC_DEFINE([RUSAGEH], [], [Define if you have the <sys/rusage.h> header file.]))
AC_CHECK_HEADER(glob.h,
AC_DEFINE([GLOBH], [], [Define if you have the <glob.h> header file.]))
AC_CHECK_HEADERS([stdint.h inttypes.h])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_MODE_T
AC_TYPE_SIZE_T
AC_TYPE_INTPTR_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_TYPE_UID_T
unreal_CHECK_TYPE_SIZES
dnl in the future, it would be nice to avoid AC_TRY_RUN to allow
dnl better support for crosscompiling.
AC_CACHE_CHECK([what kind of nonblocking sockets you have], [ac_cv_nonblocking],[
save_libs="$LIBS"
LIBS="$LIBS $SOCKLIB"
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/file.h>
#include <signal.h>
alarmed() {
exit(1);
}
int main() {
#ifdef O_NONBLOCK
char b[12], x[32];
int f, l = sizeof(x);
f = socket(AF_INET, SOCK_DGRAM, 0);
if (f >= 0 && !(fcntl(f, F_SETFL, O_NONBLOCK))) {
signal(SIGALRM, alarmed);
alarm(3);
recvfrom(f, b, 12, 0, (struct sockaddr *)x, &l);
alarm(0);
exit(0);
}
#endif
exit(1);
}
],ac_cv_nonblocking=O_NONBLOCK,[
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/file.h>
#include <signal.h>
alarmed() {
exit(0);
}
int main() {
#ifdef O_NDELAY
char b[12], x[32];
int f, l = sizeof(x);
f = socket(AF_INET, SOCK_DGRAM, 0);
if (f >= 0 && !(fcntl(f, F_SETFL, O_NDELAY))) {
signal(SIGALRM, alarmed);
alarm(3);
recvfrom(f, b, 12, 0, (struct sockaddr *)x, &l);
alarm(0);
exit(0);
}
#endif
exit(1);
}],ac_cv_nonblocking=O_NDELAY,[
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/file.h>
#include <signal.h>
alarmed() {
exit(1);
}
int main() {
#ifdef FIONBIO
char b[12], x[32];
int f, l = sizeof(x);
f = socket(AF_INET, SOCK_DGRAM, 0);
if (f >= 0 && !(fcntl(f, F_SETFL, FIONBIO))) {
signal(SIGALRM, alarmed);
alarm(3);
recvfrom(f, b, 12, 0, (struct sockaddr *)x, &l);
alarm(0);
exit(0);
}
#endif
exit(1);
], ac_cv_nonblocking=FIONBIO,ac_cv_nonblocking=none)])])])
if test "$ac_cv_nonblocking" = "O_NONBLOCK"; then
AC_DEFINE([NBLOCK_POSIX], [], [Define if you have O_NONBLOCK])
elif test "$ac_cv_nonblocking" = "O_NDELAY"; then
AC_DEFINE([NBLOCK_BSD], [], [Define if you have O_NDELAY])
elif test "$ac_cv_nonblocking" = "FIONBIO"; then
AC_DEFINE([NBLOCK_SYSV], [], [Define if you have FIONBIO])
fi
LIBS="$save_libs"
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], [], [Define if you have snprintf]))
AC_CHECK_FUNCS(vsnprintf,
AC_DEFINE([HAVE_VSNPRINTF], [], [Define if you have vsnprintf]))
AC_CHECK_FUNCS(strlcpy,
AC_DEFINE([HAVE_STRLCPY], [], [Define if you have strlcpy. Otherwise, an internal implementation will be used!]))
AC_CHECK_FUNCS(strlcat,
AC_DEFINE([HAVE_STRLCAT], [], [Define if you have strlcat]))
AC_CHECK_FUNCS(strlncat,
AC_DEFINE([HAVE_STRLNCAT], [], [Define if you have strlncat]))
AC_CHECK_FUNCS(inet_pton,
AC_DEFINE([HAVE_INET_PTON], [], [Define if you have inet_pton]))
AC_CHECK_FUNCS(inet_ntop,
AC_DEFINE([HAVE_INET_NTOP], [], [Define if you 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], [], [Define if you have a compiler with C99 variable length array support])
fi
dnl This check doesn't need to be in ./configure, we can
dnl write the sourcecode to actually handle the return value
dnl of setrlimit if necessary... -- ohnobinki
AC_CACHE_CHECK([if we can set the core size to unlimited], [ac_cv_force_core], [
AC_TRY_RUN([
#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
int main() {
struct rlimit corelim;
corelim.rlim_cur = corelim.rlim_max = RLIM_INFINITY;
if (setrlimit(RLIMIT_CORE, &corelim))
exit(1);
exit(0);
}
],ac_cv_force_core=yes,ac_cv_force_core=no)
])
if test "$ac_cv_force_core" = "yes"; then
AC_DEFINE([FORCE_CORE], [], [Define if you can set the core size to unlimited])
fi
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([gettimeofday],
[AC_DEFINE([GETTIMEOFDAY], [], [Define if you have gettimeofday])],
[AC_CHECK_FUNCS([lrand48],
[AC_DEFINE([LRADN48], [], [Define if you have lrand48])])])
AC_CHECK_FUNCS([getrusage],
[AC_DEFINE([GETRUSAGE_2], [], [Define if you have getrusage])],
[AC_CHECK_FUNCS([times],
[AC_DEFINE([TIMES_2], [], [Define if you have times])])])
AC_CHECK_FUNCS([setproctitle],
[AC_DEFINE([HAVE_SETPROCTITLE], [], [Define if you have setproctitle])],
[AC_CHECK_LIB([util],
[setproctitle],
[AC_DEFINE([HAVE_SETPROCTITLE], [], [Define if you have setproctitle])
IRCDLIBS="$IRCDLIBS-lutil"],
[
AC_EGREP_HEADER([#define.*PS_STRINGS.*],[sys/exec.h],
[AC_DEFINE([HAVE_PSSTRINGS],[], [Define if you have PS_STRINGS])],
[AC_CHECK_FUNCS([pstat],
[AC_DEFINE([HAVE_PSTAT], [], [Define if you have pstat])])])
])
]
)
AC_CACHE_CHECK([what type of signals you have], [ac_cv_sigtype], [
AC_TRY_RUN([
#include <signal.h>
int main() {
sigaction(SIGTERM, (struct sigaction *)0L, (struct sigaction *)0L);
}
], ac_cv_sigtype=POSIX, [
AC_TRY_RUN([
#include <signal.h>
int calls = 0;
void handler()
{
if (calls)
return;
calls++;
kill(getpid(), SIGTERM);
sleep(1);
}
int main() {
signal(SIGTERM, handler);
kill(getpid(), SIGTERM);
exit(0);
}
], ac_cv_sigtype=BSD,ac_cv_sigtype=SYSV)])])
if test "$ac_cv_sigtype" = "POSIX"; then
AC_DEFINE([POSIX_SIGNALS], [], [Define if you have POSIX signals])
elif test "$ac_cv_sigtype" = "BSD"; then
AC_DEFINE([BSD_RELIABLE_SIGNALS], [], [Define if you have BSD signals])
else
AC_DEFINE([SYSV_UNRELIABLE_SIGNALS], [], [Define if you have SYSV signals])
fi
AC_CHECK_FUNCS(strtoken,,AC_DEFINE([NEED_STRTOKEN], [], [Define if you need the strtoken function.]))
AC_CHECK_FUNCS(strtok,,AC_DEFINE([NEED_STRTOK], [], [Define if you need the strtok function.]))
AC_CHECK_FUNCS(strerror,,AC_DEFINE([NEED_STRERROR], [], [Define if you need the strerror function.]))
AC_CHECK_FUNCS(index,,AC_DEFINE([NOINDEX], [], [Define if you do not have the index function.]))
AC_CHECK_FUNCS(strtoul,,STRTOUL="strtoul.o")
AC_CHECK_FUNCS(bcopy,,AC_DEFINE([NEED_BCOPY], [], [Define if you don't have bcopy]))
AC_CHECK_FUNCS(bcmp,,AC_DEFINE([NEED_BCMP], [], [Define if you don't have bcmp]))
AC_CHECK_FUNCS(bzero,,AC_DEFINE([NEED_BZERO], [], [Define if you need bzero]))
AC_CHECK_FUNCS(strcasecmp,AC_DEFINE([GOT_STRCASECMP], [], [Define if you have strcasecmp]))
save_libs="$LIBS"
LIBS="$LIBS $SOCKLIB $INETLIB"
AC_CHECK_FUNCS(inet_addr,,AC_DEFINE([NEED_INET_ADDR], [], [Define if you need inet_addr]))
AC_CHECK_FUNCS(inet_ntoa,,AC_DEFINE([NEED_INET_NTOA], [], [Define if you need inet_ntoa]))
AC_CHECK_FUNCS(inet_netof,,AC_DEFINE([NEED_INET_NETOF], [], [Define if you need inet_netof]))
LIBS="$save_libs"
AC_CHECK_FUNCS(syslog,AC_DEFINE([HAVE_SYSLOG], [], [Define if you have syslog]))
AC_CHECK_FUNCS(vsyslog,AC_DEFINE([HAVE_VSYSLOG], [], [Define if you have vsyslog]))
AC_SUBST(STRTOUL)
AC_SUBST(CRYPTOLIB)
AC_SUBST(MODULEFLAGS)
AC_ARG_WITH(listen, [AS_HELP_STRING([--with-listen=backlog],[Specify the listen backlog value])],
[AC_DEFINE_UNQUOTED([LISTEN_SIZE], [$withval], [Set to the listen backlog size you want])],
[AC_DEFINE([LISTEN_SIZE], [5], [Set to the listen backlog size you want])])
AC_ARG_WITH(nick-history, [AS_HELP_STRING([--with-nick-history=length],[Specify the length of the nickname history])],
[AC_DEFINE_UNQUOTED([NICKNAMEHISTORYLENGTH], [$withval], [Set to the nickname history length you want])],
[AC_DEFINE([NICKNAMEHISTORYLENGTH], [2000], [Set to the nickname history length you want])])
AC_ARG_WITH([sendq], [AS_HELP_STRING([--with-sendq=maxsendq],[Specify the max sendq for the server])],
[AC_DEFINE_UNQUOTED([MAXSENDQLENGTH], [$withval], [Set to the max sendq you want])],
[AC_DEFINE([MAXSENDQLENGTH], [3000000], [Set to the max sendq you want])])
AC_ARG_WITH(bufferpool, [AS_HELP_STRING([--with-bufferpool=size],[Specify the size of the buffer pool])],
[AC_DEFINE_UNQUOTED([BUFFERPOOL],[($withval * MAXSENDQLENGTH)], [Set to the bufferpool size you want])],
[AC_DEFINE([BUFFERPOOL],[(18 * MAXSENDQLENGTH)], [Set to the bufferpool size you want])])
AC_ARG_WITH(permissions, [AS_HELP_STRING([--with-permissions=permissions], [Specify the default permissions for
configuration files])],
dnl We have an apparently out-of-place 0 here because of a MacOSX bug and because
dnl we assume that a user thinks that `chmod 0600 blah' is the same as `chmod 600 blah'
dnl (#3189)
[AC_DEFINE_UNQUOTED([DEFAULT_PERMISSIONS], [0$withval], [The default permissions for configuration files. Set to 0 to prevent unrealircd from calling chmod() on the files.])],
[AC_DEFINE([DEFAULT_PERMISSIONS], [0600], [The default permissions for configuration files. Set to 0 to prevent unrealircd from calling chmod() on the files.])])
AC_ARG_WITH(dpath, [AS_HELP_STRING([--with-dpath=path],[Specify the path where configuration files are stored])],
[AC_DEFINE_UNQUOTED([DPATH], ["$withval"], [Define the location of the configuration files])
IRCDDIR="$withval"],
[AC_DEFINE_UNQUOTED([DPATH], ["`pwd`"], [Define the location of the configuration files])
IRCDDIR="`pwd`"])
AC_ARG_WITH(fd-setsize, [AS_HELP_STRING([--with-fd-setsize=size], [Specify the max file descriptors to use])],
[ac_fd=$withval],
[ac_fd=1024])
AC_DEFINE_UNQUOTED([MAXCONNECTIONS], [$ac_fd], [Set to the max connections you want])
dnl It would be nice if this could just respect --bindir like every other
dnl program does someday... -- ohnobinki
AC_ARG_WITH(spath, [AS_HELP_STRING([--with-spath],[Specify the location of the executable])],
[AC_DEFINE_UNQUOTED([SPATH], ["$withval"], [Define the location of the executable])
BINDIR="$withval"],
[AC_DEFINE_UNQUOTED([SPATH], ["`pwd`/src/ircd"], [Define the location of the executable])
BINDIR="`pwd`/src/ircd"])
# enable nospoof by default; protects against javascript POST attacks and much more ;-)
AC_ARG_ENABLE([nospoof],
[AS_HELP_STRING([--disable-nospoof], [Disable spoofing protection (requires clients to respond to a randomly generated PING packet after USER and NICK but before using other commands)])],
[],
[enable_nospoof=yes])
AS_IF([test $enable_nospoof = "yes"],
[AC_DEFINE([NOSPOOF], [], [Define if you want spoof protection])])
AC_ARG_ENABLE([prefixaq],
[AS_HELP_STRING([--disable-prefixaq],[Enable chanadmin (+a) and chanowner (+q) prefixes])],
[],
[enable_prefixaq=yes])
AS_IF([test $enable_prefixaq = "yes"],
[AC_DEFINE([PREFIX_AQ], [], [Define if you want +a/+q prefixes])])
AC_ARG_WITH(showlistmodes,
[AS_HELP_STRING([--with-showlistmodes], [Specify whether modes are shown in /list])],
[AS_IF([test $withval = "yes"],
[AC_DEFINE([LIST_SHOW_MODES], [], [Define if you want modes shown in /list])])])
AC_ARG_WITH(topicisnuhost, [AS_HELP_STRING([--with-topicisnuhost], [Display nick!user@host as the topic setter])],
[AS_IF([test $withval = "yes"],
[AC_DEFINE([TOPIC_NICK_IS_NUHOST], [], [Define if you want nick!user@host shown for the topic setter])])])
AC_ARG_WITH(shunnotices, [AS_HELP_STRING([--with-shunnotices], [Notify a user when he/she is no longer shunned])],
[AS_IF([test $withval = "yes"],
[AC_DEFINE([SHUN_NOTICES], [], [Define if you want users to be notified when their shun is removed])])])
AC_ARG_WITH(no-operoverride, [AS_HELP_STRING([--with-no-operoverride], [Disable OperOverride])],
[AS_IF([test $withval = "yes"],
[AC_DEFINE([NO_OPEROVERRIDE], [], [Define if you want OperOverride disabled])])])
AC_ARG_WITH(disableusermod, [AS_HELP_STRING([--with-disableusermod], [Disable /set* and /chg*])],
[AS_IF([test $withval = "yes"],
[AC_DEFINE([DISABLE_USERMOD], [], [Define if you want to disable /set* and /chg*])])])
AC_ARG_WITH(operoverride-verify, [AS_HELP_STRING([--with-operoverride-verify], [Require opers to invite themselves to +s/+p channels])],
[AS_IF([test $withval = "yes"],
[AC_DEFINE([OPEROVERRIDE_VERIFY], [], [Define if you want opers to have to use /invite to join +s/+p channels])])])
AC_ARG_WITH(disable-extendedban-stacking, [AS_HELP_STRING([--with-disable-extendedban-stacking], [Disable extended ban stacking])],
[AS_IF([test $withval = "yes"],
[AC_DEFINE([DISABLE_STACKED_EXTBANS], [], [Define to disable extended ban stacking (~q:~c:\#chan, etc)])])])
AC_ARG_WITH(system-tre, [AS_HELP_STRING([--with-system-tre], [Use the system tre package instead of bundled, discovered using pkg-config])], [], [with_system_tre=no])
AC_ARG_WITH(system-cares, [AS_HELP_STRING([--with-system-cares], [Use the system c-ares (at least version 1.6.0) package instead of bundled c-ares, discovered using pkg-config])], [], [with_system_cares=no])
CHECK_SSL
CHECK_ZLIB
AC_ARG_ENABLE(dynamic-linking, [AS_HELP_STRING([--disable-dynamic-linking], [Make the IRCd statically link with shared objects rather than dynamically (noone knows if disabling dynamic linking actually does anything or not)])],
[enable_dynamic_linking=$enableval], [enable_dynamic_linking="yes"])
AS_IF([test $enable_dynamic_linking = "yes"],
[AC_ENABLE_DYN],
[AC_DEFINE([STATIC_LINKING], [], [Link... statically(?) (defining this macro will probably cause the build tofail)])])
AC_ARG_ENABLE([inet6], [AS_HELP_STRING([--enable-inet6], [Make the IRCd support IPv6])],
[AS_IF([test $enableval = "yes"],
[AC_ENABLE_INET6])])
AC_SUBST(IRCDDIR)
AC_SUBST(BINDIR)
AC_MSG_CHECKING([if FD_SETSIZE is large enough to allow $ac_fd file descriptors])
AC_COMPILE_IFELSE([
#include <sys/types.h>
#include <sys/time.h>
int main() {
#if FD_SETSIZE < $ac_fd
#error FD_SETSIZE is smaller than $ac_fd
#endif
exit(0);
}
], AC_MSG_RESULT([yes]), [
# must be passed on the commandline to avoid a ``warning, you redefined something''
FD_SETSIZE="-DFD_SETSIZE=$ac_fd"
AC_MSG_RESULT(no)
])
AC_SUBST([FD_SETSIZE])
case `uname -s` in
*SunOS*|*solaris*)
AC_DEFINE([_SOLARIS], [], [Define if you are compiling unrealircd on Sun's (or Oracle's?) Solaris])
IRCDLIBS="$IRCDLIBS -lresolv "
;;
esac
dnl c-ares needs PATH_SEPARATOR set or it will
dnl fail on certain solaris boxes. We might as
dnl well set it here.
export PATH_SEPARATOR
AS_IF([test "x$with_system_tre" = "xno"],[
dnl REMEMBER TO CHANGE WITH A NEW TRE RELEASE!
tre_version="0.8.0"
AC_MSG_RESULT(extracting TRE regex library)
cur_dir=`pwd`
cd extras
dnl remove old tre directory to force a recompile...
dnl and remove its installation prefix just to clean things up.
rm -rf tre-$tre_version rege[]xp
if test "x$ac_cv_path_GUNZIP" = "x" ; then
tar xfz tre.tar.gz
else
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 TRE regex library)
cd tre-$tre_version
./configure --disable-agrep --disable-shared --disable-system-abi --disable-wchar --disable-multibyte --prefix=$cur_dir/extras/regexp || exit 1
AC_MSG_RESULT(compiling TRE regex library)
$ac_cv_prog_MAKER || exit 1
AC_MSG_RESULT(installing TRE regex library)
$ac_cv_prog_MAKER install || exit 1
TRE_CFLAGS="-I$cur_dir/extras/regexp/include"
AC_SUBST(TRE_CFLAGS)
TRE_LIBS=
dnl See c-ares's compilation section for more info on this hack.
dnl ensure that we're linking against the bundled version of tre
dnl (we only reach this code if linking against the bundled version is desired).
AS_IF([test -n "$ac_cv_path_PKGCONFIG"],
[TRE_LIBS="`$ac_cv_path_PKGCONFIG --static --libs tre.pc | sed ['s,-L\([^ ]\+lib\) -ltre,\1/libtre.a,']`"])
dnl For when pkg-config isn't available -- or for when pkg-config
dnl doesn't see the tre.pc file somehow... (#3982)
AS_IF([test -z "$TRE_LIBS"],
[TRE_LIBS="../extras/regexp/lib/libtre.a"])
AC_SUBST(TRE_LIBS)
cd $cur_dir
],[
dnl use pkgconfig for tre:
PKG_CHECK_MODULES([TRE], tre >= 0.7.5)
])
AS_IF([test "x$with_system_cares" = "xno"],[
dnl REMEMBER TO CHANGE WITH A NEW C-ARES RELEASE!
dnl NOTE: when changing this here, ALSO change it in ./curlinstall
dnl and in the comment in this file around line 400!
cares_version="1.7.3"
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 c-ares
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 --disable-shared || 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
CARES_CFLAGS="-I$cur_dir/extras/c-ares/include"
AC_SUBST(CARES_CFLAGS)
CARES_LIBS="-L../extras/c-ares/lib"
dnl Set default library parameters for when pkg-config is not available
dnl Ugly cd'ing out of extras/c-ares-xxx ;)
dnl Note: must be a full path, not relative path.
cd ../..
CARESLIBSALT="`pwd`/extras/c-ares/lib/libcares.a"
cd -
case `uname -s` in
*FreeBSD*)
CARESLIBSALT="$CARESLIBSALT"
;;
*Linux*)
CARESLIBSALT="$CARESLIBSALT -lrt"
;;
*SunOS*)
CARESLIBSALT="$CARESLIBSALT -lrt"
;;
esac
dnl Use pkg-config for c-ares libraries, and if not available use defaults
dnl from above. Also, if pkg-config returns an empty result (ex: on fbsd
dnl or older versions it might be missing --static) then also use defaults.
if test "x$ac_cv_path_PKGCONFIG" = "x" ; then
CARES_LIBS="$CARES_LIBS $CARESLIBSALT"
else
CARES_LIBSPRE="$CARES_LIBS"
dnl the sed expression forces an absolute path to the .a file to be generated
dnl because this is what libtool would do. If this wasn't done and /usr/lib*/libcares.so
dnl exists, then unrealircd would still try to link against the system c-ares.
dnl The [] quotation is needed because the sed expression has [] in it.
[CARES_LIBS="$CARES_LIBS `$ac_cv_path_PKGCONFIG --static --libs libcares.pc | sed -e 's,-L\([^ ]\+lib\) -lcares,\1/libcares.a,'`"]
if test "$CARES_LIBS" = "$CARES_LIBSPRE " ; then
CARES_LIBS="$CARES_LIBS $CARESLIBSALT"
fi
fi
AC_SUBST(CARES_LIBS)
cd $cur_dir
],[
dnl use pkg-config for system c-ares:
PKG_CHECK_MODULES([CARES], libcares >= 1.6.0)
])
CHECK_LIBCURL
AC_CONFIG_FILES([Makefile
src/modules/Makefile
unreal
ircdcron/ircdchk
ircdcron/ircd.cron])
AC_OUTPUT
chmod 0700 unreal
chmod 0700 ircdcron/ircdchk
-4074
View File
File diff suppressed because it is too large Load Diff
+51 -70
View File
@@ -1,85 +1,66 @@
#!/bin/sh
URL="http://www.unrealircd.com/files/curl-latest.tar.gz"
OUTF="curl-latest.tar.gz"
OUTD="curl-latest"
ARESPATH="`pwd`/extras/c-ares"
CARESVERSION="1.7.3"
if [ ! -f "Unreal.nfo" ]; then
echo "Please run this program from your UnrealIRCd directory"
echo "(usually $HOME/Unreal3.2 or something like that)"
if test "x$1" = x -o "x$2" = x ; then
echo "Syntax:"
echo "curlinstall ares_path libcurl_path"
echo ""
exit 1
fi
wget --version 1>/dev/null 2>&1
if [ "$?" = 0 ]; then
FETCHER="wget"
else
fetch --version 1>/dev/null 2>&1
if [ "$?" = 0 ]; then
FETCHER="fetch"
else
lynx --version 1>/dev/null 2>&1
if [ "$?" = 0 ]; then
FETCHER="lynx"
else
echo "ERROR: unable to find wget/fetch/lynx, please install at least one of these programs"
exit 1
fi
fi
fi
if [ ! -d tmp ]; then
mkdir tmp || exit 1
fi
cd tmp || exit 1
rm -f "$OUTF"
if [ "$FETCHER" = "wget" ]; then
wget -O "$OUTF" "$URL"
elif [ "$FETCHER" = "lynx" ]; then
lynx -dump "$URL" >"$OUTF"
elif [ "$FETCHER" = "fetch" ]; then
cd tmp #todo: find out the cmd line parameter ;)
fetch "$URL"
fi
if [ "$?" != 0 ]; then
echo "ERROR: Something went wrong while trying to download $URL"
exit 1
fi
rm -rf "$OUTD" # remove old directory prior to extracting
tar xzf "$OUTF" || exit 1
if [ "`eval echo -n 'a'`" = "-n a" ] ; then
c="\c"
else
n="-n"
fi
if [ ! -d "$ARESPATH/lib" ]; then
echo "c-ares has not been build yet, let's do that now..."
cd ../extras/
tar xzf c-ares.tar.gz || exit 1
cd c-ares-$CARESVERSION || exit 1
./configure --prefix=$ARESPATH || exit 1
(make && make install) || exit 1
cd ../../tmp/
echo "c-ares built."
save_PWD=`pwd`
echo "Installing ares"
cd $1
./configure --prefix=$HOME/ares && make && make install
SSLFLAG=""
while [ -z "$SSLFLAG" ] ; do
echo ""
echo "Should libcurl be built with SSL support?"
echo $n "-> " $c
read cc
case "$cc" in
[Yy]*)
SSLFLAG="--with-ssl"
;;
[Nn]*)
SSLFLAG="--without-ssl"
;;
*)
echo ""
echo "You must enter either Yes or No"
;;
esac
done
if [ -f $HOME/ares/lib/libcares.a ] ; then
if [ -f $HOME/ares/lib/libares.a ] ; then
rm -f $HOME/ares/lib/libares.a
fi
cp $HOME/ares/lib/libcares.a $HOME/ares/lib/libares.a
fi
# We assume curl has been packaged in a way it will extract to "$OUTD"/
cd "$OUTD" || exit 1
echo "Building and installing libcurl"
CPPFLAGS="-I$ARESPATH/include" ./configure --prefix=$HOME/curl --disable-shared \
--disable-thread --enable-ares=$ARESPATH --disable-ipv6 $SSLFLAG
cp -R $ARESPATH/lib ares
echo "Installing libcurl"
cd $2
CPPFLAGS="-I$HOME/ares/include" ./configure --prefix=$HOME/curl --disable-shared \
--disable-thread --enable-ares=$HOME/ares --disable-ipv6 $SSLFLAG
cp -R $HOME/ares/lib ares
make && make install
#cp $ARESPATH/lib/libcares.a $HOME/curl/lib
# that isn't needed anymore as the lib is already in unreal...
if [ -f $HOME/curl/lib/libares.a ] ; then
rm -f $HOME/curl/lib/libares.a
fi
cp $HOME/ares/lib/libares.a $HOME/curl/lib
cd $save_PWD
echo ""
echo ""
echo "libcurl has been installed. When running ./Config specify:"
echo "$HOME/curl"
echo "for the directory you installed libcurl to."
+6 -7
View File
@@ -119,13 +119,12 @@ Tom Hopkins <hoppie@buengf.bu.edu> / September, October 1990:
lines worth. :)
UnrealIRCd Coders
Carsten Munk <stskeeps@unrealircd.com> / May 1999 - December 2008
Dominick Meglio <codemastr@unrealircd.com> / June 1999 - August 2005
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
This list is incomplete, type /INFO on IRC to find the updated list.
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
Thanks go to those persons not mentioned here who have added their advice,
opinions, and code to IRC.
+41 -141
View File
@@ -1,141 +1,41 @@
Rules about patches & modifications to UnrealIRCd
1. When making a change, always add a small description in Changes, in the
BOTTOM. Don't forget to mention the bug# and credit the reporter (if any).
2. If new files are made, it must contain proper copyright headers.
3. If you want to submit patches (f.e. if you don't have CVS write access)
then submit them to http://bugs.unrealircd.org/ (shortly called bugs*)
using "cvs diff -u > patchname". A submission must contain description of
what it does, etc.
4. Each bug or feature should have a bug# so people can have a discussion
about it. This has a few implications (read!!):
* People must report bugs/feature requests to bugs* and not on
IRC, e-mail, etc.
* That means other people can see the bug# and comment on it. This means
discussion is easy to read back for each issue and not spread between
several IRC logs.
Furthermore, by using the bugtracker instead of directly committing,
people could point out that there might be a better way to do things
than you originally thought, or it might be that other devs don't like
it at all.
* If a head coder has 'acknowledged' or 'confirmed' the bug or stated in
a comment that it's OK to implement, then a dev may take the issue.
The dev should change the status to 'assigned' and work on it, then
commit and change it to 'resolved', set 'fixed in version' to next
release, and add a comment pasting the relevant Changelog item and the
releaseid (.XYZ).
Of course other guidelines, like #7 and #8 still apply.
5. Do not commit changes that do not have an associated bug# and have not
had any discussion.
Small/tiny bugfixes that do not change any functionality, are very
unlikely to break anything and definitely don't require any prior
discussion may be exempted.
6. Regarding reidenting, restructuring or other code cleanups: please
discuss before doing so. The other devs might not agree with you on the
particular cleanup you have in mind which would result in another
clean-up-the-cleanup commit.
You may, however reindent and clean up individual sections when you are
working on fixing a particular bug# or implementing a new feature. In fact
you're encouraged to do so if the code is confusing without it. However,
obey the style of Unreal's code (mostly outlined in this document)
and do not introduce yet another (new) style. Also, be careful with doing
any cleanup: if you're unsure in any way about the use of something,
or something that looks redundant on first sight, then look more
carefully... it might indeed be useless and/or redundant, but it might
also be a subtle thing that can create great bugs when 'cleaned up'.
7. Prior to a release: be very careful with any restructuring of a subsystem
or doing any major commits that may break things. Stuff like this can be
perfectly fine if there are many months to go, but are not good to do a
month before release. The head coder may impose additional restrictions
during such a period.
8. During the Release Candidate stage (from RC1 until the final release)
only the head coder may commit directly, all others should ask and
present their patch before committing. Yes, even if you are changing only
1 line of code or text.
9. UnrealIRCd should compile on all supported operating systems and
platforms, using GCC 3 or higher on *NIX, and Visual Studio 2008 or
higher on Windows. This means you cannot blindly use all C99 extensions.
10. Coders should test their code before committing.
11. /*
* These kind of comments
*/
NOT
// These kind of comments
12. if (something == 1)
{
moo; /* comment */
/* This does what what what */
cow(go(moo));
}
NOT
if (something == 1) {
}
13. Do not touch version.c.SH or version.h, unless you are a head coder
if you need a credit in, contact us
14. Protocol changes must be discussed before making patches for it.
15. We do NOT rip people off. If we use other people's code, it MUST be
properly credited.
16. 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 ;)
17. 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.
18. 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.
19. 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 enormous 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 ;).
20. 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.
21. Use enums whenever possible, rather than #define constants. Besides making
things more clean, it also aids debugging.
Some minor rules about patches & modifications to UnrealIRCd
1. When making a change, always add a small description in Changes, in the
BOTTOM
2. If new files are made, it must contain proper copyright headers,
and a $Id$ somewhere.
3. /*
* These kind of comments
*/
NOT
// These kind of comments
4. if (something == 1)
{
moo; /* comment */
/* This does what what what */
cow(go(moo));
}
NOT
if (something == 1) {
}
5. Do not touch version.c.SH or version.h, unless you are a head coder
if you need a credit in, contact us
6. Patches are submitted to coders@lists.unrealircd.org,
using "cvs diff -u > patchname". A submision must contain description of
what it does, etc.
7. Protocol changes must be discussed before making patches for it.
8. We do NOT rip people off. If we use other people's code, it MUST be
properly credited.
+135 -100
View File
@@ -1,118 +1,153 @@
==[ 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).
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.
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
as cygwin is an emulation layer. It's obviously much better to run
native (Windows) code on Windows.
msvc 6.x Microsoft Visual Studio 6 does not work, this compiler is too old.
msvc 7.x Microsoft Visual Studio 7.x (.NET), works.
msvc 8.x Microsoft Visual Studio 8.x (.NET 2005), including the free kit, works.
msvc 9.x Microsoft Visual Studio 9.x (.NET 2008), is used for official compile.
mssdk Microsoft Windows SDK for Windows 7
VC++ 7.x (.NET) is highly recommended. VC 6 might work but it requires
the Platform SDK (PSDK), it also has quite some bugs (there are 5 servicepacks!).
Basically VC7 is just much easier and known to work, therefore we'll assume
in this text that you are using it.
If you don't have the paid version of Microsoft Visual Studio 7.x, then you can
use the FREE development kit available for Windows 7 explained below:
1. Download the 'MS SDK for Windows 7 and .NET Framework 3.5 SP1' at:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&displaylang=en
2. 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 CMD Shell instead (check out the
Start Menu under Microsoft Windows SDK v7.0). Users on x64 environment will have
to change their environment to x86 by typing 'SETENV /x86'.
3. Download http://www.vulnscan.org/tmp/dlltool.exe and put the file somewhere
in your path (eg: put it in c:\windows\system32).
==[ EXTERNAL LIBRARIES ]==
Fetch the external libraries (c-ares, tre, openssl, zlib, curl) from:
http://www.vulnscan.org/unrealwin32dev/
==[ COMPILING ]==
== 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)
3. Have a look at 'makefile.win32' to look at what parameters you need to
use, this depends on what libraries you want to link in and their location.
4. Two options, use either one (B is preferred), and read step 5 too:
A. Edit makefile.win32 directly to reflect your configuration and run
'nmake -f makefile.win32'
B. Don't edit makefile.win32 but instead create a one-line command (which
you can put in a batch file), like this (all on one 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:\openssl\include" OPENSSL_LIB_DIR="c:\openssl\lib"
USE_REMOTEINC=1 LIBCURL_INC_DIR="c:\dev\curl-ssl\include"
LIBCURL_LIB_DIR="c:\dev\curl-ssl\lib\dll-release"
CARES_LIB_DIR="C:\dev\c-ares\vc\cares\dll-release"
CARES_INC_DIR="C:\dev\c-ares" CARESLIB="cares.lib"
TRE_LIB_DIR="C:\dev\tre\win32\release" TRE_INC_DIR="C:\dev\tre"
TRELIB="tre.lib"
5. You are likely to encounter an error like
M_OPER.obj : error LNK2019: unresolved external symbol _sendto_snomask_global
referenced in function _m_oper
(the exact name and symbol will differ!!)
In that case you need to generate a symbols file:
nmake -f makefile.win32 SYMBOLFILE
And after that simply re-run your nmake -f makefile.win32 [options]
command, the same command you ran before the error occured.
You should not get any unresolved external symbol error again.
If you still do, then something is wrong.
6. Your compile is now done, you can package unreal if you have InnoSetup,
in that case check out src\win32\unrealinst.iss
Otherwise, manually copy over the necessary files (and the dll files
from the external libraries).
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 ]==
== 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).
3. Go to your UnrealIrcd dir (like: cd \dev\unreal3.2).
4. Compile the module with:
nmake -f makefile.win32 <YOUR OPTIONS> custommodule MODULEFILE=<name>
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 <YOUR OPTIONS> custommodule MODULEFILE=m_crappymod
Note that <YOUR OPTIONS> is the whole lot of options explained in
previous section under 4B. If you use method 4A then there aren't any.
Note 2: If you get any symbol file errors, see the section 'SYMBOL FILES'
nmake -f makefile.win32 custommodule MODULEFILE=m_crappymod
5. Done. A .dll file should have been created.
If you compiled with the same Visual Studio version that we use to compile
the official UnrealIRCd version, and use the same Unreal3.2.X.tar.gz as the
official version (and not CVS!), then your module is fully binary compatible
and you can put it on your website (or ours) so users can use them.
If you do anything else, this won't work.
So, again, it will NOT work properly, if:
1. You use a different UnrealIRCd source (like CVS, or a previous version).
2. You use another compiler... this might still work but may require an
additional .DLL file to be put in your UnrealIRCd directory (MSVxxxxxx.DLL).
3. You compile with different options, such as compiling with SSL but trying
to load the module on non-SSL.
NOTE: unless your module uses SSL-specific code, you should compile
without SSL as it will run on both SSL and non-SSL UnrealIRCd's.
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 your module
will CRASH or cause memory corruption and other subtle errors.
==[ SYMBOL FILES ]==
If you get something like this:
== 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.
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
The easiest is to download the UnrealIRCd development package
which contains zlib, openssl and curl precompiled for you.
See: www.vulnscan.org/unrealwin32dev/
(note: the exact name of the symbol will vary!)
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"
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]
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"
So basically you just run 'nmake -f makefile.win32 SYMBOLFILE' and then restart
compiling again.
== COMPILING ZLIB/SSL/CURL YOURSELF ==
This is quite some work.. With the precomiled method shown above it
just takes like 5-10 minutes to have a zlib+ssl+curl Unreal version.
But if you want to compile each of these libs manually then it will
probably take an hour or so.
==[ 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.
** THE INFORMATION BELOW IS OUTDATED, WE GOT RID OF MDd, USE MD INSTEAD
AND DONT COMPILE OPENSSL W/DEBUG ***
== ZIP LINKS (zlib) ==
[NOTE: precompiled dlls should NOT be used because they will cause a crash
(this is due to different compile parameters / api call systems]
To compile with ziplinks support you need to do the following:
Download the SOURCE from http://www.winimage.com/zLibDll/
(at the time of writing, http://www.winimage.com/zLibDll/zlib121.zip)
and extract it to somewhere, for example c:\dev\zlib-1.2.1
Then, edit win32\makefile.msc:
- Change -MD to -MDd
- Add -D ZLIB_WINAPI to CFLAGS
- so the result will be like:
CFLAGS = -nologo -MDd -O2 $(LOC) -D ZLIB_WINAPI
- Then compile: nmake -f win32\Makefile.msc
- Assuming the above step went fine, your zlib is now ready.
- Now, to compile UnrealIRCd with ziplinks you do something like this:
nmake -f makefile.win32 USE_ZIPLINKS=1 ZLIB_INC_DIR="c:\dev\zlib-1.2.1" ZLIB_LIB_DIR="c:\dev\zlib-1.2.1"
Obviously, change the paths if needed [1st = *.h files, 2nd=*.dll/*.lib]
== SSL (OpenSSL) ==
[note: openssl requires perl to configure/compile!]
- Download latest openssl (eg: openssl-0.9.7d.tar.gz) and extract it somewhere
(we'll use c:\dev\openssl-0.9.7d in this example)
- Open util\do_masm.bat, add 'debug' to the lines with 'mk1mf.pl' BUT be careful
since it should NOT be the last word, so add it somewhere before that.
For example: perl util\mk1mf.pl dll debug VC-W31-32 >ms\w31dll.mak
- Start the
- Now we go build openssl, run:
ms\do_masm
nmake -f ms\ntdll.mak
- Assuming the above step went fine, your OpenSSL is now ready.
- Now, to compile UnrealIRCd with ziplinks you do something like this:
nmake -f makefile.win32 USE_SSL=1 OPENSSL_INC_DIR="c:\openssl\inc32\openssl" OPENSSL_LIB_DIR="C:\Dev\openssl\out32dll.dbg"
Obviously, change the paths if needed [1st=*.h files, 2nd=*.dll/*.lib]
== REMOTE INCLUDES (curl, c-ares) ==
- Download latest c-ares source from http://daniel.haxx.se/projects/c-ares/
Download latest curl source from http://curl.haxx.se/download.html
Extract both somewhere (eg: c:\dev\c-ares-1.2.0 and c:\dev\curl-7.12.0)
- Open vc\vc.dsw from your ares directory. Assuming you have VC7 it will ask
whether it should convert the project, choose 'Yes to all'.
- (solution explorer) areslib -> properties
C/C++ -> code generation -> runtime library: Change to
'Multi-threaded Debug DLL (/MDd)'
- at the time of writing 'ares_free_errmem.c' should be removed from the
project file (solution explorer -> source files -> find the file + press
delete). Also 'ares_version.c' and 'ares_cancel.c' should be added
(solution explorer -> source files -> rightclick -> add -> add existing ->
go down a few directories if needed and choose the file).
- right click at 'areslib' in the solution explorer and select 'Build'.
Assuming it compiled fine, we are done with c-ares.
- Now go to the curl directory and open lib\curllib.dsw. Choose 'Yes to all'
again when asked about converting.
- Open config-win32.h (@header files in solution explorer) and add:
#define USE_ARES 1
- Open include\curl\multi.h and change the line with:
#include <winsock2.h>
to:
#include <winsock.h>
- (solution explorer) curllib -> properties
- C/C++ -> code generation -> runtime library: Change to
'Multi-threaded Debug DLL (/MDd)'
- C/C++ -> general -> additional include directories:
add the path to your <c-ares-directory> (eg: C:\Dev\c-ares-1.2.0).
- linker -> general -> additional library directories:
add the path to your <c-ares-directory>\vc\areslib\Debug,
for example C:\Dev\c-ares-1.2.0\vc\areslib\Debug.
- linker -> input -> additional dependencies:
add: areslib.lib
- linker -> input -> Module defenition file:
set to: libcurl.def
Done with editting properties.
- Now: Build -> rebuild solution, everything should compile fine.
- Now, to compile UnrealIRCd with remote includes you do something like this:
nmake -f makefile.win32 USE_REMOTEINC=1 LIBCURL_INC_DIR="C:\Dev\curl-7.12.0\include" LIBCURL_LIB_DIR="C:\Dev\curl-7.12.0\lib\Debug"
+764
View File
@@ -0,0 +1,764 @@
/*
* example.conf by Alexander Ganchev AKA Peace (unrealirc@gmail.com).
* $Id$
*
* Prednaznachen e za Unreal3.2 i versii sled nego
* Dobre priqteli. Tova e noviqt example.conf.Izglejda kato nqkoi fail C++ (shega).
* Kakto i da e..vreme e da go configurirame. Trudnichko e kato za purvi put, no
* sus malko praktikuvane i chetene shte mu sviknete.
*
* Kopiraite tozi fail vuv vashata glavna direktoriq i go prekrustete na 'unrealircd.conf'.
* VAJNO: Vsichki linii (tova sa zavurshvashtite na vseki red),
* {trqbwa da zavurshvat sus ; a kraq na samata liniqta slagate i } - demek nakraq stava };
* MOLQ PROCHETETE doc/unreal32docs.html!Online versiqta shte namerite tuk -
* www.vulnscan.org/UnrealIrcd/unreal32docs.html
* Sudurja dosta informaciq za config faila: dava vi informaciq za vseki blok,stoinost, i taka natatuka..
*/
/* Tipove Komentari */
#Comment type 1 (Shell type)
// Comment type 2(C++ style)
/* Comment type 3 (C Style) */
#tezi linii shte budat ignorirani ot ircd-to.
/*
* UnrealIRCd poddurja modulite,clock.dll & commands.dll
* zavisimost ot vashata operacionna sistema izberete za Windows ili za *NIX shte izpolzvate
* Nezavisimo ot Operacionnata vi sistema trqbva da mahnete //- predi loadmodule i na 2-ta reda.
*/
/* 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";
/*
* Sushto taka moje da vkliuchite i drugi configuracionni failove.
* help.conf vi se qvqva komadata /helpop text. The badwords.*.conf
* falovete sudurjat vsichki "badword kato slojite mod +G v kanal
* spamfilter.conf sudurja nqkoi dobri pravila za zabrani za puskane na troianski kone.
* Ako iskate mojete da gi vkliuchite tqh :
*/
include "help.conf";
include "badwords.channel.conf";
include "badwords.message.conf";
include "badwords.quit.conf";
include "spamfilter.conf";
/* NEW: me {}
* OLD: M:Line
* me {} opredelq imeto,opisanie i cifrata na vashiqt unrealircd server.
* Sintaksisut e kakto sledva :
* me {
* name "server.name";
* info "Server Description";
* numeric (server numeric*);
* };
* Ako linkvate Servera si,Cifrata moje bi nqma da bude izpolzvaema ot drugite serveri vuv mrejata
*/
me
{
name "Imeto Na Servera vi";
info "Opisanie Na Servera";
numeric Cifra po izbor(po malka e po dobre);
};
/*
* NEW: admin {}
* OLD: A:Line
* Admin dava informaciq za server admin-a na mrejata.
* Mojete da slojite mnogo linii pod grafata 'admin {' ako iskate.
* Sintaksisa kakto sledva:
* admin {
* "Purva liniq";
* "Vtora liniq";
* [drugi]
* };
*/
admin {
"TUk Slojete informaciq za admina";
"Tuk mojete da slojite i ime ili email";
};
/*
* NEW: class {}
* OLD: Y:line (old was confusing)
* Class e grupa nastroiki za vashata vruzka.Primer,Server connect-vane,max clienti i drugi.
* delqt se na 2 Class-a. Class Cliends & Servers.
* {
* pingfreq ((kolko chesto da pignesh user/server v sekundi);
* maxclients (vuzmojnite connekcii za opredelen 'Class');
* sendq (maksimuma ot hora v edna opashka);
* recvq (maximum receive queue from a connection [flood control]);
* };
*/
class clients
{
pingfreq 90;
maxclients 500;
sendq 100000;
recvq 8000;
};
class servers
{
pingfreq 90;
maxclients 10; /* Maksimum serveri koito moje da se link-nat */
sendq 1000000;
connfreq 100; /* Sekundite mejdu vseki opit za connect-vane */
};
/*
* NEW: allow {}
* OLD: I:Line
* Tazi Opciq opredelq koi shte ima pravo da vliza na servera vi...
* Mojete da kontrolirate vashite klienti,da im slagate paroli i drugi.
* control and/or set a password.
* Syntax is as follows:
* allow {
* ip (razresheno ip za izpolzvane);
* hostname (host mask);
* class (class to send them to [see class {}]);
* password "(parola)"; (po izbor)
* maxperip (pozvoleni vruzki ot edno ip); (optional)
* };
*/
allow {
ip *@*;
hostname *@*;
class clients;
maxperip 5;
};
/* Passworded allow line */
allow {
ip *@255.255.255.255;
hostname *@*.passworded.ugly.people;
class clients;
password "Test";
maxperip 1;
};
/*
* NEW: allow channel {}
* OLD: chrestrict
* Razreshenie na userite da vlizat v opredelen kanal...
* Syntax:
* allow channel {
* channel "imeto na kanala";
* };
*/
allow channel {
channel "#Free";
};
/*
* NEW: oper {}
* OLD: O:Line
* Opredelete koi da bude IRC Operator na servera vi
* IRC operators tova sa tochno tezi hora koito da se grijat za servera,
* da go poddurjat i da se connect-vat redovno.
* Sinktaksisut e kakto sledva :
* oper (login) {
* class (class to put them in, if different from I, moves them to new
* class);
* from {
* userhost (ident@host);
* userhost (ident@host);
* };
* flags
* {
* (tuk shte slagate flagovete*);
* };
* OR
* flags "old type flags, like OAaRD"; (sushto moje da slagate i samo bukvite)
* };
*/
/* Za lista s oper flagovete, poglednete doc/unreal32docs.html#operblock
*[Zaduljitelno da se prochete]
*/
oper admin {
class clients;
from {
userhost *@*;
};
password "Test";
flags
{
netadmin;
can_zline;
can_gzline;
can_gkline;
global;
coadmin;
can_globalkill;
can_ungline;
can_gline;
can_kline;
can_unkline;
can_rehash;
can_globops;
can_localroute;
can_wallops;
can_localkill;
can_localnotice;
can_globalroute;
can_globalnotice;
can_dccdeny;
can_setq;
services-admin;
};
};
/*
* NEW: listen {}
* OLD: P:Line
* Tuk shte opredelite porta na vasheto ircd prez koito
* da vlizat useri/serveri.
* Siktaksisut e kakto sledva :
* listen (ip):(nomera na porta)
* {
* options {
* (options here);
* };
* };
* or for a plain
* listen: listen (ip):(port);
*
* NOTICE: for ipv6 ips (3ffe:b80:2:51d::2 etc), use listen [ip]:port;
*
* That works also.
*/
/* Options for listen:
OLD | NEW
S serversonly
C clientsonly
J java
s ssl
* standard
*/
/* BELEJKI ZA SSL PORTOVE : SSL portovete sa dosta nestandartni,
* osven nomera na 'high-SSL portovete', nqkoi hora kazvat che mojej da gi startirash
* na 994 port, zashtoto tova e oficialniqt SSL port..no tova izskva root!Osven tova port 194
* e oficialniqt irc port i mojete nqkoi put da probvate da vidite dali ircd-to e startirano
* na tozi port.
* Nashiqt suvet e da izpolzvate port 6697 za SSL, toi se izpolzva vuv nqkoi mreji i
* mojete da otvorite mnogo SSL portove ako iskate, no izpolzvaite i 6697 po standart.
listen *:6697
{
options
{
ssl;
clientsonly;
};
};
listen *:8067;
listen *:6667;
/*
* NEW: link {}
* OLD: C/N:Lines
* Tezi opcii sa za link-vane na serveri
* BELEJKA: Dva servera se nujdaqt ot LINK {} za da budat linknati bez problemi!
* Sintaksisut e kakto sledva:
* link (server name)
* {
* username (username, moshete da slojite sushto i * );
* hostname (ip nomer/hostmask);
* bind-ip (kum koe ip da bude svurzano sled kato se connect-ne, ili slojete * );
* port (port za svurzvane (moje da slojite vseki);
* hub (ako servera vi e hub,slojete * , ili servermask-a);
* [ili leaf *;]
* password-connect "(parola za svurzvane)";
* password-receive "(povtorete parolata)";
* class (class);
* options {
* (options here*);
* };
* /* Ako izpolzvate SSL,vie mojete da izberete shifur za da izpolzvate SSL mode
* * Lista shte namerite vuv "openssl ciphers",samostoqtelen shifur sus :'s
* */
* ciphers "DES-CBC3-MD5";
*
* };
*/
/*
options:
OLD | NEW
S ssl
Z zip
N/A autoconnect
N/A quarantine
N/A nodnscache
*/
link services.Test.com
{
username *;
hostname 1.2.3.4;
bind-ip *;
port 7029;
hub *;
password-connect "LiNk";
password-receive "LiNk";
class servers;
options {
/* Belejka: vie ne mojete da izpolzvate autoconnect kogato linkvate serveri
autoconnect;
ssl;
zip;
};
};
/*
*
* NEW: ulines {}
* OLD: U:Line
* U-liniite davat poveche komandi na serverut vi,Uliniite se slagat samo za services/stats
* serveri i NIKOGA za normalnite UnrealIRCd serveri!
* Sintaksisut e kakto sledva:
* ulines {
* (server to uline);
* (server to uline);
* [etc]
* };
*/
ulines {
services.Test.org;
stats.Test.org;
};
/*
* NEW: drpass {}
* OLD: X:Line
* Tuk shte slagate parolite za /die i /restart na servera.
* Sintaksusut e kakto sledva:
* drpass {
* restart "(parola za restart na servera)";
* die "(parola za die na servera)";
* };
*/
drpass {
restart "restart";
die "die";
};
/*
* NEW: log {} OLD: nishto ne se kazva otnosno tova kude i kakvo da logva.Mojete
* gi slagate ako iskate
*
* FLAGS: errors, kills, tkl, connects, server-connects, kline, oper
*
* Syntax:
* log "log file"
* {
* flags
* {
* flag;
* flag;
* etc..
* };
* };
*/
log "ircd.log" {
/* Iztriite log faila i napravete nov koito da stiga do 2MB.
*/
maxsize 2097152;
flags {
oper;
kline;
connects;
server-connects;
kills;
errors;
sadmin-commands;
chg-commands;
oper-override;
spamfilter;
};
};
/*
* NEW: alias {}
* OLD: N/A
* Chrez tezi nastroiki moje da napravite prehod ot /nickserv,/chanserv i drugi kum drugi nickove.
* FLAGS: services,stats,normal
*
** Syntax:
* alias "Ime" {
* target "points to";
* type aliastype;
* };
* [BELEJKA: Mojete da vkliuchite i opredeleniq,za celta poglednete doc/unreal32docs.html section 2.9]
*/
// Tova posochva komandata /nickserv-a na user-a NickServ koito e svurzan s set::services-server server
/*alias NickServ {
target "NickServ";
type services;
};*/
// Ako iskate komandite da sa na drug nick mojete da promenite nick-a
//alias ChanServ {type services; };
// Posochva /StatServ na user-a StatServ koqto svurzva set::stats-server server
//alias StatServ {type stats; };
// Posochva /superbot na user-a SuperBot
//alias SuperBot {type normal; };
/* Standart Aliases */
alias NickServ { type services; };
alias ChanServ { type services; };
alias OperServ { type services; };
alias HelpServ { type services; };
alias StatServ { type stats; };
/*
* NEW: alias {}
* OLD: N/A
* Tezi moje da posochite zamestiteli na /identify,/services, i drugi...
* Syntax:
* alias "Ime" {
* format "format string" {
* target "points to";
* type aliastype;
* parameters "parameters to send";
* };
* type command;
* };
*/
/* Tova se pokazva otdelno, zashtoto vypreki che ima syshtoto ime kato predishnata direktiva
*e dosta razlichno po otnoshenie na sintaksis, vypreki che osigurqva prosta funkciq i raz4ita na standartni alias-i za da raboti.
*/
/*
alias "identify" {
format "^#" {
target "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "IDENTIFY %1-";
};
type command;
};
*/
/* alias::format ditektivata e obichaen izraz.Pyrviq format se svyrzva s
* komandata /identify kogato pyrviq simvol e "#". Sled tova se izprashta do chanserv
* alias-a s parametri identify. %1-. Togava vtoriq ormat se svyrzva s komandata /identify
* kogato pyrviq simvol ne e "#".
* Togava se izprashta do nickserv alias-a s parametri identify %1-.
/* Standard aliases */
alias "services" {
format "^#" {
target "chanserv";
type services;
parameters "%1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "%1-";
};
type command;
};
alias "identify" {
format "^#" {
target "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "IDENTIFY %1-";
};
type command;
};
/*
* NEW: tld {}
* OLD: T:Line
* Tezi nastroki sa za razlichni 'motd' i 'rules' failove
* v zavisimost ot klientskata hostmask-a.
* Sintaksisut e kakto sledva:
* tld {
* * mask (ident@host);
* motd "(motd file)";
* rules "(rules file)";
* };
*/
tld {
mask *@*;
motd "ircd.motd";
rules "ircd.rules";
};
/* BELEJKA: vzemete nqkoi fail primer - vzemete tao.of.irc.doc..sled tova go kopiraite v
* glavnata direktoriq na Unrealircd-to vi.Prekrustete go na irc.motd..Napravete po sushtiq
* nachin i ircd.rules (FAILOVETE SA ZADULJITELNI)
*/
/*
* NEW: ban nick {}
* OLD: Q:Line
* Ako slojite ban na nickname to veche tozi nick stava neizpolzvaem.
* Sintaksisut e kakto sledva :
* ban nick {
* mask "(nick koito jelaete da zabranite)";
* reason "(prichina)";
* };
*/
ban nick {
mask "Test";
reason "Test Nickname";
};
/*
* NEW: ban ip {}
* OLD: Z:Line
* Ban na ip.
* Sintaksis:
* ban ip { mask (ip nomer/hostmask); reason "(prichina)"; };
*/
ban ip {
mask 100.100.200.300;
reason "Wrong Ip";
};
/*
* NEW: ban server {}
* OLD: Server Q:Line
* Slagane na ban na server.Ako servera e link-nat kum otdalecheniq server
* (toest tozi) localniqt server shte se diskonect-ne avtormatichno.
* Syntax is as follows:
* ban server {
* mask "(Imeto na servera)";
* reason "(Prichina)";
* };
*/
ban server {
mask irc.microsoft.com;
reason "Get out of here";
};
/*
* NEW: ban user {}
* OLD: K:Line
* Tazi opciq pozvolqva da zabranite dostupa na user do vashiqt server
* Sintaksis:
* ban user { mask (hostmask/ip nomer); reason "(Prichina)"; };
*/
ban user {
mask *tirc@*.microsoft.com;
reason "Idiot";
};
/*
* NEW: ban realname {}
* OLD: n:Line
* Tazi opciq vi dava pravo da zabranite dostupa na user ot opredeleno 'realname'.
* Sintaksis:
* ban realname {
* mask "(real name)";
* reason "(prichina)";
* };
*/
ban realname {
mask "test";
reason "mIRKFORCE";
};
ban realname {
mask "sub7";
reason "virus";
};
/*
* BELEJKA ZA VSICHKI BANOVE, mojete da povtarqte procedurata sus razlichni nickove!
*
* NEW: except ban {}
* OLD: E:Line
* Nick koito ne moje da bude bannat.
* Sintaksis:
* except ban { mask (ident@host); }
*/
except ban {
/* don't ban stskeeps */
mask *stskeeps@212.*;
};
/*
* NEW: deny dcc {}
* OLD: dccdeny.conf
* Izpolzvaite go za da zabranite dcc.Predpazva vi ot virusi
* Syntax:
* deny dcc
* {
* filename "Fail koito shte blokirate (ie, *exe)";
* reason "prichina";
* };
*/
deny dcc {
filename "Sub7";
reason "Possible Sub7 Virus";
};
/*
* NEW: deny channel {}
* OLD: N/A (NEW)
* Zabranqva kanali po vash izbor.
* Syntax:
* deny channel {
* channel "(kanal)";
* reason "prichina";
* };
*/
deny channel {
channel "hackers";
reason "Warez is illegal";
};
/*
* NEW: vhost {}
* OLD: Vhost.conf file
* Tazi nastroika vi slaga Falshivo ip.Slaga se za hora koito ne sa operatori
* ili puk za operatori (za po murzelivite /sethost :P
* Sintaksis:
* vhost {
* vhost (vhost.com);
* from {
* userhost (ident@host to allow to use it);
* };
* login (login name);
* password (password);
* };
* then to use this vhost, do /vhost (login) (password) in IRC
*/
vhost {
vhost i.hate.microsefrs.com;
from {
userhost *@*;
};
login stskeeps;
password moocowsrulemyworld;
};
/* Mojete da vkliuchite i drugi konfiguracionni failove */
/* vkliuchete "klines.conf"; */
/* Network configuration */
set {
network-name "Imeto na Mrejata vi";
default-server "Imeto na Servera";
services-server "Services.servera";
stats-server "Stats.Servera";
help-channel "#Kanal za pomosht";
hiddenhost-prefix "skrithost";
/* prefix-quit "quit na userite"; */
/* Cloak Keys se slagat na vsichki serveri ot mrejata.
* Te se izpolzvat za po golqma sigurnost.Trqbva da budat izbrani 3 reda
* ot 5-100 simvola i da sudurjat SMESENI golemi,malki bukvi i cifri...
* V primera e posocheno edin takuv 'Cloak Key'..napishete oshte 2
*/
cloak-keys {
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
"Slojete Tuk Vashi Razburkani";
"Slojete Tuk Vashi Razburkani";
};
/* on-oper host */
hosts {
local "Host za localen operator";
global "Host za globalen operator";
coadmin "Host za coadmin";
admin "Host za admin";
servicesadmin "Host za services-admin";
netadmin "Host za netadmin";
host-on-oper-up "yes\no";
};
};
/* Server specific configuration */
set {
kline-address "slojete adres za kline";
auto-join "#kanal za auto-join";
modes-on-connect "+iw";
modes-on-oper "+wgs";
oper-auto-join "#Kanal za auto-join na operatorite";
dns {
nameserver 127.0.0.1;
timeout 2s;
retries 2;
};
options {
hide-ulines;
/* Ako jelaete da proverqva identa mahnete */
/* identd-check; */
show-connect-info;
};
maxchannelsperuser 10;
/* Tova e minimalnoto vreme v koeto user moje da se svurje sled kato izleze ot servera.
* Tova shte pomogne da se spre spam-a */
anti-spam-quit-message-time 10s;
/* Napravete statichen quit koito da zamestva drugite quit-ove na userite.
custom quits are allowed on local server */
/* static-quit "Client quit"; */
/* Mojete da blokirate 'Part-reason-ite' kato slojite nqkakuv text po vash izbor */
/* static-part yes; */
/* Mojete da slagate 'stats' ili inache kazano nqkoi flagove da budat razresheni i
* izpolzvaemi samo ot operite. Primer za tova sa - klines,glines i shuns
*/
oper-only-stats "okfGsMRUEelLCXzdD";
/* Throttling: Dolniqt primer pokazva che mojete da slojite limit 3 svurzvaniq
za 60 sec (na host). */
throttle {
connections 3;
period 60s;
};
/* Anti flood protection */
anti-flood {
nick-flood 3:60; /* 3 smenqniq na nicka za 60 seconds (po default) */
};
/* Spam filter */
spamfilter {
ban-time 1d; /* vremetraeneto e po default *line ban set by spamfilter */
ban-reason "Spam/Advertising"; /* default prichina */
virus-help-channel "#help"; /* Kanal za skanirane na virusi */
/* s izkliuchenie "#help"; drugite kanali se osvobojdavat ot filtrirane */
};
};
/*
* Ako imate problem ili nujda ot pomosht?
* 1) www.vulnscan.org/UnrealIrcd/unreal32docs.html
* 2) www.vulnscan.org/UnrealIrcd/faq/ <- sudurja 80% ot vuprosite vi!
* 3) Ako imate problem moje da se oburnete i kum irc.ircsystems.net #unreal-support,
* no purvo PROCHETETE HELP FAILA i 'FAQ'.
*/
+15 -73
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 */
@@ -290,9 +288,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";
*
* };
@@ -363,7 +361,7 @@ drpass {
* NEW: log {} OLD: N/A Tells the ircd where and what to log(s). You can have
* as many as you wish.
*
* FLAGS: errors, kills, tkl, connects, server-connects, oper
* FLAGS: errors, kills, tkl, connects, server-connects, kline, oper
*
* Syntax:
* log "log file"
@@ -383,6 +381,7 @@ log "ircd.log" {
maxsize 2097152;
flags {
oper;
kline;
connects;
server-connects;
kills;
@@ -506,66 +505,6 @@ alias "identify" {
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: files {}
* OLD: include/config.h
*
* This block overrides the IRCd's default paths for loading things
* like the MOTD, saving its PID, or writing/loading its tunefile. The
* existence of this block allows one UnrealIRCd installation to
* support multiple running instances when combined with the -c
* commandline option.
*
* As usual, relative paths are interpreted relative to the directory
* where UnrealIRCd would find unrealircd.conf if -c is _not_
* specified on the commandline.
*/
files
{
/* The Message Of The Day shown to users who log in: */
/* motd ircd.motd; */
/*
* A short MOTD. If this file exists, it will be displayed to
* the user in place of the MOTD. Users can still view the
* full MOTD by using the /MOTD command.
*/
/* shortmotd ircd.smotd; */
/* Shown when an operator /OPERs up */
/* opermotd oper.motd; */
/* Services MOTD append. */
/* svsmotd ircd.svsmotd; */
/* Bot MOTD */
/* botmotd bot.motd; */
/* Shown upon /RULES */
/* rules ircd.rules; */
/*
* Where the IRCd stores and loads a few values which should
* be persistent across server restarts. Must point to an
* existing file which the IRCd has permission to alter or to
* a file in a folder within which the IRCd may create files.
*/
/* tunefile ircd.tune; */
/* Where to save the IRCd's pid. Should be writable by the IRCd. */
/* pidfile ircd.pid; */
};
/*
* NEW: tld {}
@@ -759,8 +698,6 @@ set {
* 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].
* HINT: On *NIX, you can run './unreal gencloak' in your shell to let
* Unreal generate 3 random strings for you.
*/
cloak-keys {
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
@@ -786,6 +723,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 */
@@ -812,7 +754,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;
@@ -834,8 +776,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!
* 3) If you still have problems you can go irc.unrealircd.org #unreal-support,
* 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!
*/
+20 -17
View File
@@ -19,8 +19,7 @@
* BITTE LESE die doc/unreal32docs.html! Sie ist auch online erhältlich bei:
* www.vulnscan.org/UnrealIrcd/unreal32docs.html
* Diese Datei enthält zahlreiche ergänzende Informationen über jeden Block, Variablen usw.
* Übersetzung durch stylus740@smart-irc.de (bei irc.smart-irc.net)
*/
* Übersetzung durch stylus740@smart-irc.de (bei irc.smart-irc.net)/
/* Kommentar Typen */
#Kommentar Typ 1 (Shell Typ)
@@ -95,8 +94,8 @@ admin {
/*
* NEU: class {}
* ALT: Y:line (alte Form war verwirrend)
* Hiermit werden Klassen und ihre Einstellungen festgelegt. Eine Klasse ist eine Gruppen-
* einstellung für Verbindungen. So kann man beispielsweise Server Verbindungen in einer
* Hiermit werden Klassen und ihre Einstellungen festgelegt. Eine Klasse ist eine Gruppen
* Einstellung für Verbindungen. So kann man beispielsweise Server Verbindungen in einer
* eigenen Klasse behandeln, statt zusammen mit Clients.
* Syntax ist wie folgt:
* class (class name)
@@ -294,11 +293,11 @@ listen *:6667;
* options {
* (options hier*);
* };
* // Wird SSL benutzt, kann bestimmt werden, welche Verschlüsselung im SSL
* // Modus zu benutzen ist
* // Bei mehreren "openssl ciphers" sind die einzelnen Verschlüsselungen
* // durch ':' zu trennen
*
* /* Wird SSL benutzt, kann bestimmt werden, welche Verschlüsselung im SSL
* * Modus zu benutzen ist
* * Bei mehreren "openssl ciphers" sind die einzelnen Verschlüsselungen
* * durch ':' zu trennen
* */
* ciphers "DES-CBC3-MD5";
*
* };
@@ -369,7 +368,7 @@ drpass {
* NEU: log {} ALT: N/A Festlegung von Namen und Speicherort der Logfiles. Man kann
* beliebig viele festlegen.
*
* FLAGS: errors, kills, tkl, connects, server-connects, oper
* FLAGS: errors, kills, tkl, connects, server-connects, kline, oper
*
* Syntax:
* log "log file"
@@ -392,6 +391,7 @@ log "ircd.log" {
kline;
connects;
server-connects;
kills;
errors;
sadmin-commands;
chg-commands;
@@ -632,7 +632,7 @@ except ban {
/*
* NEU: deny dcc {}
* ALT: dccdeny.conf
* Mit diesem Block können dcc send's geblockt werden... Gut, um Viren aufzuhalten.
* Mit diesem Block können dcc send's geblockt werden... Gut, um Virten aufzuhalten.
* Syntax:
* deny dcc
* {
@@ -702,8 +702,6 @@ set {
* Die Keys sollten 3 zufällige Strings von 5-100 Zeichen Länge sein (10-20 Zeichen
* (sind ganz ok) und müssen aus Kleinbuchstaben(a-z), Großbuchstaben (A-Z) und
* Ziffern (0-9) bestehen [wie im ersten Key Beispiel].
* TIPP: Auf *NIX, kann man in der Shell './unreal gencloak' aufrufen und durch
* Unreal 3 Zufalls Stings erzeugen und anzeigen lassen.
*/
cloak-keys {
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
@@ -729,6 +727,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;
/* Man kann hier ident checking aktivieren, wenn man will */
@@ -738,7 +741,7 @@ set {
maxchannelsperuser 10;
/* Die Mindestzeit, die ein User verbunden sein muss, bevor er eine QUIT Meldung
* senden darf (Das wird offentlich helfen, Spam zu verhindern) */
* senden darf (Das wird offentlich helfen, Spam zu verhindern */
anti-spam-quit-message-time 10s;
/* Macht die Meldung statisch, die in allen Quit Meldungen angezeigt wird.
Somit sind keine individuellen Quts auf dem lokalen Server mehr erlaubt */
@@ -780,7 +783,7 @@ set {
* Probleme? Weitere Hilfe nötig?
* 1) www.vulnscan.org/UnrealIrcd/unreal32docs.html
* 2) www.vulnscan.org/UnrealIrcd/faq/ <- enthält 80% deiner Fragen - Wetten Dass?
* 3) Hat man dann noch Probleme, kann man den Chat bei irc.unrealircd.org
* #unreal-support aufsuchen. Achtung, wir setzen voraus, dass zuvor die
* DOKU GELESEN WURDE (genauso, wie die FAQ!)!
* 3) Hat man dann noch Probleme, kann man den Chat bei irc.ircsystems.net
* #unreal-support aufsuchen. Dabei ist zu beachten, dass wir voraussetzen,
* dass zuvor DIE DOKU GELESEN WURDE (genauso, wie die FAQ!)!
*/
+89 -101
View File
@@ -1,38 +1,34 @@
/*
* example.conf par Daniel Hawton AKA Osiris (osiris@unrealircd.org).
* Ancien traducteur français : babass
* Tradution française : Alef Burzmali - http://www.burzmali.com
* Dernière mise à jour : 2010-09-11
* $Id$
* Traduction française par babass (babass@unrealircd.org).
*
* Fonctionne pour Unreal3.2 et supérieur
*
* Okay les gars, voici la nouvelle version de l'example.conf. Cela ressemble plus à du C++.
* Okay les mecs. Voici la nouvelle version de l'example.conf. Cela ressemble plus à du C++.
* Peu importe, il est temps de se lancer. Il est difficile de l'attaquer pour la première fois, mais
* avec un peu d'expérience et de lecture vous comprendrez.
* avec un peu d'expérience et en lisant vous comprendrez.
*
* Copiez juste ce fichier dans votre répertoire unrealircd principal et appellez le 'unrealircd.conf'.
*
* NOTE: Toutes les lignes, exceptées les ligne d'ouvertures { , se terminent par un ;, en particulier
* celles de fermeture }.
* NOTE: Toutes les lignes, excepté la ligne d'ouverture { , les lignes finissant par un ;,
* et celle de fermeture } incluses.
* L'IRCd ignorera les lignes commentées.
*
* LISEZ S'IL VOUS PLAIT doc/unreal32docs.fr.html !
* La version en ligne est aussi disponible à : http://www.unrealircd.com/files/docs/unreal32docs.fr.html
* Elle contient beaucoup d'informations à propos du fichier de configuration : fournit des informations
* à propos de chaque bloc, variable, etc..
* Si vous essayez de modifier ce fichier sans avoir bien lu la documentation,
* vous êtes presque sûr de vous tromper.
* LISEZ S'IL VOUS PLAIT doc/unreal32docs.fr.html! La version en ligne est aussi disponible à :
* www.vulnscan.org/UnrealIrcd/unreal32docs.fr.html
* Elle contient beaucoup d'informations à propos du fichier de configuration : fournis des informations
* à propos de chaque blocs, variable, etc..
*/
/* Type de commentaires */
#Commentaire type 1 (type Shell)
// Commentaire type 2 (style C++)
/* Commentaire type 3 (style C) */
# Toutes ces lignes sont ignorées par l'ircd.
#Ces lignes sont ignorées par l'ircd.
/*
* UnrealIRCd supporte des modules et certains sont obligatoires.
* UnrealIRCd supportes des modules, en charger certains est requis.
* Vous aurez besoin au moins du module commands et du module cloaking.
*/
@@ -46,13 +42,12 @@
/*
* Vous pouvez également inclure d'autres fichiers de configuration.
* doc/help.fr.conf contient tout le texte de /helpop en français.
* help.conf contient la version anglaise.
* Les fichiers badwords.*.conf contiennent tous les badwords pour le mode +G...
* help.conf contient tous le texte de /helpop. Les fichiers badwords.*.conf
* contiennent tous les badwords pour le mode +G...
* spamfilter.conf contient quelques bonnes règles pour les trojans courrants.
* Vous voudrez probablement les inclure:
*/
include "doc/help.fr.conf";
include "help.conf";
include "badwords.channel.conf";
include "badwords.message.conf";
include "badwords.quit.conf";
@@ -61,14 +56,14 @@ include "spamfilter.conf";
/*
* ACTUEL : me {}
* ANCIEN : M:Line
* me {} definit le nom, la description et l'identifiant numérique pour ce serveur.
* La syntaxe est la suivante :
* me {} definit le nom, la description et le numeric du serveur unreal
* pour ce serveur. La syntaxe est la suivante :
* me {
* name "nom.du.serveur";
* info "Description du Serveur";
* numeric (numeric* serveur);
* };
* En cas de link, cet identifiant ne peut être utilisé pour aucun autre serveur du réseau.
* En cas de link, ce numeric ne peut être utilisé pour aucun autre serveur du réseau.
*/
me
{
@@ -98,8 +93,8 @@ admin {
/*
* ACTUEL : class {}
* ANCIEN : Y:line (l'ancien était déroutant)
* Définit les réglages pour les classes. Une classe est un groupe de réglages pour
* des connexions. Par exemple, pour les connexions serveurs, au lieu de passer par une classe
* Défini les réglages pour les classes. Une classe est un groupe de réglages pour
* des connexions. Par exemple, les connexions serveurs, au lieu de passer par une classe
* client, vous utilisez directement une classe serveur. La syntaxe est la suivante :
* class (nom de la classe)
* {
@@ -110,7 +105,7 @@ admin {
* };
*/
class clients
class clients
{
pingfreq 90;
maxclients 500;
@@ -118,18 +113,18 @@ class clients
recvq 8000;
};
class servers
class servers
{
pingfreq 90;
maxclients 10; /* Nombre maximum de serveurs pouvant être reliés en même temps */
maxclients 10; /* Nombre maximum de serveurs pouvant être reliés en même temps */
sendq 1000000;
connfreq 100; /* Combien de secondes entre chaque tentatives de connexions */
connfreq 100; /* Combien de secondes entre chaque tentatives de connexions */
};
/*
* ACTUEL : allow {}
* ANCIEN : I:Line
* Définit les autorisations de connexions...
* Défini les autorisations de connexions...
* Principalement pour les clients, cela leur permet de se connecter, vous pouvez donc avoir un certain
* contrôle et/ou mettre un mot de passe.
* La syntaxe est la suivante :
@@ -158,15 +153,30 @@ allow {
maxperip 1;
};
/*
* ACTUEL : allow channel {}
* ANCIEN : chrestrict
* Autorise un utilisateur à joindre un salon...
* comme une exception au deny channel.
* Syntaxe :
* allow channel {
* channel "nom du salon";
* };
*/
allow channel {
channel "#WarezSucks";
};
/*
* ACTUEL : oper {}
* ANCIEN : O:Line
* Définit un IRC Operateur
* Défini un IRC Operateur
* Les IRC operateurs sont là pour préserver la qualité du serveur mais aussi d'en assurer
* la maintenance et sa connexion au réseau.
* La syntaxe est la suivante :
* oper (login) {
* class (classe à laquelle les associer, si différent du bloc allow, les déplace vers une nouvelle classe);
* class (classe à laquelle les associer, si différent de moi, déplacez les vers une
* nouvelle classe);
* from {
* userhost (ident@host);
* userhost (ident@host);
@@ -204,7 +214,7 @@ oper bobsmith {
/*
* ACTUEL : listen {}
* ANCIEN : P:Line
* Définit un port à rattacher à l'ircd, pour autoriser
* Défini un port à rattacher à l'ircd, pour autoriser
* des utilisateurs/serveurs à se connecter au serveur.
* La syntaxe est la suivante :
* listen (ip):(port)
@@ -222,12 +232,12 @@ oper bobsmith {
*/
/* Options de listen:
ANCIEN | ACTUEL
S serversonly
C clientsonly
J java
s ssl
* standard
ANCIEN | ACTUEL
S serversonly
C clientsonly
J java
s ssl
* standard
*/
/* NOTE SUR LES PORTS SSL: les ports SSL sont plutôt non standardisés,
@@ -236,9 +246,9 @@ oper bobsmith {
* requière d'être root! D'un autre coté, le port 194 est le port irc officiel et
* avez vous déjà vu un ircd fonctionner sur celui-ci ?
* Donc, notre suggestion est d'utiliser le port 6697 pour le SSL, ceci est utilisé par
* beaucoup de réseaux et est reconnu par exemple par StunTour.
* assez bien de réseaux et est reconnu par exemple par StunTour.
* Vous êtes libre d'ouvrir autant de ports SSL que vous le désirez mais
* en utilisant (au moins) 6697 vous aidez le monde à se standardiser un peu ;).
* en utilisant (au moins) 6697 vous aidez le monde à standardiser un peu a bit ;).
*/
listen *:6697
{
@@ -252,7 +262,7 @@ listen *:6697
listen *:8067;
listen *:6667;
/* NOTE: Si vous êtes sur un shell avec de multiples IP vous êtes
/* NOTE: Si vous êtes sur un shell shell avec de multiples IP's vous êtes
* susceptibles d'avoir l'erreur 'Address already in use' (adresse déjà utilisée)
* dans vos logs et l'ircd refusera de démarer.
* Cela signifie que vous devrez utiliser une IP spécifique au lieu de '*',
@@ -264,14 +274,14 @@ listen *:6667;
/*
* ACTUEL : link {}
* ANCIEN : C/N:Lines
* Définit un accord pour la connexion d'un serveur.
* Défini un accord pour la connexion d'un serveur.
* NOTE : CHACUN DES SERVEURS NECESSITE UN PARAMETRE LINK {} POUR SE CONNECTER CORRECTEMENT !
* La syntaxe est la suivante :
* link (nom du serveur)
* {
* username (username, * fonctionne aussi);
* hostname (ip/hostmask);
* bind-ip (IP à laquelle se relier lors de la connexion, ou *);
* bind-ip (Quelle IP à laquelle se relier lors de la connexion, ou *);
* port (port auquel se connecter, si il y en a un);
* hub (Si c'est un a hub, * fonctionne, ou les servermasks qu'il doit porter);
* [ou leaf *;]
@@ -281,9 +291,9 @@ listen *:6667;
* options {
* (options ici*);
* };
* // Si vous utilisez le SSL, vous pouvez choisir quel algorithme de hash utiliser dans le mode SSL
* // Utilisez la commande "openssl ciphers" pour obtenir la liste des algorithmes disponibles, séparez les par des ":"
*
* /* Si vous utilisez le SSL, vous pouvez choisir quel cryptage (cipher) utiliser dans le mode SSL
* * Retrouvez une liste "crytages openssl", séparez les cryptages par des :
* */
* ciphers "DES-CBC3-MD5";
*
* };
@@ -292,11 +302,11 @@ listen *:6667;
/*
options:
ANCIEN | ACTUEL
S ssl
Z zip
N/A autoconnect
N/A quarantine
N/A nodnscache
S ssl
Z zip
N/A autoconnect
N/A quarantine
N/A nodnscache
*/
@@ -322,7 +332,7 @@ link hub.mynet.com
* ACTUEL : ulines {}
* ANCIEN : U:Line
* Les U-lines donnent aux serveurs plus de pouvoir/commandes, ceci doit UNIQUEMENT être appliqué
* aux serveurs de services/stats et JAMAIS pour des serveurs UnrealIRCd normaux !
* aux serveurs de services/stats et JAMAIS pour des servuers UnrealIRCd normaux !
* La syntaxe est la suivante :
* ulines {
* (serveur auquel appliquer la uline);
@@ -342,7 +352,7 @@ ulines {
* La syntaxe est la suivante :
* drpass {
* restart "(mot de passe pour relancer)";
* die "(mot de passe pour arrêter)";
* die "(mot de passe pour arrêter)";
* };
*/
drpass {
@@ -356,7 +366,7 @@ drpass {
* Dit à l'ircd où et quoi loguer. Vous pouvez en avoir
* autant que vous le souhaitez.
*
* FLAGS : errors, kills, tkl, connects, server-connects, oper
* FLAGS : errors, kills, tkl, connects, server-connects, kline, oper
*
* Syntaxe :
* log "fichier de log"
@@ -376,6 +386,7 @@ log "ircd.log" {
maxsize 2097152;
flags {
oper;
kline;
connects;
server-connects;
kills;
@@ -442,7 +453,7 @@ alias StatServ { type stats; };
* };
*/
/* Ceci est expliqué séparément car même si elle a le même nom que la directive précédente, elle est très
* différente dans sa syntaxe, bien qu'elle a une fonction similaire et dépend des alias standards pour
* différente dans sa syntaxe, bien que elle a une fonction similaire et dépend des alias standards pour
* fonctionner.
*/
/*
@@ -460,10 +471,10 @@ alias "identify" {
type command;
};
*/
/* La directive alias::format est une expression régulière. Le premier format correspond à la commande
* /identify command lorsque le premier caractère est un #. Cela renvoit donc à l'alias chanserv avec
* les paramètres IDENTIFY %1-. Le second format correspond à la commande /identify lorsque le premier
* caractère n'est pas un #. Cela envoie alors la commande à l'alias nickserv avec les paramètres
/* La direcitive alias::format est une expression régulière. Le premier format correspond à la commande
* /identify command lorsque le premier caractère est un #. Cela renvois donc à l'alias chanserv avec
* les paramètres IDENTIFY %1-. Le second format correspond à la commanden /identify lorsque le premier
* caractère n'est pas un #. Cela envoies alors la commande à l'alias nickserv avec les paramètres
* IDENTIFY %1-.
*/
@@ -502,17 +513,6 @@ alias "identify" {
type command;
};
/* Ceci est un exemple de véritable alias de commande*/
/* Ceci renvoye /GLINEBOT à /GLINE <parameter> 2d etc... */
alias "glinebot" {
format ".+" {
command "gline";
type real;
parameters "%1 2d Les bots ne sont pas permis sur ce serveur, lisez s'il-vous-plait la faq sur http://www.example.com/faq/123";
};
type command;
};
/*
* ACTUEL : tld {}
@@ -533,15 +533,15 @@ tld {
rules "ircd.rules.fr";
};
/* Note : vous pouvez juste effacer le bloc d'exemple ci-dessus,
* auquel cas les fichiers motd/règles par défaut (ircd.motd, ircd.rules)
/* note : vous pouvez juste effacer le bloc d'exemple ci-dessus,
* en quel cas les fichiers motd/règles par défaut (ircd.motd, ircd.rules)
* seront utilisés pour tout le monde.
*/
/*
* ACTUEL : ban nick {}
* ANCIEN : Q:Line
* Bannit un pseudo, il ne peut donc être utilisé.
* Banni un pseudo, il ne peut donc être utilisé.
* La syntaxe est la suivante :
* ban nick {
* mask "(pseudo à bannir)";
@@ -591,7 +591,7 @@ ban server {
ban user {
mask *tirc@*.saturn.bbn.com;
reason "Idiot";
reason "Idiot";
};
/*
@@ -628,15 +628,15 @@ ban realname {
*/
except ban {
/* ne bannit pas stskeeps */
/* ne banni pas stskeeps */
mask *stskeeps@212.*;
};
/*
* ACTUEL : deny dcc {}
* ANCIEN : dccdeny.conf
* Utilisez ceci pour bloquer l'envoi de dcc ...
* Utile pour bloquer les virus.
* Utilisez ceci pour bloquer l'envoie de dcc... stope
* mieux les virus.
* Syntaxe :
* deny dcc
* {
@@ -652,8 +652,8 @@ deny dcc {
/*
* ACTUEL : deny channel {}
* ANCIEN : N/A (NEW)
* Ceci empêche des salons d'être joints.
* Syntaxe :
* Ceci empêche des salons d'être joins.
* Syntax:
* deny channel {
* channel "(salon)";
* reason "raison";
@@ -664,21 +664,6 @@ deny channel {
reason "Warez is illegal";
};
/*
* ACTUEL : allow channel {}
* ANCIEN : chrestrict
* Autorise un utilisateur à joindre un salon...
* comme une exception au deny channel.
* Syntaxe :
* allow channel {
* channel "nom du salon";
* };
*/
allow channel {
channel "#WarezSucks";
};
/*
* ACTUEL : vhost {}
* ANCIEN : Vhost.conf file
@@ -721,8 +706,6 @@ set {
* Les clés doivent être 3 chaînes de 5-100 caractères melangés.
* (10-20 caractères est parfait) et elles doivent être constituées de minuscules (a-z),
* majuscules (A-Z) et chiffres (0-9) [voir le premier exemple de clé].
* Astuce : Sur *NIX, vous pouvez utiliser la commande './unreal gencloak' dans votre shell pour que
* Unreal génère 3 chaînes aléatoires pour vous.
*/
cloak-keys {
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
@@ -744,10 +727,15 @@ set {
/* Configuration spécifique d'un serveur */
set {
kline-address "définir.cet.email";
kline-address "mettre.cet.email";
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;
/* Vous pouvez enclencher la vérification des idents si vous voulez */
@@ -776,7 +764,7 @@ set {
*/
oper-only-stats "okfGsMRUEelLCXzdD";
/* Throttling: cet exemple applique une limite de 3 tentatives de connection en 60s (par host). */
/* Throttling: cet exemple applique une limite de 3 connexions en 60s (par host). */
throttle {
connections 3;
period 60s;
@@ -798,8 +786,8 @@ set {
/*
* Problèmes ou besoin de plus d'aide ?
* 1) http://www.unrealircd.com/files/docs/unreal32docs.fr.html
* 2) http://www.vulnscan.org/UnrealIRCd/faq/ <- contient 80% de vos questions !
* 3) Si vous avez encore des problèmes vous pouvez aller sur irc.unrealircd.org #unreal-support,
* 1) www.vulnscan.org/UnrealIrcd/unreal32docs.fr.html
* 2) www.vulnscan.org/UnrealIrcd/faq/ <- contient 80% de vos questions !
* 3) Si vous avez encore des problèmes vous pouvez aller sur irc.ircsystems.net #unreal-support,
* notez que vous devez avoir LU LA DOCUMENTATION ET LA FAQ d'abord !
*/
+19 -30
View File
@@ -1,6 +1,6 @@
/*
* example.conf Daniel Hawton avagy Osiris jóvoltából (osiris@unrealircd.org).
* A magyar fordítást AngryWolf <angrywolf2009@gmail.com> készítette.
* A magyar fordítást AngryWolf <angrywolf@flashmail.com> készítette.
* $Id$
*
* Felhasználható Unreal3.2 és későbbi verziókhoz
@@ -16,11 +16,9 @@
* a záró } sort is. Az IRCd figyelmen kívül hagyja a megjegyzéssorokat.
*
* KÉRLEK, OLVASD EL A doc/unreal32docs.html-T! Az online verzió is elérhető
* a www.vulnscan.org/UnrealIRCd/unreal32docs.html címen.
* a www.vulnscan.org/UnrealIrcd/unreal32docs.html címen.
* Rengeteg információt tartalmaz a konfigurációs fájlról: tájékoztatást ad
* minden blokkról, változóról stb.
* Ha megpróbálod szerkeszteni ezt a fájlt anélkül, hogy megfelelően elolvastad
* volna a dokumentációt, jó eséllyel kanyarodsz a biztos kudarc felé!
*/
/* Megjegyzések típusai */
@@ -295,10 +293,10 @@ listen *:6667;
* options {
* (opciók ide*);
* };
* // Ha SSL-t használunk, kiválaszthatjuk, milyen rejtjelező algoritmusok
* // legyenek használatban SSL módban. Listát kapunk az "openssl ciphers"
* // paranccsal. Az egyes algoritmusokat :-tal válasszuk el.
*
* /* Ha SSL-t használunk, kiválaszthatjuk, milyen rejtjelező algoritmusok
* * legyenek használatban SSL módban. Listát kapunk az "openssl ciphers"
* * paranccsal. Az egyes rejtjeleket :-tal válasszuk el.
* */
* ciphers "DES-CBC3-MD5";
*
* };
@@ -374,7 +372,7 @@ drpass {
* Megmondja az ircd-nek, hová és mit naplózzon. Annyi naplófájlunk lehet,
* amennyit szeretnénk.
*
* FLAGEK: errors, kills, tkl, connects, server-connects, oper
* FLAGEK: errors, kills, tkl, connects, server-connects, kline, oper
*
* Szintaktika:
* log "naplófájl"
@@ -396,6 +394,7 @@ log "ircd.log" {
maxsize 2097152;
flags {
oper;
kline;
connects;
server-connects;
kills;
@@ -521,18 +520,6 @@ alias "identify" {
type command;
};
/* Példa egy valódi álparancsra */
/* A /GLINEBOT parancsot leképezi arra, hogy /GLINE <paraméter> 2d stb... */
alias "glinebot" {
format ".+" {
command "gline";
type real;
parameters "%1 2d Botok tilosak ezen a szerveren, kérlek, olvasd el a faq-ot a http://www.example.com/faq/123 címen";
};
type command;
};
/*
* ÚJ: tld {}
@@ -723,14 +710,11 @@ set {
hiddenhost-prefix "rox";
/* prefix-quit "no"; */
/* Az álcázó kulcsoknak a hálózat minden szerverén azonosnak kell
* lenniük. Az álcázott gazdanevek előállításában van szerepük, ezért
* lenniük. Álcázott gazdanevek előállításában van szerepük, ezért
* legyenek titokban tartva! Mind 3 kulcs legyen egy-egy véletlenszerű
* sztring 5-100 karakterből (10-20 karakter kitűnő), valamint
* tartalmazniuk kell kisbetűket (a-z), nagybetűket (A-Z) és számokat
* (0-9) [ahogy az első kulcsos példában látható].
* TIPP: *NIX alatt az './unreal gencloak' parancsot futtatva
* a parancsértelmezőnkben, az Unreal 3 véletlen sztringet
* generál nekünk.
*/
cloak-keys {
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
@@ -756,6 +740,11 @@ set {
modes-on-connect "+ixw";
modes-on-oper "+xwgs";
oper-auto-join "#operek";
dns {
nameserver 127.0.0.1;
timeout 2s;
retries 2;
};
options {
hide-ulines;
/* Itt engedélyezhetjük az ident ellenőrzést, ha szeretnénk */
@@ -789,8 +778,8 @@ set {
*/
oper-only-stats "okfGsMRUEelLCXzdD";
/* Elfojtás: ez a példa 60 másodpercenként legfeljebb 3 kapcsolódási
* kísérletet engedélyező korlátozást állít be (gazdánként). */
/* Elfojtás: ez a példa 60 másodpercenként (gazdánként) legfeljebb
* 3 kapcsolatot engedélyező korlátozást állít be. */
throttle {
connections 3;
period 60s;
@@ -815,9 +804,9 @@ set {
/*
* Problémák akadtak, vagy szükség van további segítségre?
* 1) www.vulnscan.org/UnrealIRCd/unreal32docs.html
* 2) www.vulnscan.org/UnrealIRCd/faq/ <- a kérdéseid 80%-át tartalmazza!
* 3) Ha még mindig gondod van, felmehetsz az irc.unrealircd.org #unreal-support
* 1) www.vulnscan.org/UnrealIrcd/unreal32docs.html
* 2) www.vulnscan.org/UnrealIrcd/faq/ <- a kérdéseid 80%-át tartalmazza!
* 3) Ha még mindig gondod van, felmehetsz az irc.ircsystems.net #unreal-support
* csatornájára. Fontos: kérjük, hogy előbb OLVASD EL A DOKUMENTÁCIÓT és
* a GYIK-ot!
*/
-816
View File
@@ -1,816 +0,0 @@
/*
* example.conf door Daniel Hawton AKA Osiris (osiris@unrealircd.org).
* $Id$
* Vertaald door Mark
*
* Werkt voor Unreal3.2 en hoger
*
* Dit is de nieuwe example.conf. Het lijkt veel op C++.
* Het begin is wellicht moeilijk, maar met wat ervaring en lezen
* zul je het wel begrijpen.
*
* Kopieer dit bestand naar je hoofd UnrealIRCd dir en noem het 'unrealircd.conf'.
*
* OPMERKING: Alle regels, behalve de openings { regel, eindingen met een ;, dus
* ook de sluitende } regel. Commentaar regels worden door de IRCd niet verwerkt.
*
* LEES doc/unreal32docs.html! De online versie is tevens te bereiken op:
* www.vulnscan.org/UnrealIRCd/unreal32docs.html
* Er staat heel veel informatie in over het configbestand: informatie over
* elk block, variabele, etc..
* Wanneer je dit bestand aanpast zonder de documentatie grondig te lezen,
* zul je gegarandeerd falen!
*/
/* Type van commentaar */
#Commentaar type 1 (Shell type)
// Commentaar type 2(C++ style)
/* Commentaar type 3 (C Style) */
#Deze regels worden niet verwerkt door de IRCd.
/*
* UnrealIRCd ondersteunt modules, het laden van sommige is benodigd.
* Je hebt tenminste een commands module en een cloacking module nodig.
*/
/* VOOR *NIX, haal de commentaartekens weg bij de volgende 2 regels: */
//loadmodule "src/modules/commands.so";
//loadmodule "src/modules/cloak.so";
/* VOOR Windows, haal de commentaartekens weg bij de volgende 2 regels: */
//loadmodule "modules/commands.dll";
//loadmodule "modules/cloak.dll";
/*
* Je kan tevens andere configuratiebestanden toevoegen.
* help.conf bevat alle /helpop tekst. De badwords.*.conf
* bestanden bevatten alle badword instellingen voor mode +G..
* spamfilter.conf bevat enkele goede regels voor huidige trojans.
* Je wilt deze waarschijnlijk laden:
*/
include "help.conf";
include "badwords.channel.conf";
include "badwords.message.conf";
include "badwords.quit.conf";
include "spamfilter.conf";
/*
* NIEUW: me {}
* OUD: M:Line
* me {} definieert de naam, beschrijving en unreal numeriek voor deze server.
* De syntax is als volgt:
* me {
* name "server.naam";
* info "Server Beschrijving";
* numeric (server numeric*);
* };
* Waneer je servers linkt, mag de numeric niet door een andere server in gebruik zijn.
*/
me
{
name "irc.foonet.com";
info "FooNet Server";
numeric 1;
};
/*
* NIEUW: admin {}
* OUD: A:Line
* Admin geeft informatie over de server admin. Je mag hier
* zo veel regels opgeven als je wilt.
* De syntax is als volgt:
* admin {
* "eerste regel";
* "tweede regel";
* [etc]
* };
*/
admin {
"Bob Smith";
"bob";
"widely@used.name";
};
/*
* NIEUW: class {}
* OUD: Y:line (de oude was verwarrend)
* Hiermee stel je de classes in. Een class is een groepsinstelling voor
* connections. Server connecties stuur je naar een andere class dan
* gebruikers.
* De syntax is als volgt:
* class (class naam)
* {
* pingfreq (hoe vaak er gepingt moet worden naar een gebruiker/server in seconden);
* maxclients (hoeveel connecties er maximaal in deze class mogen zijn);
* sendq (maximale send queue voor 1 connectie);
* recvq (maximale receive queue voor 1 connectie [flood control]);
* };
*/
class clients
{
pingfreq 90;
maxclients 500;
sendq 100000;
recvq 8000;
};
class servers
{
pingfreq 90;
maxclients 10; /* Hoeveel servers we maximaal tegelijk gelinkt kunnen hebben */
sendq 1000000;
connfreq 100; /* Hoeveel seconden tussen een poging to verbinden */
};
/*
* NIEUW: allow {}
* OUD: I:Line
* Hiermee stel je het toestaan van connecties in.
* Gebruikers kunnen verbinden, en jij hebt wat controle en kan eventueel
* een wachtwoord instellen.
* De syntax is als volgt:
* allow {
* ip (ip mask dat toegestaan moet worden);
* hostname (host mask);
* class (class waarnaar ze gestuurd moeten worden [see class {}]);
* password "(wachtwoord)"; (optioneel)
* maxperip (hoeveel connecties per IP); (optioneel)
* };
*/
allow {
ip *@*;
hostname *@*;
class clients;
maxperip 5;
};
/* Allow met wachtwoord */
allow {
ip *@255.255.255.255;
hostname *@*.passworded.ugly.people;
class clients;
password "f00Ness";
maxperip 1;
};
/*
* NIEUW: allow channel {}
* OUD: chrestrict
* Geeft de mogelijkheid een kanaal te joinen,
* als uitzondering voor een deny channel {}
* De syntax is als volgt:
* allow channel {
* channel "kanaal naam";
* };
*/
allow channel {
channel "#WarezSucks";
};
/*
* NIEUW: oper {}
* OUD: O:Line
* Stelt een IRC Operator in
* IRC Operators zorgen voor orde op de server en zorgen er
* tevens voor dat de server verbonden blijft met het netwerk.
* De syntax is als volgt:
* oper (login) {
* class (class waarin ze geplaatst moeten worden.);
* from {
* userhost (ident@host);
* userhost (ident@host);
* };
* flags
* {
* (flags hier*);
* };
* OF
* flags "oud type flags, zoals OAaRD";
* };
*/
/* Voor een lange lijst van oper flags, zie doc/unreal32docs.html#operblock
* [wordt ten zeerste aangeraden te lezen!]
*/
oper bobsmith {
class clients;
from {
userhost bob@smithco.com;
};
password "f00";
flags
{
netadmin;
can_zline;
can_gzline;
can_gkline;
global;
};
};
/*
* NIEUW: listen {}
* OUD: P:Line
* Hiermee stel je een poort in voor de IRCd, zodat
* gebruikers/servers kunnen verbinden met je server.
* De syntax is als volgt:
* listen (ip nummer):(port nummer)
* {
* options {
* (opties hier);
* };
* };
* of een gewone:
* listen: listen (ip):(port);
*
* OPMERKING: voor IPv6 IPs (3ffe:b80:2:51d::2 etc), gebruik listen [ip]:port;
*
* Dat werkt ook.
*/
/* Opties voor listen:
OUD | NIEUW
S serversonly
C clientsonly
J java
s ssl
* standard
*/
/* Opmerking voor SSL poorten: SSL poorten zijn niet echt
* standaard. Mensen zeggen dat je SSL op poort 994 moet laten
* lopen, omdat dit de standaard SSL poort is.. Maar meestal worden
* hogere poorten gebruikt. Om poort 994 te gebruiken, moet je root
* zijn! Tevens is poort 194 de officiele IRC poort. Maar heb je daar
* ooit een IRCd op zien lopen?
* Wij raden je aan om poort 6697 voor SSL te gebruiken. Dit wordt op
* vrijwel alle netwerken gebruikt en wordt herkend door bijvoorbeeld
* StunTour. Je mag zoveel SSL poorten openen als je wil, maar als je
* (tevens) 6697 gebruikt, help je mee de wereld meer uniform te maken ;).
*/
listen *:6697
{
options
{
ssl;
clientsonly;
};
};
listen *:8067;
listen *:6667;
/* Opmerking: Als je een IRCd shell gebruikt met meerdere IPs, krijg
* je wellicht een "Address already in use" error in je log
* en de IRCd zal niet starten. Dit betekent dat je MOET binden
* naar een specifiek IP in plaats van '*', bijvoorbeeld:
* listen 1.2.3.4:6667l
* Natuurlijk moet je het IP vervangen door het IP dat je toewezen is.
*/
/*
* NIEUW: link {}
* OUD: C/N:Lines
* Geeft een server toegang om te verbinden.
* OPMERKING: Beiden servers hebben een link { } nodig om goed te kunnen verbinden!
* De syntax is als volgt:
* link (server naam)
* {
* username (username, * werkt ook);
* hostname (ip number/hostmask);
* bind-ip (welk IP te binden wanneer je connect, of *);
* port (poort om naar te verbinden);
* hub (Als dit een hub is, werkt '*');
* [of leaf *;]
* password-connect "(wachtwoord te zenden)";
* password-receive "(wachtwoord te ontvangen)";
* class (class waarin de server geplaatst moet worden);
* options {
* (opties hier*);
* };
* // Als we SSL gebruiken, kunnen we kiezen welke cipher we willen gebruiken in SSL mode
* // Verkrijg een lijst door "openssl ciphers", onderscheid ciphers met :'s
* ciphers "DES-CBC3-MD5";
*
* };
*/
/*
opties:
OUD | NIEUW
S ssl
Z zip
N/A autoconnect
N/A quarantine
N/A nodnscache
*/
link hub.mynet.com
{
username *;
hostname 1.2.3.4;
bind-ip *;
port 7029;
hub *;
password-connect "LiNk";
password-receive "LiNk";
class servers;
options {
/* Opmerking: Gebruik geen autoconnect naar Services */
autoconnect;
ssl;
zip;
};
};
/*
*
* NIEUW: ulines {}
* OUD: U:Line
* U:Lines geven servers meer macht/commando's. Gebruik het alleen voor
* services en stats, en NOOIT voor normale UnrealIRCd servers!
* De syntax is als volgt:
* ulines {
* (server to uline);
* (server to uline);
* [etc]
* };
*/
ulines {
services.roxnet.org;
stats.roxnet.org;
};
/*
* NIEUW: drpass {}
* OUD: X:Line
* Stelt de wachtwoorden voor /die en /restart in.
* De syntax is als volgt:
* drpass {
* restart "(wachtwoord voor herstart)";
* die "(wachtwoord voor beeindigen)";
* };
*/
drpass {
restart "I-love-to-restart";
die "die-you-stupid";
};
/*
* NIEUW: log {}
* OUD: N/A
* Laat de IRCd weten wat en waar te loggen. Je kan er
* zoveel instellen als je wilt.
*
* FLAGS: errors, kills, tkl, connects, server-connects, kline, oper
*
* De syntax is als volgt:
*
* log "log file"
* {
* flags
* {
* flag;
* flag;
* etc..
* };
* };
*/
log "ircd.log" {
/* Verwijder het logbestand en begint een nieuwe wanneer de oude 2MB groot is. Laat dit leeg om altijd
hetzelfde bestand te gebruiken */
maxsize 2097152;
flags {
oper;
kline;
connects;
server-connects;
kills;
errors;
sadmin-commands;
chg-commands;
oper-override;
spamfilter;
};
};
/*
* NIEUW: alias {}
* OUD: N/A
* Hiermee stel je commando's zoals /nickserv, /chanserv etc in.
* FLAGS: services, stats, normal
*
* De syntax is als volgt:
* alias "naam" {
* target "wijst naar";
* type aliastype;
* };
*
* [Opmerking: Je kan ook een standaard alias bestand gebruiken, zie doc/unreal32docs.nl.html sectie 2.9]
*/
// Dit wijst het commando /nickserv naar de gebruiker NickServ welke verbonden is met set::services-server
/*alias NickServ {
target "NickServ";
type services;
};*/
// Als je het commando naar dezelfde nick als het commando wil sturen, kun je "target" weglaten.
//alias ChanServ { type services; };
// Wijst het /statserv commando naar de gebruiker Statserv verbonden met set::stats-server
//alias StatServ { type stats; };
// Wijst het /superbot commando naar de gebruiker SuperBot
//alias SuperBot { type normal; };
/* Standaard aliases */
alias NickServ { type services; };
alias ChanServ { type services; };
alias OperServ { type services; };
alias HelpServ { type services; };
alias StatServ { type stats; };
/*
* NIEUW: alias {}
* OUD: N/A
* Hiermee stel je commando's zoals /identify, /services in.
*
* De syntax is als volgt:
* alias "naam" {
* format "format string" {
* target "wijst naar";
* type aliastype;
* parameters "parameters te verzenden";
* };
* type command;
* };
*/
/* Hier wordt apart notitie van gemaakt, hoewel het dezelfde naam heeft als het vorige block. Het verschilt veel
* in syntax, maar het maakt gebruik van dezelfde functies.
*/
/*
alias "identify" {
format "^#" {
target "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "IDENTIFY %1-";
};
type command;
};
*/
/* De alias::format is een reguliere expressie. Het eerste formaat matcht het /identify commando wanneer
* het eerste teken een # is. Daarna wordt het doorgezonden naar de chanserv alias met de parameters
* IDENTIFY %1-. Het tweede formaat matcht het /identify commando wanneer het eerste teken geen # is. Daarna
* wordt het commando doorgestuurd naar de nickserv alias met de parameters IDENTIFY %1-.
*/
/* Het alias::format::parameters is gelijk aan script-talen. %N (N is een nummer) staat voor de parameter die
* gezonden is naar het commando (in dit geval /identify). Wanneer je %N- opgeeft, betekent dat alle parameters
* vanaf N tot de laatste paramater in de string. Je kan ook %n gebruiken, waar %n vervangen wordt door de nick.
*/
/* Standaard aliases */
alias "services" {
format "^#" {
target "chanserv";
type services;
parameters "%1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "%1-";
};
type command;
};
alias "identify" {
format "^#" {
target "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "IDENTIFY %1-";
};
type command;
};
/* Dit is een voorbeeld van een echt commando alias */
/* Dit verwijst /GLINEBOT naar /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;
};
/*
* NIEUW: tld {}
* OUD: T:Line
* Hiermee stel je verschillende MOTD en RULES bestanden in,
* afhangend van de gebruikers hostmask.
* De syntax is als volgt:
* tld {
* mask (ident@host);
* motd "(motd bestand)";
* rules "(rules bestand)";
* };
*/
tld {
mask *@*.fr;
motd "ircd.motd.fr";
rules "ircd.rules.fr";
};
/* Opmerking: je kan het bovenstaande voorbeeld verwijderen.
* In dat geval worden de standaard motd/rules bestanden (ircd.motd, ircd.rules).
* gebruikt voor iedereen.
*/
/*
* NIEUW: ban nick {}
* OUD: Q:Line
* Bant een nickname zodat deze niet gebruikt kan worden.
* De syntax is als volgt:
* ban nick {
* mask "(nick om te bannen)";
* reason "(reden)";
* };
*/
ban nick {
mask "*C*h*a*n*S*e*r*v*";
reason "Reserved for Services";
};
/*
* NIEUW: ban ip {}
* OUD: Z:Line
* Bant een IP van de server
* De syntax is als volgt:
* ban ip {
* mask (ip number/hostmask);
* reason "(reden)";
* };
*/
ban ip {
mask 195.86.232.81;
reason "Delinked server";
};
/*
* NIEUW: ban server {}
* OUD: Server Q:Line
* Zorgt ervoor dat een server niet kan verbinden met het netwerk.
* Als de server naar een andere server linkt, zal de lokale server
* de verbinding met het netwerk verbreken.
* De syntax is als volgt:
* ban server {
* mask "(server naam)";
* reason "(reden)";
* };
*/
ban server {
mask eris.berkeley.edu;
reason "Get out of here.";
};
/*
* NIEUW: ban user {}
* OUD: K:Line
* Zorgt ervoor dat een gebruiker met een bepaalde mask niet
* kan verbinden met je server.
* De syntax is als volgt:
* ban user {
* mask (hostmask/ip number);
* reason "(reden)";
* };
*/
ban user {
mask *tirc@*.saturn.bbn.com;
reason "Idiot";
};
/*
* NIEUW: ban realname {}
* OUD: n:Line
* Belet het gebruik van een bepaalde realname.
* De syntax is als volgt:
* ban realname {
* mask "(real name)";
* reason "(reden)";
* };
*/
ban realname {
mask "Swat Team";
reason "mIRKFORCE";
};
ban realname {
mask "sub7server";
reason "sub7";
};
/*
* OPMERKING VOOR ALLE BANS: Ze mogen herhaald worden voor extra toevoegingen!
*
* NIEUW: except ban {}
* OUD: E:Line
* Zorgt ervoor dat jij niet gebanned kan worden.
* De syntax is als volgt:
* except ban { mask (ident@host); };
* Herhaal de except ban {} zo vaak als je wilt
* voor andere hosts.
*/
except ban {
/* don't ban stskeeps */
mask *stskeeps@212.*;
};
/*
* NIEUW: deny dcc {}
* OUD: dccdeny.conf
* Wordt gebruikt om DCC sends te blokkeren..
* Stopt virii beter.
* De syntax is als volgt:
* deny dcc
* {
* filename "bestand te blokkeren (bv, *exe)";
* reason "reden";
* };
*/
deny dcc {
filename "*sub7*";
reason "Possible Sub7 Virus";
};
/*
* NIEUW: deny channel {}
* OUD: N/A (NIEUW)
* Belet het gebruik van een kanaal.
* De syntax is als volgt:
* deny channel {
* channel "(kanaal)";
* reason "reden";
* };
*/
deny channel {
channel "*warez*";
reason "Warez is illegal";
};
/*
* NIEUW: vhost {}
* OUD: Vhost.conf file
* Dit zet een nep ip voor niet-opers, of voor opers
* die te lui zijn /sethost te gebruiken ;)
* De syntax is als volgt:
* vhost {
* vhost (vhost.com);
* from {
* userhost (ident@host toegestaan de vhost te gebruiken);
* };
* login (login name);
* password (password);
* };
* Om je vhost te gebruiken, typ /vhost (login) (password) op IRC
*/
vhost {
vhost i.hate.microsefrs.com;
from {
userhost *@*.image.dk;
};
login stskeeps;
password moocowsrulemyworld;
};
/* Je kan ook andere configuratiebestanden laden */
/* include "klines.conf"; */
/* Netwerk configuratie */
set {
network-name "ROXnet";
default-server "irc.roxnet.org";
services-server "services.roxnet.org";
stats-server "stats.roxnet.org";
help-channel "#ROXnet";
hiddenhost-prefix "rox";
/* prefix-quit "no"; */
/* Cloak keys moeten op alle servers in het netwerk hetzelfde zijn.
* Ze worden gebruikt voor het maken van gemaskte hosts en moeten geheim blijven.
* De keys moeten 3 willekeurige strings zijn, bestaande uit 5-100 tekens
* (10-20 tekens is genoeg) en moeten bestaan uit kleine letters (a-z),
* hoofdletters (A-Z) en getallen (0-9) [zie de eerste key als voorbeeld].
* Tip: Wanneer je met een *NIX systeem werkt, kun je './unreal gencloak' gebruiken in
* je shell. Dit genereert 3 willekeurige strings die je kunt gebruiken.
*/
cloak-keys {
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
"en nog eentje";
"en nog eentje";
};
/* on-oper host */
hosts {
local "locop.roxnet.org";
global "ircop.roxnet.org";
coadmin "coadmin.roxnet.org";
admin "admin.roxnet.org";
servicesadmin "csops.roxnet.org";
netadmin "netadmin.roxnet.org";
host-on-oper-up "no";
};
};
/* Server gerelateerde configuratie */
set {
kline-address "stel.dit.adres.in";
modes-on-connect "+ixw";
modes-on-oper "+xwgs";
oper-auto-join "#opers";
options {
hide-ulines;
/* Je kan hier ident checking aanzetten als je wilt */
/* identd-check; */
show-connect-info;
};
maxchannelsperuser 10;
/* Hoelang een gebruiker minimaal verbonden moet zijn voordat hij toegestaan wordt het
* QUIT bericht te gebruiken. Dit stopt spam hopelijk. */
anti-spam-quit-message-time 10s;
/* Stelt een tekst in die standaard wordt gebruikt voor een quit.
* Houdt in dat er geen eigen quits gebruikt mogen worden op deze server. */
/* static-quit "Client quit"; */
/* Je kan ook alle part-redenen blokkeren door hieronder het commentaar weg te halen
* en er 'yes' neer te zetten. Je kan ook een standaard tekst gebruiken (bijvoorbeeld
* "Bye bye!") om deze tekst altijd te gebruiken..
*/
/* static-part yes; */
/* Stelt in dat stats alleen door opers gebruikt mogen worden. Gebruik * voor alle stats,
* en laat het weg zodat gebruikers alle stats kunnen zien. Typ '/stats' voor een lijst
* van alle stats.
* Sommige admins willen 'kGs' wellicht verwijderen zodat gewone gebruikers een lijst van
* klines, glines en shunts kunnen zien.
*/
oper-only-stats "okfGsMRUEelLCXzdD";
/* Throttle: dit voorbeeld zet een limie van 3 conneties per 60s (per host). */
throttle {
connections 3;
period 60s;
};
/* Anti flood protectie */
anti-flood {
nick-flood 3:60; /* 3 naamsveranderingen per 60 seconden (standaard) */
};
/* Spam filter */
spamfilter {
ban-time 1d; /* standaard duur van een *line gezet door spamfilter */
ban-reason "Spam/Advertising"; /* standaard reden */
virus-help-channel "#help"; /* kanaal te gebruiken voor 'viruschan' actie */
/* except "#help"; kanaal waar niet gefilterd wordt */
};
};
/*
* Problemen of meer hulp nodig?
* 1) www.vulnscan.org/UnrealIRCd/unreal32docs.html
* 2) www.vulnscan.org/UnrealIRCd/faq/ <- hier staat 80% van je vragen!
* 3) Als je nog steeds problemen hebt, kun je naar irc.unrealircd.org #unreal-support,
maar je moet wel eerst de documentatie en FAQ gelezen hebben!
*/
-791
View File
@@ -1,791 +0,0 @@
/*
* example.conf by Daniel Hawton AKA Osiris (osiris@unrealircd.org).
* example.ru.conf by Samets Anton aka Bock (bock@bynets.org).
* $Id$
*
* (Encoding): Windows-1251
*
* Работает для Unreal3.2 и выше
*
* Итак, это русскоязычный пример example.conf. По синтаксису похож на C++.
* По началу будет тяжело понять, что тут написано, однако во время практики и чтения
* вы научитесь это делать.
*
* Просто скопируйте этот файл в главную директорию unrealircd и переименуйте в 'unrealircd.conf'.
*
* Замечание: Все линии, кроме тех, которые начинаются с {, заканчиваются ; включая и закрывающую }.
* IRCd проигнорирует закомментированные линии.
*
* ПРОЧТИТЕ doc/unreal32docs.ru.html! Версия в интернете доступна по адресу:
* www.vulnscan.org/UnrealIRCd/unreal32docs.ru.html
* Она содержит большинство информации о конфигурировании, даёт представление о каждом блоке,
* переменной и так далее...
* Если вы пытаетесь редактировать этот файл без прочтения документации, вы гарантированно
* потерпите неудачу!
*/
/* Типы комментариев */
# Первый тип (Shell type)
// Второй тип (C++ style)
/* Третий тип (C Style) */
# данные линии игнорируются ircd.
/*
* UnrealIRCd поддерживает модули, загрузка некоторых необходима для запуска.
* Вам необходимо загрузить как минимум модули команд и скрытия хоста.
*/
/* Для *NIX систем раскомментируйте следующие 2 линии: */
//loadmodule "src/modules/commands.so";
//loadmodule "src/modules/cloak.so";
/* Для Windows систем раскомментируйте следующие 2 линии: */
//loadmodule "modules/commands.dll";
//loadmodule "modules/cloak.dll";
/*
* Вам необходимо подключить и другие конфигурационные файлы.
* help.ru.conf содержит весь текст команды /helpop. Файлы badwords.*.conf
* содержат все включения матных слов для режима +G...
* spamfilter.conf содержит правила для защиты от троянских коней.
* Вы вероятно захотите подключить эти файлы:
*/
include "help.ru.conf";
include "badwords.channel.conf";
include "badwords.message.conf";
include "badwords.quit.conf";
include "spamfilter.conf";
/*
* НОВОЕ: me {}
* СТАРОЕ: M:Line
* me {} определяет имя, описание и нумерик сервера unreal для данного сервера.
* Синтаксис:
* me {
* name "Имя.сервера";
* info "Описание сервера";
* numeric (нумерик сервера*);
* };
* При соединении с другими серверами, нумерик должен быть уникальным в сети. Имя сервера - англоязычное.
*/
me
{
name "irc.foonet.com";
info "Сервер FooNet";
numeric 1;
};
/*
* НОВОЕ: admin {}
* СТАРОЕ: A:Line
* Данный блок предоставляет информацию об администраторе сервера.
* Вы можете поместить сколько угодно линий после admin {.
* Синтаксис:
* admin {
* "первая линия";
* "вторая линия";
* [так далее]
* };
*/
admin {
"Вася Пупкин!";
"vasya_pupkin";
"haker@lamer.ru";
"ICQ: 987654321";
};
/*
* НОВОЕ: class {}
* СТАРОЕ: Y:line (был слишком запутан)
* Определяет настройки для классов. Класс определяет групповые настройки для подключений.
* Например, подключение сервера, вместо включения его в класс пользователей, вы направляете в
* класс серверов. Используется следующий синтаксис:
* class (имя класса)
* {
* pingfreq (как часто пиновать пользователя/сервер в секундах);
* maxclients (сколько максимально соединений разрешено данному классу);
* sendq (максимальная очередь для отправки от подключения);
* recvq (максимальная очередь для получения от подключения [контроль за флудом]);
* };
*/
class clients
{
pingfreq 90;
maxclients 500;
sendq 100000;
recvq 8000;
};
class servers
{
pingfreq 90;
maxclients 10; /* Какое максимальное количество серверов может быть прилинковано к этому серверу */
sendq 1000000;
connfreq 100; /* Через сколько секунд проводить следующую попытку подключения */
};
/*
* НОВОЕ: allow {}
* СТАРОЕ: I:Line
* Определяет, кому разрешено подключаться к серверу...
* В основном используется для клиентов, это разрешает им подключаться к серверу, а вы можете их контролировать
* и/или устанавивать пароль.
* Синтаксис:
* allow {
* ip (разрешённая маска ip);
* hostname (маска хоста);
* class (класс, в который определить[смотри class {}]);
* password "(пароль)"; (необязательно)
* maxperip (сколько подключений с одного ip); (необязательно)
* };
*/
allow {
ip *@*;
hostname *@*;
class clients;
maxperip 5;
};
/* Разрешение подключения с паролем */
allow {
ip *@255.255.255.255;
hostname *@*.passworded.ugly.people;
class clients;
password "аццкип0р0ль";
maxperip 1;
};
/*
* НОВОЕ: allow channel {}
* СТАРОЕ: chrestrict
* Позволяет пользователю зайти на канал...
* служит как исключение из запрещённых каналов.
* Синтаксис:
* allow channel {
* channel "имя канала";
* };
*/
allow channel {
channel "#WarezSucks";
};
/*
* НОВОЕ: oper {}
* СТАРОЕ: O:Line
* Определяет IRC оператора
* IRC операторы следят за сервером, занимаются его поддержкой и подключением к сети.
* Синтаксис:
* oper (логин) {
* class (класс, в который определять их, если отличен от блока I, в какой класс переместить);
* from {
* userhost (идент@хост);
* userhost (идент@хост);
* };
* flags
* {
* (тут флаги*);
* };
* ИЛИ
* flags "флаги старого типа, вида OAaRD";
* };
*/
/* Для списка флагов оператора прочитайте doc/unreal32docs.ru.html#operblock
* [ОЧЕНЬ НАСТОЯТЕЛЬНО рекомендуется к прочтения]
*/
oper vasyapupkin {
class clients;
from {
userhost vasya@somewhere.by;
};
password "p0r0l'";
flags
{
netadmin;
can_zline;
can_gzline;
can_gkline;
global;
};
};
/*
* НОВОЕ: listen {}
* СТАРОЕ: P:Line
* Определяет, на каких портах будет работать ircd,
* позволяя пользователям/серверам подключаться к серверу.
* Синтаксис:
* listen (ip):(номер порта)
* {
* options {
* (тут опции);
* };
* };
* или просто
* listen: listen (ip):(порт);
*
* ЗАМЕЧАНИЕ: для протокола ip v6 (3ffe:b80:2:51d::2), используйте [ip]:порт;
*
* Это так же будет работать.
*/
/* Опции для listen:
СТАРЫЕ | НОВЫЕ
S serversonly
C clientsonly
J java
s ssl
* standard
*/
/* ЗАМЕЧАНИЕ ДЛЯ ПОРТОВ SSL: SSL порты стандартизированы,
* за исключением многочисленных "высоких" портов SSL, некоторые люди могут сказать вам,
* чтобы вы запустили на порту 994, потому что он официальный порт SSL... Но это же
* требует привилегий пользователя root! К слову, порт 194 - официальный порт irc,
* но вы видели когда-нибудь ircd, запущенный на нём?
* Итак, наше предложение - использовать порт 6697 для SSL, он используется уже рядом сетей
* и используется в примере StunTour.
* Вы можете открыть сколько угодно портов SSL, но используя так же и 6697, вы поможете
* стандартизировать его;).
*/
listen *:6697
{
options
{
ssl;
clientsonly;
};
};
listen *:8067;
listen *:6667;
/* ЗАМЕЧАНИЕ: Если вы используете шелл IRCd, где несколько IP адресов, вы можете получить сообщение типа
* 'Address already in use', ошибки в вашем лог-файле и ircd не запустится.
* Это значит, что вам необходимо указать определённый адрес IP вместо '*', к примеру:
* listen 1.2.3.4:6667;
* Конечно же, измените IP адрес на тот, который назначен вам.
*/
/*
* НОВОЕ: link {}
* СТАРОЕ: C/N:Lines
* Определяет блок для подключения серверов.
* ЗАМЕЧАНИЕ: ЧТОБЫ ПОДКЛЮЧИТЬСЯ БЕЗ ВОПРОСОВ, НА ОБОИХ СЕРВЕРАХ НЕОБХОДИМЫ ПРАВИЛЬНЫЕ НАСТРОЙКИ LINK {}!
* Синтаксис:
* link (имя сервера)
* {
* username (имя пользователя, * работает тоже);
* hostname (адрес ip/маска хоста);
* bind-ip (На каком адресе IP слушать или *);
* port (порт для соединения);
* hub (если это хаб, * так же работает, или макси сервера, которые могут быть под ним);
* [или leaf *;]
* password-connect "(пароль для отправки)";
* password-receive "(пароль, что мы должны получить)";
* class (класс, в который определить сервер);
* options {
* (тут указываются опции*);
* };
* // Если мы используем SSL, мы можем указать, какой шифр использовать в режиме SSL
* // Получить список можно "openssl ciphers", шифры разделяются двоеточиями (:)
*
* ciphers "DES-CBC3-MD5";
*
* };
*/
/*
опции:
СТАРЫЕ | НОВЫЕ
S ssl
Z zip
N/A autoconnect
N/A quarantine
N/A nodnscache
*/
link hub.ru.by
{
username *;
hostname 1.2.3.4;
bind-ip *;
port 7029;
hub *;
password-connect "LiNk";
password-receive "LiNk";
class servers;
options {
/* Замечание: Вы не должны использовать автоподключение (autoconnect) при подключении сервисов */
autoconnect;
ssl;
zip;
};
};
/*
*
* НОВОЕ: ulines {}
* СТАРОЕ: U:Line
* U-lines обладают большей силой/властью, чем другие сервера. Это нужно устанавливать только на
* сервисы/сервера сбора статистики и НИКОГДА на обычные сервера UnrealIRCd!
* Синтаксис:
* ulines {
* (сервер в uline);
* (сервер в uline);
* [и т.д.]
* };
*/
ulines {
services.roxnet.org;
stats.roxnet.org;
};
/*
* НОВОЕ: drpass {}
* СТАРОЕ: X:Line
* Определяет пароли для использования команд /die и /restart.
* Синтаксис:
* drpass {
* restart "(пароль для перезапуска)";
* die "(пароль для отключения)";
* };
*/
drpass {
restart "Я-люблю-перезапускать-сервер";
die "умри-тупое!:)";
};
/*
* НОВОЕ: log {}
* СТАРОЕ: N/A
* Указыает ircd куда и что протоколировать (вести лог). Вы можете указать столько, сколько пожелаете.
*
* ФЛАГИ: errors, kills, tkl, connects, server-connects, oper
*
* Синтаксис:
* log "путь_к_лог_файлу"
* {
* flags
* {
* flag;
* flag;
* etc..
* };
* };
*/
log "ircd.log" {
/* Удалять логфайл и старовать новый, если размер превышает 2MB, оставьте это как есть, чтобы использовать
тот же самый файл */
maxsize 2097152;
flags {
oper;
connects;
server-connects;
kills;
errors;
sadmin-commands;
chg-commands;
oper-override;
spamfilter;
};
};
/*
* НОВОЕ: alias {}
* СТАРОЕ: N/A
* Позволяет установить вам псевдонимы на команды, такие как /nickserv, /chanserv и т.д.
* ФЛАГИ: services, stats, normal
*
* Синтаксис:
* alias "имя" {
* target "куда направить";
* type aliastype;
* };
*
* [ЗАМЕЧАНИЕ: Вы так же можете подключить уже определённый файл с псевдонимами,подробнее doc/unreal32docs.ru.html в секции 2.9]
*/
// Данный псевдноним /nickserv направляет команды пользователю NickServ, который подключён к серверу set::services-server
/*alias NickServ {
target "NickServ";
type services;
};*/
// Если вы хотите, чтобы команды направлялись на тот же ник, что и команда, вы можете не указывать target
//alias ChanServ { type services; };
// Указывает, что команда /statserv будет отправлена пользователю StatServ, подключённого к серверу set::stats-server
//alias StatServ { type stats; };
// Указывает, что команда /superbot будет отправлена пользователю SuperBot
//alias SuperBot { type normal; };
/* Стандартные псевдонимы */
alias NickServ { type services; };
alias ChanServ { type services; };
alias OperServ { type services; };
alias HelpServ { type services; };
alias StatServ { type stats; };
/*
* НОВОЕ: alias {}
* СТАРОЕ: N/A
* Позволяет установить такие псевдонимы на команды как /identify, /services и т.д.
*
* Синтаксис:
* alias "имя" {
* format "строка формата" {
* target "кому";
* type aliastype;
* parameters "список параметров";
* };
* type command;
* };
*/
/* Вынесено отдельно, так как имеются отличия по сравнению с предыдущим типом псевдонимов и имеются очень большие отличия в
* синтаксисе, так же используется для других целей, чем стандартные псевдонимы.
*/
/*
alias "identify" {
format "^#" {
target "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "IDENTIFY %1-";
};
type command;
};
*/
/* Директива alias::format является регулярным выражением. Под первый формат подпадает команда /identify,
* если первым символом является #. Она посылает команду chanserv с параметрами IDENTIFY %1-.
* Второй формат срабатывает, если в команде, посланной посредством /identify первый символ не #. Тогда ircd
* передаёт эту команду nickserv с параметрами IDENTIFY %1-.
*/
/* alias::format::parameters сходно со скриптовыми языками. %N (где N число) представляет собой параметр, посланный командой
* (в случае /identify). Если вы указали %N-, так вы определили все параметры, начиная от N до последнего в этой строке.
* Вы можете так же указать %n, что будет означать ник пользователя.
*/
/* Стандартные псевдонимы */
alias "services" {
format "^#" {
target "chanserv";
type services;
parameters "%1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "%1-";
};
type command;
};
alias "identify" {
format "^#" {
target "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "IDENTIFY %1-";
};
type command;
};
/* Тут идёт пример использования "действительно псевдонима" (real command alias) */
/* Данный пример - использование /GLINEBOT как /GLINE <параметры> 2d и т.д... */
alias "glinebot" {
format ".+" {
command "gline";
type real;
parameters "%1 2d Боты запрещены на этом сервере, прочитайте ЧаВО на http://www.example.com/faq/123";
};
type command;
};
/*
* НОВОЕ: tld {}
* СТАРОЕ: T:Line
* Устанавливает различные different motd и rules файлы
* в зависимости от маски хостов клиентов.
* Синтаксис:
* tld {
* mask (идент@хост);
* motd "(файл motd)";
* rules "(файл rules)";
* };
*/
tld {
mask *@*.ru;
motd "ircd.motd.ru";
rules "ircd.rules.ru";
};
/* замечание: вы можете просто удалить блок выше, указанный для примера в случае, если есть в наличии
* файлы motd/rules, используемые по умолчанию (ircd.motd, ircd.rules), которые будут использоваться всеми
*/
/*
* НОВОЕ: ban nick {}
* СТАРОЕ: Q:Line
* Банит ник, он не может быть использован.
* Синтаксис:
* ban nick {
* mask "(ник для бана)";
* reason "(причина)";
* };
*/
ban nick {
mask "*C*h*a*n*S*e*r*v*";
reason "Зарезервирован для сервисов";
};
/*
* НОВОЕ: ban ip {}
* СТАРОЕ: Z:Line
* Банит адрес ip при подключении в сеть.
* Синтаксис:
* ban ip { mask (адрес ip/маска хоста); reason "(причина)"; };
*/
ban ip {
mask 195.86.232.81;
reason "Отключённый сервер";
};
/*
* НОВОЕ: ban server {}
* СТАРОЕ: Серверный Q:Line
* Отключает сервер от попыток подключиться в сеть.
* Если сервер подключается к удалённому серверу в сети, локальный сервер
* будет отключён он сети.
* Синтаксис:
* ban server {
* mask "(имя сервера)";
* reason "(причина)";
* };
*/
ban server {
mask eris.berkeley.edu;
reason "Ламерский сервер :).";
};
/*
* НОВОЕ: ban user {}
* СТАРОЕ: K:Line
* Пользователь с указанной маской не может подключиться к вашему серверу.
* Синтаксис:
* ban user { mask (маска хоста/адрес ip); reason "(причина)"; };
*/
ban user {
mask *newiceman@*.irc.by;
reason "Идиот!";
};
/*
* НОВОЕ: ban realname {}
* СТАРОЕ: n:Line
* Банит по указанному пользователем реальному имени.
* Синтаксис:
* ban realname {
* mask "(Реальное имя)";
* reason "(причина)";
* };
*/
ban realname {
mask "Swat Team";
reason "mIRKFORCE";
};
ban realname {
mask "sub7server";
reason "sub7";
};
/*
* ЗАМЕЧАНИЕ ДЛЯ ВСЕХ БАНОВ: они могут повторятся в случае необходимости уточнений!
*
* НОВОЕ: except ban {}
* СТАРОЕ: E:Line
* Предотвращает бан.
* Синтаксис:
* except ban { mask (идент@хост); };
* Повторите except ban {} столько раз, сколько хотите использовать различные хосты.
*/
except ban {
/* не банить wax */
mask *wax@195.222.*;
};
/*
* НОВОЕ: deny dcc {}
* СТАРОЕ: dccdeny.conf
* Используется чтобы запретить отправку dcc... служит для защиты от вирусов
* Синтаксис:
* deny dcc
* {
* filename "имя файла для блокироваки (т.е. *exe)";
* reason "причина";
* };
*/
deny dcc {
filename "*sub7*";
reason "Вероятность вируса Sub7";
};
/*
* НОВОЕ: deny channel {}
* СТАРОЕ: N/A (НОВОЕ)
* Запрещает вход на указанные каналы.
* Синтаксис:
* deny channel {
* channel "(канал)";
* reason "причина";
* };
*/
deny channel {
channel "*warez*";
reason "Warez нелегален";
};
/*
* НОВОЕ: vhost {}
* СТАРОЕ: файл Vhost.conf
* Устанавливает фейковый ip для не-операторов или операторы слишком
* ленивые, чтобы сделать /sethost :P
* Синтаксис:
* vhost {
* vhost (vhost.com);
* from {
* userhost (идент@хост, кому разрешено использовать);
* };
* login (логин);
* password (пароль);
* };
* чтобы использовать vhost, наберите /vhost (логин) (пароль) в IRC
*/
vhost {
vhost i.hate.microsefrs.com;
from {
userhost *@*.image.dk;
};
login stskeeps;
password moocowsrulemyworld;
};
/* Вы так же можете подключить и другие конфигурационные файлы */
/* include "klines.conf"; */
/* Конфигурация Сети */
set {
network-name "ROXnet";
default-server "irc.roxnet.org";
services-server "services.roxnet.org";
stats-server "stats.roxnet.org";
help-channel "#ROXnet";
hiddenhost-prefix "rox";
/* prefix-quit "no"; */
/* Ключи скрытия хостов должны быть одинаковы на всех серверах в сети.
* Они использутся для генерации замаскированных хостов и должны держаться в секрете.
* Ключи должен быть 3-мя случайными срочками с 5-100 символами в каждой
* (10-20 символов должно быть достаточно) и должны содержать прописные (a-z),
* заглавные (A-Z) буквы и цифрты (0-9) [смотрите пример первого ключа].
* Подсказка: В *NIX системах вы можете запустить './unreal gencloak' в вашем шелле, чтобы получить
* 3 строки, сгенерированные случайным образом.
*/
cloak-keys {
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
"и ещё одна;
"и ещё одна";
};
/* хост on-oper */
hosts {
local "locop.roxnet.org";
global "ircop.roxnet.org";
coadmin "coadmin.roxnet.org";
admin "admin.roxnet.org";
servicesadmin "csops.roxnet.org";
netadmin "netadmin.roxnet.org";
host-on-oper-up "no";
};
};
/* Специфическая конфигурация сервера */
set {
kline-address "set.this.email";
modes-on-connect "+ixw";
modes-on-oper "+xwgs";
oper-auto-join "#opers";
options {
hide-ulines;
/* Если желаете, вы можете включить проверку ident */
/* identd-check; */
show-connect-info;
};
maxchannelsperuser 10;
/* Указывает минимальное время, сколько был подключен пользователь,
* прежде чем разрешать ему использовать сообщение QUIT.
* Должно помочь в борьбе со спамом */
anti-spam-quit-message-time 10s;
/* Устанавливает постоянное сообщение о выходе - значит, что локальный сервер не разрешит
различные сообщения о выходе */
/* static-quit "Клиент вышел"; */
/* Вы так же можете блокировать все сообщения о выходе из канала просто раскомментировав это и указать'yes'
* или указать какой-нибудь другой текст (например: "Пока пока!"), который всегда будет использован как причина. */
/* static-part yes; */
/* Позволяет сделать важные сообщения stats были использованы только операторами, используйте * для всех сообщений stats,
* или закомментируйте, что позволит пользователям видеть все сообщения stats. Чтобы получить весь список, введите '/stats'.
* Некоторые администраторы могут убрать 'kGs' для того, чтобы разрешить обычным пользователям видеть список
* klines, glines и shuns.
*/
oper-only-stats "okfGsMRUEelLCXzdD";
/* Тротлинг: данный пример устанавливает предел в 3 попытки подключения в 60 секунд (для одного хоста). */
throttle {
connections 3;
period 60s;
};
/* Защита от флуда */
anti-flood {
nick-flood 3:60; /* 3 изменения ника в 60 секунд (по умолчанию) */
};
/* Фильтр спама */
spamfilter {
ban-time 1d; /* длительность по умолчанию бана *line, установленного spamfilter */
ban-reason "Спам/Реклама"; /* причина по умолчанию */
virus-help-channel "#help"; /* канал при использовании действия 'viruschan' */
/* except "#help"; канал для исключения действия фильтра */
};
};
/*
* Проблемы или нуждаетесь в более подробной информации?
* 1) www.vulnscan.org/UnrealIRCd/unreal32docs.ru.html
* 2) www.vulnscan.org/UnrealIRCd/faq/ <- содержит 80% ваших вопросов!
* 3) Если у вас до сих пор остались проблемы, зайдите на irc.unrealircd.org #unreal-support,
* но мы требуем, чтобы вы ПРЕЖДЕ ПРОЧИТАЛИ ДОКУМЕНТАЦИЮ и ЧаВО!
*/
-787
View File
@@ -1,787 +0,0 @@
/*
* example.conf by Daniel Hawton AKA Osiris (osiris@unrealircd.org).
* $Id$
* Türkçe çeviri: Mustafa "Ironic" Cakmak (ironic@unrealircd.org)
*
* Unreal3.2 ve üstü sürümler için kullanılmaktadır
*
* Peki beyler. Bu example.conf dosyasının yenisi. C++ türüne çok benziyor.
* Neyse şimdi bunun üstesinden gelme zamanı. Başlangıçta zor gelebilir, fakat
* okuyarak ve biraz pratikle anlayacaksınız.
*
* Yapmanız gereken bu dosyayı ana dizine atıp, 'unrealircd.conf' olarak adlandırmak.
*
* NOTE: Bütün satırlar, açılış { satırı dışında, kapama } satırı dahil, sonunda ; taşır.
* IRCd açıklama satırlarını göz ardı edecektir.
*
* Lütfen doc/unreal32docs.tk.html dosyasını okuyunuz! Çevrimiçi sürümüne ulaşabileceğiniz adres:
* www.vulnscan.org/UnrealIRCd/unreal32docs.tk.html
* Yapılandırma dosyası hakkında bir çok bilgi içerir: Her blok,
* değişken vs.. hakkında bilgi verir.
* Eğer dökümantasyon dosyasını tam olarak okumadan bu dosyayı düzenlemeye kalkarsanız
* başarısız olacağınız oldukça yüksek bir oranda garanti edilir!
*/
/* Açıklama satırı çeşitleri */
#Açıklama satırı 1 (Shell tipi)
// Açıklama satırı 2 (C++ tipi)
/* Açıklama satırı satırı 3 (C tipi) */
#Bu satırlar ircd tarafından göz ardı edilecektir.
/*
* UnrealIRCd modülleri destekler, Bunların bazılarının yüklenmesi gereklidir.
* En azından komutlar modülü(commands) ve gizleme modülü(cloaking)'ne ihtiyacınız vardır.
*/
/* *NIX için, sonraki 2 satırın açıklama satıracını(//) kaldırın: */
//loadmodule "src/modules/commands.so";
//loadmodule "src/modules/cloak.so";
/* Windows için, sonraki 2 satırın açıklama satıracını(//) kaldırın: */
//loadmodule "modules/commands.dll";
//loadmodule "modules/cloak.dll";
/*
* Diğer yapılandırma dosyalarınıda dahil edebilirsiniz.
* help.conf bütün /helpop metinlerini içerir. +G kipi için badwords.*.conf
* dosyaları bütün kötü kelime girdilerini içerir...
* spamfilter.conf güncel trojanlar için uygun kuralları içerir.
* Muhtemelen bunları eklemek isteyeceksiniz:
*/
include "help.conf";
include "badwords.channel.conf";
include "badwords.message.conf";
include "badwords.quit.conf";
include "spamfilter.conf";
/*
* YENI: me {}
* ESKI: M:Line
* me {} bu sunucu için isim, tanımlama ve unreal sunucu sayısalını(numeric) belirler.
* Sözdizimi aşağıdaki gibidir:
* me {
* name "sunucu.ismi";
* info "Sunucu tanımlaması";
* numeric (sunucu sayısalı*);
* };
* Eğer link varsa, bu sayısal ağ üzerinde varolan herhangi bir server tarafından kullanılmamalıdır.
*/
me
{
name "irc.foonet.com";
info "FooNet Server";
numeric 1;
};
/*
* YENI: admin {}
* ESKI: A:Line
* Admin sunucu yöneticisine dair bilgi verir. Dilediğiniz kadar
* satırı admin { altına yerleştirebilirsiniz.
* Sözdizimi aşağıdaki gibidir:
* admin {
* "ilk satır";
* "ikinci satır";
* [vs]
* };
*/
admin {
"Bob Smith";
"bob";
"widely@used.name";
};
/*
* YENI: class {}
* ESKI: Y:line (eskisi karışıktı)
* Bu sınıflar için ayarları belirtir. Bir sınıf bağlantılar için bir grup
* ayarıdır. Örneğin, sunucu bağlantılarını, bir istemci sınıfı
* yerine, sunucu sınıfına yönlendirirsiniz. Sözdizimi aşağıdaki gibidir:
* class (class name)
* {
* pingfreq (ne sıklıkta saniye içerisinde kullanıcı veya sunucunun ping edileceği);
* maxclients (bu sınıf için kaç bağlantı);
* sendq (bir bağlantıdan gönderilecek en yüksek dizi);
* recvq (bir bağlantıdan alınacak en yüksek dizi [flood kontrolü]);
* };
*/
class clients
{
pingfreq 90;
maxclients 500;
sendq 100000;
recvq 8000;
};
class servers
{
pingfreq 90;
maxclients 10; /* Link edebileceğimiz en yüksek sunucu sayısı */
sendq 1000000;
connfreq 100; /* Her bağlantı girişimi arasında ne kadar saniye olacağı */
};
/*
* YENI: allow {}
* ESKI: I:Line
* Bağlantı izinlerini belirtir..
* Temel olarak istemcilerin sunucuya bağlanabilmesi için herhangi bir kontrol
* ve/veya bir şifre belirtmenize olanak sağlar.
* Sözdizimi aşağıdaki gibidir:
* allow {
* ip (izin verilecek ip maskesi);
* hostname (host maskesi);
* class (gönderilecek sınıf [class {} bloğuna göz atınız]);
* password "(şifre)"; (isteğe bağlı)
* maxperip (ip başına kabul edilecek bağlantı sayısı); (isteğe bağlı)
* };
*/
allow {
ip *@*;
hostname *@*;
class clients;
maxperip 5;
};
/* Şifrelendirilmiş allow bloğu */
allow {
ip *@255.255.255.255;
hostname *@*.passworded.ugly.people;
class clients;
password "f00Ness";
maxperip 1;
};
/*
* YENI: allow channel {}
* ESKI: chrestrict
* Bir kullanıcının bir kanala girmesine olanak sağlar...
* yasak kanal bloğundaki hariçlik gibi.
* Sözdizimi:
* allow channel {
* channel "kanal ismi";
* };
*/
allow channel {
channel "#WarezSucks";
};
/*
* YENI: oper {}
* ESKI: O:Line
* Bir IRC Operatörü tanımlamanızı sağlar.
* IRC Operatörleri sunucuya uygun bir biçimde bağlanılmasını ve
* makullüğü sağlarlar.
* Sözdizimi aşağıdaki gibidir:
* oper (login) {
* class (sınıf ismini ekleyin, eğer istemciden farklıysa, yeni sınıfı ekleyin);
* from {
* userhost (ident@host);
* userhost (ident@host);
* };
* flags
* {
* (flaglar buraya*);
* };
* VEYA
* flags "OAaRD gibi eski tip flaglar";
* };
*/
/* Oper flaglarının listesine doc/unreal32docs.html#operblock dan göz atabilirsiniz.
* [Okumanız şiddetle önerilir]
*/
oper bobsmith {
class clients;
from {
userhost bob@smithco.com;
};
password "f00";
flags
{
netadmin;
can_zline;
can_gzline;
can_gkline;
global;
};
};
/*
* YENI: listen {}
* ESKI: P:Line
* İstemci ve sunucuların sunucuya bağlanmasını sağlamak için ircd tarafından
* kullanılacak bir port tanımlamanızı sağlar .
* Sözdizimi aşağıdaki gibidir:
* listen (ip adresi):(port numarası)
* {
* options {
* (tercihler buraya);
* };
* };
* veya sade bir biçimde
* listen: listen (ip):(port);
*
* UYARI: ipv6 ipleri için (3ffe:b80:2:51d::2 vb), [ip]:port; kullanınız
*
* Böylede çalışır.
*/
/* listen için tercihler:
ESKI | YENI
S serversonly
C clientsonly
J java
s ssl
* standard
*/
/* SSL PORTLARI İÇİN NOT: SSL portları oldukça standart dışıdır,
* ayrıca pek çok yüksek-SSL portları için bazı insanlar 994 te çalıştırın
* der çünkü bu resmi SSL portudur..Fakat bu root erişimi gerektirir.Yanı sıra,
* 194 resmi irc portu olarak bunun üzerinde çalışan ircd
* hiç gördünüz mü?
* Böyle olunca bizim önerimiz 6697 portunu SSL için kullanmanız, bu hayli
* sunucuda kullanılıyor ve örnek için StunTour tarafından kabul görmüş durumda.
* İstediğiniz kadar SSL port açmakta özgürsünüz, fakat 6697 yi kullanmanız
* dünya standartı haline gelmesine biraz daha yardım edecektir. ;).
*/
listen *:6697
{
options
{
ssl;
clientsonly;
};
};
listen *:8067;
listen *:6667;
/* NOT: Eğer bir çok IP barındıran bir IRCd Shell kullanıyorsanız logunuzda olası
* 'Address already in use' alırsınız ve ircd başlamaz.Bunun anlamı '*' yerine
* belirli bir IP adresi kullanmanız gerektiğidir.Yani örneğin:
* listen 1.2.3.4:6667;
* Açıkça, IP yi önceden koyduğunuz IP ile değiştirin.
*/
/*
* YENI: link {}
* ESKI: C/N:Lines
* Bir sunucu bağlantısı için bir onay tanımlamanızı sağlar.
* NOT: HER IKI SUNUCUDA BAĞLANTI IÇIN TAM OLARAK DÜZGÜN BİR LINK {} GEREĞİ DUYAR!
* Sözdizimi aşağıdaki gibidir:
* link (sunucu ismi)
* {
* username (username, * da uygundur);
* hostname (ip adresi/hostmask);
* bind-ip (Bağlanırken hangi IP ile bağlanacağı, veya *);
* port (bağlantı portu, eğer herhangi biriyse);
* hub (Bu bir hub ise, * çalışır, veya sunucu maskeleri bunu sağlar);
* [veya leaf *;]
* password-connect "(gönderilecek şifre)";
* password-receive "(almamız gereken şifre)";
* class (sunucuların yönetileceği sınıf);
* options {
* (tercihler buraya*);
* };
* /* Eğer SSL kullanıyorsak, SSL modunda ne tür bir anahtar kullanacağımızı seçebiliriz
* * "openssl ciphers" ile bir liste alınır, anahtarlar birbirinden : ile ayrılırak belirtilebilirler.
* */
* ciphers "DES-CBC3-MD5";
*
* };
*/
/*
tercihler:
YENI | ESKI
S ssl
Z zip
N/A autoconnect
N/A quarantine
N/A nodnscache
*/
link hub.mynet.com
{
username *;
hostname 1.2.3.4;
bind-ip *;
port 7029;
hub *;
password-connect "LiNk";
password-receive "LiNk";
class servers;
options {
/* Note: Servisler link edilirken autoconnect kullanmamalısınız.*/
autoconnect;
ssl;
zip;
};
};
/*
*
* YENI: ulines {}
* ESKI: U:Line
* U-lines satırları sunuculara daha güç/komut kazandırır.Bu servis/istatistik
* sunucuları içindir ve ASLA normal UnrealIRCd sunucuları için değildir.
* Sözdizimi aşağıdaki gibidir:
* ulines {
* (uline olacak sunucu);
* (uline olacak sunucu);
* [vb]
* };
*/
ulines {
services.roxnet.org;
stats.roxnet.org;
};
/*
* YENI: drpass {}
* ESKI: X:Line
* Bu blok /die ve /restart için şifre tanımlamanızı sağlar.
* Sözdizimi aşağıdaki gibidir:
* drpass {
* restart "(yeniden başlatmak için şfire)";
* die "(sona erdirmek için şifre)";
* };
*/
drpass {
restart "I-love-to-restart";
die "die-you-stupid";
};
/*
* YENI: log {} ESKI: N/A Ircd e logun ne ve nerede olacağını bildirir. Dilediğiniz
* kadara sahip olabilirsiniz.
*
* FLAGS: errors, kills, tkl, connects, server-connects, kline, oper
*
* Syntax:
* log "log file"
* {
* flags
* {
* flag;
* flag;
* etc..
* };
* };
*/
log "ircd.log" {
/* Eğer 2 MB yi geçerse log dosyasını sil ve yenisini aç, eğer her zaman aynı log
dosyasını kullanmak istiyorsanız karışmayın */
maxsize 2097152;
flags {
oper;
kline;
connects;
server-connects;
kills;
errors;
sadmin-commands;
chg-commands;
oper-override;
spamfilter;
};
};
/*
* YENI: alias {}
* ESKI: N/A
* /nickserv, /chanserv gibi komutlar hazırlamanızı sağlar.
* FLAGS: services, stats, normal
*
* Sözdizimi:
* alias "isim" {
* target "gidecek nokta";
* type aliastype;
* };
*
* [NOT: Aynı zamanda önceden tanımlanmış alias dosyası dahil edebilirsiniz, doc/unreal32docs.html bölüm 2.9]
*/
// Bu nokta /NickServ komutu ile set::services-server server üzerinden bağlanmış olan NickServ e döner.
/*alias NickServ {
target "NickServ";
type services;
};*/
// Eğer komutla noktanın aynı olmasını istiyorsanız nick girişini gözardı edebilirsiniz
//alias ChanServ { type services; };
// Bu nokta /statserv komutu ile set::stats-server server üzerinden bağlanmış olan StatServ e döner.
//alias StatServ { type stats; };
// Bu nokta /superbot komutu ile kullanıcı SuperBot a döner
//alias SuperBot { type normal; };
/* Standart aliases */
alias NickServ { type services; };
alias ChanServ { type services; };
alias OperServ { type services; };
alias HelpServ { type services; };
alias StatServ { type stats; };
/*
* ESKI: alias {}
* YENI: N/A
* Bu /identify, /services gibi komutlar hazırlamanızı sağlar.
*
* Sözdizimi:
* alias "isim" {
* format "format satırı" {
* target "gidecek nokta";
* type aliastype;
* parameters "gönderilecek parametreler";
* };
* type command;
* };
*/
/* Bu ayrı bir şekilde gösterilir.Çünkü bir önceki direktif ile aynı isme sahip olsa bile benzer bir
* fonksiyon sağlaması ve standart aliaseslerin çalışmasına dayanması ile birlikte çok farklı sözdizimine sahip olması.
*/
/*
alias "identify" {
format "^#" {
target "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "IDENTIFY %1-";
};
type command;
};
*/
/* alias::format direktifi bir düzenli ifadedir. İlk biçim /identify komutundan sonraki ilk karakter bir # ise eşleşir.
* Ardından IDENTIFY %1- ile chanserv aliases e döner.
* İkinci biçim ise /identify komutundan sonraki ilk karakterin bir # işareti ile eşleşmeme durumunu belirtir.Ardından
* IDENTIFY %1- ile nickserv aliases e döner.
*/
/* alias::format::parameters betik diline benzerdir. %N (N bir numaradır) komuta gönderilecek
* parametreyi temsil eder.(bu durumda /identify). Eğer bir %N- belirtirseniz bu N den sonraki
* bütün parametleri içerir. Ayrıca kullanıcı nickname inin yerine %n kullanabilirsiniz.
*/
/* Standart aliases */
alias "services" {
format "^#" {
target "chanserv";
type services;
parameters "%1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "%1-";
};
type command;
};
alias "identify" {
format "^#" {
target "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "IDENTIFY %1-";
};
type command;
};
/* Bu gerçek komut aliası için bir örnektir */
/* Bu eşlem /GLINEBOT ile /GLINE <parametre> 2d vb... şeklindedir */
alias "glinebot" {
format ".+" {
command "gline";
type real;
parameters "%1 2d Bu sunucuda botlara izin verilmemektedir, lütfen http://www.example.com/faq/123 sayfasından sss ı okuyunuz.";
};
type command;
};
/*
* ESKI: tld {}
* YENI: T:Line
* Bu istemcilerin hostmaskesine bağlı olarak farklı
* motd ve rules dosyaları belirler.
* Sözdizimi aşağıdaki gibidir:
* tld {
* mask (ident@host);
* motd "(motd dosyası)";
* rules "(rules dosyası)";
* };
*/
tld {
mask *@*.fr;
motd "ircd.motd.fr";
rules "ircd.rules.fr";
};
/* not: Bütün istemciler için aynı motd/rules (ircd.motd, ircd.rules) dosyaları
* görüntületmek istiyorsanız sadece yukarıdaki örnek bloğu silebilirsiniz.
*/
/*
* YENI: ban nick {}
* ESKI: Q:Line
* Nir nickname yasaklar, bundan doalyı kullanılamaz.
* Sözdizimi aşağıdaki gibidir:
* ban nick {
* mask "(yasaklanak nick)";
* reason "(neden)";
* };
*/
ban nick {
mask "*C*h*a*n*S*e*r*v*";
reason "Servisler için ayrılmıştır";
};
/*
* YENI: ban ip {}
* ESKI: Z:Line
* Ağa bağlanan bir ip yi yasaklar.
* Sözdizimi:
* ban ip { mask (ip adresi/hostmask); reason "(neden)"; };
*/
ban ip {
mask 195.86.232.81;
reason "Bağlı olmayan sunucu";
};
/*
* YENI: ban server {}
* ESKI: Server Q:Line
* Ağa bir sunucunun bağlanmasını devredışı kılar.
* eğer sunucu uzak bir sunucuya bağlanmışsa, yerel sunucunun
* ağdan bağlantısı kesilir.
* Sözdizimi aşağıdaki gibidir:
* ban server {
* mask "(sunucu ismi)";
* reason "(neden)";
* };
*/
ban server {
mask eris.berkeley.edu;
reason "Defol buradan.";
};
/*
* YENI: ban user {}
* ESKI: K:Line
* Kullanıcının belirtilen kesin bir mask ile sunucuya bağlanmasını engeller.
* Sözdizimi:
* ban user { mask (hostmask/ip adresi); reason "(neden)"; };
*/
ban user {
mask *tirc@*.saturn.bbn.com;
reason "Idiot";
};
/*
* YENI: ban realname {}
* ESKI: n:Line
* Kullanılan kesin bir realname i yasaklar.
* Sözdizimi:
* ban realname {
* mask "(real name)";
* reason "(neden)";
* };
*/
ban realname {
mask "Swat Team";
reason "mIRKFORCE";
};
ban realname {
mask "sub7server";
reason "sub7";
};
/*
* BUTUN BANLAR İÇİN NOT, ilave girdiler için tekrarlanabilir!
*
* YENI: except ban {}
* ESKI: E:Line
* Bu yasaklanmamanızı sağlar.
* Sözdizimi:
* except ban { mask (ident@host); };
* Farklı hostlar için istediğiniz kadar except ban {}
* bloğunu tekrarlayın.
*/
except ban {
/* stskeeps i yasaklama*/
mask *stskeeps@212.*;
};
/*
* YENI: deny dcc {}
* ESKI: dccdeny.conf
* Dcc gönderimlerini bloklamak için kullanılır..Virüsler
* dursa iyi olur.
* Sözdizimi:
* deny dcc
* {
* filename "bloklanacak dosya (örnek, *exe)";
* reason "neden";
* };
*/
deny dcc {
filename "*sub7*";
reason "Muhtemek Sub7 Virüsü";
};
/*
* ESKI: deny channel {}
* YENI: N/A (NEW)
* Girilen kanalları bloklar.
* Sözdizimi:
* deny channel {
* channel "(kanal)";
* reason "neden";
* };
*/
deny channel {
channel "*warez*";
reason "Warez yasaktır";
};
/*
* YENI: vhost {}
* ESKI: Vhost.conf file
* Oper olmayan kullanıcılar için sahte ip hazırlar, veya
* tembellik yaparak /sethost kullanmayan operler içindir :P
* Sözdizimi:
* vhost {
* vhost (vhost.com);
* from {
* userhost (kullanılacak ident@host);
* };
* login (login ismi);
* password (şifre);
* };
* ardından bu vhostu kullanmak için, IRC de /vhost (login) (şifre) yapın
*/
vhost {
vhost i.hate.microsefrs.com;
from {
userhost *@*.image.dk;
};
login stskeeps;
password moocowsrulemyworld;
};
/* Diğer yapılandırma dosyalarını dahil edebilirsiniz */
/* include "klines.conf"; */
/* Ağ yapılandırması */
set {
network-name "ROXnet";
default-server "irc.roxnet.org";
services-server "services.roxnet.org";
stats-server "stats.roxnet.org";
help-channel "#ROXnet";
hiddenhost-prefix "rox";
/* prefix-quit "no"; */
/* Gizleme anahtarları ağ üzerindeki bütün sunucularda aynı olmalı.
* Bu anahtarlar maskeli hostlar yaratmak ve bunları saklamak için kullanılır.
* Anahtarlar 5-100 karakterlik (10-20 karakter yeterli) 3 rastgele diziden oluşmalı ve
* küçük harf (a-z), büyük harf (A-Z) ve rakamlardan (0-9) meydana gelmelidirler.. [ilk örneğe bakınız].
*/
cloak-keys {
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
"and another one";
"and another one";
};
/* on-oper host */
hosts {
local "locop.roxnet.org";
global "ircop.roxnet.org";
coadmin "coadmin.roxnet.org";
admin "admin.roxnet.org";
servicesadmin "csops.roxnet.org";
netadmin "netadmin.roxnet.org";
host-on-oper-up "no";
};
};
/* Sunucunun kendine özgü yapılandırması */
set {
kline-address "bunu.email.olarak.ayarlayın";
modes-on-connect "+ixw";
modes-on-oper "+xwgs";
oper-auto-join "#opers";
options {
hide-ulines;
/* Eğer isterseniz identd kontrolünü buradan aktif edebilirsiniz */
/* identd-check; */
show-connect-info;
};
maxchannelsperuser 10;
/* /quit mesajının görüntülenebilmesi için, bir kullanıcının sunucuya bağlı kalması gereken süre
* Umarız spamleri durdurmak için yardım eder */
anti-spam-quit-message-time 10s;
/* Bütün çıkışlarda değişmeyen bir çıkış mesajı yaratır - anlamı yerel sunucuda
ısmarlama çıkışlara izin verilmemesidir */
/* static-quit "Client quit"; */
/* Ayrıca bu seçeneğin açıklama satırlarını kaldırıp 'yes' diyerek bütün kanaldan ayrılma mesajlarını,
* bloklamış veya belirli bir diğer metini bunun için kullanabilirsiniz. (örnek: "Bye bye!") Her zaman kanaldan
* ayrılma mesajı olarak kullanılır */
/* static-part yes; */
/* Operlerin sadece belirli istatistikleri görüntüleyebilmesini sağlar, bütün istatistikler için * kullanın,
* bütün istatistikleri görebilmeleri için gözardı edin. Full liste için '/stats' yapınız.
* Bazı yöneticiler normal kullanıcıların 'kGs' istatistiklerine ulaşmasını istemeyebilir.
*/
oper-only-stats "okfGsMRUEelLCXzdD";
/* Throttling: Bu örnek bir hosta 60 saniye içerisine yanlızca 3 bağlantı imkanı sağlar. */
throttle {
connections 3;
period 60s;
};
/* Anti flood koruması */
anti-flood {
nick-flood 3:60; /* Her 60 saniyede 3 nick değişikliği (varsayılan) */
};
/* Spam filtresi */
spamfilter {
ban-time 1d; /* spamfilter ile bir *line yasağının varsayılan devaö süresi */
ban-reason "Spam/Advertising"; /* varsayılan neden */
virus-help-channel "#help"; /* 'viruschan' eylemi için kullanılacak kanal */
/* except "#help"; spam filtreden muaf tutulacak kanal */
};
};
/*
* Sorununuz veya daha fazla yardımamı ihtiyacınız var?
* 1) www.vulnscan.org/UnrealIRCd/unreal32docs.tr.html
* 2) www.vulnscan.org/UnrealIRCd/faq/ <- sorularınızın %80 ini kapsamakta!
* 3) Eğer probleminiz hala devam ediyorsa irc.unrealircd.org sunucusu #unreal-support kanalına girebilirsiniz
* DÖKÜMANTASYON ve FAQ kısmını okumanızı gerekli gördüğümüzü belirtiyoruz!
*/
+22 -90
View File
@@ -15,7 +15,7 @@ help {
" zum Begriff 'who' wissen, ist einzugeben:";
" /HELPOP WHO";
" (Als HelpOp muss man /HELPOP ?WHO eingeben, also vor";
" den Begriff noch ein ? setzen)";
" den Begriff noch ein ? setzen);"
" In diesem Hilfesystem sind alle Server Befehle und";
" Optionen aufgeführt, die benutzt werden können.";
" Wird darüberhinaus noch Hilfe benötigt, kann diese";
@@ -60,9 +60,7 @@ help Opercmds {
" einen bestimmten Befehl zu erhalten.";
" -";
" ==-------------------------oOo-------------------------==";
" ADCHAT DNS NACHAT SETIDENT";
" ADDMOTD GLINE OPER SHUN";
" ADDOMOTD GLOBOPS OPERMOTD SPAMFILTER";
" ADCHAT GLOBOPS OPERMOTD SPAMFILTER";
" CHATOPS GZLINE REHASH SQUIT";
" CHGHOST HTM RESTART TEMPSHUN";
" CHGIDENT KILL RPING TRACE";
@@ -71,6 +69,8 @@ help Opercmds {
" CONNECT LOCOPS SAPART WALLOPS";
" DCCDENY MKPASSWD SDESC ZLINE";
" DIE MODULE SETHOST";
" DNS NACHAT SETIDENT";
" GLINE OPER SHUN";
" ==-------------------------oOo-------------------------==";
};
@@ -82,11 +82,11 @@ help Svscmds {
" einen bestimmten Befehl zu erhalten.";
" -";
" ==-------------------------oOo-------------------------==";
" SQLINE SVSKILL SVSNLINE SVSSILENCE";
" SVS2MODE SVSLUSERS SVSNOLAG SVSSNO";
" SVS2SNO SVSMODE SVSNOOP SVSWATCH";
" SVSFLINE SVSMOTD SVSO SWHOIS";
" SVSJOIN SVSNICK SVSPART UNSQLINE";
" SQLINE SVSKILL SVSNLINE SVSSNO";
" SVS2MODE SVSLUSERS SVSNOOP SVSWATCH";
" SVS2SNO SVSMODE SVSO SWHOIS";
" SVSFLINE SVSMOTD SVSPART UNSQLINE";
" SVSJOIN SVSNICK SVSSILENCE";
" ==-------------------------oOo-------------------------==";
};
@@ -126,17 +126,12 @@ help Umodes {
};
help Snomasks {
" Snomask seht für 'Service NOtice MASK'. Hiermit wird (hauptsächlich)";
" gesteuert, welche Server Notices empfangen werden.";
" Anwendung: /MODE nick +s <snomask>";
" Beispiel: /MODE blah +s +cF-j";
" Der Parameter legt fest, welche snomasks gewollt sind (oder nicht).";
" Man kann einzelne SNoMasks entfernen oder durch -s alle entfernen.";
" -";
" Hier eine Liste aller verfügbaren SNoMasks";
" SNoMasks werden mit dem UMode +s gesetzt, Sie sind ein zusätzlicher Parameter.";
" Als Beispiel, um SNoMask +f zu setzen tippt man:";
" /MODE <Dein Nick> +s +f";
" Man kann einzelne SNoMasks entfernen oder durch -s alle entfernen.";
" -";
" ==-------------------------oOo-----------------------==";
" c = Sieht alle lokalen Connects/Disconnects";
" e = Bekommt alle Server Meldungen für +e User (Eyes)";
@@ -165,9 +160,8 @@ help Chmodes {
" a <nickname> = Gibt einem User Channel-Admin Status";
" q <nickname> = Gibt einem User Owner-Status";
" -";
" b <nick!ident@host> = Bannt alle User, auf die die nick!ident@host-Maske passt";
" Erweiterte Bann Typen werden unter /HELPOP EXTBANS beschrieben [h]";
" c = Blockt alle Nachrichten in denen mIRC FarbCodes enthalten sind [o]";
" b <nick!ident@host> = Bannt alle User, auf die die nick!ident@host-Maske passt [h]";
" c = Blockt alle Nachrichten in denen mIRC FarbCodes enthalten sind [o]";
" e <nick!ident@host> = Nimmt passende User von einem Bann aus [h]";
" f <Floodparameter> = Schutz vor Flood (für weitere Informationen siehe /HELPOP CHMODEF) [o]";
" I nick!ident@host> = Nimmt passende User von +i aus [h]";
@@ -202,37 +196,6 @@ help Chmodes {
" ==------------------------------oOo----------------------------==";
};
help ExtBans {
" Erweiterte Banntypen: ";
" -";
" ==-Typ---------Name---------------------------Beschreibung----------------------==";
" | | User, auf die dieser Bann gesetzt wird, können joinen, ";
" ~q | Quiet | a´ber nichts schreiben, solange sich nicht +v oder ";
" | | höher haben. ";
" | | Beispiel: ";
" | | +bb ~q:*!*@blah.blah.com ~q:nick*!*@* ";
"-----------------------------------------------------------------------------------";
" | | User, auf die dieser Bann gesetzt ist, können ihren ";
" ~n | nickchange | Nick nicht ändern, solange sie nicht +v oder höher sind.";
" | | Beispiel: ";
" | | +bb ~n:*!*@*.aol.com ~n:nick*!*@* ";
"-----------------------------------------------------------------------------------";
" | | Wenn der User in diesem Channel ist, kann er/sie nicht ";
" | [prefix] | joinen. Es kann ein Prefix (+/%/@/&/~) angegeben werden.";
" ~c | channel | Dadurch gilt der Bann nur, wenn der User diese Rechte ";
" | | oder höher im angegebenen Channel hat. ";
" | | Beispiel: +b ~c:#lamers, +e ~c:@#trusted ";
"-----------------------------------------------------------------------------------";
" | | Wenn der Bann auf den gegebenen Realnamen gesetzt ist, ";
" | | kann dieser User nicht joinen. ";
" ~r | realname | Beispiel: +b ~r:*Stupid_bot_script* ";
" | | ACHTUNG: Ein Unterstrich ('_') steht für Beides: ein ";
" | | Leerzeichen und auch ein Unterstrich ('_') ";
" | | Dieser Bann würde auch auf 'Stupid bot script v1.4'. ";
" | | passen. ";
" ==------------------------------------------------------------------------------==";
};
help Chmodef {
" Der +f Channel Mode ermöglicht eienn umfangreichen Flood Schutz für einen";
" Channel. Durch diesen Modus ist es möglich, Floods durch join, nick change,";
@@ -247,7 +210,7 @@ help Chmodef {
" ==-----Type-----Name--------Default Action---Other Actions-----==";
" c CTCP +C m, M";
" j Join +i R";
" k Knock +K";
" k Knock +k";
" m Messages +m M";
" n Nickchange +N";
" t Text kick b";
@@ -467,7 +430,7 @@ help Lusers {
};
help Map {
" Zeigt eine pseude-grafische Netzwerks Karte an, aus der die";
" Zeigt eine pseude-grafische Netzwerks Karte an, aus der die;"
" Struktur des IRC Netzwerkes hervorgeht. Das wird hauptsächlich";
" zu Routing Zwecken benötigt.";
" -";
@@ -748,7 +711,7 @@ help Wallops {
};
help Globops {
" Sendet eine globale \"Nachricht\" an alle IRCops. Die Nachricht";
" Sendet eine globale \"Nachricht\" an alle IRCops. Die Nachricht;"
" kann nur von IRCops gelesen werden (anders, als WALLOPS, die";
" auch von normalen Usern gelesen werden können).";
" -";
@@ -786,12 +749,12 @@ help Nachat {
};
help Kill {
" Dieser Befehl entfernt User vom Server (anders als KICK";
" Dieser Befehl entfernt einen User vom Server (anders als KICK";
" wo der User nur vom Channel entfernt wird). Der User kann direkt";
" neu zum Server verbinden.";
" Befehl nur für IrcOps.";
" -";
" Syntax: KILL <user1>, <user2>, <user3>,... <reason>";
" Syntax: KILL <user> <reason>";
" Beispiel: KILL Jack16 Werbung für Dialer hier nicht erlaubt";
};
@@ -1190,7 +1153,7 @@ help Svskill {
help Svsnoop {
" Dieser Befehl aktiviert oder deaktiviert die Möglichkeit";
" IrcOp Funktonen auf dem angegebenen Server.";
" globaler IrcOp Funktonen auf dem angegebenen Server.";
" Muss durch einen U:Lined Server gesendet werden.";
" -";
" Syntax: SVSNOOP <server> <+/->";
@@ -1284,9 +1247,7 @@ help Svsnline {
" sind Leerzeichen durch '_' zu ersetzen, Unreal";
" übersetzt diese zu Leerzeichen.";
" -";
" Syntax: SVSNLINE <grund_für_den_bann> :<realname> (um einen Bann zu setzen)";
" SVSNLINE - (um einen Bann zu löschen)";
" SVSNLINE * (um alle Banns zu löschen)";
" Syntax: SVSNLINE <grund_für_den_bann> :<realname>";
" Beispiel: SVSNLINE sub7_drone :*sub7*";
};
@@ -1333,22 +1294,6 @@ help Svs2sno {
" Beispiel: SVS2SNO joe +Gc";
};
help Svsnolag {
" Aktiviert ein 'kein fake lag' für einen User.";
" Muss durch einen U:Lined Server gesendet werden.";
" -";
" Syntax: SVSNOLAG [+|-] <nickname>";
" Example: SVSNOLAG + joe";
};
help Svs2nolag {
" Aktiviert ein 'kein fake lag' für einen User.";
" Muss durch einen U:Lined Server gesendet werden.";
" -";
" Syntax: SVS2NOLAG [+|-] <nickname>";
" Example: SVS2NOLAG + joe";
};
help Spamfilter {
" Diese Befehle setzten oder löschen globale Spam Filter.";
" Spamfilter helfen, mit Spam, störenden Bots, Werbung etc. fertig zu werden.";
@@ -1363,7 +1308,7 @@ help Spamfilter {
" 'kill', 'tempshun' (Shun nur für aktuelle Session), 'shun',";
" 'kline', 'gline', 'zline', 'gzline', 'block' (blockiert Nachricht),";
" 'dccblock' (kann keine DCC mehr senden), 'viruschan' (verlässt alle Channels";
" und joint zwangsweise im Virus Help Channel), warn (Warnung für IrcOps).";
" und joint zwangsweise im Virus Help Channel).";
" [regex] hier handelt es sich um den Ausdruck in der Nachricht, auf den hin Reaktionen";
" erfolgen sollen.";
" [tkltime] die Zeitdauer, wie lange *LINEs, die durch [action] gesetzt wurden, gelten sollen";
@@ -1391,7 +1336,7 @@ help Tempshun {
" gilt der Shun nicht mehr.";
" -";
" Syntax: TEMPSHUN [+|-]<nickname> [reason]";
" Example: TEMPSHUN evilguy vermutlich Infektion";
" Example: TEMPSHUN evilguy suspected infection";
" TEMPSHUN -niceguy";
};
@@ -1402,16 +1347,3 @@ help DccAllow {
*/
};
help Addmotd {
" Fügt eine Zeile ans Ende der MOTD an.";
" -";
" Syntax: ADDMOTD <text>";
" Beispiel: ADDMOTD Spielt fair!";
};
help Addomotd {
" Fügt eine Zeile ans Ende der OPERMOTD an. ";
" -";
" Syntax: ADDOMOTD <text>";
" Beispiel: ADDOMOTD Abuse it and lose it!";
};
+427 -512
View File
File diff suppressed because it is too large Load Diff
-1517
View File
File diff suppressed because it is too large Load Diff
-1404
View File
File diff suppressed because it is too large Load Diff
+13 -33
View File
@@ -1,6 +1,5 @@
Numeric 005 Documentation
(c) 2002-2005 codemastr (Dominick Meglio) [codemastr@unrealircd.com]
(c) 2005-2009 syzop (Bram Matthys) [syzop@vulnscan.org]
Numeric 005 Documentation (c) 2002-2005 codemastr (Dominick Meglio) [codemastr@unrealircd.com]
(As of Unreal3.2.3)
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
@@ -24,9 +23,9 @@ impractical and technically impossible to correctly implement due to existing li
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, CMDS, NAMESX, UHNAMES, and WATCHOPTS.
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.
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
------------------------------------------------------------------------------------------------
@@ -108,7 +107,7 @@ 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
@@ -125,7 +124,7 @@ ELIST flags MNUCT Specifies the set of
flag allows topic set time
searching.
CMDS commands MAP,KNOCK,DCCALLOW,USERIP Specifies a series of commands that
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
@@ -133,48 +132,29 @@ CMDS commands MAP,KNOCK,DCCALLOW,USERIP Specifies a series of
token replaces the MAP and KNOCK
tokens.
STATUSMSG flags ~&@%+ Specifies the mode flags that may
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
EXCEPTS none none Indicates that channel ban exceptions
(+e) are supported by the server.
INVEX none none Indicates that channel invite
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
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
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
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).
UHNAMES none none Indicates that (other) extended
/NAMES info is available on the
server. If the client sends
"PROTOCTL UHNAMES" then the server
will, from then on, send user@host
information in a NAMES reply
(eg: @nick!ident@hostname).
WATCHOPTS flags A WATCH options supported. 'A' means
Away Notification is available.
-15
View File
@@ -139,18 +139,3 @@ NICKCHARS This specifies a list of language characters that are allowed in n
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.
CHANMODES Like CHANMODES from the 005 numeric. Useful to see which channel modes are
supported/used, and can also be used to properly eat parameters in parameter
modes in the MODE command (for eg: +jk 1:1 a).
EAUTH Early Authorization. This makes it possible for servers to authenticate each
other before the regular SERVER command. Needs to be done prior to using the
SERVERS token, and possibly other tokens or commands in the future. Hence,
is recommended to be sent as first (or early) PROTOCTL token. Note also that
the PASS command should be sent prior to this PROTOCTL token.
EAUTH=my.server.name[,options]
SERVERS Informs the other server about the other servers (numerics) on this network
(including our own numeric).
Syntax: SERVERS=numeric1,numeric2,numeric3,etc
-467
View File
@@ -1,467 +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).
It is currently slightly out of date, as the current protocol is 2310, but that should not matter much.</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>2310 - Unreal 3.2.9</li>
<li>2309 - Unreal 3.2.6, 3.2.7, 3.2.8</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>
+2 -1
View File
@@ -1,8 +1,9 @@
Token List (c) 2002-2004 codemastr (Dominick Meglio) [codemastr@unrealircd.com]
(As of Unreal3.2.3)
Command Token
------------------------------------------------------------------------------------------------
PRIVMSG !
PRIVATE !
WHOIS #
NICK &
SERVER '
+1 -4
View File
@@ -1,11 +1,8 @@
VL Information (c) 2002 codemastr (Dominick Meglio) [codemastr@unrealircd.com]
(As of Unreal3.2-beta11)
Protocol Version
------------------------------------------------------------------------------------------------
2310 3.2.9
2309 3.2.6, 3.2.7, 3.2.8
2308 3.2.5
2307 3.2.4
2306 3.2.3
2305 3.2.2
2304 3.2.1
+2 -2
View File
@@ -1,4 +1,4 @@
==[ Translations ]===========================================================
==[ Translations ]============================================================
Starting with the release of Unreal 3.2 we have begun accepting translated
documentation files. For now, only translations of unreal32docs.html and
@@ -42,4 +42,4 @@ 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.
=============================================================================
==============================================================================
+137 -401
View File
@@ -12,7 +12,7 @@
.block_old { font-size: 14; }
.set { font-weight: bold; }
.desc { margin-left: 15px; }
pre { font: "times new roman"; font-style: normal; background-color: #eeeeee;}
pre { font: "times new roman"; font-style: normal;}
</style>
</head>
@@ -21,25 +21,23 @@
<a href="unreal32docs.es.html">Spanish</a> |
<a href="unreal32docs.hu.html">Hungarian</a> |
<a href="unreal32docs.fr.html">French</a> |
<a href="unreal32docs.gr.html">Greek</a> |
<a href="unreal32docs.nl.html">Dutch</a> |
<a href="unreal32docs.ru.html">Russian</a> |
<a href="unreal32docs.tr.html">Turkish</a>
<a href="unreal32docs.gr.html">Greek</a>
<br><br>
<div align="center"><b><font size="7">UnrealIRCd</font></b><br>
<font size="4"><a href="http://www.unrealircd.com">http://www.unrealircd.com</a></font><br>
<font size="4">Version: 3.2.9-RC2</font><br>
<b>Letztes Update dieses Handbuchs:</b> 2009-12-24</div>
<b>Head Coders:</b> Stskeeps / codemastr / Syzop / Luke<font face="Helvetica,Arial" size="-1">/
aquanight / WolfSage</font><br>
<font size="4">Version: 3.2.3 </font><br>
<b>Letztes Dokumentation Update:</b> 2005-03-13</div>
<b>Head Coders:</b> Stskeeps / codemastr / Syzop / Luke<br>
<b>Contributors:</b> McSkaf / Zogg / NiQuiL / assyrian / chasm / DrBin / llthangel / Griever / nighthawk<br>
<b>Dokumentation</b><b>:</b> CKnight^ / Syzop<br>
<b>Deutsche Übersetzung:</b> LowDigit / Orginalübersetzung: stylus740<br>
<p>Um diese Dokumentation zu lesen, ist einer der unten aufgeführten
kompatiblen Browser erforderlich. Aktuelle Dokumentationen sind erhältlich&nbsp; @
<a href="http://www.vulnscan.org/UnrealIRCd/unreal32docs.html">http://www.vulnscan.org/UnrealIRCd/unreal32docs.html</a>
und&nbsp; eine FAQ @ <a href="http://www.vulnscan.org/UnrealIRCd/faq/.">http://www.vulnscan.org/UnrealIRCd/faq</a>/.</p>
<b>Deutsche Übersetzung:</b> Stylus740 (irc.smart-irc.net)<br>
<p>Aufgrund des wachsenden Umfangs der Dokumentation von UnrealIRCd3.2 wurde das
Dokument auf HTML umgestellt, um leichter navigieren und besser
Querverweisen folgen zu können. Um diese Dokumentation zu lesen, wird einer der
nachfolgenden Browser benötigt. Aktuelle Dokumentationen sind erhältlich&nbsp; @ <a href="http://www.vulnscan.org/UnrealIrcd/unreal32docs.html">http://www.vulnscan.org/UnrealIrcd/unreal32docs.html</a>
und&nbsp; eine FAQ @
<a href="http://www.vulnscan.org/UnrealIrcd/faq/.">http://www.vulnscan.org/UnrealIrcd/faq</a>/.</p>
<p><b>Kompatible Browser: </b><br>
<ul>
<li>Opera 6.02
@@ -70,11 +68,9 @@ und&nbsp; eine FAQ @ <a href="http://www.vulnscan.org/UnrealIRCd/faq/.">http://w
-- 3.14. <a href="#feature_spamfilter"> Spamfilter</a><br>
-- 3.15. <a href="#feature_cidr">CIDR<br>
</a>
-- 3.16. <a href="#feature_nickchars">Nick Zeichensätze<br>
</a>-- 3.17 <a href="#feature_cgiirc">CGI:IRC Unterstützung<br>
</a>-- 3.18 <a href="#feature_timesync">Zeitsynchronisation</a><a href="#feature_cidr"><br>
-- 3.16. <a href="#feature_nickchars">Nick Zeichensätze</a><a href="#feature_cidr"><br>
</a>
-- 3.19. <a href="#feature_other">Andere Features</a> <a href="#feature_other"><br>
-- 3.17. <a href="#feature_other">Andere Features</a> <a href="#feature_other"><br>
</a>
4. <a href="#configuringyourunrealircdconf">Konfiguration der unrealircd.conf
Datei</a><br>
@@ -113,10 +109,8 @@ Konfigurationsdatei</a><br>
---4.32. <a href="#aliasblock">Alias Block</a><br>
---4.33. <a href="#helpblock">Help Block<br>
</a>---4.34. <a href="#officialchannels"> Official Channels Block</a><br>
---4.35. <a href="#spamfilter"> Spamfilter Block<br>
</a>---4.36. <a href="#cgiirc">Cgiirc Block</a><br>
---4.37. <a href="#setblock">Set Block -=- (networks/unrealircd.conf)</a><br>
---4.38. <a href="#filesblock">Files Block</a><br>
---4.35. <a href="#spamfilter"> Spamfilter Block</a><br>
---4.36. <a href="#setblock">Set Block -=- (networks/unrealircd.conf)</a><br>
5. <a href="#addtlfiles">Additional Files</a><br>
6. <a href="#userchannelmodes">User & Channel Modi</a><br>
7. <a href="#useropercommands">User & Oper Befehlsliste<br>
@@ -154,17 +148,15 @@ Verwendung des Textes mit anderer Software oder das Anbieten zusammen mit
anderer Software ohne schriftliche Genehmigung des UnrealIRCd Entwicklungsteams
ist streng verboten. Solange es der Benutzung von UnrealIRCd dient, darf dieses
Dokument beliebig kopiert/gedruckt/veröffentlicht, jedoch nicht verändert
werden. &#8211; Copyright UnrealIRCd Development Team 2002-2006</p>
werden. &#8211; Copyright UnrealIRCd Development Team 2002-2005</p>
<p>Bitte lesen Sie diese Anleitung, bevor Sie um Hilfe bitten und schauen Sie
WIRKLICH erst einmal in die <a href="#faq">FAQ</a>, da rund 80% der Fragen dort
WIRKLICH erst ein mal in die <a href="#faq">FAQ</a>, da rund 80% der Fragen dort
beantwortet sind. Hilft
dies alles nicht, kann bzgl. Support bei irc.unrealircd.org
(Port 6667) im Channel #unreal-support
dies alles nicht, kann bzgl. Support bei irc.ircsystems.net
(Port 6667) Channel #unreal-support
nach Unterstützung gefragt werden (Wir erwarten UNBEDINGT, dass zuvor Dokumentation
und <a href="#faq">
FAQ</a> gelesen wurden und wir helfen nur zu UnrealIRCd, nicht zu Services!).
Ebenso können Sie das Forum nutzen, welches über <a href="http://forums.unrealircd.com/" target="_blank">http://forums.unrealircd.com</a>
erreichbar ist. Im Falle eines echten Bugs (z.B. einem Crash) bitte Nachricht an
und
FAQ gelesen wurden und wir helfen nur zu UnrealIRCd, nicht zu Services!). Im Falle eines echten Bugs (z.B. einem Crash) bitte Nachricht an
<a href="http://bugs.unrealircd.org" TARGET="_blank">http://bugs.unrealircd.org</a>.</p></div>
<p><font size="+2"><b><a name="notesonolder">1.1 &#8211; Anmerkungen zu Upgrade/Mixing 3.1.x -&gt; 3.2</a>&nbsp; </b></font><br>
@@ -187,7 +179,7 @@ Upgrade von 3.2 Versionen</a></b></font><br>
<p>Der empfohlene Weg für ein Upgrade ist:<br>
Linux:<br>
<ul>
<li>Altes UnrealIRCd Verzeichnis umbenennen (ansonsten wird es im nächsten Schritt
<li>Altes UnrealIRCd Verzeichnis umbenennen (oder es wird im nächsten Schritt
überschrieben)
<li>Neue UnrealIRCd Version entpacken und &quot;./Config&quot; und &quot;make&quot;
laufen lassen (*NIX).
@@ -212,9 +204,7 @@ Bug gemeldet wird!</p></div>
<li><b>*NIX Versionen:</b>
<ul>
<li>Linux (2.2.*, 2.4.*, 2.6.*)
<li>FreeBSD (4.*, 5.*, 6.*)
<li>NetBSD (2.*)
<li>OpenBSD (3.7, 3.8, 3.9)
<li>FreeBSD (4.*, 5.*)
<li>Solaris (9,10)
</ul>
<li><b>Windows Versionen:</b>
@@ -233,12 +223,12 @@ Bug gemeldet wird!</p></div>
</ul>
<br>
Im Falle, dass Unreal3.2 korrekt unter anderen Betriebssystemen läuft, bitte
Details an <a href="mailto:coders@lists.unrealircd.org">coders@lists.unrealircd.org
Details an <a href="mailto:coders@lists.unrealircd.com">coders@lists.unrealircd.com
</a> senden. <p><b>Installationsanleitungen</b><br>
Linux:<br>
<ol>
<li>gunzip -d Unreal3.2.X.tar.gz
<li>tar xvf Unreal3.2.X.tar
<li>gunzip -d Unreal3.2.2.tar.gz
<li>tar xvf Unreal3.2.2.tar
<li>cd Unreal3.2
<li>./Config
<li>Die hierbei angezeigten Fragen nach bestem Wissen beantworten. Allgemein ist
@@ -262,8 +252,7 @@ erl
die .conf Datei bezogen wird (die Neuanfängern momentan noch unbekannt sein
dürfte).</p>
<p>Dieser Abschnitt kann auch übersprungen werden, obwohl es sinnvoll ist ihn
vor oder nach der Installation zu lesen, weil man ansonsten Konzepte wie
cloaking, snowmask etc. nicht verstehen wird..</p></div>
vor oder nach der Installation zu lesen.</p></div>
<p><font size="+2"><b><a name="feature_cloaking">3.1 - Cloaking</a></b></font></p><div class="desc">
<p>Das Cloaking ist eine Möglichkeit, den echten Hostnamen vor Usern zu verbergen.
@@ -280,7 +269,7 @@ einstellen k
Modul mitgeliefert:<br>
<b>cloak:</b><br>
Hierbei handelt es sich um das neue offizielle Cloaking Modul, welches viel
sicherer, als der alte Algorithmus ist. Es verwendet intern md5 und erfordert, dass 3
sicherer, als der alte Algorithmis ist. Es verwendet intern md5 und erfordert, dass 3
<b>set::cloak-keys::</b>
gesetzt sind, die gemischt Kleinbuchstaben (a-z), Großbuchstaben (A-Z) und
Ziffern (0-9) enthalten [z.B. "AopAS6WQH2Os6hfosh4SFJHs"] . Siehe auch
@@ -289,22 +278,18 @@ example.conf f
GEHEIM gehalten werden. Wenn jemand
diese drei Keys kennt, kann er den geschützten Host erkennen und den realen
Host ermitteln (was dem Usermodus +x sinnlos macht).</p>
<p>Tipp: Wenn man auf *NIX Systemen arbeitet und Cloak Keys neu erstellt werden
müssen, kann man in der Shell eingeben: '<font face="Courier New">./unreal
gencloak</font>' und erhält als Ausgabe 3 zufällig erzeugte Strings, die man
verwenden kann.</p>
</div>
<p><font size="+2"><b><a name="feature_modules">3.2 - Module</a></b></font></p><div class="desc">
<p>UnrealIRCd unterstützt Module, was sehr nützlich
ist, weil:<br>
- Module können bei laufendem ircd geladen/ersetzt/gelöscht werden (durch /rehash). Dadurch können verschiedene Bugs gefixt
oder neue Module hinzugefügt werden, ohne dass ein Neustart erforderlich ist.<br>
oder neue Module hinzugefügt werden, ohne dass ein Neustart erforderlich ist!<br>
- Andere Entwickler können weitere Module mit neuen Befehlen oder anderen
Usermodi erstellen.<br>
UnrealIRCd selbst enthält nur wenige Module. Durch eine Suche auf <a href="http://www.unrealircd.com"> www.unrealircd.com</a>
(modules) oder per Google können weitere 3rd party Module gefunden werden.</p>
<p>Achtung: Minimal müssen zwei Module geladen sein, oder der ircd wird nicht
starten:<br>
starten!<br>
- das commands Modul: commands.so (oder commands.dll bei Windows)<br>
- das cloaking Modul: üblicherweise cloak.so (oder cloak.dll bei Windows)</p>
</div>
@@ -353,7 +338,7 @@ die beispielsweise den Befehl <font face="Courier New" size="2">/register</font>
an Chanserv weiterleitet, wenn der erste Parameter mit einem # beginnt oder an
Nickserv, wenn der erste Parameter nicht mit einem # beginnt. (Im ersten Fall
soll ein Channel registriert werden, im zweiten Fall ein Nickname)</p>
<p>Aliases werden in <a href="#aliasblock"> alias Blocks</a> in der Konfigurationsdatei definiert oder in
<p>Aliases werden in alias Blocks in der Konfigurationsdatei definiert oder in
einer Include Datei mit den häufigsten Default Aliassen.&nbsp;</p></div>
<p><font size="+2"><b><a name="feature_helpop">3.5 - Helpop</a></b></font></p><div class="desc">
@@ -998,24 +983,6 @@ die *lines/shuns (Default: 'Spam/advertising'). Mehrere Worte sind durch Undersc
Channels, in den bei der Action 'viruschan' gejoined wird (Default: #help)<br>
<b>set::spamfilter::virus-help-channel-deny</b> ermöglicht es, normale Joins in
den virus-help-channel zu blockieren (Default: no)
<p>
<font size="+1"><b><a name="feature_spamfilter_slow">Erkennung langsamer
Spamfilter</a></b></font><br>
Ein Spamfilter Ausdruck (regex) kann einen IRCd beträchtlich verlangsamen. Das
hängt davon ab, welcher Ausdruck verwendet wird (und wie dieser Ausdruck
ausgewertet wird). Einige Spamfilter Ausdrücke sind sehr schnell und UnrealIRCd
kann Tausende von ihnen pro Sekunde verarbeiten. Andere können extrem langsam
sein und mehrere Sekunden für die Ausführung benötigen und dadurch den IRCd
regelrecht einfrieren..<br>
Zur Unterstützung gegen dieses Problem stellt Unreal eine Erkennung langsamer
Spamfilter ('Slow Spamfilter Detection' bereit: Für jeden Spamfilter wird bei jeder Ausführung die hierzu benötigte
Zeit überprüft. Wird ein
bestimmter Grenzwert erreicht, warnt der IRCd oder entfernt einfach diesen Spamfilter.<br>
Warnungen werden durch <b>set::spamfilter::slowdetect-warn</b> konfiguriert (Default:
250ms) und die automatische Löschung durch <b>set::spamfilter::slowdetect-fatal</b>
(Default: 500ms). Man kann beide Werte auf 0 setzen um die Erkennung langsamer
Spamfilter zu deaktivieren.<br>
Dieses Feature steht unter Windows derzeit noch nicht zur Verfügung.
</div>
<p><font size="+2"><b><a name="feature_cidr">3.15 - CIDR</a></b></font></p><div class="desc">
@@ -1024,7 +991,7 @@ erm
unter Verwendung von CIDR vergeben. Daher ist es möglich unter Verwendung eines
CIDR basierten Banns auf einfache Weise ganze ISPs zu sperren. Unreal
unterstützt CIDR sowohl für IPv4 als auch für IPv6. CIDR Masken können
benutzt werden bei: allow::ip, oper::from::userhost, ban user::mask, ban ip::mask, except ban::mask, except
benutzt werden bei: allow::ip, ban user::mask, ban ip::mask, except ban::mask, except
throttle::mask, und except tkl::mask (für gzline, gline, and shun). Zusätzlich
kann&nbsp; CIDR bei /kline, /gline, /zline, /gzline, und /shun benutzt werden. Unreal
verwendet die Standard Syntax von IP/bits, z.B. 127.0.0.0/8 (passt auf 127.0.0.0 - 127.255.255.255),
@@ -1035,51 +1002,45 @@ und fe80:0:0:123::/64 (passt auf fe80:0:0:123:0:0:0:0 - fe80:0:0:123:ffff:ffff:f
Zeichensätze/Sprachen in Nicknamen gestattet sein sollen. Dies wird festgelegt
in <b> set::allowed-nickchars</b>.<br>
Hier eine Liste der möglichen Einstellungen:<br>
<table border="1" width="868" height="902">
<tr><td width="98" height="19"><b>Name:</b></td> <td width="494" height="19"><b>Beschreibung:</b></td> <td width="254" height="19"><b>Character set/encoding:</b></td></tr>
<tr><td width="98" height="19">catalan</td> <td width="494" height="19">Katalanische Zeichen</td> <td width="254" height="19">iso8859-1 (latin1)</td></tr>
<tr><td width="98" height="19">danish</td> <td width="494" height="19"> Dänische Zeichen</td> <td width="254" height="19"> iso8859-1
<table border="1" width="868">
<tr><td width="98"><b>Name:</b></td> <td width="494"><b>Beschreibung:</b></td> <td width="254"><b>Character set/encoding:</b></td></tr>
<tr><td width="98">catalan</td> <td width="494">Katalanische Zeichen</td> <td width="254">iso8859-1 (latin1)</td></tr>
<tr><td width="98">danish</td> <td width="494"> Dänische Zeichen</td> <td width="254"> iso8859-1
(latin1)</td></tr>
<tr><td width="98" height="19">dutch</td> <td width="494" height="19"> Niederländische Zeichen</td> <td width="254" height="19"> iso8859-1 (latin1)</td></tr>
<tr><td width="98" height="19">french</td> <td width="494" height="19"> Französische Zeichen</td> <td width="254" height="19"> iso8859-1 (latin1)</td></tr>
<tr><td width="98" height="19">german</td> <td width="494" height="19"> Deutsche Zeichen </td> <td width="254" height="19">iso8859-1 (latin1)</td></tr>
<tr><td width="98" height="19">swiss-german</td> <td width="494" height="19"> Schweiz-Deutsche Zeichen
(kein 'ß')</td> <td width="254" height="19"> iso8859-1 (latin1)</td></tr>
<tr><td width="98" height="19">icelandic </td> <td width="494" height="19">Isländische Zeichen</td> <td width="254" height="19"> iso8859-1 (latin1)</td></tr>
<tr><td width="98" height="19">italian</td> <td width="494" height="19"> Italienische Zeichen</td> <td width="254" height="19"> iso8859-1 (latin1)</td></tr>
<tr><td width="98" height="19">spanish</td> <td width="494" height="19"> Spanische Zeichen</td> <td width="254" height="19"> iso8859-1 (latin1)</td></tr>
<tr><td width="98" height="19">swedish</td> <td width="494" height="19"> Schwedische Zeichen</td> <td width="254" height="19"> iso8859-1 (latin1)</td></tr>
<tr><td width="98" height="57"><b>latin1</b></td> <td width="494" height="57"> katalanisch, dänisch, niederländisch, französisch, deutsch, schweizer deutsch, spanisch,
isländisch, italienisch, schwedisch</td> <td width="254" height="57"> iso8859-1 (latin1)
<tr><td width="98" height="19">hungarian</td> <td width="494" height="19"> Ungarische Zeichen </td> <td width="254" height="19"> iso8859-2 (latin2), windows-1250</td></tr>
<tr><td width="98" height="19">polish</td> <td width="494" height="19"> Polnische Zeichen&nbsp; <td width="254" height="19"> iso8859-2 (latin2)</td></tr>
<tr><td width="98" height="38">romanian</td> <td width="494" height="38"> Rumänische Zeichen <td width="254" height="38"> iso8859-2 (latin2), windows-1250, iso8859-16</td></tr>
<tr><td width="98" height="19"><b>latin2</b></td> <td width="494" height="19"> ungarisch, polnisch,
rumänisch <td width="254" height="19"> iso8859-2 (latin2)</td></tr>
<tr><td width="98" height="38">polish-w1250</td> <td width="494" height="38"> Polnische Zeichen,
Windows Variante (leider mehr allgemein, als iso)<td width="254" height="38"> windows-1250</td></tr>
<tr><td width="98" height="19">slovak-w1250</td> <td width="494" height="19"> Slowakische Zeichen,
Windows Variante<td width="254" height="19"> windows-1250</td></tr>
<tr><td width="98" height="19">czech-w1250</td> <td width="494" height="19"> Tschechische Zeichen,
Windows Variante <td width="254" height="19">windows-1250</td></tr>
<tr><td width="98" height="38"><b>windows-1250</b></td> <td width="494" height="38"> polnisch-w1250,
slowakisch-w1250, tschechisch-w1250, ungarisch, rumänisch <td width="254" height="38">windows-1250</td></tr>
<tr><td width="98" height="19">greek</td> <td width="494" height="19"> Griechische Zeichen <td width="254" height="19">iso8859-7</td></tr>
<tr><td width="98" height="19">turkish</td> <td width="494" height="19"> Türkische Zeichen <td width="254" height="19">iso8859-9</td></tr>
<tr><td width="98" height="19">russian-w1251</td> <td width="494" height="19"> Russische Zeichen <td width="254" height="19">windows-1251</td></tr>
<tr><td width="98" height="19">belarussian-w1251</td> <td width="494" height="19"> Belarussische
Zeichen <td width="254" height="19">windows-1251</td></tr>
<tr><td width="98" height="19">ukrainian-w1251</td> <td width="494" height="19"> Ukrainische
Zeichen <td width="254" height="19">windows-1251</td></tr>
<tr><td width="98" height="1"><b>windows-1251</b></td> <td width="494" height="26"> russisch-w1251,
belarussisch-w1251, ukrainisch-w1251 <td width="254" height="26">windows-1251</td></tr>
<tr><td width="98" height="19">hebrew</td> <td width="494" height="19"> Hebräische Zeichen <td width="254" height="19">iso8859-8-I/windows-1255</td></tr>
<tr><td width="98" height="19">chinese-simp</td> <td width="494" height="19"> Einfaches Chinesisch <td width="254" height="19">Multibyte: GBK/GB2312</td></tr>
<tr><td width="98" height="19">chinese-trad</td> <td width="494" height="19"> Traditionelles
Chinesisch <td width="254" height="19">Multibyte: GBK</td></tr>
<tr><td width="98" height="19">chinese-ja</td> <td width="494" height="19"> Japanisch Hiragana/Pinyin <td width="254" height="19">Multibyte: GBK</td></tr>
<tr><td width="98" height="19"><b>chinese</b></td> <td width="494" height="19"> chinese-* <td width="254" height="19">Multibyte: GBK</td></tr>
<tr><td width="98" height="19"><b>gbk</b></td> <td width="494" height="19"> chinese-* <td width="254" height="19">Multibyte: GBK</td></tr>
<tr><td width="98">dutch</td> <td width="494"> Niederländische Zeichen</td> <td width="254"> iso8859-1 (latin1)</td></tr>
<tr><td width="98">french</td> <td width="494"> Französische Zeichen</td> <td width="254"> iso8859-1 (latin1)</td></tr>
<tr><td width="98">german</td> <td width="494"> Deutsche Zeichen </td> <td width="254">iso8859-1 (latin1)</td></tr>
<tr><td width="98">swiss-german</td> <td width="494"> Schweiz-Deutsche Zeichen
(kein 'ß')</td> <td width="254"> iso8859-1 (latin1)</td></tr>
<tr><td width="98">icelandic </td> <td width="494">Isländische Zeichen</td> <td width="254"> iso8859-1 (latin1)</td></tr>
<tr><td width="98">italian</td> <td width="494"> Italienische Zeichen</td> <td width="254"> iso8859-1 (latin1)</td></tr>
<tr><td width="98">spanish</td> <td width="494"> Spanische Zeichen</td> <td width="254"> iso8859-1 (latin1)</td></tr>
<tr><td width="98">swedish</td> <td width="494"> Schwedische Zeichen</td> <td width="254"> iso8859-1 (latin1)</td></tr>
<tr><td width="98"><b>latin1</b></td> <td width="494"> katalanisch, dänisch, niederländisch, französisch, deutsch, schweizer deutsch, spanisch,
isländisch, italienisch, schwedisch</td> <td width="254"> iso8859-1 (latin1)
<tr><td width="98">hungarian</td> <td width="494"> Ungarische Zeichen </td> <td width="254"> iso8859-2 (latin2), windows-1250</td></tr>
<tr><td width="98">polish</td> <td width="494"> Polnische Zeichen&nbsp; <td width="254"> iso8859-2 (latin2)</td></tr>
<tr><td width="98">romanian</td> <td width="494"> Rumänische Zeichen <td width="254"> iso8859-2 (latin2), windows-1250, iso8859-16</td></tr>
<tr><td width="98"><b>latin2</b></td> <td width="494"> ungarisch, polnisch,
rumänisch <td width="254"> iso8859-2 (latin2)</td></tr>
<tr><td width="98">polish-w1250</td> <td width="494"> Polnische Zeichen,
Windows Variante (leider mehr allgemein, als iso)<td width="254"> windows-1250</td></tr>
<tr><td width="98">slovak-w1250</td> <td width="494"> Slowakische Zeichen,
Windows Variante<td width="254"> windows-1250</td></tr>
<tr><td width="98">czech-w1250</td> <td width="494"> Tschechische Zeichen,
Windows Variante <td width="254">windows-1250</td></tr>
<tr><td width="98"><b>windows-1250</b></td> <td width="494"> polnisch-w1250,
slowakisch-w1250, tschechisch-w1250, ungarisch, rumänisch <td width="254">windows-1250</td></tr>
<tr><td width="98">greek</td> <td width="494"> Griechische Zeichen <td width="254">iso8859-7</td></tr>
<tr><td width="98">turkish</td> <td width="494"> Türkische Zeichen <td width="254">iso8859-9</td></tr>
<tr><td width="98">russian-w1251</td> <td width="494"> Russische Zeichen <td width="254">windows-1251</td></tr>
<tr><td width="98">hebrew</td> <td width="494"> Hebräische Zeichen <td width="254">iso8859-8-I/windows-1255</td></tr>
<tr><td width="98">chinese-simp</td> <td width="494"> Einfaches Chinesisch <td width="254">Multibyte: GBK/GB2312</td></tr>
<tr><td width="98">chinese-trad</td> <td width="494"> Traditionelles
Chinesisch <td width="254">Multibyte: GBK</td></tr>
<tr><td width="98">chinese-ja</td> <td width="494"> Japanisch Hiragana/Pinyin <td width="254">Multibyte: GBK</td></tr>
<tr><td width="98"><b>chinese</b></td> <td width="494"> chinese-* <td width="254">Multibyte: GBK</td></tr>
<tr><td width="98"><b>gbk</b></td> <td width="494"> chinese-* <td width="254">Multibyte: GBK</td></tr>
</table>
&nbsp;
<p>Anmerkung 1: Zu beachten ist, dass einige Kombinationen Probleme verursachen können.
@@ -1093,9 +1054,9 @@ Anmerkung 2: Die
welchem Kleinbuchstaben gehört, erfolgt nach dem US-ASCII, was bedeutet, dass
ö und Ö nicht als 'gleiches Zeichen' erkannt werden und deswegen jemand
beispielsweise den Nick Bär haben kann, während jemand anderes gleichzeitig
den Nick BÄr hat. Das ist eine Einschränkung durch das aktuelle System und IRCd
den Nick BÄr hat. Das ist eine Einschränkung durch das aktuelle SDystem und IRCd
Standards, die nicht binnen kurzer Zeit gelöst werden können. Den Usern sollte
diese Einschränkung klar sein. Zu beachten dabei ist, dass es diese
diese Enschränkung klar sein. Zu beachten dabei ist, dass es diese
Einschränkung schon immer bei den Channelnamen gegeben hat, in denen ja fast
alle Zeichen erlaubt sind und schon immer die US-ASCII Regeln der
Zeichenübereinstimmung gegolten haben.<br>
@@ -1103,7 +1064,6 @@ Zeichen
Anmerkung 3: Die Basis Nick Zeichen (a-z A-Z 0-9 [ \ ] ^ _ - { | }) sind immer
erlaubt/aktiviert.<br>
<br>
<br>
Beispiel 1, für West-Europäer:<br>
<br>
<font face="Courier">
@@ -1116,41 +1076,7 @@ Schriftzeichen gestatten will:<br>
<font face="Courier">
set { allowed-nickchars { chinese-simp; chinese-trad; }; };</font></div>
<p><font size="+2"><b><a name="feature_cgiirc">3.17 - CGI:IRC Unterstützung</a></b></font></p><div class="desc">
UnrealIRCD unterstützt eine CGI:IRC Host Manipulation. Das bedeutet: Man kann
bestimmte CGI:IRC Gateways als &quot;trusted&quot; (&quot;vertraut&quot;)
festlegen, wodurch der IRCd veranlasst wird, statt Host/IP des CGI:IRC Gatewäys
überall im IRC die reale Host/IP des Users anzuzeigen.
<p>Nähere Informationen, wie dies konfiguriert wird, stehen im <a href="#cgiirc">cgiirc
Block</a>&nbsp;</div>
<p><font size="+2"><b><a name="feature_timesync">3.18 - Zeitsynchronisation</a></b></font></p>
<div class="desc">
<p>Es ist für die IRC Server sehr wichtig, immer die korrekte Zeit
eingestellt zu haben. Ohne korrekte - insbesondere unterschiedliche Zeit
zwischen Servern - können Channel desynchronisieren (auf verschiedenen
Servern wird etwas anderes im gleichen Channel angezeigt), ahnungslose User
grundlos gekillt werden, Channels gar nicht oder falsch in der /List Anzeige
eingetragen sein. Kurzum: es entstehen sehr große Probleme.´</p>
<p>UnrealIRCd hat eine eine Unterstützung zur Zeitsybchronisation integriert.
Obwohl sie nicht optimal ist (die Zeiten können weiterhin um wenige Sekunden
differieren), sollten damit die meisten Zeitunterschiede beseitigt werden.
Soweit möglich ist es weiterhin empfehlenswert, eine Zeitsynchronisations
Software wie 'ntpd' auf&nbsp; *NIX Systemen oder den Zeit Synchonisations
Service von Windosws laufen zu haben. In diesem Fall kann man die Unreal Zeitsynchronisation
abschalten. (mehr dazu später)</p>
<p>Per Default versucht UnrealIRCd beim Start einen Versuch der
Zeitsynchronisation. Es werden hierzu einige Anforderungen an Zeitserver
gesendet und sobald die erste (schnellste) Antwort empfangen wird die interne
IRCD Uhr (NICHT die Systemuhr) danach eingestellt. Wenn aus irgendwelchen
Gründen nicht binnen 3 Sekunden eine Zeitabfrage beantwortet wird, startet
der IRCD ohne Zeitsynchronisation (sollte nur selten passieren).</p>
<p>Zeitsynchronisation wird im <b>set::timesynch</b> Block konfiguriert (oder
abgeschaltet). Siehe in der <a href="#setblock">Set-Block Beschreibung</a>
für weitere Informationen.</p>
</div>
<p><font size="+2"><b><a name="feature_other">3.18 - Andere Features</a></b></font></p><div class="desc">
<p><font size="+2"><b><a name="feature_other">3.17 - Andere Features</a></b></font></p><div class="desc">
<p>UnrealIRCd hat eine Reihe weiterer Features, die hier nicht alle einzeln
aufgeführt sind. Man wird sie während der Konfiguration selbst herausfinden ;)</p></div>
@@ -1159,11 +1085,11 @@ aufgef
der unrealircd.conf</a></b></font>
<a name="configuringyourunrealircdconf">&nbsp;</a></p><div class="desc">
<p>Beim ersten Mal wird das Erstellen einer guten unrealircd.conf Datei eine
gewisse Zeit in Anspruch nehmen - je nach Vorerfahrung etwa 15 - 60 Minuten.
Eine <u>gute</u> unrealircd.conf zu erstellen, wird bedeutend länger dauern.
Man sollte nicht hetzen, um den IRCd rasch gestartet zu bekommen, sondern lieber
Schritt für Schritt vorangehen.&nbsp; Im Falle auftretender Probleme zuerst die Syntax
überprüfen, diese Anleitung und auch die <a href="#faq"> FAQ</a> bevor man nach Hilfe fragt oder
gewisse Zeit in Anspruch nehmen - je nach Vorerfahrung etwa 10 - 60 Minuten. Man
kann versuchen, so rasch wie möglich den ircd zu starten und später zu
verfeinern oder man kann die Haupt Abschnitte Schritt für Schritt erlernen (was
der empfohlene Weg ist ;P). Im Falle auftretender Probleme zuerst die Syntax
überprüfen, diese Anleitung und auch die FAQ bevor man nach Hilfe fragt oder
einen Bug meldet.</p></div>
<p><b><font size="+2"><a name="configurationfileexplained">4.1 Erklärung der
Konfigurationsdatei<br>
@@ -1196,7 +1122,7 @@ werden oder in mehreren Zeilen. Normalerweise wird das oben angegebene Format
benutzt, welches leicht zu lesen ist und auch in der mitgelieferten
unrealircd.conf benutzt wird. </p>
<p>Achtung: Die Konfigurationsdatei ist derzeit &quot;case sensitive&quot;,
daher ist &quot;<i>BLOCK-NAME</i>&quot; nicht dasselbe wie &quot;<i>block-name</i>&quot;. Es
daher ist &quot;BLOCK-NAME&quot; nicht dasselbe wie &quot;block-name&quot;. Es
gibt eine spezielle Notation wie Einträge in der Konfigurationsdatei als
Beschreibung angegeben werden. Spricht man z.B. über &quot;&lt;directive-name&gt;&quot;
im obigen Beispiel, so wird angegeben &quot;&lt;block-name&gt;::&lt;block-directive&gt;&quot;
@@ -1214,10 +1140,10 @@ einem Unterblock sein, der keinen Namen hat.</p>
&nbsp;&nbsp;&nbsp; über mehrere<br>
&nbsp;&nbsp;&nbsp;&nbsp;Zeilen */<br>
</p>
<p>Nachdem nun klar ist, wie das funktioniert, sollte man die <i>doc/example.conf</i>
in das UnrealIRCd Verzeichnis kopieren (z.B.: /home/user/Unreal3.2) und in <i>unrealircd.conf</i>
umbenennen. (Oder man erstellt eine unrealircd.conf und kopiert sich die
entsprechenden Blöcke und editieret sie). Es ist
<p>Es sollte nun klar sein, wie das Block Format der .conf funktioniert und nun
kann begonnen werden, eine eigene unrealircd.conf zu erstellen. Hierzu kann man
auch dei Beispielsdatei oder Teile der Dokumentation verwenden und sich die
entsprechenden Blöcke in die eigene Datei kopieren und editieren. Es ist
empfehlenswert, sich Schritt für Schritt durch alle Blöcke und diese Anleitung
als Referenz durchzuarbeiten.</p>
<p></p></div>
@@ -1955,7 +1881,7 @@ in verschiedenen Dateien zu loggen.</p>
tkl</p>
</td>
<td width="484">
<p>zeichnet Infos auf über *lines (kline, zline etc), shuns und Spamfilter (setzen, löschen,
<p>zeichnet Infos auf über *lines, shuns und Spamfilter (setzen, löschen,
Ablauf)</p>
</td>
</tr>
@@ -1978,6 +1904,14 @@ Ablauf)</p>
</tr>
<tr>
<td width="113">
<p>
kline</p>
</td>
<td width="484"><p>Zeichnet Infos /kline auf</p>
</td>
</tr>
<tr>
<td width="113">
<p>
oper</p>
</td>
@@ -2022,6 +1956,7 @@ spamfilter
errors;
kills;
oper;
kline;
tkl;
};
};
@@ -2042,7 +1977,7 @@ bekannt als T:Line)</font><div class="desc">
channel &lt;channel-name&gt;;
options {
ssl;
};
}
};</pre>
<p>Mit dem TLD Block kann man eine motd (Messageoftheday), rules und channels für
User basierend auf deren Host festlegen. Das ist nützlich, falls man
@@ -2123,7 +2058,7 @@ bekannt als Z:Line)</font><div class="desc">
};</pre>
<p>Der Ban IP Block verhindert das Verbinden von bestimmten IP Adressen her zum
Server. Das gilt sowohl für Verbindungsversuche von Usern als auch von Servern.<br>
<b>ban::mask</b> ist eine IP, die Wildcards enthalten kann.<br>
<b>ban::mask</b> ist eine IP, die Wildcards enthalten kann<br>
<b>ban::reason</b> ist der Grund, warum der Bann eingetragen wurde.<br>
Da dieser Bann auch Server betreffen kann, sollte man beim Eintrag von IP
Adressen sehr vorsichtig sein.</p>
@@ -2196,7 +2131,7 @@ Maske kann Wildcards enthalten.<br>
<b>ban::reason</b> legt den Grund fest, der dem User angezeigt wird.<br>
<b>ban::action</b> kann ebenfalls festgelegt werden. Dabei ist der Default auf
&quot;kill&quot;. <i>tempshun</i> setzt ein shun auf die Verbindung des Users
und arbeitet effektiv gegen Zombies und/oder Bots mit dynamischer IP, weil sie
und arbeitet effektiv gegen zombies und/oder Bots mit dynamischer IP, weil sie
unschuldige User nicht beeinträchtigen. <i>shun/kline/zline/gzline</i> setzen
einen Bann auf die IP (*@IPADDR). Die Dauer dieser Banns kann mit 'set::ban-version-tkl-time'
konfiguriert werden und beträgt per Default 1 Tag.</p>
@@ -2253,9 +2188,6 @@ angegeben, welcher Bann Typ ausgenommen werden soll. G
gline, gzline, qline, gqline und shun, für Ausnahmen von Glines, Global Zlines,
Qlines, Global Qlines und Shuns. Wenn das {} Format benutzt wird, können
unterschiedliche Typen angegeben werden.</p>
<p>Anm. des Übersetzers: Die Ausnahmen funktionieren wirklich nur bei gebanntem
<b>breiteren </b>Host (123.123.* oder *@url). Man kann damit z.B. nicht einen
versehentlichen Bann auf Localhost verhindern.</p>
<p>Beispiel:
<pre>except tkl {
mask myident@my.isp.com;
@@ -2341,7 +2273,7 @@ angegebenen abgelehnt.<br>
haben oder nicht haben darf. Die Flags müssen direkt nacheinander ohne
Zwischenräume angegeben sein. Wird einem Zeichen ein &quot;!&quot;
vorangestellt, darf der Server dieses Flag nicht haben, steht kein &quot;!&quot;
davor, muss der Server dieses Flag haben, um vom Linken ausgeschlossen zu
davor, so muss der Server dieses Flag haben, um vom Linken ausgeschlossen zu
sein.</p>
</div>
<p><font class="block_section"><a name="denylinkblock">4.24 - </a> </font><a name="denylinkblock"><font class="block_name">Deny Link Block</font>
@@ -2358,7 +2290,7 @@ bekannt als D/d:Line)</font><div class="desc">
Linken ausschliessen kann.<br>
<b>deny::mask</b> definiert eine Wildcard Maske auf den Servernamen, für den
die Regel gelten soll.<br>
<b>deny::rule</b> ist ein sehr komplexer Ausdruck. Ein rule Ausdruck erlaubt
<b>deny::rule</b> ist ein sehr komplexer Ausdruck. Ein crule Ausdruck erlaubt
es, den Link sehr detailliert zu steuern und ist aufgebaut wie eine Programm
Anweisung. Vier Operatoren werden unterstützt:<br>
&nbsp;&nbsp;&nbsp; connected(&lt;servermask&gt;) ergibt 'wahr', wenn ein Server
@@ -2507,7 +2439,7 @@ im Oper Block bei &quot;oper::svhost&quot;.</p>
</a>
<font class="block_optional">OPTIONAL</font> <font class="block_old">(Früher
bekannt als badwords.*.conf)</font>
</p><div class="desc" style="width: 1195; height: 374">
</p><div class="desc">
<p>Syntax:
<pre>badword &lt;type&gt; {
word &lt;text-to-match&gt;;
@@ -2515,15 +2447,14 @@ bekannt als badwords.*.conf)</font>
action &lt;replace|block&gt;;
};</pre>
<p>Mit dem Badword Block kann die Liste für User- und Channelmodus +G
bearbeitet werden, um bestimmte &quot;badwords&quot; zu behandeln. <b>badword::</b>
legt den Typ fest, wobei hier gültige Werte sind: 'channel', 'message' und 'quit'.
'channel'
gilt für Channel Modus +G Liste, 'message' gilt für User Modus +G Liste, und 'quit'
bearbeitet werden, um bestimmte &quot;badwords&quot; zu beahandeln. <b>badword::</b>
legt den Typ fest, wobei gültige Werte hier sind: channel, message und quit. channel
gilt für Channel Modus +G list, message gilt für User Modus +G list, und quit
gilt für die quit Meldung. <b> badword::word</b> kann ein einfaches Wort sein
oder ein Ausdruck, nach dem gesucht werden soll. <b>badword::replace</b> ist ein
Ersetzungstext, der anstelle des gefundenen Badwords angezeigt wird. Wird hier
nichts eingetragen, so wird ein gefundenes Badword durch&nbsp; &lt;censored&gt;
ersezt. Bei <b> badword::action</b> wird angegeben, was im Falle eines
erstezt. Bei <b> badword::action</b> wird angegeben, was im Falle eines
gefundenen Badwords geschehen soll. Wird hier das Wort &quot;replace&quot;
eingetragen, dann wird das Badword ersetzt. Falls hier &quot;block&quot;
angegeben wird, wird die gesamte Nachricht gar nicht erst angezeigt. Falls
@@ -2625,23 +2556,19 @@ wie bei &quot;password-connect&quot;.
</p>
<p><b>hub oder leaf</b><br>
Zu einem hub sind mehrere Server verbunden, ein leaf hat immer nur eine
Verbindung. Ein Server ist solange ein leaf, wie es keine hub Anweisung gibt.
Ebenso ist er ein leaf, wenn in der Anweisung lediglich * definiert ist oder die
leaf Tiefe (Anzahl der hops) 1 ist.
Verbindung. Ein Server ist entweder ein hub oder ein leaf - die beiden Optionen
können nicht kombiniert werden.
</p>
<p><b>hub</b> (optional)<br>
Der Wert ist eine Maske, auf welche Server dieser hub connecten darf (z.B.: *.my.net).
</p>
<p><b>leaf</b> (optional)<br>
Dieser Wert gibt an, zu welchen Servern dieser Hub <b>nicht</b> verbindet. Hier
einen * anzugeben ist das selbe, wie keine hub Anweisung zu haben.
Der Wert ist eine Maske, dass dieser Server wie ein leaf in Richtung zum eigenen
Server fungiert.
</p>
<p><b>leaf-depth</b> (optional)<br>
Dieser Wert gibt die&nbsp; Tiefe (Anzahl der hops)an, die dieser Server darunter haben darf.
Beispielsweise bedeutet 1, dass der Server keine Links hat (ist ein leaf), 2
bedeutet, es kann zu Servern gelinkt werden, aber diese können zu keinem
anderen linken (dieser Hub kann also nur zu leafs linken). Ein Wert von 0
bedeutet, dass es kein Limit gibt und das ist auch Default.
Falls dies angegeben ist, sollte auch &quot;leaf&quot; angegeben sein. Angegeben
wird die Tiefe (Anzahl der hops) die dieser Server darunter haben darf.
</p>
<p><b>class</b><br>
Die Klasse, in die der Server kommt, oft ist eine eigene Klasse für Server
@@ -2671,8 +2598,7 @@ nicht ben
cache speichern, wird bei oft wechselndem Host benutzt (wie dyndns.org)</td></tr>
<tr><td><b>nohostcheck</b></td><td> den entfernten Host nicht überprüfen (link::hostname),
wird bei oft wechselndem Host benutzt (wie dyndns.org)</td></tr>
<tr><td><b>quarantine</b></td><td> Opers auf diesem Server können keine GLOBAL
Oper Privilegien erhalten (sie werden gekilled), dient zu Test Links etc.</td></tr>
<tr><td><b>quarantine</b></td><td> Opers auf diesem Server behalten locop Status bei</td></tr>
</table>
<p>Beispiel:</p>
<pre>link hub.mynet.com {
@@ -2700,7 +2626,6 @@ nicht vorhanden)</font>
<pre>alias &lt;name&gt; {
target &lt;nick-to-forward-to&gt;;
type &lt;type-of-alias&gt;;
spamfilter &lt;yes|no|&gt;
};</pre>
<p>(Hinweis: siehe auch <a href="#includedirective">hier</a> , welche Standard
Alias Dateien bei UnrealIRCd mitgeliefert werden.)</p>
@@ -2712,32 +2637,20 @@ der Nickname, an den weitergeleitet wird. Wenn &quot;alias::&quot; identisch mit
dem Nick ist, an den weitergeleitet wird, kann &quot;alias::target&quot;
weggelassen werden. <b> alias::type</b> gibt den Typ des Alias an, gültige
Typen sind hier &quot;services&quot; (der User ist auf dem Services Server),
&quot;stats&quot; (der User ist auf dem Stats Server) &quot;normal&quot; (der
User ist normaler User auf irgendeinem Server) und &quot;channel&quot; (das Ziel
ist ein Channel Name). Wenn <b>alias::spamfilter</b> (optional) auf 'yes'
eingestellt ist, werden auch Spamfilter geprüft (Default ist 'no'). Der &quot;alias block&quot; hat
auch einen weiteren nachfolgend erklärten Zweck.</p>
&quot;stats&quot; (der User ist auf dem Stats Server), und &quot;normal&quot; (der
User ist normaler User auf irgendeinem Server). Der &quot;alias block&quot; hat
auch einen weiteren Zweck, der nachfolgend erklärt ist.</p>
<p>Syntax [Befehl alias]:
<pre>alias &lt;name&gt; {
</pre>
<pre> /* Für Aliase, die an User/Channels gesendet werden */
format &lt;regex-expression&gt; {
target &lt;nick-to-forward-to&gt;;
type &lt;type-of-alias&gt;;
parameters &lt;parameter-string&gt;;
};
/* For 'echte Aliase' */
format &lt;regex-expression&gt; {
command &lt;command&gt;;
type real;
parameters &lt;parameter-string&gt;;
};
/* Etc... You can have as many format blocks as you wish.. */</pre>
<pre> format &lt;regex-expression&gt; {
...
};
type command;
spamfilter &lt;yes|no&gt;
};</pre>
<p>Wird der &quot;alias Block&quot; in diesem Format benutzt, ermöglicht er
eine breitere Anwendungsweise. Beispielsweise kann man einen Alias wie /identify
@@ -2747,19 +2660,15 @@ einen regul
Befehl gesandt wurde. Es können mehrere &quot;alias::format&quot; angegeben
werden, um unterschiedliche Dinge in Abhängigkeit vom gesandten Text
durchführen zu lassen. <b>alias::format::target</b> ist das Ziel (der Name), an den der
Alias weitergeleitet wird, bei &quot;realen Aliasen&quot; wird allerdings <b>alias::format::command</b>
benutzt. <b> alias::format::type</b> definiert den Typ des
Alias, zu dem die Nachricht geleitet wird. Neben den zuvor erwähnten Typen in
der Syntax bein Standard Alias, kann hier auch der Typ &quot;Real&quot; für
reale Aliase angegeben werden. <b>alias::format::parameters</b>
Alias weitergeleitet wird. <b> alias::format::type</b> definiert den Typ des
Alias, zu dem die Nachricht geleitet wird. <b> alias::format::parameters</b>
ist, was als Parameter an den Alias geschickt wird. Um Parameter für einen
Befehl an den Alias anzugeben, wird ein &quot;%&quot; gefolgt von einer Nummer
angegeben. So ist z.B. %1 der erste Parameter, %2 der zweite Parameter usw.&nbsp;
Man kann auch festlegen, dass ab einem Parameter alle bis zum Ende gelten
sollen, dann gibt man z.B. an:&nbsp; %1- (das Minuszeichen bedeutet: &quot;alle
weiteren&quot;) Zusätzlich kann man %n angeben, was durch den Nicknamen des
Users ersetzt wird, der den Befehl ausgeführt hat.&nbsp;</p>
<p> Um Beispiele zum Alias Block
Users ersetzt wird, der den befehl ausgeführt hat. Um Beispiele zum Alias Block
zu sehen, schaue man in doc/example.conf.</p>
<p>&nbsp;</p>
</div>
@@ -2849,66 +2758,7 @@ spamfilter {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reason &quot;Kein Spam erlaubt&quot;<br>
};<br>
</font></div>
<p><font class="block_section"><a name="cgiirc">4.36 - </a></font><a name="cgiirc"><font class="block_name">Cgiirc
Block</font></a> <font class="block_optional">OPTIONAL</font></p>
<div class="desc">
<p>Im Cgiirc Block können Host Manipulationen für vertraute CGI:IRC Gateways
konfiguriert werden (<a href="#feature_cgiirc">weitere Informationen</a>).</p>
<p>Syntax:<br>
</p>
<pre>cgiirc {
type &lt;webirc|old&gt;;
username &lt;mask&gt;; /* optional */
hostname &lt;mask&gt;;
password &lt;password&gt;; /* only for type webirc */
};</pre>
<p>&nbsp;</p>
<p><b>type</b> ist entweder 'webirc' oder 'old'.<br>
<b>username</b> wird auf die Ident geprüft (wenn angegeben). Falls nicht
definiert, wird '*' angenommen.<br>
<b>hostname</b> ist die Hostmaske, auf die geprüft wird.<br>
<b>password</b> ist das webirc Passwort, wird nur beim Typ 'webirc' benutzt.<br>
</p>
<p><b>Konfiguration mit der 'webirc' Methode (empfohlene Methode)</b><br>
In der CGI:IRC Konfigurationsdatei (cgiirc.conf) wird für &quot;webirc_password&quot;
ein gutes Passwort festgelegt.<br>
Danach wird in der unrealircd.conf ein cgiirc block eingetragen, um diesen
Host mit diesem Passwort zu erlauben.<br>
Dann wird für '<b>set cgiirc::type'</b>&nbsp; &quot;webirc&quot; eingetragen.<br>
<br>
Beispiel:<br>
In die CGI:IRC Konfigurationsdatei (cgiirc.conf) wird eingetragen:</p>
<pre>webirc_password = LpT4xqPI5</pre>
Danach wird die unrealircd.conf um einen Cgiirc Block erweitert:
<pre>cgiirc {
type webirc;
hostname &quot;1.2.3.4&quot;;
password &quot;LpT4xqPI5&quot;;
};</pre>
<p>&nbsp;</p>
<p><b>Konfiguration mit Methode 'old'</b><br>
ACHTUNG: Dies ist nicht die empfohlene Methode, da sie zwei Nachteile hat:
Diese Methode sendet den IP/Host, der zu verändern ist, als ein Server
Passwort, was bedeutet,&nbsp; als&nbsp; CGI:IRC User kein Server Passwort
angeben kann. Außerdem ist die Zugriffskontrolle nur IP-basiert und erfordert
kein Extra Passwort, wie die 'webirc' Methode. Kurz gesagt sollten Sie nicht
diese Methode nur verwenden, wenn es einen triftigen Grund dazu gibt.<br>
<br>
In der CGI:IRC Konfigurationsdatei (cgiirc.conf) wird 'realhost_as_password'
auf 1 gesetzt.<br>
Danach wird die unrealircd.conf um einen Cgiirc Block erweitert, um diesen
Host zu erlauben.<br>
<br>
Beispiel:<br>
In die CGI:IRC Konfigurationsdatei (cgiirc.conf) wird eingetragen:</p>
<pre>realhost_as_password = 1</pre>
Danach wird die unrealircd.conf um einen Cgiirc Block erweitert:
<pre>cgiirc {
type old;
hostname &quot;1.2.3.4&quot;;
};</pre>
</div>
<p><font class="block_section"><a name="setblock">4.37 - </a> </font><a name="setblock"><font class="block_name">Set Block</font>
<p><font class="block_section"><a name="setblock">4.36 - </a> </font><a name="setblock"><font class="block_name">Set Block</font>
</a> <font class="block_required">ERFORDERLICH</font> <font class="block_old">(Früher
bekannt als unrealircd.conf/networks file)</font>
</p><div class="desc">
@@ -2985,10 +2835,6 @@ eingeschr
Beispielsweise kann man&nbsp; +G in 'modes-on-connect' setzen und G in 'restrict-usermodes',
wodurch erreicht wird, dass sämtliche User&nbsp; +G erhalten, aber kein -G
anwenden können.</p>
<p><font class="set">set::level-on-join &lt;op|none&gt;</font><br>
Die Modus, der einem User beim ersten joinen eines Channels gegeben wird. Das
ist entweder 'op' (Channel Operator, Default) oder 'none', wenn kein Level
gegeben werden soll. Default ist Op.</p>
<p><font class="set">set::restrict-channelmodes &lt;modes&gt;</font><br>
Die Channel-Modi, die User wählen können werden auf die hier angegebenen Modi
eingeschränkt. (kein + oder - angeben!).<br>
@@ -3037,17 +2883,6 @@ bel
angezeigt werden sollen. Ohne Eintrag hier gibt es kein Limit.</p>
<p><font class="set">set::silence-limit &lt;limit&gt;;<br>
</font>Stellt den Maximalwert der anzeigbaren SILENCE Einträge ein. Ohne Eintrag ist hier ein Limit von 15 voreingestellt.</p>
<b><font face="Helvetica,Arial" size="-1">set::maxbans &lt;limit&gt;;<br>
</font></b>Stellt den Maximalwert der je Channel erlaubten Banns (+b) ein. Der
Defaultwert beträgt 60. Wenn dieser Wert geändert wird, sollte man sich
versichern, dass auch der Wert für 'maxbanlength' (siehe nächster Punkt)
sinnvoll eingestellt ist.
<p><b>set::maxbanlength &lt;limit&gt;;</b><br>
Ähnliche Funktion wie im Punkt zuvor, aber legt den Maximalwert der Zeichen
für alle Banns zusammen fest. Dadurch wird festgelegt, wie viel Speicherplatz
für alle Banns in einem Channel zusammen benutzt wird. Der Default beträgt
2048 (Bytes). Bei einem Default von 'set::maxbans 60' gestattet dies 2048:60=34
Zeichen je Bann im Durchschnitt.</p>
<p><font class="set">set::oper-only-stats &lt;stats-list&gt;;</font><br>
Definiert eine Liste von Stats-Flags, die nur von Opers benutzt werden können.
Die Flags sind ohne Trennungen (keine Kommata, keine Leerzeichen) anzugeben.
@@ -3055,7 +2890,7 @@ Wird hier nichts angegeben, k
Angabe von '*' keines. Es dürfen nur <b> kurze Operflags</b> angegeben werden.</p>
<p><b>set::oper-only-stats {&lt;stats-flag>; &lt;stats-flag&gt;;};</b><br>
Definiert eine Liste von Stats Flags, die nur von Opers benutzt werden können.
In dieser Syntax dürfen nur <b>lange Operflags</b> angegeben werden.</p>
In dieser Syntax dürfen nur <b>lange Operflags</b> angegeben wwerden.</p>
<p><font class="set">set::maxchannelsperuser &lt;amount-of-channels&gt;;</font><br>
Einstellung, in wie vielen Channels ein User gleichzeitig sein darf.</p>
<p><b>set::maxdccallow &lt;amount-of-entries&gt;;</b><br>
@@ -3066,7 +2901,7 @@ Zeichens
<p><font class="set">set::channel-command-prefix &lt;command-prefixes&gt;;<br>
</font>Stellt das Vorzeichen für Services in &quot;channel Befehlen&quot; ein.
Nachrichten, die mit einem dieser Zeichen beginnen, werden auch noch gesendet,
wenn der Client +d ist. Die Voreinstellung lautet &quot;`!.&quot;.</p>
wenn der Client +d ist. Die Voreinstellung lautet "`".</p>
<p><font class="set">set::allow-userhost-change [never|always|not-on-channels|force-rejoin]</font><br>
Einstellung, was passiert, wenn sich der user@host ändert (+x/-x/chghost/chgident/setident/vhost/etc).<br>
<i>never</i> schaltet sämtliche Befehle ab, <i>always</i> gestattet so
@@ -3114,13 +2949,12 @@ Oper Zugriff geloggt wurde.</p>
Ein Wert, der angibt, innerhalb welcher Zeit ein DNS Server zu antworten hat, bevor
&quot;timeout&quot; gemeldet wird. Der Zeitwert ist ein numerischer String, in
dem 'd' Tage bedeutet, 'h' Sunden, 'm' Minuten und 's' Sekunden. Beispiel: '1d2h3m'
bedeutet 1 Tag, 2 Stunden, 3 Minuten. (NICHT IMPLEMENTIERT)</p>
bedeutet 1 Tag, 2 Stunden, 3 Minuten.</p>
<p><font class="set">set::dns::retries &lt;number-of-retries&gt;;</font><br>
Ein Zahlenwert, durch den festgelegt wird, wie oft versucht werden soll, die DNS
aufzulösen, bevor ein Fehler gemeldet wird. (NICHT IMPLEMENTIERT)</p>
aufzulösen, bevor ein Fehler gemeldet wird.</p>
<p><font class="set">set::dns::nameserver &lt;name-of-dns-server&gt;;</font><br>
Gibt den Hostnamen des Servers an, der zur DNS Namensauflösungen dient. (NICHT
IMPLEMENTIERT)</p>
Gibt den Hostnamen des Servers an, der zur DNS Namensauflösungen dient.</p>
<p><font class="set">set::network-name &lt;name-of-network&gt;;</font><br>
Gibt den Namen des Netzwerks an, in dem der Server läuft (also den Namen des
irc Netzes!) Dieser Eintrag sollte auf allen Servern im Netzwerk absolut
@@ -3185,17 +3019,6 @@ Gibt den Dateinamen an, wo das SSL Zertifikat des Servers liegt.</p>
Gibt den Dateinamen an, wo der private SSL Key des Servers liegt.</p>
<p><font class="set">set::ssl::trusted-ca-file &lt;filename&gt;;</font><br>
Gibt den Dateinamen der Zertifikate der vertrauten CAs an.</p>
<p><font class="set">set::ssl::server-cipher-list &lt;cipherlist&gt;;</font><br>
Legt fest, welche Verschlüsselungen erlaubt sind, was per Default für OpenSSL
eingestellt ist. Siehe <a href="http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT">http://www.openssl.org/docs/apps/ciphers.html</a>
wie eine Liste von Verschlüsselungen&nbsp; erstellt wird (englische Seite,
nicht übersetzt!).</p>
<p><font class="set">set::ssl::renegotiate-bytes &lt;value&gt;;</font><br>
Legt fest, wieviele Bytes bei einer SSL Session neu ausgehandelt werden sollen (z.B.:
20m für 20 Megabyte).</p>
<p><font class="set">set::ssl::renegotiate-timeout &lt;timevalue&gt;;</font><br>
Legt fest, nach welcher Zeit eine SSL Session neu ausgehandelt werden soll (z.B.:
1h für 1 Stunde).</p>
<p><font class="set">set::ssl::options::fail-if-no-clientcert;</font><br>
Stellt ein, dass Clients ohne Zertifikat nicht connecten können.</p>
<p><font class="set">set::ssl::options::no-self-signed;</font><br>
@@ -3203,9 +3026,6 @@ Verbietet Verbindungen von Usern mit selbst erstellten Zertifikaten.</p>
<p><font class="set">set::ssl::options::verify-certificate;</font><br>
Stellt ein, dass Unreal&nbsp; SSL Zertifikate auf Gültigkeit überprüft, bevor
eine Verbindung akzeptiert wird.</p>
<p><font class="set">set::ssl::options::no-starttls;</font><br>
Deaktiviert STARTTLS. STARTTLS ermöglicht es Clients, über reguläere (nicht
SSL) Ports zu verbinden.</p>
<p><font class="set">set::throttle::period &lt;timevalue&gt;</font><br>
Wie lange muss ein User zum erneuten Connecten warten, wenn er häufiger, als
unter 'set::throttle::connections' eingestellt, verbunden war.</p>
@@ -3261,93 +3081,15 @@ joinen.</p>
<b>set::spamfilter::except &lt;target(s)&gt;</b><br>
Diese Ziele werden vom Spamfilter ausgenommen (es wird also keine Aktion
durchgeführt). Es sind einzelne Ziele oder eine durch Kommata getrennte Liste
möglich. Beispiel: except &quot;#help,#spamreport&quot;</p>
<p><font class="set">set::spamfilter::slowdetect-warn &lt;value&gt;</font><br>
Wenn ein Spamfilter zur Ausführung länger als der hier festgelegte Wert dauert
(in Millisekunden,&nbsp; 1000ms = 1 Sekunde), wird eine Warnung per Notice an
alle Opers versandt. (Default: 250). Siehe auch <a href="#feature_spamfilter_slow">Erkennung
langsamer Spamfilter</a>.</p>
<p><font class="set">set::spamfilter::slowdetect-fatal &lt;value&gt;</font><br>
Wenn ein Spamfilter zur Ausführung länger als der hier festgelegte Wert dauert
(in Millisekunden,&nbsp; 1000ms = 1 Sekunde), wird er gelöscht50o). Siehe auch <a href="#feature_spamfilter_slow">Erkennung
langsamer Spamfilter</a>.</p>
<p><b>set::check-target-nick-bans &lt;yes|no&gt;</b><br>
Wann immer ein User seinen Nick ändert, wird überprüft, ob der NEUE Nick zu
bannen wäre. Ist das der Fall, wird der Nickwechsel nicht erlaubt. Default ist
'yes'.</p>
<p><b>set::timesynch::enabled&lt;yes|no&gt;</b><br>
Aktiviert oder deaktiviert die Zeitsynchronisation beim Start des IRCd. Default
ist 'yes'.</p>
<p><font class="set">set::timesynch::server &lt;IP&gt;</font><br>
Server mit dem die Zeit synchronisiert werden soll. Hier können bis zu 4 IP's
angegeben werden, die durch Komma zu trennen sind. Die Server müssen das NTP Protokoll
Version 4 unterstützen. Default ist die Benutzung von 3 Zeitservern (US, EU,
AU). Die Anforderungen an diese Server erfolgen zeitgleich, die schnellste
Antwort gewinnt.</p>
<p><font class="set">set::timesynch::timeout &lt;time&gt;</font><br>
Maximale Zeit, die auf eine Zeitserverantwort gewartet wird. Möglich ist ein
Wert von 1 bis 5, mehr ist nicht möglich, weil das Ergebnis sonst zu ungenau
wäre. Default Einstellung ist hier 3 und normalerweise sollte es keinen Grund
geben, dies zu ändern.
<p><font class="set">set::pingpong-warning&lt;yes|no&gt;</font><br>
Die Versuche von Name-Servern einen falschen Hostnamen zurückzuliefern, werden
Spoofing (Reinlegen) genannt. Um sich davor zu schützen, kann der Resolver so
konfiguriert werden, daß er überprüft, ob die gegebene IP-Adresse auch
tatsächlich zum erhaltenen Hostnamen gehört. Wenn dies nicht der Fall ist,
wird der Name verworfen und ein Fehler zurückgeliefert. Dieses Verhalten wird
mit nospoof on eingestellt. Wenn NOSPOOF aktiviert ist (üblicherweise in
Windows), wird aene Warnung an jeden User geschickt, &nbsp;'/quote pong ..' zu
benutzen, wenn es beim Verbinden Probleme gibt.&nbsp; Voreingestellt ist 'no'.</p>
<p><font class="set">set::watch-away-notification &lt;yes|no&gt;</font><br>
Ermöglicht eine AWAY Meldung in WATCH. Der Default is yes.</p>
</div>
<p><font class="block_section"><a name="filesblock">4.38 - Files Block</a> </font><font class="block_optional" size="3">OPTIONAL</font>
</p>
<p>Es ist nicht nötig, für die Default Speicherorte der MOTD und Rules Dateien
einen <a href="#tldblock">TLD block</a> zu definieren. Der Files Block steuert
die Default Einstellungen für diese Dateien und zusätzlich für die pidfile und
irc.tune file. Für alles, was hier nicht angegeben ist, wird der Defaultwert
genommen, wie er in <a href="#addtlfiles">Additional Files</a> steht.</p>
<p>Relative Pfadnamen werden als relativ zum unrealIRCD Startverzeichnis
interpretiert, in dem normalerweise auch die <tt>unrealircd.conf</tt> steht.
Dieser Block kan dazu benutzt werden, mehr als einen IRCd im gleichen
Verzeichnis laufen zu lassen. In diesem Fall sollten mindestens verschiedene
pidfiles und tunefiles definiert werden - eines für jeden Server.</p>
<p>Syntax:<br>
</p>
<pre>files {
motd &lt;motd file&gt;;
shortmotd &lt;short motd file&gt;;
opermotd &lt;oper motd file&gt;;
svsmotd &lt;services motd file&gt;;
botmotd &lt;bot motd file&gt;;
rules &lt;rules file&gt;;
tunefile &lt;tune file&gt;;
pidfile &lt;pid file&gt;;
};
</pre>
<p>&nbsp;</p>
<p>Beispiel:<br>
</p>
<pre>files {
motd /etc/motd;
pidfile /var/lib/run/unrealircd.pid;
};
</pre>
<p>&nbsp;
</p>
möglich. Beispiel: except "#help,#spamreport"</p> </div>
<p><b><font size="+2"><a name="addtlfiles">5 &#8211; Additional Files</a></font></b></p><div class="desc">
Zusätzlich zu den Konfigurationsdateien hat Unreal einige weitere Dateien,
wie MOTD, OperMOTD, BotMOTD, und Rules. In der nachfolgenden Liste stehen die
Namen dieser dateien und ihr Verwendungszweck.<br>
Zu beachten ist, dass die motd Dateien (alle Typen) und die rules Dateien auch
in einem speziellen <a href="#tldblock"> tld Block </a>oder einem <a href="#filesblock">files
Block</a> angegeben sein können. Dies sind nur die
in einem speziellen tld Block angegeben sein können. Dies sind nur die
Dateien, die per Default benutzt werden (und für Anforderungen von
MOTD/RULES).<br>
MOTD/RULES).
<table width="83%" border="1">
<tr>
<td>ircd.motd</td><td>Wird angezeigt, wenn der /motd Befehl ausgeführt wird
@@ -3557,8 +3299,7 @@ pidfiles und tunefiles definiert werden - eines f
</tr>
<tr>
<td height="19"><div align="center">d</div></td>
<td height="19">User kann keine Channel PRIVMSGs empfangen (mit der Ausnahme
von Text, dem bestimmte Zeichen vorangestellt sind. Siehe hierzu: 'set::channel-command-prefix'.</td>
<td height="19">User kann keine Channel PRIVMSGs empfangen</td>
</tr>
<tr>
<td height="19"><div align="center">G</div></td>
@@ -3931,13 +3672,13 @@ Befehlsliste</a></b></font></p><div class="desc">
</tr>
<tr>
<td height="33" width="267">globops &lt;message&gt;</td>
<td width="486" height="33">Schickt eine Nachricht an alle globalen IRCops</td>
<td width="486" height="33">Schickt eine Nachricht an alle IRCops</td>
<td width="93" height="33">IRCop</td>
</tr>
<tr>
<td height="33" width="267">chatops &lt;message&gt;</td>
<td width="486" height="33">Schickt eine Nachricht an alle IRCops (lokal und
global)</td>
<td width="486" height="33">Schickt eine Nachricht an alle IRCops mit dem
Usermode +c</td>
<td width="93" height="33">IRCop</td>
</tr>
<tr>
@@ -4436,19 +4177,12 @@ Datei</a></b></font></p>
erhöht den Aufwand für einen Angriff oder hack.</div>
<p><font size="+2"><b><a name="secantiexpolit">8.8 Schutz gegen Expolits</a></b></font></p>
<div class="desc">Es gibt Kernel Patches, die es Stack- oder Heap-basierenden
Expolits erschweren, zu arbeiten. Das ist schön, allerdings sollte man nicht nur primär
Expolits erschweren, zu arbeiten. Allerdings sollte man nicht nur primär
hierauf achten, es gibt weit größere Risiken mit Expolits, die andere
Punkte, als den Kernel angreifen.... aus verschiedenen Gründen.<br>
Eine andere Option ist es chrooting zu aktivieren (gibt es nur in *nix
Systemen), was bedeutet, dass bei einem erfolgreichen expolit der User auf auf
das UnrealIRCd Verzeichnis begrenzt ist und keinen Zugriff auf andere Dateien
hat. Dies erfordert root Rechte und Änderungen in der include/config.h (suche
nach CHROOTDIR und setze sowohl IRC_USER als auch IRC_GROUP und compiliere
neu.)
<p>
<br>
Eines allerdings sollte man tun: IMMER DIE NEUESTE VERSION BENUTZEN. Wenn man
sich in die <a href="http://lists.sourceforge.net/mailman/listinfo/unreal-notify" target="_blank"> Unreal-notify mailinglist</a> einträgt, erhält man die Ankündigung
sich in die <a href="http://mail1.sourceforge.net/mailman/listinfo/unreal-notify"> Unreal-notify mailinglist</a> einträgt, erhält man die Ankündigung
über neue Versionen (unreal-notify ist nur für Ankündigungen und man
erhält nur alle X Monate 1 Mail). Üblicherweise gibt es neue Releases, wenn
es (bedeutende) Sicherheits Fixes gibt, aber eigentlich ist es gut, in jedem
@@ -4522,14 +4256,16 @@ Datei</a></b></font></p>
Übereinstimmung mit 0 oder 1 der vorhergehenden Zeichen. Dieses
&quot;vorhergehende Zeichen&quot; ist auch der Punkt, worin sich das '?' in
einer regex von einer Wildcard unterscheidet. In Wildcards bedeutet die Angabe
von "a?c" eine Übereinstimmung mit einem "a", gefolgt von irgend einem anderen Zeichen, gefolgt von einem "c." In Regex hat dies eine andere
von "a?c" eine Übereinstimmung mit einem "a", gefolgt von irgend einem (oder
keinem) anderen Zeichen, gefolgt von einem "c." In Regex hat dies eine andere
Bedeutung. Es wird auf Übereinstimmung geprüft mit 0 oder einem
&quot;a&quot;, gefolgt von dem Buchstaben &quot;c&quot;.&nbsp; Damit
kann&nbsp; durch das ? angegeben werden, wie viele &quot;a&quot; vorhanden
sein dürfen. Soll das ? in einer Wildcard emuliert werden, wird der Punkt
Operator verwendet. Der Ausdruck &quot;a.c&quot; ist gleichbedeutend mit der zuvor
Operator verwendet. Der Ausdruck "a.?c" ist gleichbedeutend mit der zuvor
beschrieben Wildcard. Geprüft wird auf Übereinstimmung mit einem
&quot;a&quot;, gefolgt von irgend einem anderen Zeichen, gefolgt von einem "c."</p><p>Der nächste
&quot;a&quot;, gefolgt von irgend einem oder keinen anderen Zeichen (das ?
modifiziert den .), gefolgt von einem "c."</p><p>Der nächste
Wiederholungsoperator ist der *. Auch dieser ist wieder ähnlich zum Wildcard
Zeichen. Geprüft wird die Übereinstimmung mit 0 oder mehr der voranstehenden
Zeichen. Zu beachten ist, dass dieses &quot;vornstehende Zeichen&quot; das
+3168 -3300
View File
File diff suppressed because it is too large Load Diff
+3129 -4721
View File
File diff suppressed because it is too large Load Diff
+3248 -3871
View File
File diff suppressed because it is too large Load Diff
+156 -547
View File
File diff suppressed because it is too large Load Diff
+212 -597
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
Binary file not shown.
BIN
View File
Binary file not shown.
+45 -133
View File
@@ -56,9 +56,7 @@ help Opercmds {
" a specific command.";
" -";
" ==-------------------------oOo-------------------------==";
" ADCHAT DNS NACHAT SETIDENT";
" ADDMOTD GLINE OPER SHUN";
" ADDOMOTD GLOBOPS OPERMOTD SPAMFILTER";
" ADCHAT GLOBOPS OPERMOTD SPAMFILTER";
" CHATOPS GZLINE REHASH SQUIT";
" CHGHOST HTM RESTART TEMPSHUN";
" CHGIDENT KILL RPING TRACE";
@@ -67,6 +65,8 @@ help Opercmds {
" CONNECT LOCOPS SAPART WALLOPS";
" DCCDENY MKPASSWD SDESC ZLINE";
" DIE MODULE SETHOST";
" DNS NACHAT SETIDENT";
" GLINE OPER SHUN";
" ==-------------------------oOo-------------------------==";
};
@@ -79,11 +79,11 @@ help Svscmds {
" a specific command.";
" -";
" ==-------------------------oOo-------------------------==";
" SQLINE SVSKILL SVSNLINE SVSSILENCE";
" SVS2MODE SVSLUSERS SVSNOLAG SVSSNO";
" SVS2SNO SVSMODE SVSNOOP SVSWATCH";
" SVSFLINE SVSMOTD SVSO SWHOIS";
" SVSJOIN SVSNICK SVSPART UNSQLINE";
" SQLINE SVSKILL SVSNLINE SVSSNO";
" SVS2MODE SVSLUSERS SVSNOOP SVSWATCH";
" SVS2SNO SVSMODE SVSO SWHOIS";
" SVSFLINE SVSMOTD SVSPART UNSQLINE";
" SVSJOIN SVSNICK SVSSILENCE";
" ==-------------------------oOo-------------------------==";
};
@@ -127,7 +127,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:";
@@ -159,95 +159,41 @@ help Chmodes {
" a <nickname> = Gives Channel Admin to the user";
" q <nickname> = Gives Owner status to the user";
" -";
" A = Server/Net Admin only channel (settable by Admins)";
" b <nick!ident@host> = Bans the nick!ident@host from the channel [h]";
" c = Block messages containing mIRC color codes [o]";
" C = No CTCPs allowed in the channel [o]";
" e <nick!ident@host> = Overrides a ban for matching users [h]";
" f <floodparams> = Flood protection (for more info see /HELPOP CHMODEF) [o]";
" (For more info on extended bantypes, see /HELPOP EXTBANS)";
" G = Filters out all Bad words in messages with <censored> [o]";
" i = A user must be invited to join the channel [h]";
" I <nick!ident@host> = Overrides +i for matching users [h]";
" f <floodparams> = Flood protection (for more info see /HELPOP CHMODEF) [o]";
" 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]";
" K = /KNOCK is not allowed [o]";
" L <chan2> = Channel link (If +l is full, the next user will auto-join <chan2>) [q]";
" l <number of max users> = Channel may hold at most <number> of users [o]";
" m = Moderated channel (only +vhoaq users may speak) [h]";
" M = Must be using a registered nick (+r), or have voice access to talk [o]";
" N = No Nickname changes are permitted in the channel [o]";
" n = Users outside the channel can not send PRIVMSGs to the channel [h]";
" O = IRC Operator only channel (settable by IRCops)";
" p = Private channel [o]";
" Q = No kicks allowed [o]";
" R = Only registered (+r) users may join the channel [o]";
" r = The channel is registered (settable by services only)";
" s = Secret channel [o]";
" t = Only +hoaq may change the topic [h]";
" z = Only Clients on a Secure Connection (SSL) can join [o]";
" 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]";
" 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]";
" O = IRC Operator only channel (settable by IRCops)";
" Q = No kicks allowed [o]";
" R = Only registered (+r) users may join the channel [o]";
" S = Strips mIRC color codes [o]";
" T = No NOTICEs allowed in the channel [o]";
" t = Only +hoaq may change the topic [h]";
" u = Auditorium mode (/names and /who #channel only show channel ops) [q]";
" V = /INVITE is not allowed [o]";
" z = Only Clients on a Secure Connection (SSL) can join [o]";
" Z = All users on the channel are on a Secure connection (SSL) [server]";
" (This mode is set/unset by the server. Only if the channel is also +z)";
" u = Auditorium mode (/names and /who #channel only show channel ops) [q]";
" -";
" [h] requires at least halfop, [o] requires at least chanop, [q] requires owner";
" ==------------------------------oOo----------------------------==";
};
help ExtBans {
" These bans let you ban based on things other than the traditional nick!user@host";
" mask. They also provide support for things like ``quieting'' users (on other IRCds";
" you might do +q <hostmask>, on UnrealIRCd use +b ~q:<hostmask>).";
" -";
" These bantypes specify which actions are affected by a ban:";
" ==-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 a user matches this, he may not join the channel. ";
" ~j | join | He may perform all other activities if he is already on ";
" | | the channel, such as speaking and changing his nick. ";
"-----------------------------------------------------------------------------------";
" -";
" These bantypes introduce new criteria which can be used:";
" ==-Type--------Name---------------------------Explanation-----------------------==";
" | | If the user is in this channel then (s)he is unable to ";
" | | 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'. ";
"-----------------------------------------------------------------------------------";
" | | If a user has identified to services (usually NickServ) ";
" | | and matches this nickname, then this ban will match. ";
" | | This means this ban is really only useful for ban ";
" ~R | registered | exemptions (+e). Example: +e ~R:Nick ";
" | | Will allow Nick in the channel, regardless of other ";
" | | bans, if he identified to NickServ and is using the ";
" | | nickname Nick. ";
" ==------------------------------------------------------------------------------==";
" -";
"You may stack extended bans from the 1st group with the 2nd.";
"Example: +b ~q:~c:#lamers";
"The above would quiet all users who have joined #lamers.";
};
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";
@@ -261,7 +207,7 @@ help Chmodef {
" ==-----Type-----Name--------Default Action---Other Actions-----==";
" c CTCP +C m, M";
" j Join +i R";
" k Knock +K";
" k Knock +k";
" m Messages +m M";
" n Nickchange +N";
" t Text kick b";
@@ -806,10 +752,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";
};
@@ -913,22 +859,19 @@ help Rehash {
" Prompts the server to reread the configuration files.";
" IRC Operator only command.";
" -";
" Syntax: REHASH <servername> [flag]";
" REHASH -global [flag]";
" REHASH [flag]";
" Syntax: REHASH <servername> -<flags>";
" REHASH -<flags>";
" -";
" If servername and flag are not specified this rehashes the";
" unrealircd.conf, and re-reads all MOTD, BOTMOTD, OPERMOTD and RULES files.";
" If servername is specified, this is used to rehash the remote server.";
" If -global is specified, then all servers on the network are rehashed.";
" Only NetAdmins may specify a server name and use -global.";
" If servername and flags are not specified this rehashes the";
" unrealircd.conf , removing any temporary k:lines.";
" If servername is specified, this is used to rehash config files on servername.";
" Only NetAdmins may specify a server name.";
" -";
" The flags are used to rehash other config files, valid flags are:";
" -dns - Reinitializes and reloads the resolver";
" -motd - Rehashes all MOTD files and RULES files (including tld{})";
" -opermotd - Rehashes the OPERMOTD";
" -botmotd - Rehashes the BOTMOTD";
" -garbage - Force garbage collection";
" -motd - Only re-read all MOTD, BOTMOTD, OPERMOTD and RULES files";
" (including those in tld{} blocks)";
" -ssl - Reloads SSL certificates";
};
help Restart {
@@ -1096,7 +1039,7 @@ help Sdesc {
};
help Mkpasswd {
" This command will return a 'hash' of the string that has been specified,";
" 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'):";
@@ -1189,7 +1132,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.";
" -";
@@ -1283,11 +1226,9 @@ help Svsnline {
" Must be sent through an U:Lined server.";
" The reason must be a single parameter therefore";
" spaces are indicated by _, Unreal will internally";
" translate these to spaces.";
" translate these to spaces";
" -";
" Syntax: SVSNLINE + <reason_for_ban> :<realname> (To add a ban)";
" SVSNLINE - :<realname> (To remove a ban)";
" SVSNLINE * (To clear all bans)";
" Syntax: SVSNLINE +/- <reason_for_ban> :<realname>";
" Example: SVSNLINE + sub7_drone :*sub7*";
};
@@ -1303,18 +1244,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 {
@@ -1331,24 +1272,9 @@ help Svs2sno {
" Must be sent through an U:Lined server.";
" -";
" Syntax: SVS2SNO <nickname> <snomasks>";
" Example: SVS2SNO joe +Gc";
" Example: SVSSNO joe +Gc";
};
help Svsnolag {
" Enable 'no fake lag' for a user.";
" Must be sent through an U:Lined server.";
" -";
" Syntax: SVSNOLAG [+|-] <nickname>";
" Example: SVSNOLAG + joe";
};
help Svs2nolag {
" Enable 'no fake lag' for a user.";
" Must be sent through an U:Lined server.";
" -";
" Syntax: SVS2NOLAG [+|-] <nickname>";
" Example: SVS2NOLAG + joe";
};
help Spamfilter {
" This command adds/removes global spam filters.";
@@ -1363,7 +1289,7 @@ help Spamfilter {
" 'kill', 'tempshun' (only shun current session), 'shun',";
" 'kline', 'gline', 'zline', 'gzline', 'block' (blocks the msg),";
" 'dccblock' (unable to send any dccs), 'viruschan' (part all channels";
" and join the virus help chan), 'warn' (warn for IRC Operators).";
" and join the virus help chan).";
" [regex] this is the actual regex where we should block on";
" [tkltime] the duration of the *LINEs placed by action (use '-' to use the default";
" set::spamfilter::ban-time, this value is ignored for block/tempshun');";
@@ -1399,17 +1325,3 @@ help DccAllow {
* 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!";
};
+4
View File
@@ -5,7 +5,11 @@
#include <stdlib.h>
#include <string.h>
#ifndef _WIN32
#include "tre/regex.h"
#else
#include "win32/regex.h"
#endif
#define MAX_MATCH 1
#define MAX_WORDLEN 64
+42 -77
View File
@@ -99,24 +99,6 @@
*/
#define REMOTE_REHASH
/*
* Special remote include caching, see this Changelog item:
* - Added special caching of remote includes. When a remote include fails to
* load (for example when the webserver is down), then the most recent
* version of that remote include will be used, and the ircd will still boot
* and be able to rehash. Even though this is quite a simple feature, it
* can make a key difference when deciding to roll out remote includes on
* your network. Previously, servers would be unable to boot or rehash when
* the webserver was down, which would be a big problem (often unacceptable).
* The latest version of fetched urls are cached in the cache/ directory as
* cache/<md5 hash of url>.
* Obviously, if there's no 'latest version' and an url fails, the ircd will
* still not be able to boot. This would be the case if you added or changed
* the path of a remote include and it's trying to fetch it for the first time.
* There usually is no reason to disable this.
*/
#define REMOTEINC_SPECIALCACHE
/*
Stripbadwords patch
*/
@@ -130,8 +112,6 @@
/*
* THROTTLING
* This will only allow 1 connection per ip in set::throttle::period time
* NOTE: There's no reason to disable this (anymore) since it can be fully
* configured in the unrealircd.conf. Keep the define...
*/
#define THROTTLING
@@ -159,13 +139,6 @@
*/
#undef JOIN_INSTEAD_OF_SJOIN_ON_REMOTEJOIN
/*
* So called 'smart' banning: if this is enabled and a ban on like *!*@*h.com is present,
* then you cannot add a ban like *!*@*blah.com. In other words.. the ircd tries to be "smart".
* In general this is considered quite annoying. This was on by default until Unreal 3.2.8.
*/
#undef SOCALLEDSMARTBANNING
/*
** Freelinks garbage collector -Stskeeps
**
@@ -225,12 +198,8 @@
/*
* Full pathnames and defaults of irc system's support files. Please note that
* these are only the recommened names and paths. You must define PPATH if you
* want a pidfile written. Also, IRCDTUNE should be defined because it is needed for
* operation. All of these options are runtime-configurable (except for CPATH and LPATH)
* in the files block of unrealircd.conf. CPATH is runtime-configurable as a command-
* line argument. These used as the default values for options absent from the user's
* unrealircd.conf.
* 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.
*/
#define CPATH "unrealircd.conf" /* server configuration file */
#define MPATH "ircd.motd" /* server MOTD file */
@@ -245,32 +214,15 @@
/* 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
@@ -329,6 +281,19 @@
#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
*
@@ -346,13 +311,17 @@
#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
@@ -389,7 +358,7 @@
* 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
@@ -404,13 +373,12 @@
/*
* 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.
* The original value here was 60 (which was [hopefuly] never reached and was
* stupid anyway), changed to 2.
* DO NOT SET THIS TO ANYTHING MORE THAN 5. BETTER YET, JUST LEAVE IT AT 2!
*/
#define TIMESEC 2
@@ -419,10 +387,15 @@
* 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
@@ -456,10 +429,16 @@
/*
* Use much faster badwords replace routine (>100 times faster).
* Disabling this is not supported.
*/
#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
/*
* Forces Unreal to use compressed IPv6 addresses rather than expanding them
*/
@@ -485,16 +464,6 @@
*/
#define JOINTHROTTLE
/* Detect slow spamfilters? This requires a little more cpu time when processing
* any spamfilter (like on text/connect/..) but will save you from slowing down
* your IRCd to a near-halt (well, in most cases.. there are still cases like when
* it goes into a loop that it will still stall completely... forever..).
* This is kinda experimental, and requires getrusage.
*/
#ifndef _WIN32
#define SPAMFILTER_DETECTSLOW
#endif
/* ------------------------- END CONFIGURATION SECTION -------------------- */
#define MOTD MPATH
#define RULES RPATH
@@ -502,10 +471,6 @@
#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 */
+3 -61
View File
@@ -80,10 +80,8 @@ struct zConfiguration {
unsigned dont_resolve:1;
unsigned use_ban_version:1;
unsigned mkpasswd_for_everyone:1;
unsigned allow_insane_bans;
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;
@@ -111,27 +109,20 @@ struct zConfiguration {
#ifdef USE_SSL
char *x_server_cert_pem;
char *x_server_key_pem;
char *x_server_cipher_list;
char *trusted_ca_file;
long ssl_options;
int ssl_renegotiate_bytes;
int ssl_renegotiate_timeout;
#elif defined(_WIN32)
void *bogus1, *bogus2, *bogus3, *bogus5;
void *bogus1, *bogus2, *bogus3;
long bogus4;
int bogus6, bogus7;
#endif
enum UHAllowed userhost_allowed;
char *restrict_usermodes;
char *restrict_channelmodes;
char *restrict_extendedbans;
int new_linking_protocol;
char *channel_command_prefix;
long unknown_flood_bantime;
long unknown_flood_amount;
struct ChMode modes_on_join;
int level_on_join;
#ifdef NO_FLOOD_AWAY
unsigned char away_count;
long away_period;
@@ -154,20 +145,7 @@ struct zConfiguration {
char spamfilter_vchan_deny;
SpamExcept *spamexcept;
char *spamexcept_line;
long spamfilter_detectslow_warn;
long spamfilter_detectslow_fatal;
int maxbans;
int maxbanlength;
int timesynch_enabled;
int timesynch_timeout;
char *timesynch_server;
int pingpong_warning;
int watch_away_notification;
int uhnames;
aNetwork network;
#ifdef INET6
unsigned short default_ipv6_clone_mask;
#endif /* INET6 */
};
#ifndef DYNCONF_C
@@ -228,7 +206,6 @@ extern MODVAR aConfiguration iConf;
#define RESTRICT_USERMODES iConf.restrict_usermodes
#define RESTRICT_CHANNELMODES iConf.restrict_channelmodes
#define RESTRICT_EXTENDEDBANS iConf.restrict_extendedbans
#define NEW_LINKING_PROTOCOL iConf.new_linking_protocol
#ifdef THROTTLING
#define THROTTLING_PERIOD iConf.throttle_period
#define THROTTLING_COUNT iConf.throttle_count
@@ -237,7 +214,6 @@ extern MODVAR aConfiguration iConf;
#define UNKNOWN_FLOOD_BANTIME iConf.unknown_flood_bantime
#define UNKNOWN_FLOOD_AMOUNT iConf.unknown_flood_amount
#define MODES_ON_JOIN iConf.modes_on_join.mode
#define LEVEL_ON_JOIN iConf.level_on_join
#ifdef NO_FLOOD_AWAY
#define AWAY_PERIOD iConf.away_period
@@ -250,7 +226,6 @@ extern MODVAR aConfiguration iConf;
#define IDENT_READ_TIMEOUT iConf.ident_read_timeout
#define MKPASSWD_FOR_EVERYONE iConf.mkpasswd_for_everyone
#define ALLOW_INSANE_BANS iConf.allow_insane_bans
#define CHANCMDPFX iConf.channel_command_prefix
#define DEFAULT_BANTIME iConf.default_bantime
@@ -271,25 +246,8 @@ extern MODVAR aConfiguration iConf;
#define SPAMFILTER_VIRUSCHAN iConf.spamfilter_virus_help_channel
#define SPAMFILTER_VIRUSCHANDENY iConf.spamfilter_vchan_deny
#define SPAMFILTER_EXCEPT iConf.spamexcept_line
#define SPAMFILTER_DETECTSLOW_WARN iConf.spamfilter_detectslow_warn
#define SPAMFILTER_DETECTSLOW_FATAL iConf.spamfilter_detectslow_fatal
#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
#define WATCH_AWAY_NOTIFICATION iConf.watch_away_notification
#define UHNAMES_ENABLED iConf.uhnames
/* Used for "is present?" and duplicate checking */
/* Used for duplicate checking */
struct SetCheck {
unsigned has_show_opermotd:1;
unsigned has_hide_ulines:1;
@@ -304,11 +262,9 @@ struct SetCheck {
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;
#ifdef THROTTLING
unsigned has_throttle_period:1;
unsigned has_throttle_connections:1;
@@ -321,10 +277,6 @@ struct SetCheck {
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_watch_away_notification:1;
unsigned has_uhnames:1;
unsigned has_oper_only_stats:1;
unsigned has_maxchannelsperuser:1;
unsigned has_maxdccallow:1;
@@ -337,19 +289,15 @@ struct SetCheck {
unsigned has_ssl_key:1;
unsigned has_ssl_trusted_ca_file:1;
unsigned has_ssl_options: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_new_linking_protocol: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;
unsigned has_level_on_join:1;
#ifdef NO_FLOOD_AWAY
unsigned has_anti_flood_away_count:1;
unsigned has_anti_flood_away_period:1;
@@ -359,8 +307,6 @@ struct SetCheck {
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;
@@ -396,11 +342,7 @@ struct SetCheck {
unsigned has_options_dont_resolve:1;
unsigned has_options_show_connect_info:1;
unsigned has_options_mkpasswd_for_everyone:1;
unsigned has_options_allow_insane_bans:1;
unsigned has_options_allow_part_if_shunned:1;
int cgiirc_type; /* cheat :( */
unsigned has_cgiirc_hosts:1;
unsigned has_cgiirc_webpass:1;
};
+34 -71
View File
@@ -73,7 +73,6 @@ extern MODVAR long lastsendK, lastrecvK;
* Configuration linked lists
*/
extern MODVAR ConfigItem_me *conf_me;
extern MODVAR ConfigItem_files *conf_files;
extern MODVAR ConfigItem_class *conf_class;
extern MODVAR ConfigItem_class *default_class;
extern MODVAR ConfigItem_admin *conf_admin;
@@ -113,8 +112,6 @@ extern void module_loadall(int module_load);
extern long set_usermode(char *umode);
extern char *get_modestr(long umodes);
extern void config_error(char *format, ...) __attribute__((format(printf,1,2)));
extern void config_warn(char *format, ...) __attribute__((format(printf,1,2)));
extern MODVAR int config_verbose;
extern void config_progress(char *format, ...) __attribute__((format(printf,1,2)));
extern void ipport_seperate(char *string, char **ip, char **port);
@@ -126,7 +123,6 @@ ConfigItem_ulines *Find_uline(char *host);
ConfigItem_except *Find_except(aClient *, 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_vhost *Find_vhost(char *name);
@@ -136,10 +132,8 @@ 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);
#ifdef INET6
int match_ipv6(struct IN_ADDR *addr, struct IN_ADDR *mask, int bits);
#endif
ConfigItem_ban *Find_ban_ip(aClient *sptr);
extern MODVAR struct tm motd_tm, smotd_tm;
extern MODVAR Link *Servers;
void add_ListItem(ListStruct *, ListStruct **);
ListStruct *del_ListItem(ListStruct *, ListStruct **);
@@ -193,13 +187,7 @@ 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_or_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)));
@@ -227,11 +215,11 @@ extern MODFUNC char *sock_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
@@ -258,7 +246,6 @@ extern int get_sockerr(aClient *);
extern int inetport(aClient *, char *, int);
extern void init_sys();
extern void init_modef();
extern int verify_hostname(char *name);
#ifdef NO_FDLIST
extern int read_message(time_t);
@@ -276,12 +263,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,
@@ -331,7 +321,14 @@ extern MODVAR 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 int webtv_parse(aClient *sptr, char *string);
extern ConfigItem_deny_dcc *dcc_isforbidden(aClient *sptr, char *filename);
extern ConfigItem_deny_dcc *dcc_isdiscouraged(aClient *sptr, char *filename);
extern int check_registered(aClient *);
@@ -343,7 +340,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 **);
@@ -351,6 +347,7 @@ 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_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));
@@ -388,7 +385,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 void init_resolver(void);
extern time_t timeout_query_list(time_t);
extern time_t expire_cache(time_t);
extern void del_queries(char *);
@@ -400,7 +397,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 *);
@@ -488,6 +485,7 @@ 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
@@ -550,12 +548,12 @@ extern int Auth_CheckError(ConfigEntry *ce);
extern long xbase64dec(char *b64);
extern aClient *find_server_b64_or_real(char *name);
extern aClient *find_server_by_base64(char *b64);
extern aClient *find_server_by_numeric(long value);
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 *new, 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 void dcc_sync(aClient *sptr);
extern void report_flines(aClient *sptr);
extern void report_network(aClient *sptr);
@@ -567,6 +565,7 @@ extern char *oflagstr(long oflag);
extern int rehash(aClient *cptr, aClient *sptr, int sig);
extern int _match(char *mask, char *name);
extern void outofmemory(void);
extern unsigned long our_crc32(const unsigned char *s, unsigned int len);
extern int add_listener2(ConfigItem_listen *conf);
extern void link_cleanup(ConfigItem_link *link_ptr);
extern void listen_cleanup();
@@ -580,7 +579,8 @@ extern int init_conf(char *filename, int rehash);
extern void validate_configuration(void);
extern void run_configuration(void);
extern void rehash_motdrules();
extern void read_motd(const char *filename, aMotdFile *motd); /* s_serv.c */
extern aMotd *read_file(char *filename, aMotd **list);
extern aMotd *read_file_ex(char *filename, aMotd **list, struct tm *);
extern CMD_FUNC(m_server_remote);
extern void send_proto(aClient *, ConfigItem_link *);
extern char *xbase64enc(long i);
@@ -639,15 +639,13 @@ extern void sendto_chmodemucrap(aClient *, aChannel *, char *);
extern void verify_opercount(aClient *, char *);
extern int valid_host(char *host);
extern int count_oper_sessions(char *);
extern char *unreal_mktemp(const char *dir, const char *suffix);
extern char *unreal_mktemp(char *dir, char *suffix);
extern char *unreal_getpathname(char *filepath, char *path);
extern char *unreal_getfilename(char *path);
extern char *unreal_mkcache(const char *url);
extern int has_cached_version(const char *url);
extern int unreal_copyfile(const char *src, const char *dest);
extern int unreal_copyfileex(const char *src, const char *dest, int tryhardlink);
extern time_t unreal_getfilemodtime(const char *filename);
extern void unreal_setfilemodtime(const char *filename, time_t mtime);
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 *findmod_by_bantype(char c);
@@ -685,6 +683,7 @@ extern MODVAR aCtab cFlagTab[];
extern char *unreal_encodespace(char *s);
extern char *unreal_decodespace(char *s);
extern MODVAR Link *helpign;
extern MODVAR aMotd *rules;
extern MODVAR fdlist default_fdlist, busycli_fdlist, serv_fdlist, oper_fdlist;
extern void DCCdeny_add(char *filename, char *reason, int type, int type2);
extern void DCCdeny_del(ConfigItem_deny_dcc *deny);
@@ -730,29 +729,16 @@ 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 int (*find_spamfilter_user)(aClient *sptr);
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_channel)(char *str, int *blocked);
extern MODVAR char *(*stripbadwords_message)(char *str, int *blocked);
extern MODVAR char *(*stripbadwords_quit)(char *str, 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);
extern MODVAR void (*send_protoctl_servers)(aClient *sptr, int response);
extern MODVAR int (*verify_link)(aClient *cptr, aClient *sptr, char *servername, ConfigItem_link **link_out);
extern MODVAR void (*send_server_message)(aClient *sptr);
extern MODVAR int (*dospamfilter)(aClient *sptr, char *str_in, int type, char *target);
/* /Efuncs */
extern MODVAR aMotdFile opermotd, svsmotd, motd, botmotd, smotd, rules;
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);
@@ -762,8 +748,7 @@ extern void chanfloodtimer_del(aChannel *chptr, char mflag, long mbit);
extern char *clean_ban_mask(char *, int, aClient *);
extern void chanfloodtimer_stopchantimers(aChannel *chptr);
extern int find_invex(aChannel *chptr, aClient *sptr);
extern void DoMD5(unsigned char *mdout, const unsigned char *src, unsigned long n);
extern char *md5hash(unsigned char *dst, const unsigned char *src, unsigned long n);
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);
@@ -775,33 +760,11 @@ 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 char *casemapping[2];
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 sendtxtnumeric(aClient *to, char *pattern, ...);
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 void kick_insecure_users(aChannel *);
extern int file_exists(char* file);
extern void free_motd(aMotdFile *motd); /* s_serv.c */
extern void fix_timers(void);
extern char *chfl_to_sjoin_symbol(int s);
extern char chfl_to_chanmode(int s);
extern void add_pending_net(aClient *sptr, char *str);
extern void free_pending_net(aClient *sptr);
extern aPendingNet *find_pending_net_by_numeric_butone(int numeric, aClient *exempt);
extern aClient *find_pending_net_duplicates(aClient *cptr, aClient **srv, int *numeric);
extern aClient *find_non_pending_net_duplicates(aClient *cptr);
-4
View File
@@ -57,7 +57,3 @@ extern __u_l inet_network();
extern __u_l inet_lnaof();
#endif
#undef __u_l
#ifndef INADDR_NONE
#define INADDR_NONE 0xffffffff
#endif
+1 -1
View File
@@ -22,7 +22,7 @@ typedef struct {
} MD5_CTX;
extern void MD5_Init(MD5_CTX *ctx);
extern void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size);
extern void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size);
extern void MD5_Final(unsigned char *result, MD5_CTX *ctx);
#endif
+1 -40
View File
@@ -110,7 +110,6 @@ typedef struct {
#define MOBJ_CALLBACK 0x0200
#define MOBJ_ISUPPORT 0x0400
#define MOBJ_EFUNCTION 0x0800
#define MOBJ_CMODE 0x1000
typedef struct {
long mode;
@@ -223,20 +222,6 @@ typedef struct {
* aExtCMtableParam *: their parameter
*/
int (*sjoin_check)(aChannel *, CmodeParam *, CmodeParam *);
/** Local channel mode? Prevents remote servers from setting/unsetting this */
char local;
/** Is this mode being unloaded?
* This is set to 1 if the chanmode module providing this mode is unloaded
* and we are waiting to see if in our new round of loads a "new" chanmode
* module will popup to take this mode. This only happens during a rehash,
* should never be 0 outside an internal rehash.
*/
char unloaded;
/** Module owner */
Module *owner;
} Cmode;
typedef struct {
@@ -249,7 +234,6 @@ typedef struct {
void (*free_param)(CmodeParam *);
CmodeParam * (*dup_struct)(CmodeParam *);
int (*sjoin_check)(aChannel *, CmodeParam *, CmodeParam *);
char local;
} CmodeInfo;
#endif
@@ -261,11 +245,10 @@ typedef struct {
#define EXBTYPE_BAN 0 /* a ban */
#define EXBTYPE_EXCEPT 1 /* an except */
#define EXBTYPE_INVEX 2 /* an invite exception */
#define EXTBANTABLESZ 32
typedef enum ExtbanOptions { EXTBOPT_CHSVSMODE=0x1, EXTBOPT_ACTMODIFIER=0x2, EXTBOPT_NOSTACKCHILD=0x4, EXTBOPT_INVEX=0x8 } ExtbanOptions;
typedef enum ExtbanOptions { EXTBOPT_CHSVSMODE=0x1 } ExtbanOptions;
typedef struct {
/** extbans module */
@@ -351,7 +334,6 @@ typedef struct _ModuleObject {
Callback *callback;
Efunction *efunction;
Isupport *isupport;
Cmode *cmode;
} object;
} ModuleObject;
@@ -438,7 +420,6 @@ struct _Module
unsigned char errorcode;
char *tmp_file;
unsigned long mod_sys_version;
unsigned int compiler_version;
};
/*
* Symbol table
@@ -654,12 +635,6 @@ int CallCmdoverride(Cmdoverride *ovr, aClient *cptr, aClient *sptr, int parc, ch
#define HOOKTYPE_REMOTE_PART 44
#define HOOKTYPE_REMOTE_KICK 45
#define HOOKTYPE_LOCAL_SPAMFILTER 46
#define HOOKTYPE_SILENCED 47
#define HOOKTYPE_POST_SERVER_CONNECT 48
#define HOOKTYPE_RAWPACKET_IN 49
#define HOOKTYPE_LOCAL_NICKPASS 50
#define HOOKTYPE_PACKET 51
#define HOOKTYPE_HANDSHAKE 52
/* Hook return values */
#define HOOK_CONTINUE 0
@@ -669,7 +644,6 @@ int CallCmdoverride(Cmdoverride *ovr, aClient *cptr, aClient *sptr, int parc, ch
/* Callback types */
#define CALLBACKTYPE_CLOAK 1
#define CALLBACKTYPE_CLOAKKEYCSUM 2
#define CALLBACKTYPE_CLOAK_EX 3
/* Efunction types */
#define EFUNC_DO_JOIN 1
@@ -696,19 +670,6 @@ int CallCmdoverride(Cmdoverride *ovr, aClient *cptr, aClient *sptr, int parc, ch
#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_CHANNEL 28
#define EFUNC_STRIPBADWORDS_MESSAGE 29
#define EFUNC_STRIPBADWORDS_QUIT 30
#define EFUNC_STRIPCOLORS 31
#define EFUNC_STRIPCONTROLCODES 32
#define EFUNC_SPAMFILTER_BUILD_USER_STRING 33
#define EFUNC_IS_SILENCED 34
#define EFUNC_SEND_PROTOCTL_SERVERS 35
#define EFUNC_VERIFY_LINK 36
#define EFUNC_SEND_SERVER_MESSAGE 37
/* Module flags */
#define MODFLAG_NONE 0x0000
+2 -15
View File
@@ -80,25 +80,12 @@
#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 \
char our_mod_version[] = BASE_VERSION PATCH1 PATCH2 PATCH3 PATCH4 PATCH5 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 \
DLLFUNC char Mod_Version[] = BASE_VERSION PATCH1 PATCH2 PATCH3 PATCH4 PATCH5 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
+2
View File
@@ -303,6 +303,8 @@ extern int m_error();
extern int m_dns();
extern int m_info(), m_summon();
extern int m_users(), m_version();
extern int m_names();
extern int m_service();
extern int m_dalinfo();
extern int m_credits();
extern int m_license();
+388
View File
@@ -0,0 +1,388 @@
/*
* ++Copyright++ 1983, 1989, 1993
* -
* Copyright (c) 1983, 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS `AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* -
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
* CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
* -
* Portions Copyright (c) 1995 by International Business Machines, Inc.
*
* International Business Machines, Inc. (hereinafter called IBM) grants
* permission under its copyrights to use, copy, modify, and distribute this
* Software with or without fee, provided that the above copyright notice and
* all paragraphs of this notice appear in all copies, and that the name of IBM
* not be used in connection with the marketing of any product incorporating
* the Software or modifications thereof, without specific, written prior
* permission.
*
* To the extent it has a right to do so, IBM grants an immunity from suit
* under its patents, if any, for the use, sale or manufacture of products to
* the extent that such products are used for performing Domain Name System
* dynamic updates in TCP/IP networks by means of the Software. No immunity is
* granted for any product per se or for any other function of any product.
*
* THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
* DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
* IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
* --Copyright--
*/
/*
* @(#)nameser.h 8.1 (Berkeley) 6/2/93
* $NetBSD: nameser.h,v 1.14 2000/08/09 14:41:00 itojun Exp $
*/
#ifndef _ARPA_NAMESER_H_
#define _ARPA_NAMESER_H_
#ifdef PARAMH
#include <sys/param.h>
#endif
#ifdef _AUX_SOURCE
# include <sys/types.h>
#endif
/*
* revision information. this is the release date in YYYYMMDD format.
* it can change every day so the right thing to do with it is use it
* in preprocessor commands such as "#if (__BIND > 19931104)". do not
* compare for equality; rather, use it to determine whether your resolver
* is new enough to contain a certain feature.
*/
#define __BIND 19960801 /* interface version stamp */
/*
* Define constants based on rfc883
*/
#define PACKETSZ 512 /* maximum packet size */
#define MAXDNAME 1025 /* maximum presentation domain name */
#define MAXCDNAME 255 /* maximum compressed domain name */
#define MAXLABEL 63 /* maximum length of domain label */
#define HFIXEDSZ 12 /* #/bytes of fixed data in header */
#define QFIXEDSZ 4 /* #/bytes of fixed data in query */
#define RRFIXEDSZ 10 /* #/bytes of fixed data in r record */
#define INT32SZ 4 /* for systems without 32-bit ints */
#define INT16SZ 2 /* for systems without 16-bit ints */
#define INADDRSZ 4 /* IPv4 T_A */
#define IN6ADDRSZ 16 /* IPv6 T_AAAA */
/*
* Internet nameserver port number
*/
#define NAMESERVER_PORT 53
/*
* Currently defined opcodes
*/
#define QUERY 0x0 /* standard query */
#define IQUERY 0x1 /* inverse query */
#define STATUS 0x2 /* nameserver status query */
/*#define xxx 0x3*/ /* 0x3 reserved */
#define NS_NOTIFY_OP 0x4 /* notify secondary of SOA change */
/*
* Currently defined response codes
*/
#define NOERROR 0 /* no error */
#define FORMERR 1 /* format error */
#define SERVFAIL 2 /* server failure */
#define NXDOMAIN 3 /* non existent domain */
#define NOTIMP 4 /* not implemented */
#define REFUSED 5 /* query refused */
/*
* Type values for resources and queries
*/
#define T_A 1 /* host address */
#define T_NS 2 /* authoritative server */
#define T_MD 3 /* mail destination */
#define T_MF 4 /* mail forwarder */
#define T_CNAME 5 /* canonical name */
#define T_SOA 6 /* start of authority zone */
#define T_MB 7 /* mailbox domain name */
#define T_MG 8 /* mail group member */
#define T_MR 9 /* mail rename name */
#define T_NULL 10 /* null resource record */
#define T_WKS 11 /* well known service */
#define T_PTR 12 /* domain name pointer */
#define T_HINFO 13 /* host information */
#define T_MINFO 14 /* mailbox information */
#define T_MX 15 /* mail routing information */
#define T_TXT 16 /* text strings */
#define T_RP 17 /* responsible person */
#define T_AFSDB 18 /* AFS cell database */
#define T_X25 19 /* X_25 calling address */
#define T_ISDN 20 /* ISDN calling address */
#define T_RT 21 /* router */
#define T_NSAP 22 /* NSAP address */
#define T_NSAP_PTR 23 /* reverse NSAP lookup (deprecated) */
#define T_SIG 24 /* security signature */
#define T_KEY 25 /* security key */
#define T_PX 26 /* X.400 mail mapping */
#define T_GPOS 27 /* geographical position (withdrawn) */
#define T_AAAA 28 /* IP6 Address */
#define T_LOC 29 /* Location Information */
#define T_NXT 30 /* Next Valid Name in Zone */
#define T_EID 31 /* Endpoint identifier */
#define T_NIMLOC 32 /* Nimrod locator */
#define T_SRV 33 /* Server selection */
#define T_ATMA 34 /* ATM Address */
#define T_NAPTR 35 /* Naming Authority PoinTeR */
#define T_OPT 41 /* OPT pseudo-RR, RFC2761 */
/* non standard */
#define T_UINFO 100 /* user (finger) information */
#define T_UID 101 /* user ID */
#define T_GID 102 /* group ID */
#define T_UNSPEC 103 /* Unspecified format (binary data) */
/* Query type values which do not appear in resource records */
#define T_IXFR 251 /* incremental zone transfer */
#define T_AXFR 252 /* transfer zone of authority */
#define T_MAILB 253 /* transfer mailbox records */
#define T_MAILA 254 /* transfer mail agent records */
#define T_ANY 255 /* wildcard match */
/*
* Values for class field
*/
#define C_IN 1 /* the arpa internet */
#define C_CHAOS 3 /* for chaos net (MIT) */
#define C_HS 4 /* for Hesiod name server (MIT) (XXX) */
/* Query class values which do not appear in resource records */
#define C_ANY 255 /* wildcard match */
/*
* Flags field of the KEY RR rdata
*/
#define KEYFLAG_TYPEMASK 0xC000 /* Mask for "type" bits */
#define KEYFLAG_TYPE_AUTH_CONF 0x0000 /* Key usable for both */
#define KEYFLAG_TYPE_CONF_ONLY 0x8000 /* Key usable for confidentiality */
#define KEYFLAG_TYPE_AUTH_ONLY 0x4000 /* Key usable for authentication */
#define KEYFLAG_TYPE_NO_KEY 0xC000 /* No key usable for either; no key */
/* The type bits can also be interpreted independently, as single bits: */
#define KEYFLAG_NO_AUTH 0x8000 /* Key not usable for authentication */
#define KEYFLAG_NO_CONF 0x4000 /* Key not usable for confidentiality */
#define KEYFLAG_EXPERIMENTAL 0x2000 /* Security is *mandatory* if bit=0 */
#define KEYFLAG_RESERVED3 0x1000 /* reserved - must be zero */
#define KEYFLAG_RESERVED4 0x0800 /* reserved - must be zero */
#define KEYFLAG_USERACCOUNT 0x0400 /* key is assoc. with a user acct */
#define KEYFLAG_ENTITY 0x0200 /* key is assoc. with entity eg host */
#define KEYFLAG_ZONEKEY 0x0100 /* key is zone key for the zone named */
#define KEYFLAG_IPSEC 0x0080 /* key is for IPSEC use (host or user)*/
#define KEYFLAG_EMAIL 0x0040 /* key is for email (MIME security) */
#define KEYFLAG_RESERVED10 0x0020 /* reserved - must be zero */
#define KEYFLAG_RESERVED11 0x0010 /* reserved - must be zero */
#define KEYFLAG_SIGNATORYMASK 0x000F /* key can sign DNS RR's of same name */
#define KEYFLAG_RESERVED_BITMASK ( KEYFLAG_RESERVED3 | \
KEYFLAG_RESERVED4 | \
KEYFLAG_RESERVED10| KEYFLAG_RESERVED11)
/* The Algorithm field of the KEY and SIG RR's is an integer, {1..254} */
#define ALGORITHM_MD5RSA 1 /* MD5 with RSA */
#define ALGORITHM_EXPIRE_ONLY 253 /* No alg, no security */
#define ALGORITHM_PRIVATE_OID 254 /* Key begins with OID indicating alg */
/* Signatures */
/* Size of a mod or exp in bits */
#define MIN_MD5RSA_KEY_PART_BITS 512
#define MAX_MD5RSA_KEY_PART_BITS 2552
/* Total of binary mod and exp, bytes */
#define MAX_MD5RSA_KEY_BYTES ((MAX_MD5RSA_KEY_PART_BITS+7/8)*2+3)
/* Max length of text sig block */
#define MAX_KEY_BASE64 (((MAX_MD5RSA_KEY_BYTES+2)/3)*4)
/*
* Status return codes for T_UNSPEC conversion routines
*/
#define CONV_SUCCESS 0
#define CONV_OVERFLOW (-1)
#define CONV_BADFMT (-2)
#define CONV_BADCKSUM (-3)
#define CONV_BADBUFLEN (-4)
#ifndef BYTE_ORDER
#if (BSD >= 199103)
# include <machine/endian.h>
#else
#ifdef linux
# include <endian.h>
#else
#define LITTLE_ENDIAN 1234 /* least-significant byte first (vax, pc) */
#define BIG_ENDIAN 4321 /* most-significant byte first (IBM, net) */
#define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long (pdp)*/
#if defined(vax) || defined(ns32000) || defined(sun386) || defined(i386) || \
defined(MIPSEL) || defined(_MIPSEL) || defined(BIT_ZERO_ON_RIGHT) || \
defined(__alpha__) || defined(__alpha) || defined(__vax__) || defined(_WIN32)
#define BYTE_ORDER LITTLE_ENDIAN
#endif
#if defined(sel) || defined(pyr) || defined(mc68000) || defined(sparc) || \
defined(is68k) || defined(tahoe) || defined(ibm032) || defined(ibm370) || \
defined(MIPSEB) || defined(_MIPSEB) || defined(_IBMR2) || defined(DGUX) ||\
defined(apollo) || defined(__convex__) || defined(_CRAY) || \
defined(__hppa) || defined(__hp9000) || \
defined(__hp9000s300) || defined(__hp9000s700) || \
defined (BIT_ZERO_ON_LEFT) || defined(m68k)
#define BYTE_ORDER BIG_ENDIAN
#endif
#endif /* linux */
#endif /* BSD */
#endif /* BYTE_ORDER */
#if !defined(BYTE_ORDER) || \
(BYTE_ORDER != BIG_ENDIAN && BYTE_ORDER != LITTLE_ENDIAN && \
BYTE_ORDER != PDP_ENDIAN)
/* you must determine what the correct bit order is for
* your compiler - the next line is an intentional error
* which will force your compiles to bomb until you fix
* the above macros.
*/
#error "Undefined or invalid BYTE_ORDER";
#endif
/*
* Structure for query header. The order of the fields is machine- and
* compiler-dependent, depending on the byte/bit order and the layout
* of bit fields. We use bit fields only in int variables, as this
* is all ANSI requires. This requires a somewhat confusing rearrangement.
*/
typedef struct {
unsigned id :16; /* query identification number */
#if BYTE_ORDER == BIG_ENDIAN
/* fields in third byte */
unsigned qr: 1; /* response flag */
unsigned opcode: 4; /* purpose of message */
unsigned aa: 1; /* authoritive answer */
unsigned tc: 1; /* truncated message */
unsigned rd: 1; /* recursion desired */
/* fields in fourth byte */
unsigned ra: 1; /* recursion available */
unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
unsigned ad: 1; /* authentic data from named */
unsigned cd: 1; /* checking disabled by resolver */
unsigned rcode :4; /* response code */
#endif
#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN
/* fields in third byte */
unsigned rd :1; /* recursion desired */
unsigned tc :1; /* truncated message */
unsigned aa :1; /* authoritive answer */
unsigned opcode :4; /* purpose of message */
unsigned qr :1; /* response flag */
/* fields in fourth byte */
unsigned rcode :4; /* response code */
unsigned cd: 1; /* checking disabled by resolver */
unsigned ad: 1; /* authentic data from named */
unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
unsigned ra :1; /* recursion available */
#endif
/* remaining bytes */
unsigned qdcount :16; /* number of question entries */
unsigned ancount :16; /* number of answer entries */
unsigned nscount :16; /* number of authority entries */
unsigned arcount :16; /* number of resource entries */
} HEADER;
/*
* Defines for handling compressed domain names
*/
#define INDIR_MASK 0xc0
/*
* Inline versions of get/put short/long. Pointer is advanced.
*
* These macros demonstrate the property of C whereby it can be
* portable or it can be elegant but rarely both.
*/
#define GETSHORT(s, cp) { \
register const u_char *t_cp = (const u_char *)(cp); \
(s) = ((const u_int16_t)t_cp[0] << 8) \
| ((const u_int16_t)t_cp[1]) \
; \
(cp) += INT16SZ; \
}
#define GETLONG(l, cp) { \
register const u_char *t_cp = (const u_char *)(cp); \
(l) = ((const u_int32_t)t_cp[0] << 24) \
| ((const u_int32_t)t_cp[1] << 16) \
| ((const u_int32_t)t_cp[2] << 8) \
| ((const u_int32_t)t_cp[3]) \
; \
(cp) += INT32SZ; \
}
#define PUTSHORT(s, cp) { \
register u_int16_t t_s = (u_int16_t)(s); \
register u_char *t_cp = (u_char *)(cp); \
*t_cp++ = (u_int32_t)t_s >> 8; \
*t_cp = t_s; \
(cp) += INT16SZ; \
}
#define PUTLONG(l, cp) { \
register u_int32_t t_l = (u_int32_t)(l); \
register u_char *t_cp = (u_char *)(cp); \
*t_cp++ = t_l >> 24; \
*t_cp++ = t_l >> 16; \
*t_cp++ = t_l >> 8; \
*t_cp = t_l; \
(cp) += INT32SZ; \
}
#endif /* _ARPA_NAMESER_H_ */
-12
View File
@@ -336,9 +336,6 @@
* These are also in the range 600-799.
*/
#define RPL_REAWAY 597
#define RPL_GONEAWAY 598
#define RPL_NOTAWAY 599
#define RPL_LOGON 600
#define RPL_LOGOFF 601
#define RPL_WATCHOFF 602
@@ -347,8 +344,6 @@
#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
@@ -359,15 +354,8 @@
#define RPL_DUMPRPL 641
#define RPL_EODUMP 642
#define RPL_SPAMCMDFWD 659
#define RPL_STARTTLS 670
#define RPL_WHOISSECURE 671
#define ERR_CANNOTDOCOMMAND 972
#define ERR_CANNOTCHANGECHANMODE 974
#define ERR_STARTTLS 691
#define ERR_NUMERICERR 999
+2 -1
View File
@@ -58,7 +58,8 @@ char *my_itoa(int i);
/* s_serv.c */
void load_tunefile(void);
extern EVENT(save_tunefile);
extern void read_motd(const char *filename, aMotdFile *motd);
aMotd *read_rules(char *filename);
aMotd *read_motd(char *filename);
/* s_user.c */
int check_for_target_limit(aClient *sptr, void *target, const char *name);
+4 -1
View File
@@ -1,6 +1,9 @@
/* OMG... OMG! WHAT AN INCLUDE HORROR !!! */
#undef strcasecmp
#undef strncasecmp
#ifdef WIN32
#include <win32/ares/setup.h>
#endif
#include <ares.h>
#include <ares_version.h>
#undef strcasecmp
@@ -74,6 +77,6 @@ struct _dnsstats {
extern ares_channel resolver_channel;
extern void init_resolver(int);
extern void init_resolver(void);
struct hostent *unrealdns_doclient(aClient *cptr);
+217 -340
View File
@@ -1,107 +1,178 @@
/* include/setup.h.in. Generated from configure.ac by autoheader. */
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Define if you have BSD signals */
#undef BSD_RELIABLE_SIGNALS
/* Set to the bufferpool size you want */
#undef BUFFERPOOL
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
#undef CRAY_STACKSEG_END
/* Define to 1 if using `alloca.c'. */
/* Define if using alloca.c. */
#undef C_ALLOCA
/* The default permissions for configuration files. Set to 0 to prevent
unrealircd from calling chmod() on the files. */
#undef DEFAULT_PERMISSIONS
/* Define to empty if the keyword does not work. */
#undef const
/* Define to disable extended ban stacking (~q:~c:\#chan, etc) */
#undef DISABLE_STACKED_EXTBANS
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
#undef CRAY_STACKSEG_END
/* Define if you want to disable /set* and /chg* */
#undef DISABLE_USERMOD
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
/* Define the location of the configuration files */
#undef DPATH
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
/* Define if you can set the core size to unlimited */
#undef FORCE_CORE
/* Define if you have the vprintf function. */
#undef HAVE_VPRINTF
/* Define if you have getrusage */
#undef GETRUSAGE_2
/* Define as __inline if that's what the C compiler calls it. */
#undef inline
/* Define if you have gettimeofday */
#undef GETTIMEOFDAY
/* Define if the `setpgrp' function takes no argument. */
#undef SETPGRP_VOID
/* Define if the setvbuf function takes the buffering type as its second
argument and the buffer pointer as the third, as on System V
before release 3. */
#undef SETVBUF_REVERSED
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
#undef STACK_DIRECTION
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Define if your <sys/time.h> declares struct tm. */
#undef TM_IN_SYS_TIME
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
/* Define if you do not have the index function. */
#undef NOINDEX
/* Define if you need the strtok function. */
#undef NEED_STRTOK
/* Define if you need the strtoken function. */
#undef NEED_STRTOKEN
/* Define if you have the times function. */
#undef HAVE_TIMES
/* Define if you have the <stddef.h> header file. */
#undef STDDEFH
/* Define if you have the <stdlib.h> header file. */
#undef STDLIBH
/* Define if you have the <string.h> header file. */
#undef STRINGH
/* Define if you have the <strings.h> header file. */
#undef STRINGSH
/* Define if you have the <sys/param.h> header file. */
#undef PARAMH
/* Define if you have the <sys/rusage.h> header file. */
#undef HAVE_SYS_RUSAGE_H
/* Define if you have the <sys/syslog.h> header file. */
#undef SYSSYSLOGH
/* Define if you have the <unistd.h> header file. */
#undef UNISTDH
/* Define to <malloc.h> you need malloc.h. */
#undef MALLOCH
/* Define if you have the <sys/rusage.h> header file. */
#undef RUSAGEH
/* Define if you have the <glob.h> header file. */
#undef GLOBH
/* Define if you have regex */
#undef HAVE_REGEX
/* Define if you don't have bcopy */
#undef NEED_BCOPY
/* Define if you don't have bcmp */
#undef NEED_BCMP
/* Define if you need bzero */
#undef NEED_BZERO
/* Define if you have syslog */
#undef HAVE_SYSLOG
/* Define if you have vsyslog */
#undef HAVE_VSYSLOG
/* Define if you want to allow SSL connections */
#undef USE_SSL
/* Define if you can set the core size to unlimited */
#undef FORCE_CORE
/* Define if you have strcasecmp */
#undef GOT_STRCASECMP
/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA
/* Define if you need inet_addr */
#undef NEED_INET_ADDR
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
#undef HAVE_ALLOCA_H
/* Define if you need inet_ntoa */
#undef NEED_INET_NTOA
/* Define to 1 if you have the `bcmp' function. */
#undef HAVE_BCMP
/* Define if you need inet_netof */
#undef NEED_INET_NETOF
/* Define to 1 if you have the `bcopy' function. */
#undef HAVE_BCOPY
/* Define if you have gettimeofday */
#undef GETTIMEOFDAY
/* Define to 1 if you have the `bzero' function. */
#undef HAVE_BZERO
/* Define if you have lrand48 */
#undef LRAND48
/* Define if you have a compiler with C99 variable length array support */
#undef HAVE_C99_VARLEN_ARRAY
/* Define if you have getrusage */
#undef GETRUSAGE_2
/* Define if you have crypt */
#undef HAVE_CRYPT
/* Define if you have times */
#undef TIMES_2
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
#undef HAVE_DOPRNT
/* Define if you have O_NONBLOCK */
#undef NBLOCK_POSIX
/* Define to 1 if you have the `getrusage' function. */
#undef HAVE_GETRUSAGE
/* Define if you have O_NDELAY */
#undef NBLOCK_BSD
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
/* Define if you have FIONBIO */
#undef NBLOCK_SYSV
/* Define to 1 if you have the `index' function. */
#undef HAVE_INDEX
/* Define if you have POSIX signals */
#undef POSIX_SIGNALS
/* Define to 1 if you have the `inet_addr' function. */
#undef HAVE_INET_ADDR
/* Define if you have BSD signals */
#undef RELIABLE_BSD_SIGNALS
/* Define to 1 if you have the `inet_netof' function. */
#undef HAVE_INET_NETOF
/* Define if you have SYSV signals */
#undef UNRELIABLE_SYSV_SIGNALS
/* Define to 1 if you have the `inet_ntoa' function. */
#undef HAVE_INET_NTOA
/* Define these to be unsigned integral internal types,
* of respecitvely 2 and 4 bytes in size, when not already
* defined in <sys/types.h>, <stdlib.h> or <stddef.h> */
#undef u_int16_t
#undef u_int32_t
/* Define to 1 if you have the `inet_ntop' function. */
#undef HAVE_INET_NTOP
/* Define to 1 if you have the `inet_pton' function. */
#undef HAVE_INET_PTON
/* Define to 1 if the system has the type `intptr_t'. */
#undef HAVE_INTPTR_T
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `lrand48' function. */
#undef HAVE_LRAND48
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define if you have setproctitle */
#undef HAVE_SETPROCTITLE
/* Define if you have PS_STRINGS */
#undef HAVE_PSSTRINGS
@@ -109,143 +180,59 @@
/* Define if you have pstat */
#undef HAVE_PSTAT
/* Define if you have setproctitle */
#undef HAVE_SETPROCTITLE
/* Define if you have crypt */
#undef HAVE_CRYPT
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Local hostname of the server */
#undef DOMAINNAME
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* The OS name and version of the server */
#undef MYOSNAME
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strcasecmp' function. */
#undef HAVE_STRCASECMP
/* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strlcat' function. */
#undef HAVE_STRLCAT
/* Define to 1 if you have the `strlcpy' function. */
#undef HAVE_STRLCPY
/* Define to 1 if you have the `strlncat' function. */
#undef HAVE_STRLNCAT
/* Define to 1 if you have the `strtok' function. */
#undef HAVE_STRTOK
/* Define to 1 if you have the `strtoken' function. */
#undef HAVE_STRTOKEN
/* Define to 1 if you have the `strtoul' function. */
#undef HAVE_STRTOUL
/* Define to 1 if you have the `syslog' function. */
#undef HAVE_SYSLOG
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the `times' function. */
#undef HAVE_TIMES
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `vprintf' function. */
#undef HAVE_VPRINTF
/* Define to 1 if you have the `vsnprintf' function. */
#undef HAVE_VSNPRINTF
/* Define to 1 if you have the `vsyslog' function. */
#undef HAVE_VSYSLOG
/* Define if you want IPv6 enabled */
#undef INET6
/* Set to the listen backlog size you want */
#undef LISTEN_SIZE
/* Define if you want modes shown in /list */
#undef LIST_SHOW_MODES
/* Define if rlim_t is long long */
#undef LONG_LONG_RLIM_T
/* Define if you have lrand48 */
#undef LRADN48
/* Define to <malloc.h> you need malloc.h. */
#undef MALLOCH
/* Set to the max connections you want */
#undef MAXCONNECTIONS
/* Set to the max sendq you want */
#undef MAXSENDQLENGTH
/* Define if you have O_NDELAY */
#undef NBLOCK_BSD
/* Define if you have O_NONBLOCK */
#undef NBLOCK_POSIX
/* Define if you have FIONBIO */
#undef NBLOCK_SYSV
/* Define if you don't have bcmp */
#undef NEED_BCMP
/* Define if you don't have bcopy */
#undef NEED_BCOPY
/* Define if you need bzero */
#undef NEED_BZERO
/* Define if you need inet_addr */
#undef NEED_INET_ADDR
/* Define if you need inet_netof */
#undef NEED_INET_NETOF
/* Define if you need inet_ntoa */
#undef NEED_INET_NTOA
/* Define if you need the strerror function. */
#undef NEED_STRERROR
/* Define if you need the strtok function. */
#undef NEED_STRTOK
/* Define if you need the strtoken function. */
#undef NEED_STRTOKEN
/* Set to the nickname history length you want */
#undef NICKNAMEHISTORYLENGTH
/* Define if you do not have the index function. */
#undef NOINDEX
/* The default permissions for configuration files */
#undef DEFAULT_PERMISSIONS
/* Define if you want spoof protection */
#undef NOSPOOF
/* Define to 1 if your system has no in6addr_any. */
#undef NO_IN6ADDR_ANY
/* Define if you want +a/+q prefixes */
#undef PREFIX_AQ
/* Define if you want to compile as a hub */
#undef HUB
/* Define the location of the configuration files */
#undef DPATH
/* Define the location of the executable */
#undef SPATH
/* Set to the listen backlog size you want */
#undef LISTEN_SIZE
/* Set to the max sendq you want */
#undef MAXSENDQLENGTH
/* Set to the nickname history length you want */
#undef NICKNAMEHISTORYLENGTH
/* Set to the bufferpool size you want */
#undef BUFFERPOOL
/* Set to the max connections you want */
#undef MAXCONNECTIONS
/* 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
@@ -253,154 +240,44 @@
/* Define if you want opers to have to use /invite to join +s/+p channels */
#undef OPEROVERRIDE_VERIFY
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define if you have the <sys/param.h> header file. */
#undef PARAMH
/* Define if you have POSIX signals */
#undef POSIX_SIGNALS
/* Define if you want +a/+q prefixes */
#undef PREFIX_AQ
/* Define if you have the <sys/rusage.h> header file. */
#undef RUSAGEH
/* Define to 1 if the `setpgrp' function takes no argument. */
#undef SETPGRP_VOID
/* Define if you want users to be notified when their shun is removed */
#undef SHUN_NOTICES
/* The size of `int', as computed by sizeof. */
#undef SIZEOF_INT
/* The size of `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* The size of `rlim_t', as computed by sizeof. */
#undef SIZEOF_RLIM_T
/* The size of `short', as computed by sizeof. */
#undef SIZEOF_SHORT
/* Define the location of the executable */
#undef SPATH
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
/* Link... statically(?) (defining this macro will probably cause the build
tofail) */
#undef STATIC_LINKING
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if you have the <stddef.h> header file. */
#undef STDDEFH
/* Define if you have the <stdlib.h> header file. */
#undef STDLIBH
/* Define if you have the <string.h> header file. */
#undef STRINGH
/* Define if you have the <strings.h> header file. */
#undef STRINGSH
/* Define if you have the <sys/syslog.h> header file. */
#undef SYSSYSLOGH
/* Define if you have SYSV signals */
#undef SYSV_UNRELIABLE_SIGNALS
/* Define if you have times */
#undef TIMES_2
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
/* Define if you want nick!user@host shown for the topic setter */
#undef TOPIC_NICK_IS_NUHOST
/* Define if you want to disable /set* and /chg* */
#undef DISABLE_USERMOD
/* Define if your system prepends an underscore to symbols */
#undef UNDERSCORE
/* Define if you have the <unistd.h> header file. */
#undef UNISTDH
/* Define if rlim_t is long long */
#undef LONG_LONG_RLIM_T
/* Define if you have libcurl installed to get remote includes and MOTD
support */
#undef USE_LIBCURL
/* Define if you have snprintf */
#undef HAVE_SNPRINTF
/* Define if you want to allow SSL connections */
#undef USE_SSL
/* Define if you have vsnprintf */
#undef HAVE_VSNPRINTF
/* Define if you have zlib and want zip links support. */
#undef ZIP_LINKS
/* Define if you have strlcpy */
#undef HAVE_STRLCPY
/* Define if you are compiling unrealircd on Sun's (or Oracle's?) Solaris */
#undef _SOLARIS
/* Define if you have strlcat */
#undef HAVE_STRLCAT
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define if you have strlncat */
#undef HAVE_STRLNCAT
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
/* Define if you have inet_pton */
#undef HAVE_INET_PTON
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#undef inline
#endif
/* Define if you have inet_ntop */
#undef HAVE_INET_NTOP
/* Define to `short' if <sys/types.h> does not define. */
#undef int16_t
/* Define if you have a compiler with C99 variable length array support */
#undef HAVE_C99_VARLEN_ARRAY
/* Define to `long' if <sys/types.h> does not define. */
#undef int32_t
/* Define if you have alloca.h */
#undef HAVE_ALLOCA_H
/* Define to the type of a signed integer type wide enough to hold a pointer,
if such a type exists, and if the system does not define it. */
#undef intptr_t
/* Define if you have alloca */
#undef HAVE_ALLOCA
/* Define to `int' if <sys/types.h> does not define. */
#undef mode_t
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
/* Define to `unsigned short' if <sys/types.h> does not define. */
#undef u_int16_t
/* Define to `unsigned long' if <sys/types.h> does not define. */
#undef u_int32_t
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
/* Define to 1 if your system has no in6addr_any. */
#undef NO_IN6ADDR_ANY
+29 -144
View File
@@ -24,7 +24,6 @@
#define __struct_include__
#include "config.h"
#include "sys.h"
/* need to include ssl stuff here coz otherwise you get
* conflicting types with isalnum/isalpha/etc @ redhat. -- Syzop
*/
@@ -65,10 +64,17 @@
#include "zip.h"
#endif
#include "auth.h"
#ifndef _WIN32
#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;
@@ -88,7 +94,6 @@ typedef struct _configflag_ban ConfigFlag_ban;
typedef struct _configflag_tld ConfigFlag_tld;
typedef struct _configitem ConfigItem;
typedef struct _configitem_me ConfigItem_me;
typedef struct _configitem_files ConfigItem_files;
typedef struct _configitem_admin ConfigItem_admin;
typedef struct _configitem_class ConfigItem_class;
typedef struct _configitem_oper ConfigItem_oper;
@@ -104,7 +109,6 @@ 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;
@@ -137,12 +141,7 @@ typedef struct SChanFloodProt ChanFloodProt;
typedef struct SRemoveFld RemoveFld;
typedef struct ListOptions LOpts;
typedef struct FloodOpt aFloodOpt;
typedef struct Motd aMotdFile; /* represents a whole MOTD, including remote MOTD support info */
typedef struct MotdItem aMotdLine; /* one line of a MOTD stored as a linked list */
#ifdef USE_LIBCURL
typedef struct MotdDownload aMotdDownload; /* used to coordinate download of a remote MOTD */
#endif
typedef struct MotdItem aMotd;
typedef struct trecord aTrecord;
typedef struct Command aCommand;
typedef struct _cmdoverride Cmdoverride;
@@ -150,7 +149,6 @@ typedef struct SMember Member;
typedef struct SMembership Membership;
typedef struct SMembershipL MembershipL;
typedef struct JFlood aJFlood;
typedef struct PendingNet aPendingNet;
#ifdef ZIP_LINKS
typedef struct Zdata aZdata;
@@ -173,12 +171,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)
/*
@@ -232,7 +232,6 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define STAT_LOG -7 /* logfile for -x */
#define STAT_CONNECTING -6
#define STAT_SSL_STARTTLS_HANDSHAKE -8
#define STAT_SSL_CONNECT_HANDSHAKE -5
#define STAT_SSL_ACCEPT_HANDSHAKE -4
#define STAT_HANDSHAKE -3
@@ -255,11 +254,9 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define IsLog(x) ((x)->status == STAT_LOG)
#ifdef USE_SSL
#define IsSSLStartTLSHandshake(x) ((x)->status == STAT_SSL_STARTTLS_HANDSHAKE)
#define IsSSLAcceptHandshake(x) ((x)->status == STAT_SSL_ACCEPT_HANDSHAKE)
#define IsSSLConnectHandshake(x) ((x)->status == STAT_SSL_CONNECT_HANDSHAKE)
#define IsSSLHandshake(x) (IsSSLAcceptHandshake(x) || IsSSLConnectHandshake(x) | IsSSLStartTLSHandshake(x))
#define SetSSLStartTLSHandshake(x) ((x)->status = STAT_SSL_STARTTLS_HANDSHAKE)
#define IsSSLHandshake(x) (IsSSLAcceptHandshake(x) || IsSSLConnectHandshake(x))
#define SetSSLAcceptHandshake(x) ((x)->status = STAT_SSL_ACCEPT_HANDSHAKE)
#define SetSSLConnectHandshake(x) ((x)->status = STAT_SSL_CONNECT_HANDSHAKE)
#endif
@@ -273,7 +270,6 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define SetLog(x) ((x)->status = STAT_LOG)
#define IsSynched(x) (x->serv->flags.synced)
#define IsServerSent(x) (x->serv && x->serv->flags.server_sent)
/* opt.. */
#define OPT_SJOIN 0x0001
@@ -294,8 +290,6 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#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 */
@@ -313,12 +307,12 @@ 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 */
#define FLAGS_PING 0x80000
#define FLAGS_EAUTH 0x100000
#define FLAGS_ASKEDPING 0x100000
#define FLAGS_NETINFO 0x200000
#define FLAGS_HYBNOTICE 0x400000
#define FLAGS_QUARANTINE 0x800000
@@ -331,7 +325,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#ifdef USE_SSL
#define FLAGS_SSL 0x10000000
#endif
#define FLAGS_NOFAKELAG 0x20000000 /* Exception from fake lag */
#define FLAGS_UNOCCUP4 0x20000000 /* [FREE] */
#define FLAGS_DCCBLOCK 0x40000000 /* Block all DCC send requests */
#define FLAGS_MAP 0x80000000 /* Show this entry in /map */
/* Dec 26th, 1997 - added flags2 when I ran out of room in flags -DuffJ */
@@ -364,9 +358,8 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#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.
@@ -412,15 +405,14 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#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 SetEAuth(x) ((x)->flags |= FLAGS_EAUTH)
#define IsEAuth(x) ((x)->flags & FLAGS_EAUTH)
#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
@@ -435,16 +427,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)
@@ -476,7 +462,6 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#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)
@@ -532,9 +517,6 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#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 SetSJOIN(x) ((x)->proto |= PROTO_SJOIN)
#define SetNoQuit(x) ((x)->proto |= PROTO_NOQUIT)
@@ -547,9 +529,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)
@@ -627,11 +606,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)
@@ -719,46 +693,6 @@ struct FloodOpt {
TS firstmsg;
};
#ifdef USE_LIBCURL
struct Motd;
struct MotdDownload
{
struct Motd *themotd;
};
#endif /* USE_LIBCURL */
struct Motd
{
struct MotdItem *lines;
struct tm last_modified; /* store the last modification time */
#ifdef USE_LIBCURL
/*
This pointer is used to communicate with an asynchronous MOTD
download. The problem is that a download may take 10 seconds or
more to complete and, in that time, the IRCd could be rehashed.
This would mean that TLD blocks are reallocated and thus the
aMotd structs would be free()d in the meantime.
To prevent such a situation from leading to a segfault, we
introduce this remote control pointer. It works like this:
1. read_motd() is called with a URL. A new MotdDownload is
allocated and the pointer is placed here. This pointer is
also passed to the asynchrnous download handler.
2.a. The download is completed and read_motd_asynch_downloaded()
is called with the same pointer. From this function, this pointer
if free()d. No other code may free() the pointer. Not even free_motd().
OR
2.b. The user rehashes the IRCd before the download is completed.
free_motd() is called, which sets motd_download->themotd to NULL
to signal to read_motd_asynch_downloaded() that it should ignore
the download. read_motd_asynch_downloaded() is eventually called
and frees motd_download.
*/
struct MotdDownload *motd_download;
#endif /* USE_LIBCURL */
};
struct MotdItem {
char *line;
struct MotdItem *next;
@@ -807,7 +741,6 @@ struct User {
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 */
@@ -830,7 +763,6 @@ struct User {
#ifdef JOINTHROTTLE
aJFlood *jflood;
#endif
TS lastaway;
};
struct Server {
@@ -847,7 +779,6 @@ struct Server {
#endif
struct {
unsigned synced:1; /* Server linked? (3.2beta18+) */
unsigned server_sent:1; /* SERVER message sent to this link? (for outgoing links) */
} flags;
};
@@ -887,9 +818,6 @@ struct Server {
#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* */
regex_t expr;
@@ -969,8 +897,6 @@ typedef struct {
#define LISTENER_SSL 0x000040
#define LISTENER_BOUND 0x000080
#define IsServersOnlyListener(x) ((x) && ((x)->umodes & LISTENER_SERVERSONLY))
#define CONNECT_SSL 0x000001
#define CONNECT_ZIP 0x000002
#define CONNECT_AUTO 0x000004
@@ -981,8 +907,6 @@ typedef struct {
#define SSLFLAG_FAILIFNOCERT 0x1
#define SSLFLAG_VERIFYCERT 0x2
#define SSLFLAG_DONOTACCEPTSELFSIGNED 0x4
#define SSLFLAG_NOSTARTTLS 0x8
struct Client {
struct Client *next, *prev, *hnext;
anUser *user; /* ...defined, if this is a User */
@@ -1023,7 +947,7 @@ 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 */
@@ -1139,7 +1063,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
@@ -1160,12 +1083,6 @@ struct _configitem_me {
unsigned short numeric;
};
struct _configitem_files {
char *motd_file, *rules_file, *smotd_file;
char *botmotd_file, *opermotd_file, *svsmotd_file;
char *pid_file, *tune_file;
};
struct _configitem_admin {
ConfigItem *prev, *next;
ConfigFlag flag;
@@ -1202,9 +1119,6 @@ struct _configitem_allow {
ConfigItem_class *class;
struct irc_netmask *netmask;
ConfigFlag_allow flags;
#ifdef INET6
unsigned short ipv6_clone_mask;
#endif /* INET6 */
};
struct _configitem_oper {
@@ -1223,7 +1137,6 @@ struct _configitem_oper_from {
ConfigItem *prev, *next;
ConfigFlag flag;
char *name;
struct irc_netmask *netmask;
};
struct _configitem_drpass {
@@ -1243,10 +1156,10 @@ struct _configitem_ulines {
struct _configitem_tld {
ConfigItem *prev, *next;
ConfigFlag_tld flag;
char *mask, *channel;
char *motd_file, *rules_file, *smotd_file;
char *botmotd_file, *opermotd_file;
aMotdFile rules, motd, smotd, botmotd, opermotd;
char *mask, *motd_file, *rules_file, *smotd_file;
char *botmotd_file, *opermotd_file, *channel;
struct tm motd_tm, smotd_tm;
aMotd *rules, *motd, *smotd, *botmotd, *opermotd;
u_short options;
};
@@ -1288,19 +1201,6 @@ struct _configitem_link {
#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;
@@ -1317,13 +1217,6 @@ struct _configitem_ban {
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
@@ -1408,7 +1301,7 @@ struct _configitem_unknown_ext {
typedef enum {
ALIAS_SERVICES=1, ALIAS_STATS, ALIAS_NORMAL, ALIAS_COMMAND, ALIAS_CHANNEL, ALIAS_REAL
ALIAS_SERVICES=1, ALIAS_STATS, ALIAS_NORMAL, ALIAS_COMMAND, ALIAS_CHANNEL
} AliasType;
struct _configitem_alias {
@@ -1417,7 +1310,6 @@ struct _configitem_alias {
ConfigItem_alias_format *format;
char *alias, *nick;
AliasType type;
unsigned int spamfilter:1;
};
struct _configitem_alias_format {
@@ -1448,7 +1340,7 @@ struct _configitem_help {
ConfigItem *prev, *next;
ConfigFlag flag;
char *command;
aMotdLine *text;
aMotd *text;
};
struct _configitem_offchans {
@@ -1760,7 +1652,7 @@ struct liststruct {
*/
#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)
@@ -1807,7 +1699,7 @@ struct liststruct {
/* misc variable externs */
extern MODVAR char *version, *infotext[], *dalinfotext[], *unrealcredits[], *unrealinfo[];
extern MODVAR char *version, *infotext[], *dalinfotext[], *unrealcredits[];
extern MODVAR char *generation, *creation;
extern MODVAR char *gnulicense[];
/* misc defines */
@@ -1901,13 +1793,6 @@ struct JFlood {
};
#endif
struct PendingNet {
aPendingNet *prev, *next; /* Previous and next in list */
aClient *sptr; /**< Client to which these servers belong */
int numservers; /**< Amount of servers in list */
int servers[1]; /** The list of servers (array of integer server numerics) */
};
void init_throttling_hash();
int hash_throttling(struct IN_ADDR *in);
struct ThrottlingBucket *find_throttling_bucket(struct IN_ADDR *in);
+7 -25
View File
@@ -22,9 +22,6 @@
#ifndef __sys_include__
#define __sys_include__
/* PATH_MAX */
#include <limits.h>
/* alloca stuff */
#ifdef _WIN32
# include <malloc.h>
@@ -46,7 +43,11 @@
#ifdef ISC202
#include <net/errno.h>
#else
# ifndef _WIN32
#include <sys/errno.h>
# else
#include <errno.h>
# endif
#endif
#include "setup.h"
#include <stdio.h>
@@ -70,28 +71,18 @@
# include <string.h>
# endif
#endif
/* get intptr_t if the system provides it -- otherwise, ./configure will define it for us */
#ifdef HAVE_STDINT_H
#include <stdint.h>
#else
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif /* HAVE_INTTYPES_H */
#endif /* HAVE_STDINT_H */
#ifdef SSL
#include <openssl/ssl.h>
#endif
#ifdef INET6
#ifndef _WIN32
#include <netinet/in.h>
#include <sys/socket.h>
#endif
#ifdef _WIN32
#define _WIN32_WINNT 0x0501
#else
#include <winsock2.h>
#include <ws2tcpip.h>
#endif
#endif
#ifndef GOT_STRCASECMP
#define strcasecmp mycmp
#define strncasecmp myncmp
@@ -141,13 +132,6 @@ extern char *rindex(char *, char);
#define dn_skipname __dn_skipname
#endif
/*
* Mac OS X Tiger Support (Intel Only)
*/
#if defined(macosx) || (defined(__APPLE__) && defined(__MACH__))
#define OSXTIGER
#endif
#ifndef _WIN32
extern VOIDSIG dummy();
#endif
@@ -163,8 +147,6 @@ typedef unsigned int u_int;
#define MYOSNAME OSName
extern char OSName[256];
#define PATH_MAX MAX_PATH
#else
#define MYOSNAME getosname()
#endif
#ifdef DEBUGMODE
// #define ircsprintf sprintf
+4 -4
View File
@@ -2,10 +2,10 @@
#define URL_H
#include "types.h"
int MODFUNC url_is_valid(const char *);
char MODFUNC *url_getfilename(const char *url);
char MODFUNC *download_file(const char *, char **);
void MODFUNC download_file_async(const char *, time_t, vFP, void *callback_data);
int MODFUNC url_is_valid(char *);
char MODFUNC *url_getfilename(char *);
char MODFUNC *download_file(char *, char **);
void MODFUNC download_file_async(char *, time_t, vFP);
void MODFUNC url_do_transfers_async(void);
void MODFUNC url_init(void);
+5 -27
View File
@@ -23,36 +23,14 @@
#endif
/**/
#define COMPILEINFO DEBUGMODESET DEBUGSET
/* Version info follows
* 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.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: 2 for Unreal3.2*) */
#define UNREAL_VERSION_MAJOR 2
/** The minor version number (eg: 1 for Unreal3.2.1), negative numbers for unstable/alpha/beta */
#define UNREAL_VERSION_MINOR 9
/** Year + week of the year (ISO week number, with Monday as first day of 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 201120
#define UnrealProtocol 2310
#define UnrealProtocol 2306
#define PATCH1 "3"
#define PATCH2 ".2"
#define PATCH3 ".9"
#define PATCH4 "-rc2"
#define PATCH3 ".3"
#define PATCH4 ""
#define PATCH5 ""
#define PATCH6 ""
#define PATCH7 ""
+250
View File
@@ -0,0 +1,250 @@
/*
regex.h - POSIX.2 compatible regexp interface and TRE extensions
Copyright (C) 2001-2004 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
1991) as published by the Free Software Foundation.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef TRE_REGEX_H
#define TRE_REGEX_H 1
#include "tre-config.h"
#ifdef HAVE_SYS_TYPES_H
#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. */
#include TRE_SYSTEM_REGEX_H_PATH
#endif /* TRE_USE_SYSTEM_REGEX_H */
#ifdef __cplusplus
extern "C" {
#endif
#ifdef TRE_USE_SYSTEM_REGEX_H
#ifndef REG_OK
#define REG_OK 0
#endif /* !REG_OK */
#ifndef HAVE_REG_ERRCODE_T
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
structs and enums ourselves. */
typedef int regoff_t;
typedef struct {
size_t re_nsub; /* Number of parenthesized subexpressions. */
void *value; /* For internal use only. */
} regex_t;
typedef struct {
regoff_t rm_so;
regoff_t rm_eo;
} regmatch_t;
typedef enum {
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. */
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)
/* Extra regcomp() flags. */
#define REG_BASIC 0
#define REG_LITERAL (REG_NOSUB << 1)
#define REG_RIGHT_ASSOC (REG_LITERAL << 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
#elif defined(REG_NOSPEC)
#define REG_LITERAL REG_NOSPEC
#endif /* defined(REG_NOSPEC) */
/* The maximum number of iterations in a bound expression. */
#undef RE_DUP_MAX
#define RE_DUP_MAX 255
/* The POSIX.2 regexp functions */
int regcomp(regex_t *preg, const char *regex, int cflags);
int regexec(const regex_t *preg, const char *string, size_t nmatch,
regmatch_t pmatch[], int eflags);
size_t regerror(int errcode, const regex_t *preg, char *errbuf,
size_t errbuf_size);
void regfree(regex_t *preg);
#ifdef TRE_WCHAR
#ifdef HAVE_WCHAR_H
#include <wchar.h>
#endif /* HAVE_WCHAR_H */
/* Wide character versions (not in POSIX.2). */
int regwcomp(regex_t *preg, const wchar_t *regex, int cflags);
int regwexec(const regex_t *preg, const wchar_t *string, size_t nmatch,
regmatch_t pmatch[], int eflags);
#endif /* TRE_WCHAR */
/* Versions with a maximum length argument and therefore the capability to
handle null characters in the middle of the strings (not in POSIX.2). */
int regncomp(regex_t *preg, const char *regex, size_t len, int cflags);
int regnexec(const regex_t *preg, const char *string, size_t len,
size_t nmatch, regmatch_t pmatch[], int eflags);
#ifdef TRE_WCHAR
int regwncomp(regex_t *preg, const wchar_t *regex, size_t len, int cflags);
int regwnexec(const regex_t *preg, const wchar_t *string, size_t len,
size_t nmatch, regmatch_t pmatch[], int eflags);
#endif /* TRE_WCHAR */
#ifdef TRE_APPROX
/* 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_subst; /* Default cost of a substituted character. */
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_subst; /* Maximum allowed number of substitutes. */
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 num_subst; /* Number of substitutes in the match. */
} regamatch_t;
/* Approximate matching functions. */
int regaexec(const regex_t *preg, const char *string,
regamatch_t *match, regaparams_t params, int eflags);
int reganexec(const regex_t *preg, const char *string, size_t len,
regamatch_t *match, regaparams_t params, int eflags);
#ifdef TRE_WCHAR
/* Wide character approximate matching. */
int regawexec(const regex_t *preg, const wchar_t *string,
regamatch_t *match, regaparams_t params, int eflags);
int regawnexec(const regex_t *preg, const wchar_t *string, size_t len,
regamatch_t *match, regaparams_t params, int eflags);
#endif /* TRE_WCHAR */
/* Sets the parameters to default values. */
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
#endif /* TRE_REGEX_H */
/* EOF */
+1 -24
View File
@@ -21,7 +21,6 @@
#ifndef __setup_include__
#define __setup_include__
#undef PARAMH
#undef UNISTDH
#define STRINGH
@@ -44,33 +43,11 @@
#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
#ifndef mode_t
/*
Needed in s_conf.c for the third argument of open(3p).
Should be an int because of http://msdn.microsoft.com/en-us/library/z0kc8e3z(VS.71).aspx
*/
#define mode_t int
#endif
/*
make up for win32 (and win64?) users not being able to run ./configure.
*/
#ifndef intptr_t
#define intptr_t long
#endif
#endif
+52
View File
@@ -0,0 +1,52 @@
/* 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 */
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <wchar.h> header file. */
#define HAVE_WCHAR_H 1
/* Define if you want to enable approximate matching functionality. */
#define TRE_APPROX 1
/* 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 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
View File
+1
View File
@@ -0,0 +1 @@
0,10,20,30,40,50 * * * * /home/mydir-to/ircdcron/ircdchk >/dev/null 2>&1
-1
View File
@@ -1 +0,0 @@
0,10,20,30,40,50 * * * * @IRCDDIR@/ircdcron/ircdchk >/dev/null 2>&1
+40 -101
View File
@@ -4,26 +4,9 @@
CC=cl
LINK=link
RC=rc
MT=mt
############################ USER CONFIGURATION ############################
# You are encouraged NOT to set these values here, but instead make a batch file
# which passes all these arguments to nmake, like:
# nmake -f makefile.win32 USE_ZIPLINKS=1 ZLIB_INC_DIR="c:\dev\zlib" etc etc...
# Both ways will work, but if you use a batch file it's easier with
# upgrading Unreal as you won't have to edit this makefile again.
### TRE ###
#TRE_LIB_DIR="C:\dev\tre\win32\release"
#TRE_INC_DIR="C:\dev\tre"
#TRELIB="tre.lib"
### C-ARES ####
#CARES_LIB_DIR="C:\dev\c-ares\vc\cares\dll-release"
#CARES_INC_DIR="C:\dev\c-ares"
#CARESLIB="cares.lib"
##### REMOTE INCLUDES ####
#To enable remote include support you must have libcurl installed on your
#system and it must have ares support enabled.
@@ -71,43 +54,21 @@ MT=mt
#
######### 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 ###
############################# END CONFIGURATION ############################
!IFDEF CARES_INC_DIR
CARES_INC=/I "$(CARES_INC_DIR)"
!ENDIF
!IFDEF CARES_LIB_DIR
CARES_LIB=/LIBPATH:"$(CARES_LIB_DIR)"
!ENDIF
!IFDEF TRE_INC_DIR
TRE_INC=/I "$(TRE_INC_DIR)"
!ENDIF
!IFDEF TRE_LIB_DIR
TRE_LIB=/LIBPATH:"$(TRE_LIB_DIR)"
!ENDIF
!IFDEF USE_REMOTEINC
CURLCFLAGS=/D USE_LIBCURL
CURLOBJ=SRC/URL.OBJ
CURLLIB=libcurl_imp.lib
CURLLIB=libcurl.lib
!IFDEF LIBCURL_INC_DIR
LIBCURL_INC=/I "$(LIBCURL_INC_DIR)"
!ENDIF
@@ -139,31 +100,26 @@ OPENSSL_LIB=/LIBPATH:"$(OPENSSL_LIB_DIR)"
!ENDIF
!ENDIF
!IFDEF DEBUGEXTRA
DBGCFLAG=/MDd /Zi /Od
DBGCFLAGST=/MTd /Zi /Od
DBGLFLAG=/debug
MODDBGCFLAG=/LDd /MDd /Zi
!ELSE
!IFDEF DEBUG
DBGCFLAG=/MD /Zi
DBGCFLAGST=/MT /Zi
DBGLFLAG=/debug
DBGLFLAG=/debug /debugtype:BOTH
MODDBGCFLAG=/LDd /MD /Zi
!ELSE
DBGCFLAG=/MD /O2 /G5
MODDBGCFLAG=/LD /MD
!ENDIF
FD_SETSIZE=/D FD_SETSIZE=16384
CFLAGS=$(DBGCFLAG) $(TRE_INC) $(CARES_INC) $(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
CFLAGSST=$(DBGCFLAGST) $(TRE_INC) $(CARES_INC) $(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) /J /I ./INCLUDE /I ./INCLUDE/WIN32/ARES /Fosrc/ /nologo \
$(ZIPCFLAGS) $(CURLCFLAGS) $(FD_SETSIZE) $(SSLCFLAGS) $(NS_ADDRESS) /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 $(CARES_LIB) $(CARESLIB) $(TRE_LIB) $(TRELIB) $(ZLIB_LIB) $(ZIPLIB) \
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 $(TRE_INC) $(CARES_INC) $(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 ws2_32.lib $(TRE_LIB) $(TRELIB) $(CARES_LIB) $(OPENSSL_LIB) $(SSLLIBS) \
/Fosrc/modules/ /nologo $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) /I ./INCLUDE /D \
DYNAMIC_LINKING /D NOSPOOF /D MODULE_COMPILE
MODLFLAGS=/link /def:src/modules/module.def wircd.lib $(OPENSSL_LIB) $(SSLLIBS) \
$(ZLIB_LIB) $(ZIPLIB) $(LIBCURL_LIB) $(CURLLIB)
INCLUDES=./include/struct.h ./include/config.h ./include/sys.h \
@@ -179,10 +135,10 @@ EXP_OBJ_FILES=SRC/CHANNEL.OBJ SRC/SEND.OBJ SRC/SOCKET.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/LUSERS.OBJ \
SRC/SCACHE.OBJ SRC/ALN.OBJ SRC/RES.OBJ SRC/MODULES.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/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
@@ -194,7 +150,7 @@ MOD_FILES=SRC/MODULES/L_COMMANDS.C SRC/MODULES/M_CHGHOST.C SRC/MODULES/M_SDESC.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_MESSAGE.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 \
@@ -218,8 +174,7 @@ MOD_FILES=SRC/MODULES/L_COMMANDS.C SRC/MODULES/M_CHGHOST.C SRC/MODULES/M_SDESC.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 \
SRC/MODULES/M_STARTTLS.C SRC/MODULES/M_NOPOST.C SRC/MODULES/M_ISSECURE.C
SRC/MODULES/M_LUSERS.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 \
@@ -254,9 +209,7 @@ DLL_FILES=SRC/MODULES/M_CHGHOST.DLL SRC/MODULES/M_SDESC.DLL SRC/MODULES/M_SETIDE
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/M_STARTTLS.DLL \
SRC/MODULES/M_NOPOST.DLL SRC/MODULES/M_ISSECURE.DLL \
SRC/MODULES/M_LUSERS.DLL \
SRC/MODULES/CLOAK.DLL
@@ -277,23 +230,22 @@ CLEAN:
-@erase src\modules\*.ilk >NUL
./UNREAL.EXE: SRC/UNREAL.OBJ SRC/WIN32/UNREAL.RES
$(LINK) $(DBGLFLAGST) 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
$(CC) src/win32/config.c
-@config.exe
./WIRCD.EXE: $(OBJ_FILES) SRC/win32/WIN32.RES
$(LINK) $(LFLAGS) $(OBJ_FILES) SRC/win32/WIN32.RES /MAP
$(LINK) $(LFLAGS) $(OBJ_FILES) SRC/win32/WIN32.RES SRC/WIN32/TRE.LIB SRC/WIN32/ARESLIB.LIB /MAPINFO:LINES /MAP
-@erase src\win32\win32.res
$(MT) -manifest WIRCD.EXE.manifest -outputresource:WIRCD.EXE;1
!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
@@ -304,6 +256,12 @@ src/version.obj: 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
@@ -353,9 +311,6 @@ 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/s_bsd.obj: src/s_bsd.c $(INCLUDES)
$(CC) $(CFLAGS) src/s_bsd.c
@@ -432,7 +387,7 @@ src/win32.obj: src/win32/win32.c $(INCLUDES)
$(CC) $(CFLAGS) src/win32/win32.c
src/unreal.obj: src/win32/unreal.c $(INCLUDES)
$(CC) $(CFLAGSST) src/win32/unreal.c
$(CC) $(CFLAGS) src/win32/unreal.c
src/help.obj: src/help.c $(INCLUDES)
$(CC) $(CFLAGS) src/help.c
@@ -502,10 +457,9 @@ MODULES: $(DLL_FILES)
src/modules/commands.dll: $(MOD_FILES) $(INCLUDES)
$(CC) $(MODDBGCFLAG) $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) /nologo \
$(SSLCFLAGS) $(ZIPCFLAGS) $(CURLCFLAGS) $(TRE_INC) /Fosrc/modules/ \
/I ./INCLUDE /D NOSPOOF /D MODULE_COMPILE /D _CRT_SECURE_NO_DEPRECATE \
/D _USE_32BIT_TIME_T $(MOD_FILES) \
$(MODLFLAGS) /OUT:src/modules/commands.dll
$(SSLCFLAGS) $(ZIPCFLAGS) $(CURLCFLAGS) /Fosrc/modules/ \
/I ./INCLUDE /D NOSPOOF /D MODULE_COMPILE $(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)
@@ -532,7 +486,7 @@ 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)
$(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)
@@ -580,7 +534,7 @@ 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)
$(CC) $(MODCFLAGS) src/modules/m_message.c $(MODLFLAGS)
src/modules/m_nachat.dll: src/modules/m_nachat.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_nachat.c $(MODLFLAGS)
@@ -807,24 +761,9 @@ src/modules/m_botmotd.dll: src/modules/m_botmotd.c $(INCLUDES)
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)
src/modules/m_starttls.dll: src/modules/m_starttls.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_starttls.c $(MODLFLAGS)
src/modules/m_nopost.dll: src/modules/m_nopost.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_nopost.c $(MODLFLAGS)
src/modules/m_issecure.dll: src/modules/m_issecure.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_issecure.c $(MODLFLAGS)
dummy:
+12 -11
View File
@@ -21,13 +21,13 @@
CC = danger will robinson
OBJS=timesynch.o res.o s_bsd.o auth.o aln.o channel.o cloak.o crule.o dbuf.o \
OBJS=res.o s_bsd.o auth.o aln.o badwords.o channel.o cloak.o crule.o dbuf.o \
events.o fdlist.o hash.o help.o ircd.o ircsprintf.o list.o lusers.o \
match.o modules.o packet.o parse.o s_auth.o \
s_conf.o s_debug.o s_err.o s_extra.o s_kline.o \
s_misc.o s_numeric.o s_serv.o s_svs.o $(STRTOUL) socket.o \
ssl.o s_user.o charsys.o scache.o send.o support.o umodes.o \
version.o whowas.o zip.o cidr.o random.o extcmodes.o \
version.o webtv.o whowas.o zip.o cidr.o random.o extcmodes.o \
extbans.o md5.o api-isupport.o api-command.o $(URL)
SRC=$(OBJS:%.o=%.c)
@@ -41,14 +41,14 @@ MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'IRCDLIBS=${IRCDLIBS}' \
'CRYPTOLIB=${CRYPTOLIB}' \
'CRYPTOINCLUDES=${CRYPTOINCLUDES}' 'URL=${URL}' \
MY_MAKE = $(MAKE) $(MAKEARGS)
MAKE = make $(MAKEARGS)
INCLUDES = ../include/auth.h ../include/badwords.h ../include/channel.h \
../include/class.h ../include/common.h ../include/config.h ../include/dbuf.h \
../include/dynconf.h ../include/events.h ../include/fdlist.h ../include/h.h \
../include/hash.h ../include/inet.h ../include/ircsprintf.h \
../include/license.h ../include/macros.h ../include/md5.h \
../include/modules.h ../include/modversion.h ../include/msg.h \
../include/modules.h ../include/modversion.h ../include/msg.h ../include/nameser.h \
../include/numeric.h ../include/proto.h \
../include/resource.h ../include/setup.h ../include/sjoin.h \
../include/sock.h ../include/ssl.h ../include/struct.h ../include/sys.h \
@@ -60,7 +60,7 @@ all: build
build: ircd mods
custommodule:
cd modules; $(MY_MAKE) MODULEFILE=$(MODULEFILE) 'EXLIBS=$(EXLIBS)' custommodule
cd modules; $(MAKE) MODULEFILE=$(MODULEFILE) 'EXLIBS=$(EXLIBS)' custommodule
ircd: $(OBJS)
$(CC) $(CFLAGS) $(CRYPTOLIB) -o ircd $(OBJS) $(LDFLAGS) $(IRCDLIBS) $(CRYPTOLIB)
@@ -83,7 +83,7 @@ mods:
@if [ ! -r modules ] ; then \
echo "You havent done cvs update -P -d"; \
fi
cd modules; $(MY_MAKE) all
cd modules; $(MAKE) all
version.c: version.c.SH ../Changes
$(SHELL) version.c.SH
@@ -105,6 +105,9 @@ dbuf.o: dbuf.c $(INCLUDES)
packet.o: packet.c $(INCLUDES)
$(CC) $(CFLAGS) -c packet.c
badwords.o: badwords.c $(INCLUDES)
$(CC) $(CFLAGS) -c badwords.c
aln.o: aln.c $(INCLUDES)
$(CC) $(CFLAGS) -c aln.c
@@ -117,14 +120,15 @@ zip.o: zip.c $(INCLUDES)
send.o: send.c $(INCLUDES)
$(CC) $(CFLAGS) -c send.c
webtv.o: webtv.c $(INCLUDES)
$(CC) $(CFLAGS) -c webtv.c
ssl.o: ssl.c $(INCLUDES)
$(CC) $(CFLAGS) -c ssl.c
match.o: match.c $(INCLUDES)
$(CC) $(CFLAGS) -c match.c
modules.o: modules.c $(INCLUDES)
support.o: support.c $(INCLUDES)
$(CC) $(CFLAGS) -c support.c
@@ -179,9 +183,6 @@ lusers.o: lusers.c $(INCLUDES)
res.o: res.c $(INCLUDES) ../include/res.h
$(CC) $(CFLAGS) -c res.c
timesynch.o: timesynch.c $(INCLUDES)
$(CC) $(CFLAGS) -c timesynch.c
cloak.o: cloak.c $(INCLUDES)
$(CC) $(CFLAGS) -c cloak.c
-1
View File
@@ -116,7 +116,6 @@ void CommandDel(Command *command) {
if (!*tmp)
{
IsupportDel(IsupportFind("CMDS"));
free(tmp);
cmdstr = NULL;
}
else
-5
View File
@@ -132,8 +132,6 @@ void isupport_init(void)
IsupportAdd(NULL, "CHANTYPES", "#");
IsupportAdd(NULL, "MODES", my_itoa(MAXMODEPARAMS));
IsupportAdd(NULL, "SILENCE", my_itoa(SILENCE_LIMIT));
if (WATCH_AWAY_NOTIFICATION)
IsupportAdd(NULL, "WATCHOPTS", "A");
IsupportAdd(NULL, "WATCH", my_itoa(MAXWATCH));
IsupportAdd(NULL, "WALLCHOPS", NULL);
IsupportAdd(NULL, "MAXTARGETS", my_itoa(MAXTARGETS));
@@ -149,9 +147,6 @@ void isupport_init(void)
IsupportAdd(NULL, "MAXCHANNELS", my_itoa(MAXCHANNELSPERUSER));
IsupportAdd(NULL, "HCN", NULL);
IsupportAdd(NULL, "SAFELIST", NULL);
IsupportAdd(NULL, "NAMESX", NULL);
if (UHNAMES_ENABLED)
IsupportAdd(NULL, "UHNAMES", NULL);
if (cmdstr)
IsupportAdd(NULL, "CMDS", cmdstr);
}
+6 -12
View File
@@ -94,12 +94,6 @@ int Auth_CheckError(ConfigEntry *ce)
ce->ce_fileptr->cf_filename, ce->ce_varlinenum);
return -1;
}
if (ce->ce_entries && ce->ce_entries->ce_next)
{
config_error("%s:%i: you may not have multiple authentication methods",
ce->ce_fileptr->cf_filename, ce->ce_varlinenum);
return -1;
}
if (ce->ce_entries)
{
if (ce->ce_entries->ce_varname)
@@ -316,9 +310,9 @@ char *saltstr, *hashstr;
SHA1_Update(&hash, para, strlen(para));
SHA1_Final(result1, &hash);
#else
if (!CryptCreateHash(hProv, CALG_SHA1, 0, 0, &hHash)) return -1;
if (!CryptHashData(hHash, para, strlen(para), 0)) return -1;
if (!CryptGetHashParam(hHash, HP_HASHVAL, result1, &size, 0)) return -1;
if (!CryptCreateHash(hProv, CALG_SHA1, 0, 0, &hHash)) return NULL;
if (!CryptHashData(hHash, para, strlen(para), 0)) return NULL;
if (!CryptGetHashParam(hHash, HP_HASHVAL, result1, &size, 0)) return NULL;
CryptDestroyHash(hHash);
#endif
/* Add salt to result */
@@ -330,9 +324,9 @@ char *saltstr, *hashstr;
SHA1_Update(&hash, result1, rsaltlen+20);
SHA1_Final(result2, &hash);
#else
if (!CryptCreateHash(hProv, CALG_SHA1, 0, 0, &hHash)) return -1;
if (!CryptHashData(hHash, result1, 20+rsaltlen, 0)) return -1;
if (!CryptGetHashParam(hHash, HP_HASHVAL, result2, &size, 0)) return -1;
if (!CryptCreateHash(hProv, CALG_SHA1, 0, 0, &hHash)) return NULL;
if (!CryptHashData(hHash, result1, 20+rsaltlen, 0)) return NULL;
if (!CryptGetHashParam(hHash, HP_HASHVAL, result2, &size, 0)) return NULL;
CryptDestroyHash(hHash);
CryptReleaseContext(hProv, 0);
#endif
+293
View File
@@ -0,0 +1,293 @@
/*
* IRC - Internet Relay Chat, badwords.c
* Copyleft (C) 2000 meow <csi@gnu.net>
*
* Provides functions, for loading and filtering unwanted words out of
* a string, or in this case part of a message. Please note that this
* is flawed because when mode_strip is set, mode_stripbadwords is not
* active. This is due to the structure of m_message(), and therefore
* will not change until I (or someone else) revamps the code.
*
* You can redistribute and/or modify this under the terms of the GNU
* General Public License as published by the Free Software Foundation.
*
* Disclaimer: You have no rights. Use at your own risk. Don't drink
* too much pepsi.
*/
#ifndef _WIN32
#include <unistd.h>
#endif
#include "config.h"
#include "struct.h"
#include "common.h"
#include "h.h"
#ifdef STRIPBADWORDS
#include "badwords.h"
/* This was modified a bit in order to use newconf. The loading functions
* have been trashed and integrated into the config parser. The striping
* function now only uses REPLACEWORD if no word is specifically defined
* for the word found. Also the freeing function has been ditched. -- codemastr
*/
#ifdef FAST_BADWORD_REPLACE
/*
* our own strcasestr implementation because strcasestr is often not
* available or is not working correctly (??).
*/
char *our_strcasestr(char *haystack, char *needle) {
int i;
int nlength = strlen (needle);
int hlength = strlen (haystack);
if (nlength > hlength) return NULL;
if (hlength <= 0) return NULL;
if (nlength <= 0) return haystack;
for (i = 0; i <= (hlength - nlength); i++) {
if (strncasecmp (haystack + i, needle, nlength) == 0)
return haystack + i;
}
return NULL; /* not found */
}
inline int fast_badword_match(ConfigItem_badword *badword, char *line)
{
char *p;
int bwlen = strlen(badword->word);
if ((badword->type & BADW_TYPE_FAST_L) && (badword->type & BADW_TYPE_FAST_R))
return (our_strcasestr(line, badword->word) ? 1 : 0);
p = line;
while((p = our_strcasestr(p, badword->word)))
{
if (!(badword->type & BADW_TYPE_FAST_L))
{
if ((p != line) && !iswseperator(*(p - 1))) /* aaBLA but no *BLA */
goto next;
}
if (!(badword->type & BADW_TYPE_FAST_R))
{
if (!iswseperator(*(p + bwlen))) /* BLAaa but no BLA* */
goto next;
}
/* Looks like it matched */
return 1;
next:
p += bwlen;
}
return 0;
}
/* fast_badword_replace:
* a fast replace routine written by Syzop used for replacing badwords.
* searches in line for huntw and replaces it with replacew,
* buf is used for the result and max is sizeof(buf).
* (Internal assumptions: max > 0 AND max > strlen(line)+1)
*/
inline int fast_badword_replace(ConfigItem_badword *badword, char *line, char *buf, int max)
{
/* Some aliases ;P */
char *replacew = badword->replace ? badword->replace : REPLACEWORD;
char *pold = line, *pnew = buf; /* Pointers to old string and new string */
char *poldx = line;
int replacen = -1; /* Only calculated if needed. w00t! saves us a few nanosecs? lol */
int searchn = -1;
char *startw, *endw;
char *c_eol = buf + max - 1; /* Cached end of (new) line */
int run = 1;
int cleaned = 0;
Debug((DEBUG_NOTICE, "replacing %s -> %s in '%s'", badword->word, replacew, line));
while(run) {
pold = our_strcasestr(pold, badword->word);
if (!pold)
break;
if (replacen == -1)
replacen = strlen(replacew);
if (searchn == -1)
searchn = strlen(badword->word);
/* Hunt for start of word */
if (pold > line) {
for (startw = pold; (!iswseperator(*startw) && (startw != line)); startw--);
if (iswseperator(*startw))
startw++; /* Don't point at the space/seperator but at the word! */
} else {
startw = pold;
}
if (!(badword->type & BADW_TYPE_FAST_L) && (pold != startw)) {
/* not matched */
pold++;
continue;
}
/* Hunt for end of word */
for (endw = pold; ((*endw != '\0') && (!iswseperator(*endw))); endw++);
if (!(badword->type & BADW_TYPE_FAST_R) && (pold+searchn != endw)) {
/* not matched */
pold++;
continue;
}
cleaned = 1; /* still too soon? Syzop/20050227 */
/* Do we have any not-copied-yet data? */
if (poldx != startw) {
int tmp_n = startw - poldx;
if (pnew + tmp_n >= c_eol) {
/* Partial copy and return... */
memcpy(pnew, poldx, c_eol - pnew);
*c_eol = '\0';
return 1;
}
memcpy(pnew, poldx, tmp_n);
pnew += tmp_n;
}
/* Now update the word in buf (pnew is now something like startw-in-new-buffer */
if (replacen) {
if ((pnew + replacen) >= c_eol) {
/* Partial copy and return... */
memcpy(pnew, replacew, c_eol - pnew);
*c_eol = '\0';
return 1;
}
memcpy(pnew, replacew, replacen);
pnew += replacen;
}
poldx = pold = endw;
}
/* Copy the last part */
if (*poldx) {
strncpy(pnew, poldx, c_eol - pnew);
*(c_eol) = '\0';
} else {
*pnew = '\0';
}
return cleaned;
}
#endif
/*
* Returns a string, which has been filtered by the words loaded via
* the loadbadwords() function. It's primary use is to filter swearing
* in both private and public messages
*/
void badwords_stats(aClient *sptr)
{
}
char *stripbadwords(char *str, ConfigItem_badword *start_bw, int *blocked)
{
regmatch_t pmatch[MAX_MATCH];
static char cleanstr[4096];
char buf[4096];
char *ptr;
int matchlen, m, stringlen, cleaned;
ConfigItem_badword *this_word;
*blocked = 0;
if (!start_bw)
return str;
/*
* work on a copy
*/
stringlen = strlcpy(cleanstr, StripControlCodes(str), sizeof cleanstr);
memset(&pmatch, 0, sizeof pmatch);
matchlen = 0;
buf[0] = '\0';
cleaned = 0;
for (this_word = start_bw; this_word; this_word = (ConfigItem_badword *)this_word->next)
{
#ifdef FAST_BADWORD_REPLACE
if (this_word->type & BADW_TYPE_FAST)
{
if (this_word->action == BADWORD_BLOCK)
{
if (fast_badword_match(this_word, cleanstr))
{
*blocked = 1;
return NULL;
}
}
else
{
int n;
/* fast_badword_replace() does size checking so we can use 512 here instead of 4096 */
n = fast_badword_replace(this_word, cleanstr, buf, 512);
if (!cleaned && n)
cleaned = n;
strcpy(cleanstr, buf);
memset(buf, 0, sizeof(buf)); /* regexp likes this somehow */
}
} else
if (this_word->type & BADW_TYPE_REGEX)
{
#endif
if (this_word->action == BADWORD_BLOCK)
{
if (!regexec(&this_word->expr, cleanstr, 0, NULL, 0))
{
*blocked = 1;
return NULL;
}
}
else
{
ptr = cleanstr; /* set pointer to start of string */
while (regexec(&this_word->expr, ptr, MAX_MATCH, pmatch,0) != REG_NOMATCH)
{
if (pmatch[0].rm_so == -1)
break;
m = pmatch[0].rm_eo - pmatch[0].rm_so;
if (m == 0)
break; /* anti-loop */
cleaned = 1;
matchlen += m;
strlncat(buf, ptr, sizeof buf, pmatch[0].rm_so);
if (this_word->replace)
strlcat(buf, this_word->replace, sizeof buf);
else
strlcat(buf, REPLACEWORD, sizeof buf);
ptr += pmatch[0].rm_eo; /* Set pointer after the match pos */
memset(&pmatch, 0, sizeof(pmatch));
}
/* All the better to eat you with! */
strlcat(buf, ptr, sizeof buf);
memcpy(cleanstr, buf, sizeof cleanstr);
memset(buf, 0, sizeof(buf));
if (matchlen == stringlen)
break;
}
#ifdef FAST_BADWORD_REPLACE
}
#endif
}
cleanstr[511] = '\0'; /* cutoff, just to be sure */
return (cleaned) ? cleanstr : str;
}
char inline *stripbadwords_channel(char *str, int *blocked)
{
return stripbadwords(str, conf_badword_channel, blocked);
}
char inline *stripbadwords_message(char *str, int *blocked)
{
return stripbadwords(str, conf_badword_message, blocked);
}
char inline *stripbadwords_quit(char *str, int *blocked)
{
return stripbadwords(str, conf_badword_quit, blocked);
}
#endif
+996 -160
View File
File diff suppressed because it is too large Load Diff
+12 -35
View File
@@ -90,12 +90,11 @@ struct _langlist
/* MUST be alphabetized (first column) */
static LangList langlist[] = {
{ "belarussian-w1251", "blr", LANGAV_ASCII|LANGAV_W1251 },
{ "catalan", "cat", LANGAV_ASCII|LANGAV_LATIN1 },
{ "chinese", "chi-j,chi-s,chi-t", LANGAV_GBK },
{ "chinese-ja", "chi-j", LANGAV_GBK },
{ "chinese", "chi-s,chi-t,chi-j", LANGAV_GBK },
{ "chinese-simp", "chi-s", LANGAV_GBK },
{ "chinese-trad", "chi-t", LANGAV_GBK },
{ "chinese-ja", "chi-j", LANGAV_GBK },
{ "czech", "cze-m", LANGAV_ASCII|LANGAV_W1250 },
{ "danish", "dan", LANGAV_ASCII|LANGAV_LATIN1 },
{ "dutch", "dut", LANGAV_ASCII|LANGAV_LATIN1 },
@@ -107,7 +106,7 @@ static LangList langlist[] = {
{ "hungarian", "hun", LANGAV_ASCII|LANGAV_LATIN2W1250 },
{ "icelandic", "ice", LANGAV_ASCII|LANGAV_LATIN1 },
{ "italian", "ita", LANGAV_ASCII|LANGAV_LATIN1 },
{ "latin1", "cat,dut,fre,ger,ita,spa,swe", LANGAV_ASCII|LANGAV_LATIN1 },
{ "latin1", "cat,dan,dut,fre,ger,ita,spa,swe", LANGAV_ASCII|LANGAV_LATIN1 },
{ "latin2", "hun,pol,rum", LANGAV_ASCII|LANGAV_LATIN2 },
{ "polish", "pol", LANGAV_ASCII|LANGAV_LATIN2 },
{ "polish-w1250", "pol-m", LANGAV_ASCII|LANGAV_W1250 },
@@ -118,9 +117,7 @@ static LangList langlist[] = {
{ "swedish", "swe", LANGAV_ASCII|LANGAV_LATIN1 },
{ "swiss-german", "swg", LANGAV_ASCII|LANGAV_LATIN1 },
{ "turkish", "tur", LANGAV_ASCII|LANGAV_ISO8859_9 },
{ "ukrainian-w1251", "ukr", LANGAV_ASCII|LANGAV_W1251 },
{ "windows-1250", "cze-m,pol-m,rum,slo-m,hun", LANGAV_ASCII|LANGAV_W1250 },
{ "windows-1251", "rus,ukr,blr", LANGAV_ASCII|LANGAV_W1251 },
{ NULL, NULL, 0 }
};
@@ -245,7 +242,7 @@ ILangList *e, *e_next;
*/
void charsys_addmultibyterange(char s1, char e1, char s2, char e2)
{
MBList *m = MyMallocEx(sizeof(MBList));
MBList *m = MyMallocEx(sizeof(m));
m->s1 = s1;
m->e1 = e1;
@@ -372,7 +369,7 @@ int charsys_postconftest(void)
int x=0;
if ((langav & LANGAV_ASCII) && (langav & LANGAV_GBK))
{
config_error("ERROR: set::allowed-nickchars specifies incorrect combination "
config_error("ERROR: set::accept-language specifies incorrect combination "
"of languages: high-ascii languages (such as german, french, etc) "
"cannot be mixed with chinese/..");
return -1;
@@ -393,7 +390,7 @@ int x=0;
x++;
if (x > 1)
{
config_status("WARNING: set::allowed-nickchars: "
config_status("WARNING: set::accept-language: "
"Mixing of charsets (eg: latin1+latin2) can cause display problems");
}
return 1;
@@ -408,7 +405,7 @@ int mid;
while (start <= stop)
{
mid = (start+stop)/2;
if (!langlist[mid].directive || smycmp(name, langlist[mid].directive) < 0)
if (smycmp(name, langlist[mid].directive) < 0)
stop = mid-1;
else if (strcmp(name, langlist[mid].directive) == 0)
return &langlist[mid];
@@ -430,7 +427,7 @@ LangList *l = charsys_find_language(name);
}
if (!strcmp(name, "euro-west"))
{
config_error("set::allowed-nickchars: ERROR: 'euro-west' got renamed to 'latin1'");
config_error("set::accept-language: ERROR: 'euro-west' got renamed to 'latin1'");
return 0;
}
return 0;
@@ -475,7 +472,7 @@ char tmp[512], *lang, *p;
void charsys_add_language(char *name)
{
char latin1=0, latin2=0, w1250=0, w1251=0, chinese=0;
char latin1=0, latin2=0, w1250=0, chinese=0;
/** Note: there could well be some characters missing in the lists below.
* While I've seen other altnernatives that just allow pretty much
@@ -496,8 +493,6 @@ char latin1=0, latin2=0, w1250=0, w1251=0, chinese=0;
latin2 = 1;
else if (!strcmp(name, "windows-1250"))
w1250 = 1;
else if (!strcmp(name, "windows-1251"))
w1251 = 1;
else if (!strcmp(name, "chinese") || !strcmp(name, "gbk"))
chinese = 1;
@@ -553,8 +548,8 @@ char latin1=0, latin2=0, w1250=0, w1251=0, chinese=0;
if (latin1 || !strcmp(name, "catalan"))
{
/* supplied by Trocotronic */
/* a`, A`, e`, weird-c, weird-C, E`, e', E', i', I', o`, O`, o', O', u', U', i", I", u", U", weird-dot */
charsys_addallowed("àÀçÇèÈéÉíÍòÒóÓúÚïÏüÜ");
/* a`, A`, e`, E`, e', E', i', I', o`, O`, o', O', u', U', i", I", u", U" */
charsys_addallowed("àÀèÈéÉíÍòÒóÓúÚïÏüÜ");
}
if (latin1 || !strcmp(name, "swedish"))
{
@@ -608,31 +603,13 @@ char latin1=0, latin2=0, w1250=0, w1251=0, chinese=0;
}
/* [windows 1251] */
if (w1251 || !strcmp(name, "russian-w1251"))
if (!strcmp(name, "russian-w1251"))
{
/* supplied by Roman Parkin:
* 128-159 and 223-254
*/
charsys_addallowed("ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¨¸");
}
if (w1251 || !strcmp(name, "belarussian-w1251"))
{
/* supplied by Bock (Samets Anton) & ss:
* 128-159, 161, 162, 178, 179 and 223-254
* Corrected 01.11.2006 to more "correct" behavior by Bock
*/
charsys_addallowed("ÀÁÂÃÄŨÆÇ²ÉÊËÌÍÎÏÐÑÒÓ¡ÔÕÖרÛÜÝÞßàáâãä叿ç³éêëìíîïðñòó¢ôõö÷øûüýþÿ");
}
if (w1251 || !strcmp(name, "ukrainian-w1251"))
{
/* supplied by Anton Samets & ss:
* 128-159, 170, 175, 178, 179, 186, 191 and 223-254
* Corrected 01.11.2006 to more "correct" behavior by core
*/
charsys_addallowed("ÀÁÂÃ¥ÄŪÆÇȲ¯ÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÜÞßàáâã´äåºæç賿éêëìíîïðñòóôõö÷øùüþÿ");
}
/* [GREEK] */
if (!strcmp(name, "greek"))
+1 -4
View File
@@ -295,8 +295,6 @@ int parse_netmask(const char *text, struct irc_netmask *netmask)
/* The address matching stuff... */
/* int match_ipv6(struct IN_ADDR *, struct IN_ADDR *, int)
* Input: An IP address, an IP mask, the number of bits in the mask.
* Only the first bits of the IP mask will be compared, so
* it doesn't need to be zeroed out after bits bits.
* Output: if match, 1 else 0
* Side effects: None
*/
@@ -310,8 +308,7 @@ int match_ipv6(struct IN_ADDR *addr, struct IN_ADDR *mask, int bits)
return 0;
if ((m = bits % 8) == 0)
return 1;
if ((addr->s6_addr[n] & ~((1 << (8 - m)) - 1))
== (mask->s6_addr[n] & ~((1 << (8 - m)) - 1)))
if ((addr->s6_addr[n] & ~((1 << (8 - m)) - 1)) == mask->s6_addr[n])
return 1;
return 0;
}
+125 -6
View File
@@ -15,6 +15,12 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
#ifdef CLEAN_COMPILE
static char sccxid[] = "@(#)cloak.c 9.00 7/12/99 UnrealIRCd";
#endif
*/
#include "struct.h"
#include "common.h"
#include "sys.h"
@@ -27,8 +33,124 @@
#include <string.h>
#include "h.h"
/* The implementation here was originally done by Gary S. Brown. I have
borrowed the tables directly, and made some minor changes to the
crc32-function (including changing the interface). //ylo */
/* ============================================================= */
/* COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or */
/* code or tables extracted from it, as desired without restriction. */
/* */
/* First, the polynomial itself and its table of feedback terms. The */
/* polynomial is */
/* X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 */
/* */
/* Note that we take it "backwards" and put the highest-order term in */
/* the lowest-order bit. The X^32 term is "implied"; the LSB is the */
/* X^31 term, etc. The X^0 term (usually shown as "+1") results in */
/* the MSB being 1. */
/* */
/* Note that the usual hardware shift register implementation, which */
/* is what we're using (we're merely optimizing it by doing eight-bit */
/* chunks at a time) shifts bits into the lowest-order term. In our */
/* implementation, that means shifting towards the right. Why do we */
/* do it this way? Because the calculated CRC must be transmitted in */
/* order from highest-order term to lowest-order term. UARTs transmit */
/* characters in order from LSB to MSB. By storing the CRC this way, */
/* we hand it to the UART in the order low-byte to high-byte; the UART */
/* sends each low-bit to hight-bit; and the result is transmission bit */
/* by bit from highest- to lowest-order term without requiring any bit */
/* shuffling on our part. Reception works similarly. */
/* */
/* The feedback terms table consists of 256, 32-bit entries. Notes: */
/* */
/* The table can be generated at runtime if desired; code to do so */
/* is shown later. It might not be obvious, but the feedback */
/* terms simply represent the results of eight shift/xor opera- */
/* tions for all combinations of data and CRC register values. */
/* */
/* The values must be right-shifted by eight bits by the "updcrc" */
/* logic; the shift must be unsigned (bring in zeroes). On some */
/* hardware you could probably optimize the shift in assembler by */
/* using byte-swap instructions. */
/* polynomial $edb88320 */
/* */
/* -------------------------------------------------------------------- */
static unsigned long crc32_tab[] = {
0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L,
0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL,
0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L,
0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L,
0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L,
0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,
0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L,
0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL,
0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L,
0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L,
0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L,
0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL,
0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL,
0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,
0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL,
0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L,
0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L,
0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L,
0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL,
0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L,
0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L,
0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,
0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L,
0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L,
0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L,
0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L,
0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L,
0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL,
0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL,
0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,
0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L,
0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL,
0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL,
0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L,
0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL,
0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L,
0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL,
0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,
0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL,
0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L,
0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L,
0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL,
0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L,
0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L,
0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L,
0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,
0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L,
0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L,
0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL,
0x2d02ef8dL
};
/* Return a 32-bit CRC of the contents of the buffer. */
unsigned long our_crc32(const unsigned char *s, unsigned int len)
{
unsigned int i;
unsigned long crc32val;
crc32val = 0;
for (i = 0; i < len; i ++)
{
crc32val =
crc32_tab[(crc32val ^ s[i]) & 0xff] ^
(crc32val >> 8);
}
return crc32val;
}
/* mode = 0, just use strncpyzt, 1 = Realloc new and return new pointer */
char *make_virthost(aClient *sptr, char *curr, char *new, int mode)
char *make_virthost(char *curr, char *new, int mode)
{
char host[256], *mask, *x, *p, *q;
@@ -41,14 +163,11 @@ char host[256], *mask, *x, *p, *q;
*q = '\0';
/* Call the cloaking layer */
if (RCallbacks[CALLBACKTYPE_CLOAK_EX])
mask = RCallbacks[CALLBACKTYPE_CLOAK_EX]->func.pcharfunc(sptr, host);
else
mask = RCallbacks[CALLBACKTYPE_CLOAK]->func.pcharfunc(host);
mask = RCallbacks[CALLBACKTYPE_CLOAK]->func.pcharfunc(host);
if (mode == 0)
{
strlcpy(new, mask, HOSTLEN + 1);
strncpyzt(new, mask, HOSTLEN); /* */
return NULL;
}
if (new)
+23 -246
View File
@@ -230,7 +230,7 @@ char *p = ban+3, symbol = '\0';
}
for (lp = sptr->user->channel; lp; lp = lp->next)
{
if (!match_esc(p, lp->chptr->chname))
if (!match(p, lp->chptr->chname))
{
/* Channel matched, check symbol if needed (+/%/@/etc) */
if (symbol)
@@ -250,12 +250,13 @@ char *ban = banin + 3;
if (type != BANCHK_MSG)
return 0;
if ((ban_realhost && !match(ban, ban_realhost)) ||
(ban_virthost && !match(ban, ban_virthost)) ||
(ban_ip && !match(ban, ban_ip)))
return 1;
#ifdef DISABLE_STACKED_EXTBANS
return extban_is_banned_helper(ban);
#else
return ban_check_mask(sptr, chptr, ban, type, 0);
#endif
return 0;
}
int extban_moden_is_banned(aClient *sptr, aChannel *chptr, char *banin, int type)
@@ -267,79 +268,15 @@ char *ban = banin + 3;
if (has_voice(sptr, chptr))
return 0;
if ((ban_realhost && !match(ban, ban_realhost)) ||
(ban_virthost && !match(ban, ban_virthost)) ||
(ban_ip && !match(ban, ban_ip)))
return 1;
#ifdef DISABLE_STACKED_EXTBANS
return extban_is_banned_helper(ban);
#else
return ban_check_mask(sptr, chptr, ban, type, 0);
#endif
return 0;
}
/* a ban that affects JOINs only */
int extban_modej_is_banned(aClient *sptr, aChannel *chptr, char *banin, int type)
{
char *sub_ban;
if (type != BANCHK_JOIN)
return 0;
sub_ban = banin + 3;
#ifdef DISABLE_STACKED_EXTBANS
return extban_is_banned_helper(sub_ban);
#else
return ban_check_mask(sptr, chptr, sub_ban, type, 0);
#endif
}
#ifndef DISABLE_STACKED_EXTBANS
/** General is_ok for n!u@h stuff that also deals with recursive extbans.
*/
int extban_is_ok_nuh_extban(aClient* sptr, aChannel* chptr, char* para, int checkt, int what, int what2)
{
char *mask = (para + 3);
Extban *p = NULL;
int isok;
static int extban_is_ok_recursion = 0;
/* Mostly copied from clean_ban_mask - but note MyClient checks aren't needed here: extban->is_ok() according to m_mode isn't called for nonlocal. */
if ((*mask == '~') && mask[1] && (mask[2] == ':'))
{
if (extban_is_ok_recursion)
return 0; /* Fail: more than one stacked extban */
/* We can be sure RESTRICT_EXTENDEDBANS is not *. Else this extended ban wouldn't be happening at all. */
if (what == EXBCHK_PARAM && RESTRICT_EXTENDEDBANS && !IsAnOper(sptr))
{
if (strchr(RESTRICT_EXTENDEDBANS, mask[1]))
{
sendnotice(sptr, "Setting/removing of extended bantypes '%s' has been disabled.", RESTRICT_EXTENDEDBANS);
return 0; /* Fail */
}
}
p = findmod_by_bantype(mask[1]);
if (!p)
{
if (what == MODE_DEL)
{
return 1; /* Always allow killing unknowns. */
}
return 0; /* Don't add unknown extbans. */
}
/* Now we have to ask the stacked extban if it's ok. */
if (p->is_ok)
{
extban_is_ok_recursion++;
isok = p->is_ok(sptr, chptr, mask, checkt, what, what2);
extban_is_ok_recursion--;
return isok;
}
}
return 1; /* Either not an extban, or extban has NULL is_ok. Good to go. */
}
#endif
/** Some kind of general conv_param routine,
* to ensure the parameter is nick!user@host.
* most of the code is just copied from clean_ban_mask.
@@ -374,100 +311,6 @@ char pfix[8];
return retbuf;
}
#ifndef DISABLE_STACKED_EXTBANS
/** conv_param to deal with stacked extbans.
*/
char* extban_conv_param_nuh_or_extban(char* para)
{
#if (USERLEN + NICKLEN + HOSTLEN + 32) > 256
#error "wtf?"
#endif
static char retbuf[256];
static char printbuf[256];
char *mask;
char tmpbuf[USERLEN + NICKLEN + HOSTLEN + 32];
char bantype = para[1];
char *ret = NULL;
Extban *p = NULL;
static int extban_recursion = 0;
if (para[3] == '~' && para[4] && para[5] == ':')
{
/* We're dealing with a stacked extended ban.
* Rules:
* 1) You can only stack once, so: ~x:~y:something and not ~x:~y:~z...
* 2) The first item must be an action modifier, such as ~q/~n/~j
* 3) The second item may never be an action modifier, nor have the
* EXTBOPT_NOSTACKCHILD flag set (for things like a textban).
*/
/* Rule #1. Yes the recursion check is also in extban_is_ok_nuh_extban,
* but it's possible to get here without the is_ok() function ever
* being called (think: non-local client). And no, don't delete it
* there either. It needs to be in BOTH places. -- Syzop
*/
if (extban_recursion)
return NULL;
/* Rule #2 */
p = findmod_by_bantype(para[1]);
if (p && !(p->options & EXTBOPT_ACTMODIFIER))
{
/* Rule #2 violation */
return NULL;
}
strncpyzt(tmpbuf, para, sizeof(tmpbuf));
mask = tmpbuf + 3;
/* Already did restrict-extended bans check. */
p = findmod_by_bantype(mask[1]);
if (!p)
{
/* Handling unknown bantypes in is_ok. Assume that it's ok here. */
return para;
}
if ((p->options & EXTBOPT_ACTMODIFIER) || (p->options & EXTBOPT_NOSTACKCHILD))
{
/* Rule #3 violation */
return NULL;
}
if (p->conv_param)
{
extban_recursion++;
ret = p->conv_param(mask);
extban_recursion--;
if (ret)
{
/*
* If bans are stacked, then we have to use two buffers
* to prevent ircsprintf() from going into a loop.
*/
ircsprintf(printbuf, "~%c:%s", bantype, ret); /* Make sure our extban prefix sticks. */
memcpy(retbuf, printbuf, sizeof(retbuf));
return retbuf;
}
else
{
return NULL; /* Fail. */
}
}
/* I honestly don't know what the deal is with the 80 char cap in clean_ban_mask is about. So I'm leaving it out here. -- aquanight */
/* I don't know why it's 80, but I like a limit anyway. A ban of 500 characters can never be good... -- Syzop */
if (strlen(para) > 80)
{
strlcpy(retbuf, para, 128);
return retbuf;
}
return para;
}
else
{
return extban_conv_param_nuh(para);
}
}
#endif
/** Realname bans - conv_param */
char *extban_moder_conv_param(char *para)
{
@@ -478,35 +321,12 @@ static char retbuf[REALLEN + 8];
mask = retbuf+3;
if (strlen(mask) > REALLEN + 3)
mask[REALLEN + 3] = '\0';
if (*mask == '~')
*mask = '?'; /* Is this good? No ;) */
return retbuf;
}
int extban_moder_is_banned(aClient *sptr, aChannel *chptr, char *banin, int type)
{
char *ban = banin+3;
if (!match_esc(ban, sptr->info))
return 1;
return 0;
}
/** Registered user ban */
char *extban_modeR_conv_param(char *para)
{
static char retbuf[NICKLEN + 4];
strlcpy(retbuf, para, sizeof(retbuf));
if (do_nick_name(retbuf+3) == 0)
return NULL;
return retbuf;
}
int extban_modeR_is_banned(aClient *sptr, aChannel *chptr, char *banin, int type)
{
char *ban = banin+3;
if (IsRegNick(sptr) && !strcasecmp(ban, sptr->name))
if (!match(ban, sptr->info))
return 1;
return 0;
}
@@ -515,66 +335,23 @@ void extban_init(void)
{
ExtbanInfo req;
memset(&req, 0, sizeof(ExtbanInfo));
req.flag = 'q';
#ifdef DISABLE_STACKED_EXTBANS
req.conv_param = extban_conv_param_nuh;
#else
req.conv_param = extban_conv_param_nuh_or_extban;
req.is_ok = extban_is_ok_nuh_extban;
#endif
req.options = EXTBOPT_ACTMODIFIER;
req.is_banned = extban_modeq_is_banned;
ExtbanAdd(NULL, req);
memset(&req, 0, sizeof(ExtbanInfo));
req.flag = 'j';
#ifdef DISABLE_STACKED_EXTBANS
req.conv_param = extban_conv_param_nuh;
#else
req.conv_param = extban_conv_param_nuh_or_extban;
#endif
req.is_banned = extban_modej_is_banned;
req.is_ok = extban_is_ok_nuh_extban;
req.options = EXTBOPT_ACTMODIFIER;
ExtbanAdd(NULL, req);
memset(&req, 0, sizeof(ExtbanInfo));
req.flag = 'n';
#ifdef DISABLE_STACKED_EXTBANS
req.conv_param = extban_conv_param_nuh;
#else
req.conv_param = extban_conv_param_nuh_or_extban;
req.is_ok = extban_is_ok_nuh_extban;
#endif
req.is_banned = extban_moden_is_banned;
req.options = EXTBOPT_ACTMODIFIER;
ExtbanAdd(NULL, req);
memset(&req, 0, sizeof(ExtbanInfo));
req.flag = 'c';
req.conv_param = extban_modec_conv_param;
req.is_banned = extban_modec_is_banned;
req.is_ok = extban_modec_is_ok;
req.options = EXTBOPT_INVEX;
ExtbanAdd(NULL, req);
memset(&req, 0, sizeof(ExtbanInfo));
req.flag = 'q';
req.conv_param = extban_conv_param_nuh;
req.is_banned = extban_modeq_is_banned;
ExtbanAdd(NULL, req);
req.flag = 'n';
req.conv_param = extban_conv_param_nuh;
req.is_banned = extban_moden_is_banned;
ExtbanAdd(NULL, req);
req.flag = 'r';
req.conv_param = extban_moder_conv_param;
req.is_banned = extban_moder_is_banned;
req.options = EXTBOPT_CHSVSMODE|EXTBOPT_INVEX;
req.options = EXTBOPT_CHSVSMODE;
ExtbanAdd(NULL, req);
memset(&req, 0, sizeof(ExtbanInfo));
req.flag = 'R';
req.conv_param = extban_modeR_conv_param;
req.is_banned = extban_modeR_is_banned;
req.options = EXTBOPT_INVEX;
ExtbanAdd(NULL, req);
/* When adding new extbans, be sure to always add a prior memset like above
* so you don't "inherit" old options (we are 2005 and the 20 nanoseconds
* per-boot/rehash is NOT EXACTLY a problem....) -- Syzop.
*/
}
+16 -88
View File
@@ -1,6 +1,6 @@
/************************************************************************
* IRC - Internet Relay Chat, extcmodes.c
* (C) 2003-2007 Bram Matthys (Syzop) and the UnrealIRCd Team
* IRC - Internet Relay Chat, s_unreal.c
* (C) 2003 Bram Matthys (Syzop) and the UnrealIRCd Team
*
* See file AUTHORS in IRC package for additional names of
* the programmers.
@@ -151,7 +151,7 @@ void extcmode_init(void)
load_extendedchanmodes();
}
Cmode *CmodeAdd(Module *module, CmodeInfo req, Cmode_t *mode)
Cmode *CmodeAdd(Module *reserved, CmodeInfo req, Cmode_t *mode)
{
short i = 0, j = 0;
char tmpbuf[512];
@@ -162,23 +162,17 @@ Cmode *CmodeAdd(Module *module, CmodeInfo req, Cmode_t *mode)
break;
else if (Channelmode_Table[i].flag == req.flag)
{
if (Channelmode_Table[i].unloaded)
{
Channelmode_Table[i].unloaded = 0;
break;
} else {
if (module)
module->errorcode = MODERR_EXISTS;
return NULL;
}
if (reserved)
reserved->errorcode = MODERR_EXISTS;
return NULL;
}
i++;
}
if (i == EXTCMODETABLESZ)
{
Debug((DEBUG_DEBUG, "CmodeAdd failed, no space"));
if (module)
module->errorcode = MODERR_NOSPACE;
if (reserved)
reserved->errorcode = MODERR_NOSPACE;
return NULL;
}
*mode = Channelmode_Table[i].mode;
@@ -192,21 +186,12 @@ Cmode *CmodeAdd(Module *module, CmodeInfo req, Cmode_t *mode)
Channelmode_Table[i].free_param = req.free_param;
Channelmode_Table[i].dup_struct = req.dup_struct;
Channelmode_Table[i].sjoin_check = req.sjoin_check;
Channelmode_Table[i].local = req.local;
Channelmode_Table[i].owner = module;
for (j = 0; j < EXTCMODETABLESZ; j++)
if (Channelmode_Table[j].flag)
if (j > Channelmode_highest)
Channelmode_highest = j;
if (module)
{
ModuleObject *cmodeobj = MyMallocEx(sizeof(ModuleObject));
cmodeobj->object.cmode = &Channelmode_Table[i];
cmodeobj->type = MOBJ_CMODE;
AddListItem(cmodeobj, module->objects);
module->errorcode = MODERR_NOERROR;
}
if (reserved)
reserved->errorcode = MODERR_NOERROR;
if (loop.ircd_booted)
{
make_cmodestr();
@@ -218,75 +203,20 @@ Cmode *CmodeAdd(Module *module, CmodeInfo req, Cmode_t *mode)
return &(Channelmode_Table[i]);
}
void unload_extcmode_commit(Cmode *cmode)
void CmodeDel(Cmode *cmode)
{
char tmpbuf[512];
aChannel *chptr;
if (!cmode)
return;
if (cmode->paracount == 1)
{
/* If we don't do this, we will crash anyway.. but then with severe corruption / suckyness */
ircd_log(LOG_ERROR, "FATAL ERROR: ChannelMode module for chanmode +%c is misbehaving: "
"all chanmode modules with parameters should be tagged PERManent.", cmode->flag);
abort();
}
for (chptr = channel; chptr; chptr = chptr->nextch)
if (chptr->mode.extmode && cmode->mode)
{
/* Unset channel mode and send MODE -<char> to other servers */
sendto_channel_butserv(chptr, &me, ":%s MODE %s -%c",
me.name, chptr->chname, cmode->flag);
sendto_serv_butone(NULL, ":%s MODE %s -%c 0",
me.name, chptr->chname, cmode->flag);
chptr->mode.extmode &= ~cmode->mode;
}
cmode->flag = '\0';
char tmpbuf[512];
/* TODO: remove from all channel */
if (cmode)
cmode->flag = '\0';
make_cmodestr();
make_extcmodestr();
/* Not unloadable, so module object support is not needed (yet) */
ircsprintf(tmpbuf, CHPAR1 "%s," CHPAR2 "%s," CHPAR3 "%s," CHPAR4 "%s",
EXPAR1, EXPAR2, EXPAR3, EXPAR4);
IsupportSetValue(IsupportFind("CHANMODES"), tmpbuf);
}
void CmodeDel(Cmode *cmode)
{
/* It would be nice if we could abort() here if a parameter module is trying to unload which is extremely dangerous/crashy/disallowed */
if (loop.ircd_rehashing)
cmode->unloaded = 1;
else
unload_extcmode_commit(cmode);
if (cmode->owner)
{
ModuleObject *cmodeobj;
for (cmodeobj = cmode->owner->objects; cmodeobj; cmodeobj = cmodeobj->next) {
if (cmodeobj->type == MOBJ_CMODE && cmodeobj->object.cmode == cmode) {
DelListItem(cmodeobj, cmode->owner->objects);
MyFree(cmodeobj);
break;
}
}
cmode->owner = NULL;
}
}
void unload_all_unused_extcmodes(void)
{
int i;
for (i = 0; i < EXTCMODETABLESZ; i++)
if (Channelmode_Table[i].flag && Channelmode_Table[i].unloaded)
{
unload_extcmode_commit(&Channelmode_Table[i]);
}
}
/** searches in chptr extmode parameters and returns entry or NULL. */
CmodeParam *extcmode_get_struct(CmodeParam *p, char ch)
{
@@ -319,7 +249,6 @@ CmodeParam *extcmode_duplicate_paramlist(CmodeParam *lst)
}
}
n = tbl->dup_struct(lst);
n->next = n->prev = NULL; /* safety (required!) */
if (head)
{
AddListItem(n, head);
@@ -525,7 +454,6 @@ aModejEntry *r = (aModejEntry *)r_in;
aModejEntry *w = (aModejEntry *)MyMalloc(sizeof(aModejEntry));
memcpy(w, r, sizeof(aModejEntry));
w->next = w->prev = NULL;
return (CmodeParam *)w;
}
+21 -63
View File
@@ -480,7 +480,7 @@ void clear_watch_hash_table(void)
/*
* add_to_watch_hash_table
*/
int add_to_watch_hash_table(char *nick, aClient *cptr, int awaynotify)
int add_to_watch_hash_table(char *nick, aClient *cptr)
{
unsigned int hashv;
aWatch *anptr;
@@ -516,13 +516,11 @@ int add_to_watch_hash_table(char *nick, aClient *cptr, int awaynotify)
lp = anptr->watch;
anptr->watch = make_link();
anptr->watch->value.cptr = cptr;
anptr->watch->flags = awaynotify;
anptr->watch->next = lp;
lp = make_link();
lp->next = cptr->watch;
lp->value.wptr = anptr;
lp->flags = awaynotify;
cptr->watch = lp;
cptr->watches++;
}
@@ -538,10 +536,6 @@ int hash_check_watch(aClient *cptr, int reply)
unsigned int hashv;
aWatch *anptr;
Link *lp;
int awaynotify = 0;
if ((reply == RPL_GONEAWAY) || (reply == RPL_NOTAWAY) || (reply == RPL_REAWAY))
awaynotify = 1;
/* Get us the right bucket */
@@ -560,46 +554,22 @@ int hash_check_watch(aClient *cptr, int reply)
/* Send notifies out to everybody on the list in header */
for (lp = anptr->watch; lp; lp = lp->next)
{
if (!awaynotify)
{
/* Most common: LOGON or LOGOFF */
if (IsWebTV(lp->value.cptr))
sendto_one(lp->value.cptr, ":IRC!IRC@%s PRIVMSG %s :%s (%s@%s) "
" %s IRC",
me.name, lp->value.cptr->name, cptr->name,
(IsPerson(cptr) ? cptr->user->username : "<N/A>"),
(IsPerson(cptr) ?
(IsHidden(cptr) ? cptr->user->virthost : cptr->
user->realhost) : "<N/A>"), reply == RPL_LOGON ?
"is now on" : "has left");
else
sendto_one(lp->value.cptr, rpl_str(reply), me.name,
lp->value.cptr->name, cptr->name,
(IsPerson(cptr) ? cptr->user->username : "<N/A>"),
(IsPerson(cptr) ?
(IsHidden(cptr) ? cptr->user->virthost : cptr->
user->realhost) : "<N/A>"), anptr->lasttime, cptr->info);
} else
{
/* AWAY or UNAWAY */
if (!lp->flags)
continue; /* skip away/unaway notification for users not interested in them */
if (reply == RPL_NOTAWAY)
sendto_one(lp->value.cptr, rpl_str(reply), me.name,
lp->value.cptr->name, cptr->name,
(IsPerson(cptr) ? cptr->user->username : "<N/A>"),
(IsPerson(cptr) ?
(IsHidden(cptr) ? cptr->user->virthost : cptr->
user->realhost) : "<N/A>"), cptr->user->lastaway);
else /* RPL_GONEAWAY / RPL_REAWAY */
sendto_one(lp->value.cptr, rpl_str(reply), me.name,
lp->value.cptr->name, cptr->name,
(IsPerson(cptr) ? cptr->user->username : "<N/A>"),
(IsPerson(cptr) ?
(IsHidden(cptr) ? cptr->user->virthost : cptr->
user->realhost) : "<N/A>"), cptr->user->lastaway, cptr->user->away);
}
if (IsWebTV(lp->value.cptr))
sendto_one(lp->value.cptr, ":IRC!IRC@%s PRIVMSG %s :%s (%s@%s) "
" %s IRC",
me.name, lp->value.cptr->name, cptr->name,
(IsPerson(cptr) ? cptr->user->username : "<N/A>"),
(IsPerson(cptr) ?
(IsHidden(cptr) ? cptr->user->virthost : cptr->
user->realhost) : "<N/A>"), reply == RPL_LOGON ?
"is now on" : "has left");
else
sendto_one(lp->value.cptr, rpl_str(reply), me.name,
lp->value.cptr->name, cptr->name,
(IsPerson(cptr) ? cptr->user->username : "<N/A>"),
(IsPerson(cptr) ?
(IsHidden(cptr) ? cptr->user->virthost : cptr->
user->realhost) : "<N/A>"), anptr->lasttime, cptr->info);
}
return 0;
@@ -781,17 +751,9 @@ struct MODVAR ThrottlingBucket *ThrottlingHash[THROTTLING_HASH_SIZE+1];
void init_throttling_hash()
{
long v;
bzero(ThrottlingHash, sizeof(ThrottlingHash));
if (!THROTTLING_PERIOD)
v = 120;
else
{
v = THROTTLING_PERIOD/2;
if (v > 5)
v = 5; /* accuracy, please */
}
EventAddEx(NULL, "bucketcleaning", v, 0, e_clean_out_throttling_buckets, NULL);
EventAddEx(NULL, "bucketcleaning", (THROTTLING_PERIOD ? THROTTLING_PERIOD : 120)/2, 0,
e_clean_out_throttling_buckets, NULL);
}
int hash_throttling(struct IN_ADDR *in)
@@ -851,14 +813,10 @@ EVENT(e_clean_out_throttling_buckets)
{ p = strchr(serveropts, 'm'); *p = '\0'; }
if (!Hooks[18] && strchr(serveropts, 'M'))
{ p = strchr(serveropts, 'M'); *p = '\0'; }
if (!Hooks[49] && !Hooks[51] && strchr(serveropts, 'R'))
{ p = strchr(serveropts, 'R'); *p = '\0'; }
if (Hooks[17] && !strchr(serveropts, 'm'))
*p++ = 'm';
if (Hooks[18] && !strchr(serveropts, 'M'))
*p++ = 'M';
if ((Hooks[49] || Hooks[51]) && !strchr(serveropts, 'R'))
*p++ = 'R';
*p = '\0';
for (mi = Modules; mi; mi = mi->next)
if (!(mi->options & MOD_OPT_OFFICIAL))
@@ -911,9 +869,9 @@ int throttle_can_connect(aClient *sptr, struct IN_ADDR *in)
{
if (Find_except(sptr, Inet_ia2p(in), CONF_EXCEPT_THROTTLE))
return 2;
if (b->count+1 > (THROTTLING_COUNT ? THROTTLING_COUNT : 3))
return 0;
b->count++;
if (b->count > (THROTTLING_COUNT ? THROTTLING_COUNT : 3))
return 0;
return 2;
}
}
+1 -1
View File
@@ -47,7 +47,7 @@ ConfigItem_help *Find_Help(char *command) {
int parse_help(aClient *sptr, char *name, char *help)
{
ConfigItem_help *helpitem;
aMotdLine *text;
aMotd *text;
if (BadPtr(help))
{
helpitem = Find_Help(NULL);
+48 -352
View File
@@ -37,7 +37,6 @@ Computing Center and Jarkko Oikarinen";
#ifndef _WIN32
#include <sys/file.h>
#include <pwd.h>
#include <grp.h>
#include <sys/time.h>
#else
#include <io.h>
@@ -90,11 +89,13 @@ extern MODVAR char *buildid;
time_t timeofday = 0;
int tainted = 0;
LoopStruct loop;
extern MODVAR aMotd *opermotd;
extern MODVAR aMotd *svsmotd;
extern MODVAR aMotd *motd;
extern MODVAR aMotd *rules;
extern MODVAR aMotd *botmotd;
extern MODVAR aMotd *smotd;
MODVAR MemoryInfo StatsZ;
#ifndef _WIN32
uid_t irc_uid = 0;
gid_t irc_gid = 0;
#endif
int R_do_dns, R_fin_dns, R_fin_dnsc, R_fail_dns, R_do_id, R_fin_id, R_fail_id;
@@ -140,9 +141,6 @@ char trouble_info[1024];
extern void url_init(void);
#endif
time_t highesttimeofday=0, oldtimeofday=0, lasthighwarn=0;
void save_stats(void)
{
FILE *stats = fopen("ircd.stats", "w");
@@ -168,11 +166,7 @@ extern void init_glines(void);
extern void tkl_init(void);
MODVAR TS last_garbage_collect = 0;
#ifndef _WIN32
MODVAR char **myargv;
#else
LPCSTR cmdLine;
#endif
int portnum = -1; /* Server port number, listening this */
char *configfile = CONFIGFILE; /* Server configuration file */
int debuglevel = 10; /* Server debug level */
@@ -355,14 +349,15 @@ void server_reboot(char *mesg)
if (!(bootopt & (BOOT_TTY | BOOT_DEBUG)))
(void)close(2);
(void)close(1);
(void)close(0);
if ((bootopt & BOOT_CONSOLE) || isatty(0))
(void)close(0);
(void)execv(MYNAME, myargv);
#else
close_connections();
if (!IsService)
{
CleanUp();
WinExec(cmdLine, SW_SHOWDEFAULT);
(void)execv(myargv[0], myargv);
}
#endif
#ifndef _WIN32
@@ -455,7 +450,7 @@ static TS try_connections(TS currenttime)
/*
* Also when already connecting! (update holdtimes) --SRB
*/
if (!(aconf->options & CONNECT_AUTO) || (aconf->flag.temporary == 1))
if (!(aconf->options & CONNECT_AUTO))
continue;
cltmp = aconf->class;
@@ -491,7 +486,7 @@ static TS try_connections(TS currenttime)
&& crule_eval(deny->rule))
break;
if (!deny && connect_server(aconf, (aClient *)NULL,
if (connect_server(aconf, (aClient *)NULL,
(struct hostent *)NULL) == 0)
sendto_realops
("Connection to %s[%s] activated.",
@@ -591,11 +586,12 @@ extern TS check_pings(TS currenttime)
reason : "no reason");
if (bconf->reason) {
if (IsPerson(cptr))
snprintf(banbuf, sizeof banbuf - 1,
"User has been banned (%s)", bconf->reason);
else
snprintf(banbuf, sizeof banbuf - 1,
"Banned (%s)", bconf->reason);
snprintf(banbuf,
sizeof banbuf - 1,
"User has been banned (%s)",
bconf->reason);
snprintf(banbuf, sizeof banbuf - 1,
"Banned (%s)", bconf->reason);
(void)exit_client(cptr, cptr, &me,
banbuf);
} else {
@@ -614,12 +610,12 @@ extern TS check_pings(TS currenttime)
/* Do spamfilter 'user' banchecks.. */
if (loop.do_bancheck_spamf_user && IsPerson(cptr))
{
if (find_spamfilter_user(cptr, SPAMFLAG_NOWARN) == FLUSH_BUFFER)
if (find_spamfilter_user(cptr) == FLUSH_BUFFER)
continue;
}
if (loop.do_bancheck_spamf_away && IsPerson(cptr) && cptr->user->away)
{
if (dospamfilter(cptr, cptr->user->away, SPAMF_AWAY, NULL, SPAMFLAG_NOWARN, NULL) == FLUSH_BUFFER)
if (dospamfilter(cptr, cptr->user->away, SPAMF_AWAY, NULL) == FLUSH_BUFFER)
continue;
}
/*
@@ -850,7 +846,7 @@ int error = 0;
#ifdef ZIP_LINKS
runtime = zlibVersion();
compiledfor = ZLIB_VERSION;
if (*compiledfor != *runtime)
if (strcasecmp(compiledfor, runtime))
{
version_check_logerror("Zlib version mismatch: compiled for '%s', library is '%s'",
compiledfor, runtime);
@@ -904,161 +900,6 @@ int error = 0;
extern time_t TSoffset;
extern int unreal_time_synch(int timeout);
extern MODVAR Event *events;
extern struct MODVAR ThrottlingBucket *ThrottlingHash[THROTTLING_HASH_SIZE+1];
/** This functions resets a couple of timers and does other things that
* are absolutely cruicial when the clock is adjusted - particularly
* when the clock goes backwards. -- Syzop
*/
void fix_timers(void)
{
int i, cnt;
aClient *acptr;
Event *e;
struct ThrottlingBucket *n;
struct ThrottlingBucket z = { NULL, NULL, {0}, 0, 0};
/* Client time stuff */
for (i = 0; i <= LastSlot; i++)
{
if (!(acptr = local[i]) || IsMe(acptr))
continue;
/* all (servers AND users) */
if (MyConnect(acptr))
{
if (acptr->since > TStime())
{
Debug((DEBUG_DEBUG, "fix_timers(): %s: acptr->since %ld -> %ld",
acptr->name, acptr->since, TStime()));
acptr->since = TStime();
}
if (acptr->lasttime > TStime())
{
Debug((DEBUG_DEBUG, "fix_timers(): %s: acptr->lasttime %ld -> %ld",
acptr->name, acptr->lasttime, TStime()));
acptr->lasttime = TStime();
}
if (acptr->last > TStime())
{
Debug((DEBUG_DEBUG, "fix_timers(): %s: acptr->last %ld -> %ld",
acptr->name, acptr->last, TStime()));
acptr->last = TStime();
}
}
/* users */
if (MyClient(acptr))
{
if (acptr->nextnick > TStime())
{
Debug((DEBUG_DEBUG, "fix_timers(): %s: acptr->nextnick %ld -> %ld",
acptr->name, acptr->nextnick, TStime()));
acptr->nextnick = TStime();
}
if (acptr->nexttarget > TStime())
{
Debug((DEBUG_DEBUG, "fix_timers(): %s: acptr->nexttarget %ld -> %ld",
acptr->name, acptr->nexttarget, TStime()));
acptr->nexttarget = TStime();
}
}
}
/* Reset all event timers */
for (e = events; e; e = e->next)
{
if (e->last > TStime())
{
Debug((DEBUG_DEBUG, "fix_timers(): %s: e->last %ld -> %ld",
e->name, e->last, TStime()-1));
e->last = TStime()-1;
}
}
/* Just flush all throttle stuff... */
cnt = 0;
for (i = 0; i < THROTTLING_HASH_SIZE; i++)
for (n = ThrottlingHash[i]; n; n = n->next)
{
z.next = (struct ThrottlingBucket *) DelListItem(n, ThrottlingHash[i]);
cnt++;
MyFree(n);
n = &z;
}
Debug((DEBUG_DEBUG, "fix_timers(): removed %d throttling item(s)", cnt));
Debug((DEBUG_DEBUG, "fix_timers(): updating nextping/nextconnect/nextdnscheck/nextexpire (%ld/%ld/%ld/%ld)",
nextping, nextconnect, nextdnscheck, nextexpire));
nextping = nextconnect = nextdnscheck = nextexpire = 1;
}
#ifndef _WIN32
static void generate_cloakkeys()
{
/* Generate 3 cloak keys */
#define GENERATE_CLOAKKEY_MINLEN 16
#define GENERATE_CLOAKKEY_MAXLEN 32 /* Length of cloak keys to generate. */
char keyBuf[GENERATE_CLOAKKEY_MAXLEN + 1];
int keyNum;
int keyLen;
int charIndex;
int value;
short has_upper;
short has_lower;
short has_num;
fprintf(stderr, "Here are 3 random cloak keys:\n");
for (keyNum = 0; keyNum < 3; ++keyNum)
{
has_upper = 0;
has_lower = 0;
has_num = 0;
keyLen = (getrandom8() % (GENERATE_CLOAKKEY_MAXLEN - GENERATE_CLOAKKEY_MINLEN + 1)) + GENERATE_CLOAKKEY_MINLEN;
for (charIndex = 0; charIndex < keyLen; ++charIndex)
{
switch (getrandom8() % 3)
{
case 0: /* Uppercase. */
keyBuf[charIndex] = (char)('A' + (getrandom8() % ('Z' - 'A')));
has_upper = 1;
break;
case 1: /* Lowercase. */
keyBuf[charIndex] = (char)('a' + (getrandom8() % ('z' - 'a')));
has_lower = 1;
break;
case 2: /* Digit. */
keyBuf[charIndex] = (char)('0' + (getrandom8() % ('9' - '0')));
has_num = 1;
break;
}
}
keyBuf[keyLen] = '\0';
if (has_upper && has_lower && has_num)
(void)fprintf(stderr, "%s\n", keyBuf);
else
/* Try again. For this reason, keyNum must be signed. */
keyNum--;
}
}
#endif
/* MY tdiff... because 'double' sucks.
* This should work until 2038, and very likely after that as well
* because 'long' should be 64 bit on all systems by then... -- Syzop
*/
#define mytdiff(a, b) ((long)a - (long)b)
#ifndef _WIN32
int main(int argc, char *argv[])
#else
@@ -1072,8 +913,6 @@ int InitwIRCD(int argc, char *argv[])
uid_t uid, euid;
gid_t gid, egid;
TS delay = 0;
struct passwd *pw;
struct group *gr;
#endif
#ifdef HAVE_PSTAT
union pstun pstats;
@@ -1085,14 +924,6 @@ int InitwIRCD(int argc, char *argv[])
#ifndef NO_FDLIST
TS nextfdlistcheck = 0; /*end of priority code */
#endif
memset(&botmotd, '\0', sizeof(aMotdFile));
memset(&rules, '\0', sizeof(aMotdFile));
memset(&opermotd, '\0', sizeof(aMotdFile));
memset(&motd, '\0', sizeof(aMotdFile));
memset(&smotd, '\0', sizeof(aMotdFile));
memset(&svsmotd, '\0', sizeof(aMotdFile));
#ifdef _WIN32
CreateMutex(NULL, FALSE, "UnrealMutex");
SetErrorMode(SEM_FAILCRITICALERRORS);
@@ -1103,52 +934,19 @@ int InitwIRCD(int argc, char *argv[])
euid = geteuid();
gid = getgid();
egid = getegid();
#ifndef IRC_USER
if (!euid)
{
fprintf(stderr,
"WARNING: You are running UnrealIRCd as root and it is not\n"
" configured to drop priviliges. This is _very_ dangerous,\n"
" as any compromise of your UnrealIRCd is the same as\n"
" giving a cracker root SSH access to your box.\n"
" You should either start UnrealIRCd under a different\n"
" account than root, or set IRC_USER in include/config.h\n"
" to a nonprivileged username and recompile.\n");
}
#endif /* IRC_USER */
# ifdef PROFIL
(void)monstartup(0, etext);
(void)moncontrol(1);
(void)signal(SIGUSR1, s_monitor);
# endif
#endif
#if defined(IRC_USER) && defined(IRC_GROUP)
if ((int)getuid() == 0) {
pw = getpwnam(IRC_USER);
gr = getgrnam(IRC_GROUP);
if ((pw == NULL) || (gr == NULL)) {
fprintf(stderr, "ERROR: Unable to lookup to specified user (IRC_USER) or group (IRC_GROUP): %s\n", strerror(errno));
exit(-1);
} else {
irc_uid = pw->pw_uid;
irc_gid = gr->gr_gid;
}
}
#endif
#ifdef CHROOTDIR
if (chdir(dpath)) {
perror("chdir");
fprintf(stderr, "ERROR: Unable to change to directory '%s'\n", dpath);
exit(-1);
}
if (geteuid() != 0)
fprintf(stderr, "WARNING: IRCd compiled with CHROOTDIR but effective user id is not root!? "
"Booting is very likely to fail...\n");
init_resolver(1);
ircd_res_init();
{
struct stat sb;
mode_t umaskold;
@@ -1196,11 +994,7 @@ int InitwIRCD(int argc, char *argv[])
exit(5);
}
#endif /*CHROOTDIR*/
#ifndef _WIN32
myargv = argv;
#else
cmdLine = GetCommandLine();
#endif
#ifndef _WIN32
(void)umask(077); /* better safe than sorry --SRB */
#else
@@ -1298,14 +1092,6 @@ int InitwIRCD(int argc, char *argv[])
}
p = *++argv;
argc--;
#ifdef AUTHENABLE_UNIXCRYPT
if ((type == AUTHTYPE_UNIXCRYPT) && (strlen(p) > 8))
{
printf("WARNING: Password truncated to 8 characters due to 'crypt' algorithm. "
"You are suggested to use the 'md5' algorithm instead.");
p[8] = '\0';
}
#endif
if (!(result = Auth_Make(type, p))) {
printf("Authentication failed\n");
exit(0);
@@ -1378,14 +1164,9 @@ int InitwIRCD(int argc, char *argv[])
}
# endif
exit(0);
#endif
#ifndef _WIN32
case 'k':
generate_cloakkeys();
exit(0);
#endif
default:
return bad_command();
bad_command();
break;
}
}
@@ -1408,14 +1189,8 @@ int InitwIRCD(int argc, char *argv[])
#endif
#ifndef _WIN32
mkdir("tmp", S_IRUSR|S_IWUSR|S_IXUSR); /* Create the tmp dir, if it doesn't exist */
#if defined(USE_LIBCURL) && defined(REMOTEINC_SPECIALCACHE)
mkdir("cache", S_IRUSR|S_IWUSR|S_IXUSR); /* Create the cache dir, if using curl and it doesn't exist */
#endif
#else
mkdir("tmp");
#if defined(USE_LIBCURL) && defined(REMOTEINC_SPECIALCACHE)
mkdir("cache");
#endif
#endif
#ifndef _WIN32
/*
@@ -1431,19 +1206,14 @@ int InitwIRCD(int argc, char *argv[])
}
#endif
/* HACK! This ifndef should be removed when the restart-on-w32-brings-up-dialog bug
* is fixed. This is just an ugly "ignore the invalid parameter" thing ;). -- Syzop
*/
#ifndef _WIN32
if (argc > 0)
return bad_command(); /* This should exit out */
#endif
#ifndef _WIN32
fprintf(stderr, "%s", unreallogo);
fprintf(stderr, " v%s\n", VERSIONONLY);
fprintf(stderr, " using %s\n", tre_version());
#ifdef USE_SSL
fprintf(stderr, " using %s\n", SSLeay_version(SSLEAY_VERSION));
fprintf(stderr, " using %s\n", OPENSSL_VERSION_TEXT);
#endif
#ifdef ZIP_LINKS
fprintf(stderr, " using zlib %s\n", zlibVersion());
@@ -1464,7 +1234,7 @@ int InitwIRCD(int argc, char *argv[])
DeleteTempModules();
booted = FALSE;
/* Hack to stop people from being able to read the config file */
#if !defined(_WIN32) && !defined(_AMIGA) && !defined(OSXTIGER) && DEFAULT_PERMISSIONS != 0
#if !defined(_WIN32) && !defined(_AMIGA) && DEFAULT_PERMISSIONS != 0
chmod(CPATH, DEFAULT_PERMISSIONS);
#endif
init_dynconf();
@@ -1569,20 +1339,16 @@ int InitwIRCD(int argc, char *argv[])
Debug((DEBUG_ERROR, "Port = %d", portnum));
if (inetport(&me, conf_listen->ip, portnum))
exit(1);
set_non_blocking(me.fd, &me);
conf_listen->options |= LISTENER_BOUND;
me.umodes = conf_listen->options;
conf_listen->listener = &me;
run_configuration();
ircd_log(LOG_ERROR, "UnrealIRCd started.");
read_motd(conf_files->botmotd_file, &botmotd);
read_motd(conf_files->rules_file, &rules);
read_motd(conf_files->opermotd_file, &opermotd);
read_motd(conf_files->motd_file, &motd);
read_motd(conf_files->smotd_file, &smotd);
read_motd(conf_files->svsmotd_file, &svsmotd);
botmotd = (aMotd *) read_file(BPATH, NULL);
rules = (aMotd *) read_file(RPATH, NULL);
opermotd = (aMotd *) read_file(OPATH, NULL);
motd = (aMotd *) read_file_ex(MPATH, NULL, &motd_tm);
smotd = (aMotd *) read_file_ex(SMPATH, NULL, &smotd_tm);
svsmotd = (aMotd *) read_file(VPATH, NULL);
strncpy(me.sockhost, conf_listen->ip, sizeof(me.sockhost) - 1);
if (me.name[0] == '\0')
strncpyzt(me.name, me.sockhost, sizeof(me.name));
@@ -1623,7 +1389,7 @@ int InitwIRCD(int argc, char *argv[])
R_fin_id = strlen(REPORT_FIN_ID);
R_fail_id = strlen(REPORT_FAIL_ID);
#if !defined(IRC_USER) && !defined(_WIN32)
#if !defined(IRC_UID) && !defined(_WIN32)
if ((uid != euid) && !euid) {
(void)fprintf(stderr,
"ERROR: do not run ircd setuid root. Make it setuid a normal user.\n");
@@ -1631,45 +1397,29 @@ int InitwIRCD(int argc, char *argv[])
}
#endif
#if defined(IRC_USER) && defined(IRC_GROUP)
#if defined(IRC_UID) && defined(IRC_GID)
if ((int)getuid() == 0) {
/* NOTE: irc_uid/irc_gid have been looked up earlier, before the chrooting code */
if ((irc_uid == 0) || (irc_gid == 0)) {
if ((IRC_UID == 0) || (IRC_GID == 0)) {
(void)fprintf(stderr,
"ERROR: SETUID and SETGID have not been set properly"
"\nPlease read your documentation\n(HINT: IRC_USER and IRC_GROUP in include/config.h cannot be root/wheel)\n");
"\nPlease read your documentation\n(HINT:SETUID or SETGID can not be 0)\n");
exit(-1);
} else {
/*
* run as a specified user
*/
(void)fprintf(stderr, "WARNING: ircd invoked as root\n");
(void)fprintf(stderr, " changing to uid %d\n", irc_uid);
(void)fprintf(stderr, " changing to gid %d\n", irc_gid);
if (setgid(irc_gid))
{
fprintf(stderr, "ERROR: Unable to change group: %s\n", strerror(errno));
exit(-1);
}
if (setuid(irc_uid))
{
fprintf(stderr, "ERROR: Unable to change userid: %s\n", strerror(errno));
exit(-1);
}
(void)fprintf(stderr,
"WARNING: ircd invoked as root\n");
(void)fprintf(stderr, " changing to uid %d\n",
IRC_UID);
(void)fprintf(stderr, " changing to gid %d\n",
IRC_GID);
(void)setgid(IRC_GID);
(void)setuid(IRC_UID);
}
}
#endif
if (TIMESYNCH)
{
if (!unreal_time_synch(TIMESYNCH_TIMEOUT))
ircd_log(LOG_ERROR, "TIME SYNCH: Unable to synchronize time: %s. "
"This means UnrealIRCd was unable to synchronize the IRCd clock to a known good time source. "
"As long as the server owner keeps the server clock synchronized through NTP, everything will be fine.",
unreal_time_synch_error());
}
fix_timers(); /* Fix timers AFTER reading tune file AND timesynch */
write_pidfile();
Debug((DEBUG_NOTICE, "Server ready..."));
SetupEvents();
@@ -1724,68 +1474,14 @@ void SocketLoop(void *dummy)
for (;;)
#endif
{
time_t oldtimeofday;
#define NEGATIVE_SHIFT_WARN -15
#define POSITIVE_SHIFT_WARN 20
timeofday = time(NULL) + TSoffset;
if (oldtimeofday == 0)
oldtimeofday = timeofday; /* pretend everything is ok the first time.. */
if (mytdiff(timeofday, oldtimeofday) < NEGATIVE_SHIFT_WARN) {
/* tdiff = # of seconds of time set backwards (positive number! eg: 60) */
long tdiff = oldtimeofday - timeofday;
ircd_log(LOG_ERROR, "WARNING: Time running backwards! Clock set back ~%ld seconds (%ld -> %ld)",
tdiff, oldtimeofday, timeofday);
ircd_log(LOG_ERROR, "[TimeShift] Resetting a few timers to prevent IRCd freeze!");
sendto_realops("WARNING: Time running backwards! Clock set back ~%ld seconds (%ld -> %ld)",
tdiff, oldtimeofday, timeofday);
sendto_realops("Incorrect time for IRC servers is a serious problem. "
"Time being set backwards (either by TSCTL or by resetting the clock) is "
"even more serious and can cause clients to freeze, channels to be "
"taken over, and other issues.");
sendto_realops("Please be sure your clock is always synchronized before "
"the IRCd is started or use the built-in timesynch feature.");
sendto_realops("[TimeShift] Resetting a few timers to prevent IRCd freeze!");
fix_timers();
nextfdlistcheck = 0;
} else
if (mytdiff(timeofday, oldtimeofday) > POSITIVE_SHIFT_WARN) /* do not set too low or you get false positives */
{
/* tdiff = # of seconds of time set forward (eg: 60) */
long tdiff = timeofday - oldtimeofday;
ircd_log(LOG_ERROR, "WARNING: Time jumped ~%ld seconds ahead! (%ld -> %ld)",
tdiff, oldtimeofday, timeofday);
ircd_log(LOG_ERROR, "[TimeShift] Resetting some timers!");
sendto_realops("WARNING: Time jumped ~%ld seconds ahead! (%ld -> %ld)",
tdiff, oldtimeofday, timeofday);
sendto_realops("Incorrect time for IRC servers is a serious problem. "
"Time being adjusted (either by TSCTL or by resetting the clock) "
"more than a few seconds forward/backward can lead to serious issues.");
sendto_realops("Please be sure your clock is always synchronized before "
"the IRCd is started or use the built-in timesynch feature.");
sendto_realops("[TimeShift] Resetting some timers!");
fix_timers();
nextfdlistcheck = 0;
}
if (highesttimeofday+NEGATIVE_SHIFT_WARN > timeofday)
{
if (lasthighwarn > timeofday)
lasthighwarn = timeofday;
if (timeofday - lasthighwarn > 300)
{
ircd_log(LOG_ERROR, "[TimeShift] The (IRCd) clock was set backwards. "
"Waiting for time to be OK again. This will be in %ld seconds",
highesttimeofday - timeofday);
sendto_realops("[TimeShift] The (IRCd) clock was set backwards. Timers, nick- "
"and channel-timestamps are possibly incorrect. This message will "
"repeat itself until we catch up with the original time, which will be "
"in %ld seconds", highesttimeofday - timeofday);
lasthighwarn = timeofday;
}
} else {
highesttimeofday = timeofday;
}
oldtimeofday = timeofday;
timeofday = time(NULL) + TSoffset;
if (timeofday - oldtimeofday < 0) {
sendto_realops("Time running backwards! %ld - %ld < 0",
timeofday, oldtimeofday);
}
LockEventSystem();
DoEvents();
UnlockEventSystem();
-2
View File
@@ -162,8 +162,6 @@ void free_client(aClient *cptr)
if (cptr->zip)
zip_free(cptr);
#endif
if (cptr->hostp)
unreal_free_hostent(cptr->hostp);
}
MyFree((char *)cptr);
}
+131 -113
View File
@@ -37,6 +37,21 @@ ID_Copyright("(C) 1990 Jarkko Oikarinen");
u_char touppertab[], tolowertab[];
#define tolowertab2 tolowertab
#endif
/*
* match()
* written by binary
*/
static inline int match2(const char *mask, const char *name)
{
u_char *m; /* why didn't the old one use registers */
u_char *n; /* because registers suck -- codemastr */
u_char cm;
u_char *wsn;
u_char *wsm;
m = (u_char *)mask;
cm = *m;
#ifndef USE_LOCALE
#define lc(x) tolowertab2[x] /* use mylowertab, because registers are FASTER */
@@ -44,131 +59,134 @@ u_char touppertab[], tolowertab[];
#define lc(x) tolower(x)
#endif
/* Match routine for special cases where escaping is needed in a normal fashion.
* Checks a string ('name') against a globbing(+more) pattern ('mask').
* Original by Douglas A Lewis (dalewis@acsu.buffalo.edu).
* Code based on hybrid7's version (match_esc()).
* Various modifications by Bram Matthys (Syzop).
* Instead of our previous code, this one is less optimized but actually _readable_ ;).
* Modifications I (Syzop) had to do vs the hybrid7 code:
* - Got rid of (u_char *) casts, since we already compile with
* chars defaulting to unsigned [or else major things break] ;).
* - Use 0 for match and non-zero for no match (a la strcmp), not the reverse.
* - Support for '_'.
* - Rip out support for '#'.
*/
int match_esc(const char *mask, const char *name)
{
const u_char *m = mask;
const u_char *n = name;
const u_char *ma = NULL;
const u_char *na = name;
while(1)
n = (u_char *)name;
if (cm == '*')
{
if (*m == '*')
if (m[1] == '\0') /* mask is just "*", so true */
return 0;
}
else if (cm != '?' && lc(cm) != lc(*n))
return 1; /* most likely first chars won't match */
else if ((cm == '_') && (*n != ' ') && (*n != '_'))
return 1; /* false: '_' but first character not '_' nor ' ' */
else if ((*m == '\0') && (*n == '\0'))
return 0; /* true: both are empty */
else if (*n == '\0')
return 1; /* false: name is empty */
else
{
m++;
n++;
}
cm = lc(*m);
wsm = (char *)NULL;
wsn = (char *)NULL;
while (1)
{
if (cm == '*') /* found the * wildcard */
{
while (*m == '*') /* collapse.. */
m++;
ma = m;
na = n;
}
if (!*m)
{
if (!*n)
return 0;
if (!ma)
return 1;
for (m--; (m > (const u_char *)mask) && (*m == '?'); m--);
if (*m == '*')
return 0;
m = ma;
n = ++na;
} else
if (!*n)
{
while (*m == '*') /* collapse.. */
m++;
return (*m != 0);
}
if (*m != '?')
{
if (*m == '\\')
if (!*++m)
return 1; /* unfinished escape sequence */
if ((lc(*m) != lc(*n)) && !((*m == '_') && (*n == ' ')))
m++; /* go to next char of mask */
if (!*m) /* if at end of mask, */
return 0; /* function becomes true. */
while (*m == '*') /* while the char at m is "*" */
{
if (!ma)
return 1;
m = ma;
n = ++na;
} else
{
m++;
n++;
m++; /* go to next char of mask */
if (!*m) /* if at end of mask, */
return 0; /* function becomes true. */
}
} else
{
m++;
n++;
cm = *m;
if (cm == '\\') /* don't do ? checking if a \ */
{
cm = *(++m); /* just skip this char, no ? checking */
/* In case of something like: '*\', return false. */
if (!*m)
return 1;
}
else if (cm == '?') /* if it's a ? */
{
do
{
m++; /* go to the next char of both */
if (!*n)
return 1; /* false: no character left */
n++;
if (!*n) /* if end of test string... */
return (!*m ? 0 : 1); /* true if end of mask str, else false */
}
while (*m == '?'); /* while we have ?'s */
cm = *m;
if (!cm) /* last char of mask is ?, so it's true */
return 0;
}
cm = lc(cm);
while (lc(*n) != cm)
{ /* compare */
if (!*n) /* if at end of n string */
return 1; /* function becomes false. */
n++; /* go to next char of n */
}
wsm = m; /* mark after where wildcard found */
cm = lc(*(++m)); /* go to next mask char */
wsn = n; /* mark spot first char was found */
n++; /* go to next char of n */
continue;
}
}
return 1;
}
/** Same credit/copyright as match_esc() applies, except escaping removed.. ;p */
static inline int match2(const char *mask, const char *name)
{
const u_char *m = mask;
const u_char *n = name;
const u_char *ma = NULL;
const u_char *na = name;
while(1)
{
if (*m == '*')
{
while (*m == '*') /* collapse.. */
m++;
ma = m;
na = n;
}
if (!*m)
if (cm == '?') /* found ? wildcard */
{
cm = lc(*(++m)); /* just skip and go to next */
if (!*n)
return 0;
if (!ma)
return 1;
for (m--; (m > (const u_char *)mask) && (*m == '?'); m--);
if (*m == '*')
return 0;
m = ma;
n = ++na;
} else
if (!*n)
{
while (*m == '*') /* collapse.. */
m++;
return (*m != 0);
return 1; /* false: no character left */
n++;
if (!*n) /* return true if end of both, */
{
if ((m[0] == '*') && (m[1] == '\0'))
return 0; /* special case.. a '?*' */
return (cm ? 1 : 0); /* false if end of test str only */
}
continue;
}
if ((lc(*m) != lc(*n)) && !((*m == '_') && (*n == ' ')) && (*m != '?'))
if (cm == '_') /* found _: check for '_' or ' ' */
{
if (!ma)
return 1;
m = ma;
n = ++na;
} else
{
m++;
cm = lc(*(++m)); /* just skip and go to next */
if ((*n != ' ') && (*n != '_'))
return 1; /* false: didnt match or no character left */
n++;
if (!*n) /* return true if end of both, */
{
if ((m[0] == '*') && (m[1] == '\0'))
return 0; /* special case.. a '?*' */
return (cm ? 1 : 0); /* false if end of test str only */
}
continue;
}
if (cm == '\\') /* next char will not be a wildcard. */
{ /* skip wild checking, don't continue */
cm = lc(*(++m));
n++;
}
/* Complicated to read, but to save CPU time. Every ounce counts. */
if (lc(*n) != cm) /* if the current chars don't equal, */
{
if (!wsm) /* if there was no * wildcard, */
return 1; /* function becomes false. */
n = wsn + 1; /* start on char after the one we found last */
m = wsm; /* set m to the spot after the "*" */
cm = lc(*m);
while (cm != lc(*n))
{ /* compare them */
if (!*n) /* if we reached end of n string, */
return 1; /* function becomes false. */
n++; /* go to next char of n */
}
wsn = n; /* mark spot first char was found */
}
if (!cm) /* cm == cn, so if !cm, then we've */
return 0; /* reached end of BOTH, so it matches */
m++; /* go to next mask char */
n++; /* go to next testing char */
cm = lc(*m); /* pointers are slower */
}
return 1;
}
/*
+4 -22
View File
@@ -16,7 +16,6 @@
*/
#include "config.h"
#include <stdio.h>
#if !defined(USE_SSL)
#include <string.h>
@@ -70,9 +69,9 @@
* This processes one or more 64-byte data blocks, but does NOT update
* the bit counters. There're no alignment requirements.
*/
static const void *body(MD5_CTX *ctx, const void *data, unsigned long size)
static void *body(MD5_CTX *ctx, void *data, unsigned long size)
{
const unsigned char *ptr;
unsigned char *ptr;
MD5_u32plus a, b, c, d;
MD5_u32plus saved_a, saved_b, saved_c, saved_d;
@@ -188,7 +187,7 @@ void MD5_Init(MD5_CTX *ctx)
ctx->hi = 0;
}
void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size)
void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size)
{
MD5_u32plus saved_lo;
unsigned long used, free;
@@ -285,7 +284,7 @@ void MD5_Final(unsigned char *result, MD5_CTX *ctx)
* @param src[in] The input data used to generate the checksum.
* @param n[in] Length of data.
*/
void DoMD5(unsigned char *mdout, const unsigned char *src, unsigned long n)
void DoMD5(unsigned char *mdout, unsigned char *src, unsigned long n)
{
MD5_CTX hash;
@@ -293,20 +292,3 @@ MD5_CTX hash;
MD5_Update(&hash, src, n);
MD5_Final(mdout, &hash);
}
/** Generates an MD5 checksum - ASCII printable string (0011223344..etc..).
* @param dst[out] Buffer to store result in, this will be the result will be
* 32 characters + nul terminator, so needs to be at least 33 characters.
* @param src[in] The input data used to generate the checksum.
* @param n[in] Length of data.
*/
char *md5hash(unsigned char *dst, const unsigned char *src, unsigned long n)
{
unsigned char tmp[16];
DoMD5(tmp, src, n);
sprintf(dst, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
tmp[0], tmp[1], tmp[2], tmp[3], tmp[4], tmp[5], tmp[6], tmp[7], tmp[8],
tmp[9], tmp[10], tmp[11], tmp[12], tmp[13], tmp[14], tmp[15]);
return dst;
}

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