mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-24 11:16:38 +02:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b2e402231d |
@@ -1,20 +0,0 @@
|
||||
|
||||
_ _ _ ___________ _____ _
|
||||
| | | | | |_ _| ___ \/ __ \ | |
|
||||
| | | |_ __ _ __ ___ __ _| | | | | |_/ /| / \/ __| |
|
||||
| | | | '_ \| '__/ _ \/ _ | | | | | / | | / _ |
|
||||
| |_| | | | | | | __/ (_| | |_| |_| |\ \ | \__/\ (_| |
|
||||
\___/|_| |_|_| \___|\__,_|_|\___/\_| \_| \____/\__,_|
|
||||
|
||||
Configuration Program
|
||||
for Unreal3.2
|
||||
|
||||
This program will help you to compile your IRC server, and ask you
|
||||
questions regarding the compile-time settings of it during the process.
|
||||
regarding the setup of it, during the process.
|
||||
|
||||
If you have problems regarding the setup & compile, read Unreal.nfo to get
|
||||
more information on where to get help. Please, before running this setup,
|
||||
read the documentation in the "doc" folder. Docs are also avail online @
|
||||
http://www.unrealircd.com/unreal32docs.html
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
|
||||
Configuration rant, by Stskeeps
|
||||
--------------------------------
|
||||
|
||||
Right.. so you think you are done now, you can boot your IRCd and be happy,
|
||||
and it just works. No, you still got a lot to do. You need to read all of
|
||||
the documentation through. Would you even have made it this far without
|
||||
makeconf?.
|
||||
|
||||
Well, today, people think they can be 3 months on IRC, and be ready to run
|
||||
an IRC daemon. I hate to say this, but I don't think so.
|
||||
|
||||
If you cannot read an IRC help file, or understand what stuff like "desynch",
|
||||
"masskill", "k-line", or what "mode # +l 5" means - or you got no experince
|
||||
in the UNIX field at all, like, you MUST know how to invoke a editor in a
|
||||
shell, or to unzip a file. If you don't know/can do these things, I suggest
|
||||
you stop trying to set this up, and go read on some UNIX tutorials, and IRC
|
||||
tutorials. It takes a LOT of work to run a IRC server good.
|
||||
|
||||
I mean. I sit on the #unreal-support support channel each day, and I see
|
||||
countless questions about stuff that IS IN the documentation. Numerous
|
||||
people don't even bother to look at the config files (CONFIG_FILE_STOP
|
||||
problem).
|
||||
|
||||
You need to look at the documentation now. You need to see how to "include"
|
||||
other configuration files. You need to know how to work out how to use
|
||||
doc/example.settings. I can only tell you, if you ask for support, and it
|
||||
is for errors that you could solve by reading the first lines of a document,
|
||||
then you'll be firmly ignored. I'm sorry, we cannot help your laziness.
|
||||
|
||||
Anyhow, good luck with setting this up. Hope you understand what I am saying
|
||||
here. You will learn a lot more reading, than just ignoring what we are
|
||||
saying.
|
||||
|
||||
--Stskeeps
|
||||
@@ -1,50 +0,0 @@
|
||||
|
||||
Unreal3.2 Release Notes
|
||||
========================
|
||||
|
||||
==[ GENERAL INFORMATION ]==
|
||||
* If you are upgrading, make sure you run make clean and ./Config before doing make
|
||||
* The official UnrealIRCd documentation is doc/unreal32docs.html
|
||||
online version at: http://www.vulnscan.org/UnrealIrcd/unreal32docs.html
|
||||
FAQ: http://www.vulnscan.org/UnrealIrcd/faq/
|
||||
Read them before asking for help.
|
||||
* Report bugs at http://bugs.unrealircd.org/
|
||||
|
||||
== [ NEW ]==
|
||||
- Added german docs (doc/unreal32docs.de.html)
|
||||
- In a spamfilter reason field '_' gets converted to a space (' '),
|
||||
now also added '__' which gets converted to underscore itself ('_').
|
||||
|
||||
==[ MAJOR BUGS FIXED ]==
|
||||
- '/spamfiltere remove' was often removing the wrong entry (RC2 bug)
|
||||
- The TRE regex library was sometimes matching too much if [range].+
|
||||
was used multiple times.
|
||||
- Fixed a remote include issue and added timeouts in case a connection/transfer fails
|
||||
|
||||
==[ MINOR BUGS FIXED ]==
|
||||
- Sometimes hosts were not resolved on Windows due to a resolver bug
|
||||
- spamfilter and sqline: memory leak on /rehash (a few kb)
|
||||
- spamfilter: protect against insane long reason/regex fields in configfile
|
||||
- set::modes-on-join now accepts extended channelmodes
|
||||
- Opteron: various crashbugs fixed, should work ok now.
|
||||
- Win32 GUI "rehash all" option did not reload motd/rules.
|
||||
- Same for ./unreal rehash on *NIX
|
||||
- Usermode 'r' (registered) was unset if you changed the case of your
|
||||
nick (eg: 'blah'->'Blah'), this affected at least ircservices.
|
||||
- vhost::swhois wasn't shown if you did a remote /whois.
|
||||
- Made './curlinstall' work with new c-ares-1.0.0.
|
||||
- Fixed compile problem on some machines related to TRE / libintl.
|
||||
- /who +m was incorrectly hiding +H users even for opers.
|
||||
- Fixed /rehash bug if an .so or remote include didn't load properly
|
||||
|
||||
==[ CHANGED ]==
|
||||
- spamfilter.conf: fixed fyle sig, added sigs for: soex, Nkie, LOI, Gaggle,
|
||||
changed a lot of sigs from block to gline.
|
||||
- Windows: now using new Inno Setup which made the installer 300k smaller
|
||||
- Docs, help.conf and other text updates.
|
||||
|
||||
==[ COMMING UP ]==
|
||||
- You can expect module support on windows in a nearby release.
|
||||
|
||||
==[ ADDITIONAL INFO ]==
|
||||
* See Changelog
|
||||
@@ -1,15 +0,0 @@
|
||||
|-------------------------------------------------------------------------|
|
||||
| Congratulations on your new SSL self-signed certificate for your IRCd. |
|
||||
| However, wouldn't it be better that you get your certifcate signed by |
|
||||
| some kind of Certification Authority (CA), so your users can check that |
|
||||
| they are really connected to the real server, so they feel secure? |
|
||||
| |
|
||||
| There is an initiative at CACert.org - They offer SSL Certificates |
|
||||
| for use with your IRCd for free, so your users can be sure that they |
|
||||
| can trust you and your server. |
|
||||
| |
|
||||
| To get a free signed certificate please visit http://www.CACert.org |
|
||||
| _________________________|
|
||||
| | Press enter to continue |
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
|
||||
_ _ _ ___________ _____ _
|
||||
| | | | | |_ _| ___ \/ __ \ | |
|
||||
| | | |_ __ _ __ ___ __ _| | | | | |_/ /| / \/ __| |
|
||||
| | | | '_ \| '__/ _ \/ _` | | | | | / | | / _` |
|
||||
| |_| | | | | | | __/ (_| | |_| |_| |\ \ | \__/\ (_| |
|
||||
\___/|_| |_|_| \___|\__,_|_|\___/\_| \_| \____/\__,_|
|
||||
|
||||
Update Script v2.0
|
||||
|
||||
What download program do you want to use?
|
||||
-----------------------------------------
|
||||
|
||||
Type "wget" for wget
|
||||
Type "lynx" for lynx
|
||||
|
||||
>
|
||||
@@ -1,77 +0,0 @@
|
||||
#
|
||||
# UnrealIRCd Bug Reporting Script
|
||||
# Copyright (c) 2001, The UnrealIRCd Team
|
||||
# All rights reserved
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
# provided that the following conditions are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
# and the following disclaimer.
|
||||
# * 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.
|
||||
# * Neither the name of the The UnrealIRCd Team nor the names of its contributors may be used
|
||||
# to endorse or promote products derived from this software without specific prior written permission.
|
||||
# * The source code may not be redistributed for a fee or in closed source
|
||||
# programs, without expressed oral consent by the UnrealIRCd Team, however
|
||||
# for operating systems where binary distribution is required, if URL
|
||||
# is passed with the package to get the full source
|
||||
# * No warranty is given unless stated so by the The UnrealIRCd Team
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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.
|
||||
|
||||
# First we define some nice settings and some nice functions
|
||||
set print pretty on
|
||||
|
||||
# dumplist <linked list> <structure format>
|
||||
define dumplist
|
||||
echo Dumping linked list $arg0 in format $arg1\n
|
||||
set $p = $arg0
|
||||
while $p
|
||||
print *($arg1 *) $p
|
||||
set $p = $p->next
|
||||
end
|
||||
end
|
||||
|
||||
# dumparray <name> <size>
|
||||
define dumparray
|
||||
echo Dumping array $arg0 size $arg1\n
|
||||
set $p = 0
|
||||
while $p < $arg1
|
||||
if $arg0[$p]
|
||||
print *$arg0[$p]
|
||||
end
|
||||
set $p = $p + 1
|
||||
end
|
||||
end
|
||||
|
||||
echo Full backtrace:\n
|
||||
echo ---------------\n
|
||||
echo \n
|
||||
bt full
|
||||
echo \n
|
||||
echo Backup parse() buffer:\n
|
||||
echo ----------------------\n
|
||||
echo \n
|
||||
print backupbuf
|
||||
echo \n
|
||||
echo me output:\n
|
||||
echo ----------------------\n
|
||||
print me
|
||||
echo \n
|
||||
echo IRCstats:\n
|
||||
echo ----------------------\n
|
||||
print IRCstats
|
||||
echo \n
|
||||
echo Modules:\n
|
||||
echo ----------------------\n
|
||||
dumparray Modules 50
|
||||
quit
|
||||
@@ -1,6 +0,0 @@
|
||||
ircdcron/ircd.cron
|
||||
ircdcron/ircdchk
|
||||
src/modules/Makefile
|
||||
src/ssl.rnd
|
||||
src/win32/devel/StackTrace.lib
|
||||
src/win32/gnu_regex.lib
|
||||
Vendored
-52
@@ -1,52 +0,0 @@
|
||||
--leave-preprocessor-space
|
||||
--dont-break-procedure-type
|
||||
--no-space-after-function-call-names
|
||||
--brace-indent0
|
||||
--indent-level8
|
||||
-ip8
|
||||
--dont-line-up-parentheses
|
||||
--continuation-indentation4
|
||||
--case-indentation2
|
||||
--no-space-after-casts
|
||||
--blank-lines-after-procedures
|
||||
--no-blank-lines-after-declarations
|
||||
--braces-on-struct-decl-line
|
||||
--paren-indentation0
|
||||
--case-brace-indentation0
|
||||
--line-length80
|
||||
--declaration-indentation5
|
||||
-T size_t
|
||||
-T aClass
|
||||
-T TS
|
||||
-T aClient
|
||||
-T aServer
|
||||
-T anUser
|
||||
-T aChannel
|
||||
-T Mode
|
||||
-T aConfItem
|
||||
-T aMessage
|
||||
-T aMessageTree
|
||||
-T aGline
|
||||
-T aListingArgs
|
||||
-T snomask_t
|
||||
-T n_short
|
||||
-T n_long
|
||||
-T n_time
|
||||
-T u_char
|
||||
-T u_short
|
||||
-T u_long
|
||||
-T u_int
|
||||
-T dbuf
|
||||
-T dbufbuf
|
||||
-T aHashEntry
|
||||
-T Link
|
||||
-T Dlink
|
||||
-T VOIDSIG
|
||||
-T aHostent
|
||||
-T ResRQ
|
||||
-T aCache
|
||||
-T CacheTable
|
||||
-T cainfo
|
||||
-T reinfo
|
||||
-T RETSIGTYPE
|
||||
-T OPT_TYPE
|
||||
-1751
File diff suppressed because it is too large
Load Diff
@@ -1,647 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Config script for UnrealIRCd
|
||||
# (C) 2001 The UnrealIRCd Team
|
||||
#
|
||||
# This configure script is free software; the UnrealIRCd Team gives
|
||||
# unlimited permission to copy, distribute and modify as long as the
|
||||
# copyright headers stay intact
|
||||
#
|
||||
#
|
||||
# Rewritten completely to be an interface to autoconf by codemastr
|
||||
# This was inspired by the config by Michael Graff (explorer@flame.org)
|
||||
# but was written from scratch
|
||||
|
||||
# In order to be faster than the old Config, this assumes that all information
|
||||
# in the cache file is valid and therefore doesn't check it, so if you messed with
|
||||
# default values thats your problem :P
|
||||
|
||||
# some bits edited by baafie on March 17 2004, every change marked.
|
||||
|
||||
|
||||
RUN_CONFIGURE () {
|
||||
ARG=""
|
||||
if [ "$NOSPOOF" = "1" ] ; then
|
||||
ARG="$ARG--enable-nospoof "
|
||||
fi
|
||||
if [ -n "$HUB" ] ; then
|
||||
ARG="$ARG--enable-hub "
|
||||
fi
|
||||
if [ "$CRYPTOIRCD" = "1" ] ; then
|
||||
if test x"$SSLDIR" = "x" ; then
|
||||
ARG="$ARG--enable-ssl "
|
||||
else
|
||||
ARG="$ARG--enable-ssl=$SSLDIR "
|
||||
fi
|
||||
fi
|
||||
if [ "$ZIPLINKS" = "1" ] ; then
|
||||
if test x"$ZIPLINKSDIR" = "x" ; then
|
||||
ARG="$ARG--enable-ziplinks "
|
||||
else
|
||||
ARG="$ARG--enable-ziplinks=$ZIPLINKSDIR "
|
||||
fi
|
||||
fi
|
||||
if [ "$REMOTEINC" = "1" ] ; then
|
||||
ARG="$ARG--enable-libcurl=$CURLDIR "
|
||||
fi
|
||||
if [ "$INET6" = "1" ] ; then
|
||||
ARG="$ARG--enable-inet6 "
|
||||
fi
|
||||
if [ "$PREFIXAQ" = "1" ]; then
|
||||
ARG="$ARG--enable-prefixaq "
|
||||
fi
|
||||
ARG="$ARG--with-listen=$LISTEN_SIZE "
|
||||
ARG="$ARG--with-dpath=$DPATH "
|
||||
ARG="$ARG--with-spath=$SPATH "
|
||||
ARG="$ARG--with-nick-history=$NICKNAMEHISTORYLENGTH "
|
||||
ARG="$ARG--with-sendq=$MAXSENDQLENGTH "
|
||||
ARG="$ARG--with-bufferpool=$BUFFERPOOL "
|
||||
ARG="$ARG--with-hostname=$DOMAINNAME "
|
||||
ARG="$ARG--with-permissions=$DEFPERM "
|
||||
ARG="$ARG--with-fd-setsize=$MAXCONNECTIONS "
|
||||
ARG="$ARG--enable-dynamic-linking "
|
||||
ARG="$ARG $EXTRAPARA "
|
||||
CONF="./configure $ARG"
|
||||
echo $CONF
|
||||
$CONF
|
||||
if [ "$CRYPTOIRCD" = "1" ] ; then
|
||||
if [ ! -f server.req.pem ]; then
|
||||
export OPENSSLPATH
|
||||
make pem
|
||||
cat .SICI
|
||||
read cc
|
||||
else
|
||||
echo "SSL certificate already existing, no need to regenerate"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
c=""
|
||||
n=""
|
||||
NOSPOOF=""
|
||||
DPATH="`pwd`"
|
||||
SPATH="`pwd`/src/ircd"
|
||||
HUB="1"
|
||||
DOMAINNAME=`hostname`
|
||||
DEFPERM="0600"
|
||||
CRYPTOIRCD=""
|
||||
SSLDIR=""
|
||||
ZIPLINKS=""
|
||||
ZIPLINKSDIR=""
|
||||
LISTEN_SIZE="5"
|
||||
NICKNAMEHISTORYLENGTH="2000"
|
||||
MAXSENDQLENGTH="3000000"
|
||||
BUFFERPOOL="18"
|
||||
MAXCONNECTIONS="1024"
|
||||
INET6=""
|
||||
REMOTEINC=""
|
||||
CURLDIR=""
|
||||
PREFIXAQ=""
|
||||
EXTRAPARA=""
|
||||
if [ "`eval echo -n 'a'`" = "-n a" ] ; then
|
||||
c="\c"
|
||||
else
|
||||
n="-n"
|
||||
fi
|
||||
|
||||
|
||||
#parse arguments
|
||||
NOCACHE=""
|
||||
NOINTRO=""
|
||||
if [ "$1" = "--help" ] ; then
|
||||
echo "Config utility for UnrealIRCd"
|
||||
echo "-----------------------------"
|
||||
echo "Syntax: ./Config [options]"
|
||||
echo "-nocache Ignore settings saved in config.settings"
|
||||
echo "-nointro Skip intro (release notes, etc)"
|
||||
echo "-quick Skip questions, go straight to configure"
|
||||
echo "-C Clean ./configure cache"
|
||||
exit 0
|
||||
fi
|
||||
if [ "$1" = "-nocache" -o "$2" = "-nocache" ] ; then
|
||||
NOCACHE="1"
|
||||
fi
|
||||
if [ "$1" = "-nointro" -o "$2" = "-nointro" ] ; then
|
||||
NOINTRO="1"
|
||||
fi
|
||||
|
||||
if [ -f "config.settings" -a -z "$NOCACHE" ] ; then
|
||||
. config.settings
|
||||
fi
|
||||
|
||||
if [ "$1" = "-C" -o "$2" = "-C" ] ; then
|
||||
rm -f config.cache
|
||||
fi
|
||||
|
||||
if [ "$1" = "-quick" -o "$1" = "-q" -o "$2" = "-quick" ] ; then
|
||||
echo "running quick config"
|
||||
RUN_CONFIGURE
|
||||
exit 0
|
||||
fi
|
||||
|
||||
clear
|
||||
|
||||
if [ -f ".CHANGES.NEW" -a -z "$NOINTRO" ] ; then
|
||||
more .CHANGES.NEW
|
||||
echo $n "[Enter to continue]"
|
||||
read cc
|
||||
clear
|
||||
fi
|
||||
if [ -f ".RELEASE.NOTES" -a -z "$NOINTRO" ] ; then
|
||||
more .RELEASE.NOTES
|
||||
echo $n "[Enter to continue]"
|
||||
read cc
|
||||
clear
|
||||
fi
|
||||
|
||||
TEST=""
|
||||
while [ -z "$TEST" ] ; do
|
||||
if [ "$NOSPOOF" = "1" ] ; then
|
||||
TEST="Yes"
|
||||
else
|
||||
TEST="No"
|
||||
fi
|
||||
echo ""
|
||||
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. 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"
|
||||
read cc
|
||||
if [ -z "$cc" ] ; then
|
||||
cc=$TEST
|
||||
fi
|
||||
case "$cc" in
|
||||
[Yy]*)
|
||||
NOSPOOF="1"
|
||||
;;
|
||||
[Nn]*)
|
||||
NOSPOOF=""
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "You must enter either Yes or No"
|
||||
TEST=""
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
TEST="$DPATH"
|
||||
echo ""
|
||||
echo "What directory are all the server configuration files in?"
|
||||
echo $n "[$TEST] -> $c"
|
||||
read cc
|
||||
if [ -z "$cc" ] ; then
|
||||
DPATH=$TEST
|
||||
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=""
|
||||
while [ -z "$TEST" ] ; do
|
||||
if [ "$HUB" = "1" ] ; then
|
||||
TEST="Hub"
|
||||
else
|
||||
TEST="Leaf"
|
||||
fi
|
||||
echo ""
|
||||
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
|
||||
if [ -z "$cc" ] ; then
|
||||
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"
|
||||
echo ""
|
||||
echo "What should the default permissions for your configuration files be? (Set this to 0 to disable)"
|
||||
echo "It is strongly recommended that you use 0600 to prevent unwanted reading of the file"
|
||||
echo $n "[$TEST] -> $c"
|
||||
read cc
|
||||
if [ -z "$cc" ] ; then
|
||||
DEFPERM=$TEST
|
||||
break
|
||||
fi
|
||||
case "$cc" in
|
||||
[0-9]*)
|
||||
DEFPERM="$cc"
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "You must enter a number"
|
||||
TEST=""
|
||||
;;
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
TEST=""
|
||||
while [ -z "$TEST" ] ; do
|
||||
if [ "$CRYPTOIRCD" = "1" ] ; then
|
||||
TEST="Yes"
|
||||
else
|
||||
TEST="No"
|
||||
fi
|
||||
echo ""
|
||||
echo "Do you want to support SSL (Secure Sockets Layer) connections?"
|
||||
echo $n "[$TEST] -> $c"
|
||||
read cc
|
||||
if [ -z "$cc" ] ; then
|
||||
cc=$TEST
|
||||
fi
|
||||
case "$cc" in
|
||||
[Yy]*)
|
||||
CRYPTOIRCD="1"
|
||||
;;
|
||||
[Nn]*)
|
||||
CRYPTOIRCD=""
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "You must enter either Yes or No"
|
||||
TEST=""
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$CRYPTOIRCD" = "1" ] ; then
|
||||
TEST=""
|
||||
echo ""
|
||||
echo "If you know the path to OpenSSL on your system, enter it here. If not"
|
||||
echo "leave this blank"
|
||||
echo $n "[$TEST] -> $c"
|
||||
read cc
|
||||
if [ -z "$cc" ] ; then
|
||||
SSLDIR=""
|
||||
else
|
||||
SSLDIR=`eval echo $cc` # modified
|
||||
fi
|
||||
fi
|
||||
|
||||
TEST=""
|
||||
while [ -z "$TEST" ] ; do
|
||||
if [ "$INET6" = "1" ] ; then
|
||||
TEST="Yes"
|
||||
else
|
||||
TEST="No"
|
||||
fi
|
||||
echo ""
|
||||
echo "Do you want to enable IPv6 support?"
|
||||
echo $n "[$TEST] -> $c"
|
||||
read cc
|
||||
if [ -z "$cc" ] ; then
|
||||
cc=$TEST
|
||||
fi
|
||||
case "$cc" in
|
||||
[Yy]*)
|
||||
INET6="1"
|
||||
;;
|
||||
[Nn]*)
|
||||
INET6=""
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "You must enter either Yes or No"
|
||||
TEST=""
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
TEST=""
|
||||
while [ -z "$TEST" ] ; do
|
||||
if [ "$ZIPLINKS" = "1" ] ; then
|
||||
TEST="Yes"
|
||||
else
|
||||
TEST="No"
|
||||
fi
|
||||
echo ""
|
||||
echo "Do you want to enable ziplinks support?"
|
||||
echo $n "[$TEST] -> $c"
|
||||
read cc
|
||||
if [ -z "$cc" ] ; then
|
||||
cc=$TEST
|
||||
fi
|
||||
case "$cc" in
|
||||
[Yy]*)
|
||||
ZIPLINKS="1"
|
||||
;;
|
||||
[Nn]*)
|
||||
ZIPLINKS=""
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "You must enter either Yes or No"
|
||||
TEST=""
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$ZIPLINKS" = "1" ] ; then
|
||||
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=""
|
||||
else
|
||||
ZIPLINKSDIR=`eval echo $cc` # modified
|
||||
fi
|
||||
fi
|
||||
|
||||
TEST=""
|
||||
while [ -z "$TEST" ] ; do
|
||||
if [ "$REMOTEINC" = "1" ] ; then
|
||||
TEST="Yes"
|
||||
else
|
||||
TEST="No"
|
||||
fi
|
||||
echo ""
|
||||
echo "Do you want to enable remote includes?"
|
||||
echo $n "[$TEST] -> $c"
|
||||
read cc
|
||||
if [ -z "$cc" ] ; then
|
||||
cc=$TEST
|
||||
fi
|
||||
case "$cc" in
|
||||
[Yy]*)
|
||||
REMOTEINC="1"
|
||||
;;
|
||||
[Nn]*)
|
||||
REMOTEINC=""
|
||||
CURLDIR=""
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "You must enter either Yes or No"
|
||||
TEST=""
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$REMOTEINC" = "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
|
||||
|
||||
|
||||
TEST=""
|
||||
while [ -z "$TEST" ] ; do
|
||||
if [ "$PREFIXAQ" = "1" ] ; then
|
||||
TEST="Yes"
|
||||
else
|
||||
TEST="No"
|
||||
fi
|
||||
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, 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
|
||||
if [ -z "$cc" ] ; then
|
||||
cc=$TEST
|
||||
fi
|
||||
case "$cc" in
|
||||
[Yy]*)
|
||||
PREFIXAQ="1"
|
||||
;;
|
||||
[Nn]*)
|
||||
PREFIXAQ=""
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "You must enter either Yes or No"
|
||||
TEST=""
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
TEST=""
|
||||
while [ -z "$TEST" ] ; do
|
||||
TEST="$LISTEN_SIZE"
|
||||
echo ""
|
||||
echo "What listen() backlog value do you wish to use? Some older servers"
|
||||
echo "have problems with more than 5, others work fine with many more."
|
||||
echo $n "[$TEST] -> $c"
|
||||
read cc
|
||||
if [ -z "$cc" ] ; then
|
||||
LISTEN_SIZE=$TEST
|
||||
break
|
||||
fi
|
||||
case "$cc" in
|
||||
[1-9]*)
|
||||
LISTEN_SIZE="$cc"
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "You must enter a number"
|
||||
TEST=""
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
TEST=""
|
||||
while [ -z "$TEST" ] ; do
|
||||
TEST="$NICKNAMEHISTORYLENGTH"
|
||||
echo ""
|
||||
echo "How far back do you want to keep the nickname history?"
|
||||
echo $n "[$TEST] -> $c"
|
||||
read cc
|
||||
if [ -z "$cc" ] ; then
|
||||
NICKNAMEHISTORYLENGTH=$TEST
|
||||
break
|
||||
fi
|
||||
case "$cc" in
|
||||
[1-9]*)
|
||||
NICKNAMEHISTORYLENGTH="$cc"
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "You must enter a number"
|
||||
TEST=""
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
TEST=""
|
||||
while [ -z "$TEST" ] ; do
|
||||
TEST="$MAXSENDQLENGTH"
|
||||
echo ""
|
||||
echo "What is the maximum sendq length you wish to have?"
|
||||
echo $n "[$TEST] -> $c"
|
||||
read cc
|
||||
if [ -z "$cc" ] ; then
|
||||
MAXSENDQLENGTH=$TEST
|
||||
break
|
||||
fi
|
||||
case "$cc" in
|
||||
[1-9][0-9][0-9][0-9]*)
|
||||
MAXSENDQLENGTH="$cc"
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "You must enter a number greater than or equal to 1000"
|
||||
TEST=""
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
TEST=""
|
||||
while [ -z "$TEST" ] ; do
|
||||
TEST="$BUFFERPOOL"
|
||||
echo ""
|
||||
echo "How many buffer pools would you like?"
|
||||
echo "This number will be multiplied by MAXSENDQLENGTH."
|
||||
echo $n "[$TEST] -> $c"
|
||||
read cc
|
||||
if [ -z "$cc" ] ; then
|
||||
BUFFERPOOL=$TEST
|
||||
break
|
||||
fi
|
||||
case "$cc" in
|
||||
[1-9]*)
|
||||
BUFFERPOOL="$cc"
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "You must enter a number"
|
||||
TEST=""
|
||||
;;
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
echo ""
|
||||
TEST=""
|
||||
while [ -z "$TEST" ] ; do
|
||||
TEST="$MAXCONNECTIONS"
|
||||
echo ""
|
||||
echo "How many file descriptors (or sockets) can the IRCd use?"
|
||||
echo $n "[$TEST] -> $c"
|
||||
read cc
|
||||
if [ -z "$cc" ] ; then
|
||||
MAXCONNECTIONS=$TEST
|
||||
break
|
||||
fi
|
||||
case "$cc" in
|
||||
[1-9][0-9][0-9]*)
|
||||
MAXCONNECTIONS="$cc"
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "You must to enter a number greater than or equal to 100"
|
||||
TEST=""
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "Would you like any more parameters to configure?"
|
||||
echo "Write them here:"
|
||||
echo $n "[]-> $c"
|
||||
read EXTRAPARA
|
||||
|
||||
rm -f config.settings
|
||||
cat > config.settings << __EOF__
|
||||
#
|
||||
NOSPOOF="$NOSPOOF"
|
||||
DPATH="$DPATH"
|
||||
SPATH="$SPATH"
|
||||
INET6="$INET6"
|
||||
PREFIXAQ="$PREFIXAQ"
|
||||
LISTEN_SIZE="$LISTEN_SIZE"
|
||||
MAXSENDQLENGTH="$MAXSENDQLENGTH"
|
||||
BUFFERPOOL="$BUFFERPOOL"
|
||||
MAXCONNECTIONS="$MAXCONNECTIONS"
|
||||
NICKNAMEHISTORYLENGTH="$NICKNAMEHISTORYLENGTH"
|
||||
HUB="$HUB"
|
||||
DOMAINNAME="$DOMAINNAME"
|
||||
DEFPERM="$DEFPERM"
|
||||
CRYPTOIRCD="$CRYPTOIRCD"
|
||||
SSLDIR="$SSLDIR"
|
||||
ZIPLINKS="$ZIPLINKS"
|
||||
ZIPLINKSDIR="$ZIPLINKSDIR"
|
||||
REMOTEINC="$REMOTEINC"
|
||||
CURLDIR="$CURLDIR"
|
||||
EXTRAPARA="$EXTRAPARA"
|
||||
__EOF__
|
||||
RUN_CONFIGURE
|
||||
cat << __EOF__
|
||||
|
||||
_______________________________________________________________________
|
||||
| |
|
||||
| UnrealIRCd Compile-Time Config |
|
||||
|_______________________________________________________________________|
|
||||
|_______________________________________________________________________|
|
||||
| |
|
||||
| Now all you have to do is type 'make' and let it compile. When that's |
|
||||
| done, you will receive other instructions on what to do next. |
|
||||
| |
|
||||
|_______________________________________________________________________|
|
||||
|_______________________________________________________________________|
|
||||
| - The UnrealIRCd Team - |
|
||||
| |
|
||||
| * Stskeeps stskeeps@unrealircd.com |
|
||||
| * codemastr codemastr@unrealircd.com |
|
||||
| * Syzop syzop@unrealircd.com |
|
||||
|_______________________________________________________________________|
|
||||
__EOF__
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
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 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:
|
||||
<https://www.paypal.com/xclick/business=donation%40unrealircd.com&
|
||||
item_name=UnrealIRCd+Donation&no_shipping=1&cn=Comments&tax=0¤cy_code=USD>
|
||||
|
||||
Or simply send a payment through PayPal to:
|
||||
donation@unrealircd.com
|
||||
|
||||
If you don't want to use PayPal, or you want to donate something other than money
|
||||
(old computer hardware, etc.), contact Stskeeps (stskeeps@unrealircd.com) and send
|
||||
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$ ]
|
||||
@@ -1,23 +0,0 @@
|
||||
**** Remote Includes ****
|
||||
|
||||
Setting up UnrealIRCd to work with remote includes is not very difficult. The first step is to
|
||||
download c-ares. C-ares can be downloaded from <http://daniel.haxx.se/projects/c-ares/>
|
||||
download the latest version of c-ares and extract the .tar.gz somewhere.
|
||||
|
||||
Now, download the latest version of curl, available at <http://curl.haxx.se/download.html>
|
||||
again, extract the tar.gz somewhere.
|
||||
|
||||
Next, go to the Unreal3.2 directory and run the curlinstall script. You run the script
|
||||
as follows:
|
||||
|
||||
./curlinstall ares_path curl_path
|
||||
|
||||
Paths should be complete pathnames. If you extracted c-ares to /home/username/c-ares-1.0.0
|
||||
and curl to /home/username/curl-7.11.0 then you would run:
|
||||
|
||||
./curlinstall /home/username/c-ares-1.0.0 /home/username/curl-7.11.0
|
||||
|
||||
Lastly, run ./Config. When asked whether to enable remote includes say "yes" and when asked
|
||||
for the path curl was installed to include the path that is printed out after ./curlinstall
|
||||
completes. Then simply run make to compile Unreal as usual and remote includes should work
|
||||
fine.
|
||||
@@ -1,340 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
-246
@@ -1,246 +0,0 @@
|
||||
#/************************************************************************
|
||||
#* IRC - Internet Relay Chat, Makefile
|
||||
#* Copyright (C) 1990, Jarkko Oikarinen
|
||||
#*
|
||||
#* This program is free software; you can redistribute it and/or modify
|
||||
#* it under the terms of the GNU General Public License as published by
|
||||
#* the Free Software Foundation; either version 1, or (at your option)
|
||||
#* any later version.
|
||||
#*
|
||||
#* This program is distributed in the hope that it will be useful,
|
||||
#* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
#* GNU General Public License for more details.
|
||||
#*
|
||||
#* You should have received a copy of the GNU General Public License
|
||||
#* along with this program; if not, write to the Free Software
|
||||
#* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#*
|
||||
#* $Id$
|
||||
#*/
|
||||
|
||||
CC=@CC@
|
||||
INCLUDEDIR=../include
|
||||
NETWORKSDIR=
|
||||
FROMDOS=/home/cmunk/bin/4dos
|
||||
|
||||
# [CHANGEME]
|
||||
# Default flags:
|
||||
# Change XCFLAGS if you don't like what Config puts there. Same with
|
||||
# IRCDLIBS.
|
||||
#
|
||||
# If you are configuring by hand, try "-O -g" for XCFLAGS, and leave
|
||||
# IRCDLIBS blank. If that fails, try recomendations below.
|
||||
#
|
||||
|
||||
#XCFLAGS=-O -g -export-dynamic
|
||||
IRCDLIBS=@IRCDLIBS@ @TRELIBS@
|
||||
CRYPTOLIB=@CRYPTOLIB@
|
||||
OPENSSLINCLUDES=
|
||||
|
||||
XCFLAGS=-I@TREINCDIR@ @CFLAGS@
|
||||
#
|
||||
# use the following on MIPS:
|
||||
#CFLAGS= -systype bsd43 -DSYSTYPE_BSD43 -I$(INCLUDEDIR)
|
||||
# For Irix 4.x (SGI), use the following:
|
||||
#CFLAGS= -g -cckr -I$(INCLUDEDIR)
|
||||
#
|
||||
# on NEXT use:
|
||||
#CFLAGS=-bsd -I$(INCLUDEDIR)
|
||||
#on NeXT other than 2.0:
|
||||
#IRCDLIBS=-lsys_s
|
||||
#
|
||||
# AIX 370 flags
|
||||
#CFLAGS=-D_BSD -Hxa -I$(INCLUDEDIR)
|
||||
#IRCDLIBS=-lbsd
|
||||
#
|
||||
# Dynix/ptx V2.0.x
|
||||
#CFLAGS= -I$(INCLUDEDIR) -O -Xo
|
||||
#IRCDLIBS= -lsocket -linet -lnsl -lseq
|
||||
#
|
||||
# Dynix/ptx V1.x.x
|
||||
#IRCDLIBS= -lsocket -linet -lnsl -lseq
|
||||
#
|
||||
#use the following on SUN OS without nameserver libraries inside libc
|
||||
#IRCDLIBS=-lresolv
|
||||
#
|
||||
# Solaris 2
|
||||
#IRCDLIBS=-lsocket -lnsl -lresolv -L/usr/ucblib -R/usr/ucblib -lgen
|
||||
#
|
||||
# ESIX
|
||||
#CFLAGS=-O -I$(INCLUDEDIR) -I/usr/ucbinclude
|
||||
#IRCDLIBS=-L/usr/ucblib -L/usr/lib -lsocket -lucb -lns -lnsl
|
||||
#
|
||||
# LDFLAGS - flags to send the loader (ld). SunOS users may want to add
|
||||
# -Bstatic here.
|
||||
#
|
||||
#LDFLAGS=-Bstatic
|
||||
#
|
||||
#Dell SVR4
|
||||
#CC=gcc
|
||||
#CFLAGS= -I$(INCLUDEDIR) -O2
|
||||
#IRCDLIBS=-lsocket -lnsl -lucb
|
||||
|
||||
# [CHANGEME]
|
||||
# IRCDMODE is the mode you want the binary to be.
|
||||
# The 4 at the front is important (allows for setuidness)
|
||||
#
|
||||
# WARNING: if you are making ircd SUID or SGID, check config.h to make sure
|
||||
# you are not defining CMDLINE_CONFIG
|
||||
IRCDMODE = 711
|
||||
|
||||
# [CHANGEME]
|
||||
# IRCDDIR must be the same as DPATH in include/config.h
|
||||
#
|
||||
IRCDDIR=@IRCDDIR@
|
||||
|
||||
|
||||
URL=@URL@
|
||||
|
||||
# [CHANGEME]
|
||||
# If you get a link-time error dealing with strtoul, comment out
|
||||
# this line.
|
||||
# STRTOUL= strtoul.o
|
||||
STRTOUL=@STRTOUL@
|
||||
|
||||
# [CHANGEME]
|
||||
# If you get crashes around a specific number of clients, and that client
|
||||
# load comes close or a little over the system-defined value of FD_SETSIZE,
|
||||
# override it here and see what happens.
|
||||
FD_SETSIZE=@FD_SETSIZE@
|
||||
|
||||
# Where is your openssl binary
|
||||
OPENSSLPATH=@OPENSSLPATH@
|
||||
|
||||
CFLAGS=-I$(INCLUDEDIR) $(XCFLAGS) @LDFLAGS@ $(FD_SETSIZE)
|
||||
|
||||
SHELL=/bin/sh
|
||||
SUBDIRS=src
|
||||
BINDIR=@BINDIR@
|
||||
INSTALL=@INSTALL@
|
||||
RM=@RM@
|
||||
CP=@CP@
|
||||
TOUCH=@TOUCH@
|
||||
RES=
|
||||
all: build
|
||||
|
||||
MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'IRCDLIBS=${IRCDLIBS}' \
|
||||
'LDFLAGS=${LDFLAGS}' 'IRCDMODE=${IRCDMODE}' \
|
||||
'RES=${RES}' 'BINDIR=${BINDIR}' 'INSTALL=${INSTALL}' \
|
||||
'INCLUDEDIR=${INCLUDEDIR}' 'IRCDDIR=${IRCDDIR}' \
|
||||
'RM=${RM}' 'CP=${CP}' 'TOUCH=${TOUCH}' \
|
||||
'SHELL=${SHELL}' 'STRTOUL=${STRTOUL}' \
|
||||
'CRYPTOLIB=${CRYPTOLIB}' \
|
||||
'CRYPTOINCLUDES=${CRYPTOINCLUDES}' 'URL=${URL}'
|
||||
|
||||
custommodule:
|
||||
cd src; ${MAKE} ${MAKEARGS} MODULEFILE=${MODULEFILE} 'EXLIBS=${EXLIBS}' custommodule
|
||||
|
||||
server:
|
||||
build:
|
||||
-@if [ ! -f include/setup.h ] ; then \
|
||||
echo "Hmm...doesn't look like you've run Config..."; \
|
||||
echo "Doing so now."; \
|
||||
sh Config; \
|
||||
fi
|
||||
@for i in $(SUBDIRS); do \
|
||||
echo "Building $$i";\
|
||||
( cd $$i; ${MAKE} ${MAKEARGS} build; ) \
|
||||
done
|
||||
@echo ' __________________________________________________ '
|
||||
@echo '| Compile is now complete. |'
|
||||
@echo '| You should now read the documentation and learn |'
|
||||
@echo '| how to configure your IRCd. |'
|
||||
@echo '| |'
|
||||
@echo '| If you really like UnrealIRCd, and would like to |'
|
||||
@echo '| make a donation, please read the Donation file in|'
|
||||
@echo '| this archive. :) |'
|
||||
@echo '| |'
|
||||
@echo '| Thanks for using Unreal IRCd! If you are in need |'
|
||||
@echo '| for any kind of help regarding the IRCd please |'
|
||||
@echo '| read the Unreal.nfo file. |'
|
||||
@echo '|__________________________________________________|'
|
||||
|
||||
clean:
|
||||
$(RM) -f *~ \#* core *.orig include/*.orig
|
||||
@for i in $(SUBDIRS); do \
|
||||
echo "Cleaning $$i";\
|
||||
( cd $$i; ${MAKE} ${MAKEARGS} clean; ) \
|
||||
done
|
||||
-@if [ -f include/setup.h ] ; then \
|
||||
echo "To really restart installation, remove include/setup.h" ; \
|
||||
fi
|
||||
|
||||
cleandir: clean
|
||||
rm -rf include/networks.h include/setup.h Makefile Settings
|
||||
|
||||
makex:
|
||||
chmod +x Config newnet ircd ircdcron/ircdchk killircd
|
||||
chmod +x rehash ircdreg
|
||||
|
||||
fromdos: cleandir
|
||||
$(FROMDOS) -dv *
|
||||
$(FROMDOS) -dv src/*
|
||||
$(FROMDOS) -dv include/*
|
||||
$(FROMDOS) -dv doc/*
|
||||
$(FROMDOS) -dv crypt/*
|
||||
$(FROMDOS) -dv ircdcron/*
|
||||
makedist: makex
|
||||
echo "Stamping.."
|
||||
|
||||
stamp: makedist
|
||||
echo "/* Auto created release stamping */" > include/stamp.h
|
||||
echo "#define RELEASEID2 \"`date +%s`\"" >> include/stamp.h
|
||||
echo "#define RELEASESTUFF \"`hostname`\"" >> include/stamp.h
|
||||
echo "" >> include/stamp.h
|
||||
|
||||
depend:
|
||||
@for i in $(SUBDIRS); do \
|
||||
echo "Making dependencies in $$i";\
|
||||
( cd $$i; ${MAKE} ${MAKEARGS} depend; ) \
|
||||
done
|
||||
|
||||
install: all
|
||||
$(INSTALL) -m 0700 -d $(IRCDDIR)
|
||||
$(INSTALL) -m 0700 src/ircd $(BINDIR)
|
||||
$(INSTALL) -m 0700 -d $(IRCDDIR)/networks
|
||||
$(INSTALL) -m 0600 networks/*.network $(IRCDDIR)/networks
|
||||
$(INSTALL) -m 0700 networks/makenet $(IRCDDIR)/networks
|
||||
$(INSTALL) -m 0600 networks/networks.ndx $(IRCDDIR)/networks
|
||||
$(INSTALL) -m 0700 -d $(IRCDDIR)/doc
|
||||
$(INSTALL) -m 0600 doc/Authors doc/example.conf doc/example.settings doc/coding-guidelines doc/tao.of.irc doc/unreal32docs.html $(IRCDDIR)/doc
|
||||
$(INSTALL) -m 0700 -d $(IRCDDIR)/aliases
|
||||
$(INSTALL) -m 0600 aliases/*.conf $(IRCDDIR)/aliases
|
||||
$(TOUCH) $(IRCDDIR)/unrealircd.conf
|
||||
chmod 0600 $(IRCDDIR)/unrealircd.conf
|
||||
$(INSTALL) -m 0600 badwords.*.conf help.conf LICENSE Donation $(IRCDDIR)
|
||||
$(INSTALL) -m 0700 unreal $(IRCDDIR)
|
||||
$(INSTALL) -m 0700 -d $(IRCDDIR)/modules
|
||||
$(INSTALL) -m 0700 src/modules/*.so $(IRCDDIR)/modules
|
||||
|
||||
pem: src/ssl.cnf
|
||||
@echo "Generating certificate request .. "
|
||||
$(OPENSSLPATH) req -new \
|
||||
-config src/ssl.cnf -out server.req.pem \
|
||||
-keyout server.key.pem -nodes
|
||||
@echo "Generating self-signed certificate .. "
|
||||
$(OPENSSLPATH) req -x509 -days 365 -in server.req.pem \
|
||||
-key server.key.pem -out server.cert.pem
|
||||
@echo "Generating fingerprint .."
|
||||
$(OPENSSLPATH) x509 -subject -dates -fingerprint -noout \
|
||||
-in server.cert.pem
|
||||
@echo "Setting o-rwx & g-rwx for files... "
|
||||
chmod o-rwx server.req.pem server.key.pem server.cert.pem
|
||||
chmod g-rwx server.req.pem server.key.pem server.cert.pem
|
||||
@echo "Done!. If you want to encrypt the private key, run"
|
||||
@echo "make encpem"
|
||||
|
||||
encpem: server.key.pem
|
||||
@echo "Encrypting server key .."
|
||||
$(OPENSSLPATH) rsa -in server.key.pem -out server.key.c.pem -des3
|
||||
-@if [ -f server.key.c.pem ] ; then \
|
||||
echo "Replacing unencrypted with encrypted .." ; \
|
||||
cp server.key.c.pem server.key.pem ; \
|
||||
rm -f server.key.c.pem ; \
|
||||
fi
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
==[ COMPILING ]==
|
||||
To build the ircd, run:
|
||||
./Config
|
||||
make
|
||||
|
||||
If you specified an alternative location during ./Config you also need
|
||||
to run "make install".
|
||||
|
||||
==[ MAKING A CONFIG FILE ]==
|
||||
If you are new, then you need to create your own configfile:
|
||||
|
||||
copy doc/example.conf to your main UnrealIRCd directory and call
|
||||
it unrealircd.conf .
|
||||
Then open it in an editor and carefully modify it, consult the docs
|
||||
(doc/unreal32docs.html, or online: www.unrealircd.com/unreal32docs.html)
|
||||
for more information about every block/setting.
|
||||
Common problems are explained in the FAQ, which is located at:
|
||||
http://www.vulnscan.org/UnrealIrcd/faq/ .
|
||||
|
||||
==[ BOOTING YOUR IRCD ]==
|
||||
Just type: ./unreal start
|
||||
Note that after booting the errors are usually logged to ircd.log,
|
||||
so check that file if you have any problems.
|
||||
Again, check the FAQ (and docs) if you have any boot problems.
|
||||
-70
@@ -1,70 +0,0 @@
|
||||
===============================================
|
||||
= UnrealIRCd v3.2 =
|
||||
===============================================
|
||||
Was brought to you by:
|
||||
|
||||
The core team:
|
||||
==============
|
||||
* Stskeeps <stskeeps@tspre.org>
|
||||
* codemastr <codemastr@unrealircd.com>
|
||||
* Syzop <syzop@unrealircd.org>
|
||||
* Luke <luke@unrealircd.com>
|
||||
|
||||
Contributors
|
||||
============
|
||||
* McSkaf <mcskaf@unrealircd.org>
|
||||
* Zogg <zogg@unrealircd.org>
|
||||
* NiQuiL <niquil@unrealircd.org>
|
||||
* assyrian <assyrian@unrealircd.org>
|
||||
* nighthawk <nighthawk@unrealircd.com>
|
||||
* DrBin <drbin@unrealircd.com>
|
||||
* llthangel <llthangel@unrealircd.org>
|
||||
* Griever <griever@unrealircd.com>
|
||||
|
||||
Documentation:
|
||||
==============
|
||||
* CKnight^ <cknight@unrealircd.com>
|
||||
|
||||
Precenses on the Internet:
|
||||
* http://www.unrealircd.com
|
||||
|
||||
CVS
|
||||
====
|
||||
To get anonymous access: (read only)
|
||||
"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: www.unrealircd.com/unreal32docs.html)
|
||||
* check the FAQ (www.vulnscan.org/UnrealIrcd/faq/)
|
||||
|
||||
Means of support:
|
||||
* 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).
|
||||
|
||||
UnrealIRCd Bugtracker (Where to report bugs or make suggestions)
|
||||
==================================================================
|
||||
http://bugs.unrealircd.org
|
||||
|
||||
Want to discuss, chat, etc?
|
||||
=============================
|
||||
* IRC: /server irc.ircsystems.net 6667 - /join #UnrealIRCd
|
||||
@@ -1,43 +0,0 @@
|
||||
/* Standard Aliases */
|
||||
|
||||
alias identify {
|
||||
format "^#" {
|
||||
nick chanserv;
|
||||
type services;
|
||||
parameters "IDENTIFY %1-";
|
||||
};
|
||||
format "^[^#]" {
|
||||
nick nickserv;
|
||||
type services;
|
||||
parameters "IDENTIFY %1-";
|
||||
};
|
||||
type command;
|
||||
};
|
||||
|
||||
alias services {
|
||||
format "^#" {
|
||||
nick chanserv;
|
||||
type services;
|
||||
parameters "%1-";
|
||||
};
|
||||
format "^[^#]" {
|
||||
nick nickserv;
|
||||
type services;
|
||||
parameters "%1-";
|
||||
};
|
||||
type command;
|
||||
};
|
||||
|
||||
alias register {
|
||||
format "^#" {
|
||||
nick chanserv;
|
||||
type services;
|
||||
parameters "REGISTER %1-";
|
||||
};
|
||||
format "^[^#]" {
|
||||
nick nickserv;
|
||||
type services;
|
||||
parameters "REGISTER %1-";
|
||||
};
|
||||
type command;
|
||||
};
|
||||
@@ -1,19 +0,0 @@
|
||||
/* Anope Aliases */
|
||||
|
||||
alias nickserv { type services; };
|
||||
alias ns { nick nickserv; type services; };
|
||||
alias chanserv { type services; };
|
||||
alias cs { nick chanserv; type services; };
|
||||
alias memoserv { type services; };
|
||||
alias ms { nick memoserv; type services; };
|
||||
alias operserv { type services; };
|
||||
alias os { nick operserv; type services; };
|
||||
alias helpserv { type services; };
|
||||
alias hs { nick helpserv; type services; };
|
||||
alias botserv { type services; };
|
||||
alias bs { nick botserv; type services; };
|
||||
alias hostserv { type services; };
|
||||
alias hs { nick hostserv; type services; };
|
||||
|
||||
include "aliases/aliases.conf";
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/* Auspice Aliases */
|
||||
|
||||
alias nickserv { type services; };
|
||||
alias ns { nick nickserv; type services; };
|
||||
alias chanserv { type services; };
|
||||
alias cs { nick chanserv; type services; };
|
||||
alias memoserv { type services; };
|
||||
alias ms { nick memoserv; type services; };
|
||||
alias helpserv { type services; };
|
||||
alias hs { nick helpserv; type services; };
|
||||
alias operserv { type services; };
|
||||
alias os { nick operserv; type services; };
|
||||
alias rootserv { type services; };
|
||||
alias rs { nick rootserv; type services; };
|
||||
|
||||
include "aliases/aliases.conf";
|
||||
@@ -1,12 +0,0 @@
|
||||
/* Cygnus Aliases */
|
||||
|
||||
alias nickserv { type services; };
|
||||
alias ns { nick nickserv; type services; };
|
||||
alias chanserv { type services; };
|
||||
alias cs { nick chanserv; type services; };
|
||||
alias memoserv { type services; };
|
||||
alias ms { nick memoserv; type services; };
|
||||
alias rootserv { type services; };
|
||||
alias rs { nick rootserv; type services; };
|
||||
|
||||
include "aliases/aliases.conf";
|
||||
@@ -1,16 +0,0 @@
|
||||
/* Epona Aliases */
|
||||
|
||||
alias nickserv { type services; };
|
||||
alias ns { nick nickserv; type services; };
|
||||
alias chanserv { type services; };
|
||||
alias cs { nick chanserv; type services; };
|
||||
alias memoserv { type services; };
|
||||
alias ms { nick memoserv; type services; };
|
||||
alias operserv { type services; };
|
||||
alias os { nick operserv; type services; };
|
||||
alias helpserv { type services; };
|
||||
alias hs { nick helpserv; type services; };
|
||||
alias botserv { type services; };
|
||||
alias bs { nick botserv; type services; };
|
||||
|
||||
include "aliases/aliases.conf";
|
||||
@@ -1,14 +0,0 @@
|
||||
/* Generic Aliases */
|
||||
|
||||
alias nickserv { type services; };
|
||||
alias ns { nick nickserv; type services; };
|
||||
alias chanserv { type services; };
|
||||
alias cs { nick chanserv; type services; };
|
||||
alias memoserv { type services; };
|
||||
alias ms { nick memoserv; type services; };
|
||||
alias operserv { type services; };
|
||||
alias os { nick operserv; type services; };
|
||||
alias helpserv { type services; };
|
||||
alias hs { nick helpserv; type services; };
|
||||
|
||||
include "aliases/aliases.conf";
|
||||
@@ -1,4 +0,0 @@
|
||||
/* Generic StatServ Aliases */
|
||||
|
||||
alias statserv { type stats; };
|
||||
alias ss { nick statserv; type stats; };
|
||||
@@ -1,17 +0,0 @@
|
||||
/* IRCServices Aliases */
|
||||
|
||||
alias nickserv { type services; };
|
||||
alias ns { nick nickserv; type services; };
|
||||
alias chanserv { type services; };
|
||||
alias cs { nick chanserv; type services; };
|
||||
alias memoserv { type services; };
|
||||
alias ms { nick memoserv; type services; };
|
||||
alias operserv { type services; };
|
||||
alias os { nick operserv; type services; };
|
||||
alias helpserv { type services; };
|
||||
alias hs { nick helpserv; type services; };
|
||||
alias irciihelp { type services; };
|
||||
alias statserv { type services; };
|
||||
alias ss { nick statserv; type services; };
|
||||
|
||||
include "aliases/aliases.conf";
|
||||
@@ -1,6 +0,0 @@
|
||||
/* OperStats Aliases */
|
||||
|
||||
alias operserv { type stats; };
|
||||
alias os { nick operserv; type stats; };
|
||||
alias statserv { type stats; };
|
||||
alias ss { nick statserv; type stats; };
|
||||
@@ -1,3 +0,0 @@
|
||||
all:
|
||||
@autoconf
|
||||
cp configure ..
|
||||
Vendored
-141
@@ -1,141 +0,0 @@
|
||||
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)
|
||||
],
|
||||
)
|
||||
])
|
||||
@@ -1,400 +0,0 @@
|
||||
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
|
||||
|
||||
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"
|
||||
;;
|
||||
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)
|
||||
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_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_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"; mkdir $withval/tmp, AC_DEFINE_UNQUOTED(DPATH,"`pwd`") IRCDDIR="`pwd`" mkdir `pwd`/tmp)
|
||||
AC_ARG_WITH(fd-setsize, [AC_HELP_STRING([--with-fd-setsize=size],[Specify the max file descriptors to use])],
|
||||
ac_fd=$withval, ac_fd=1024)
|
||||
AC_DEFINE_UNQUOTED(MAXCONNECTIONS, $ac_fd)
|
||||
AC_ARG_WITH(spath, [AC_HELP_STRING([--with-spath],[Specify the location of the executable])],
|
||||
AC_DEFINE_UNQUOTED(SPATH,"$withval") 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))
|
||||
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 RELEASE!
|
||||
tre_version="0.6.6"
|
||||
AC_MSG_RESULT(extracting TRE regex library)
|
||||
cur_dir=`pwd`
|
||||
cd extras
|
||||
dnl remove old tre directory to force a recompile...
|
||||
rm -rf 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
|
||||
AC_MSG_RESULT(compiling TRE regex library)
|
||||
$ac_cv_prog_MAKER
|
||||
AC_MSG_RESULT(installing TRE regex library)
|
||||
$ac_cv_prog_MAKER install
|
||||
TREINCDIR="$cur_dir/extras/regexp/include"
|
||||
AC_SUBST(TREINCDIR)
|
||||
if test "x$ac_cv_path_PKGCONFIG" = "x" ; then
|
||||
TRELIBS="-L../extras/regexp/lib -ltre"
|
||||
else
|
||||
TRELIBS=`$ac_cv_path_PKGCONFIG --libs tre.pc`
|
||||
fi
|
||||
AC_SUBST(TRELIBS)
|
||||
cd $cur_dir
|
||||
AC_OUTPUT(Makefile src/modules/Makefile unreal ircdcron/ircdchk)
|
||||
chmod 0700 unreal
|
||||
chmod 0700 ircdcron/ircdchk
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
Unreal Internet Relay Chat Daemon
|
||||
Copyright (C) Carsten V. Munk 2000
|
||||
|
||||
NOTE: Those words are not meant to insult you (the user)
|
||||
but is meant to be a list of words so that the +G channel/user mode
|
||||
will work properly. You can easily modify this file at your will.
|
||||
If you got words to add to this file, please mail badwords@tspre.org
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
This is some filling space, scroll down to see the words
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
badword channel { word "pussy"; };
|
||||
badword channel { word "fuck"; };
|
||||
badword channel { word "whore"; };
|
||||
badword channel { word "slut"; };
|
||||
badword channel { word "shit"; };
|
||||
badword channel { word "asshole"; };
|
||||
badword channel { word "bitch"; };
|
||||
badword channel { word "cunt"; };
|
||||
badword channel { word "vagina"; };
|
||||
badword channel { word "penis"; };
|
||||
badword channel { word "jackass"; };
|
||||
badword channel { word "*fucker*"; };
|
||||
badword channel { word "faggot"; };
|
||||
badword channel { word "fag"; };
|
||||
badword channel { word "horny"; };
|
||||
badword channel { word "gay"; };
|
||||
badword channel { word "dickhead"; };
|
||||
badword channel { word "sonuvabitch"; };
|
||||
badword channel { word "*fuck*"; };
|
||||
badword channel { word "tits"; };
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
Unreal Internet Relay Chat Daemon
|
||||
Copyright (C) Carsten V. Munk 2000
|
||||
|
||||
NOTE: Those words are not meant to insult you (the user)
|
||||
but is meant to be a list of words so that the +G channel/user mode
|
||||
will work properly. You can easily modify this file at your will.
|
||||
If you got words to add to this file, please mail badword messages@tspre.org
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
This is some filling space, scroll down to see the words
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
badword message { word "pussy"; };
|
||||
badword message { word "fuck"; };
|
||||
badword message { word "whore"; };
|
||||
badword message { word "slut"; };
|
||||
badword message { word "shit"; };
|
||||
badword message { word "asshole"; };
|
||||
badword message { word "bitch"; };
|
||||
badword message { word "cunt"; };
|
||||
badword message { word "vagina"; };
|
||||
badword message { word "penis"; };
|
||||
badword message { word "jackass"; };
|
||||
badword message { word "*fucker*"; };
|
||||
badword message { word "faggot"; };
|
||||
badword message { word "fag"; };
|
||||
badword message { word "horny"; };
|
||||
badword message { word "gay"; };
|
||||
badword message { word "dickhead"; };
|
||||
badword message { word "sonuvabitch"; };
|
||||
badword message { word "*fuck*"; };
|
||||
badword message { word "tits"; };
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
Unreal Internet Relay Chat Daemon
|
||||
Copyright (C) Carsten V. Munk 2000
|
||||
|
||||
NOTE: Those words are not meant to insult you (the user)
|
||||
but is meant to be a list of words so that quit message censoring
|
||||
will work properly. You can easily modify this file at your will.
|
||||
If you got words to add to this file, please mail badword badwords@tspre.org
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
This is some filling space, scroll down to see the words
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
badword quit { word "pussy"; };
|
||||
badword quit { word "fuck"; };
|
||||
badword quit { word "whore"; };
|
||||
badword quit { word "slut"; };
|
||||
badword quit { word "shit"; };
|
||||
badword quit { word "asshole"; };
|
||||
badword quit { word "bitch"; };
|
||||
badword quit { word "cunt"; };
|
||||
badword quit { word "vagina"; };
|
||||
badword quit { word "penis"; };
|
||||
badword quit { word "jackass"; };
|
||||
badword quit { word "*fucker*"; };
|
||||
badword quit { word "faggot"; };
|
||||
badword quit { word "fag"; };
|
||||
badword quit { word "horny"; };
|
||||
badword quit { word "gay"; };
|
||||
badword quit { word "dickhead"; };
|
||||
badword quit { word "sonuvabitch"; };
|
||||
badword quit { word "*fuck*"; };
|
||||
badword quit { word "tits"; };
|
||||
Vendored
-1360
File diff suppressed because it is too large
Load Diff
Vendored
-1375
File diff suppressed because it is too large
Load Diff
-66
@@ -1,66 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if test "x$1" = x -o "x$2" = x ; then
|
||||
echo "Syntax:"
|
||||
echo "curlinstall ares_path libcurl_path"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "`eval echo -n 'a'`" = "-n a" ] ; then
|
||||
c="\c"
|
||||
else
|
||||
n="-n"
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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."
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
ALN, Alphanumeric System
|
||||
(C) Stskeeps 2000
|
||||
|
||||
ALN is a quick hack to short down usage of bandwidth-using servernames
|
||||
in prefixes, NICK commands, etc etc. It replaces the name with a
|
||||
1 or 2 byte prefix in a system, look at src/aln.c for the prefix
|
||||
types/values. It will be an PROTOCTL, and used in NICK messages and so on,
|
||||
and introduce a new prefix server<->server called |server. The value of the
|
||||
server is calculated by a hash value, the scache system, so that the server
|
||||
can lookup with a new scache function, scache_find_by_hash(int i). The
|
||||
question of it will conflict in similar-hash server names, is a wonder to me
|
||||
:P, we will find out, but scache will fail at same time then.
|
||||
|
||||
|
||||
Examples:
|
||||
& Medb 4 957458466 ~Medb bservice.org D2 0 +iwrx *
|
||||
:BotService Bot - bservice.org - Owner: terri{J}
|
||||
|
||||
where D2 is the hash value of oxygen.phrozen.org (/stats s on a
|
||||
#define DEVELOP server). irc.flirt.org has hash 96 (ALN code AX) for
|
||||
instance.
|
||||
|
||||
@D2 GLOBOPS :message
|
||||
will be a message from server with hash D2, found find-by-hash(256)
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
From cmunk@draconic.fyremoon.net Wed Apr 5 18:09:55 2000
|
||||
Date: Wed, 5 Apr 2000 18:07:55 +0100 (BST)
|
||||
From: "The Nightwalker (Stskeeps)" <cmunk@draconic.fyremoon.net>
|
||||
To: unreal-dev@lists.sourceforge.net
|
||||
Subject: [Unreal-dev] P:Lines
|
||||
|
||||
|
||||
Some stuff i got ideas about.. stripping the IP and port from the M:Line
|
||||
and enforcing the main port to be in a M:line
|
||||
|
||||
M:irc.fyremoon.net:*:Forever is gonna start tonight:*
|
||||
|
||||
P:ip:flags:password1,password2,password3:port
|
||||
| | | \- port to bind to
|
||||
| | |
|
||||
| | \- Commaseperated lists of accepted passwords
|
||||
| | * if none
|
||||
| |
|
||||
| \--- C = Allow clients
|
||||
| S = Allow servers
|
||||
| R = ONLY allow our remote admin connections
|
||||
| (may only be on a P:line of its own)
|
||||
| J = Clients that connect here are counted as Java(Confroomhack)
|
||||
| * = CS
|
||||
|
|
||||
\--- IP to bind to, * = INADDR_ANY (all interfaces)
|
||||
|
||||
Will make P:Lines more efficent
|
||||
|
||||
---------------------------------------------------------------------
|
||||
Carsten V. Munk - The Nightwalker, known on IRC as Stskeeps or techie
|
||||
* ICQ: 16465977 - E-Mail: stskeeps@tspre.org
|
||||
* Author of UnrealIRCd (http://unreal.tspre.org)
|
||||
* Technical Admin @ irc.roxnet.org, server admin of irc.fyremoon.net
|
||||
"To understand a program you must become both the machine and the program."
|
||||
----------------------------------------------------------------------
|
||||
|
||||
-----BEGIN GEEK CODE BLOCK-----
|
||||
Version: 3.1
|
||||
GCS/CC d- s: a--- C+++ UL P L++ E-- W++ N+ o-- K- w--- O- M V-- PS+ PE- Y+
|
||||
PGP t+ 5 X R- tv- b+ DI++ D++ G e-- h! r z**
|
||||
------END GEEK CODE BLOCK------
|
||||
|
||||
|
||||
_______________________________________________
|
||||
Unreal-dev mailing list
|
||||
Unreal-dev@lists.sourceforge.net
|
||||
http://lists.sourceforge.net/mailman/listinfo/unreal-dev
|
||||
-146
@@ -1,146 +0,0 @@
|
||||
/************************************************************************
|
||||
* IRC - Internet Relay Chat, doc/AUTHORS
|
||||
* Copyright (C) 1990
|
||||
*
|
||||
* AUTHORS FILE:
|
||||
* This file attempts to remember all contributors to the IRC
|
||||
* developement. Names can be only added this file, no name
|
||||
* should never be removed. This file must be included into all
|
||||
* distributions of IRC and derived works.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
IRC was conceived of and written by Jarkko Oikarinen <jto@tolsun.oulu.fi>.
|
||||
IRC was originally written in University of Oulu, Computing Center.
|
||||
Jan 1991 - IRC 2.6 jto@tolsun.oulu.fi
|
||||
- Multiple Channels and protocol changes
|
||||
|
||||
Contributions were made by a cast of dozens, including the following:
|
||||
|
||||
Markku Jarvinen <mta@tut.fi>: Emacs-like editing facility for the client
|
||||
|
||||
Kimmo Suominen <kim@kannel.lut.fi>: HP-UX port
|
||||
|
||||
Jeff Trim <jtrim@orion.cair.du.edu>: enhancements and advice
|
||||
|
||||
Vijay Subramaniam <vijay@lll-winken.llnl.gov>: advice and ruthless publicity
|
||||
|
||||
Karl Kleinpaste <karl@cis.ohio-state.edu>: user's manual
|
||||
|
||||
Greg Lindahl <gl8f@virginia.edu>: AUTOMATON code, the Wumpus GM automaton,
|
||||
myriad bug fixes
|
||||
|
||||
Bill Wisner <wisner@hayes.fai.alaska.edu>: numerous bug fixes and code
|
||||
enhancements
|
||||
|
||||
Tom Davis <conslt16@zeus.unl.edu> and Tim Russell <russell@zeus.unl.edu>:
|
||||
VMS modifications
|
||||
|
||||
Markku Savela <msa@tel4.tel.vtt.fi>: advice, support, and being the
|
||||
incentive to do some of our *own* coding. :)
|
||||
|
||||
Tom Hopkins <hoppie@buengf.bu.edu>: bug fixes, quarantine lines,
|
||||
consolidation of various patches.
|
||||
|
||||
Christopher Davis <ckd@cs.bu.edu>: EFnet/Anet gateway coding,
|
||||
many automata ;), documentation fixing.
|
||||
|
||||
Helen Rose <hrose@cs.bu.edu>: documentation updating, and fixing.
|
||||
|
||||
Tom Hinds <rocker@bucsf.bu.edu>: emacs client updating.
|
||||
|
||||
Tim Miller <cerebus@bu-pub.bu.edu>: various server and client-breaking
|
||||
features.
|
||||
|
||||
Darren Reed <avalon@coombs.anu.edu.au>: various bug fixes and enhancements.
|
||||
Introduced nickname and channelname hash tables into the server.
|
||||
|
||||
The version 2.2 release was coordinated by Mike Bolotski
|
||||
<mikeb@salmon.ee.ubc.ca>.
|
||||
|
||||
The version 2.4 release was coordinated by Markku Savela and
|
||||
Chelsea Ashley Dyerman
|
||||
|
||||
The version 2.5.2 release was coordinated by Christopher Davis, Helen Rose,
|
||||
and Tom Hopkins.
|
||||
|
||||
The versions 2.6.2, 2.7 and 2.8 releases were coordinated by Darren Reed.
|
||||
|
||||
Contributions for the 2.8 release from the following people:
|
||||
Matthew Green <phone@coombs.anu.edu.au>
|
||||
Chuck Kane <ckane@ece.uiuc.edu>
|
||||
Matt Lyle <matt@oc.com>
|
||||
Vesa Ruokonen <ruokonen@lut.fi>
|
||||
|
||||
Markku Savela <Markku.Savela@vtt.fi> / April 1990
|
||||
Fixed various bugs in 2.2PL1 release server (2.2msa.4) and changed
|
||||
sockets to use non-blocking mode (2.2msa.9). [I have absolutely
|
||||
nothing to do with clients :-]
|
||||
|
||||
Chelsea Ashley Dyerman <chelsea@earth.cchem.berkeley.edu> / April 1990
|
||||
Rewrote the Makefiles, restructuring of source tree. Added libIrcd.a to
|
||||
the Makefile macros, numerous reformatting of server text messages, and
|
||||
added mkversion.sh to keep track of compilation statistics. Numerous
|
||||
bug fixes and enhancements, and co-coordinator of the 2.4 release.
|
||||
|
||||
Jarle Lyngaas (nmijl@alf.uib.no) added Note functions to ircd.
|
||||
|
||||
Armin Gruner <gruner@informatik.tu-muenchen.de> / May, June 1990:
|
||||
* Patched KILL-line feature for ircd.conf, works now.
|
||||
Enhancement: Time intervals can be specified in passwd-field.
|
||||
Result: KILL-Line is only active during these intervals
|
||||
* Patched PRIVMSG handling, now OPER can specify masks for sending
|
||||
private messages, advantage: msg to all at a specified server or host.
|
||||
* Little tests on irc 2.5 alpha, fixed some little typos in client code.
|
||||
Change: common/debug.c has been moved to ircd/s_debug.c, and a
|
||||
irc/c_debug.c has been created, for the benefit that wrong server msg
|
||||
are displayed if client does not recognize them. (strange, if a server
|
||||
sends an 'unknown command', isn't it?)
|
||||
|
||||
Tom Hopkins <hoppie@buengf.bu.edu> / September, October 1990:
|
||||
* Patched msa's K lines for servers (Q lines).
|
||||
* Consolidated several patches, including Stealth's logging patch.
|
||||
* Fixed several minor bugs.
|
||||
* Has done lots of other stuff that I can't seem to remember, but he
|
||||
always works on code, so he has to have done alot more than three
|
||||
lines worth. :)
|
||||
|
||||
UnrealIRCd Coders
|
||||
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, date
|
||||
|
||||
Thanks go to those persons not mentioned here who have added their advice,
|
||||
opinions, and code to IRC.
|
||||
|
||||
Various modifications, bugreports, cleanups and testing by:
|
||||
|
||||
Hugo Calendar <hugo@ucscb.ucsc.edu>
|
||||
Bo Adler <adler@csvax.cs.caltech.edu>
|
||||
Michael Sandrof <ms5n+@andrew.cmu.edu>
|
||||
Jon Solomon <jsol@cs.bu.edu>
|
||||
Jan Peterson <jlp@hamblin.math.byu.edu>
|
||||
Nathan Glasser <nathan@brokaw.lcs.mit.edu>
|
||||
Helen Rose <hrose@eff.org>
|
||||
Mike Pelletier <stealth@caen.engin.umich.edu>
|
||||
Basalat Ali Raja <gwydion@tavi.rice.edu>
|
||||
Eric P. Scott <eps@toaster.sfsu.edu>
|
||||
Dan Goodwin <fornax@wpi.wpi.edu>
|
||||
Noah Friedman <friedman@ai.mit.edu>
|
||||
|
||||
[ $Id$ ]
|
||||
@@ -0,0 +1,129 @@
|
||||
[ $Id$ ]
|
||||
Take this with a grain of salt.. it's heaps old and this isn't Elite anymore
|
||||
|
||||
|
||||
---------------------------
|
||||
Version Elite2.0 ==========
|
||||
===========================
|
||||
- Since +x was rewritten, the ban bug is 100% fixed. :)
|
||||
- Rewrote +x hidden host function completely.
|
||||
- Fixed FUNNY bug with hiddenhost and /who (Reported by Prod|gy)
|
||||
- Added/Removed irc networks
|
||||
- Fixed bug in /watch (Reported/Fixed by Despise)
|
||||
- Added nick-change flood protection.
|
||||
- Added an awesome manual... ./manual to run
|
||||
- Removed /who notice for opers.
|
||||
- Added protection of /akill *@* :)
|
||||
- Removed java stuff completely. (Java clients are like normal IRC clients...right?)
|
||||
- Added new +a mode. This mode can only be set by +q channel owners. When you are +a in a
|
||||
channel, you cannot be deopped or kicked. (Syntax: /mode #chan +a <nick>)
|
||||
- Added new +q channel mode. ChanServ must set the channel founder +q so they are also
|
||||
known as channel owners via the ircd. Channel owners are protected and may set
|
||||
other users +a which they will also be protected (but not chan owners).
|
||||
(Syntax: /mode #chan +q <nick>)
|
||||
- Re-coded /MAP
|
||||
- Changed GLINE notices from sendto_ops to send to all opers with +e flag on.
|
||||
- Added (addnet) script, you can run this to add your net settings to the next release.
|
||||
- Changed <server> to <ircnetwork> in whois "Blah is an oper on <server>"
|
||||
- Added new +L channel mode. If a #chat has a limit (+l) of 10 users, and +L set to channel
|
||||
#chat2, when a user trys to join #chat, they won't get "#chat is full", they will be
|
||||
auto-joined to #chat2 - (Linked channels in other words).
|
||||
(Syntax: /mode #chan +L <linked chan>)
|
||||
- Changes user@shadow-33.com to user@user-33.one.com (noone will know one.com is the realhost)
|
||||
- Changed +x for IP's from (x.x.x.***) to (x.x.x.network-#)
|
||||
- In oline flags * will introduce +e on oper up. (before: required +e in oline flag)
|
||||
- Removed +t usermode (UMODE_ALL) - wasn't used.
|
||||
- Made 'create your own network setting' feature more stable.
|
||||
- Added new channel mode (+x) to disable colored text in channel.
|
||||
- Added +C (Co Administrator)
|
||||
- Added +T (Technical Administrator)
|
||||
- Changed /map to numerics...
|
||||
- Made startup message when booting more stable.
|
||||
|
||||
Version Elite1.3 (02/23/99)
|
||||
============================
|
||||
- Cleaned up version.c.SH
|
||||
- Added new net settings (netdomain & helpchan)
|
||||
- Added new net config creator in ./Config
|
||||
- Made ./Config more easier...
|
||||
- Created new usermode +j (Java user)
|
||||
- New hostname (java.shadownet.org) for java users.
|
||||
- Removed RUN_SERVICES code from entire ircd.
|
||||
|
||||
Version Elite1.2.4 (02/14/99)
|
||||
============================
|
||||
- Fixed the nick crash bug! (damn m_kill small error)
|
||||
- New network(s) added.
|
||||
- Changed one thing in m_gline (nothing big)
|
||||
|
||||
Version Elite1.2.3 (02/10/99)
|
||||
============================
|
||||
- Removed SOCKS checking. (possibly cause of crashing)
|
||||
- Added new networks
|
||||
|
||||
Version Elite1.2.2 (02/02/99)
|
||||
============================
|
||||
- Fixed the crashing bug. (Changing nicks with linked servers)
|
||||
- Modified AceStar net settings.
|
||||
- Q-line notices are back (except for ULined clients).
|
||||
- Fixed /kill bug with services.
|
||||
|
||||
Version Elite1.2.1 (01/29/99)
|
||||
============================
|
||||
- Fixed multiple notices from +N / -N
|
||||
- Added some text to s_err.c
|
||||
- Possibly fixed the odd crashing... ?
|
||||
|
||||
Version Elite1.2 (01/24/99)
|
||||
============================
|
||||
- Netadmin can be used via +N in the oline slot now.
|
||||
- When +N is executed, net-wide oper msg's are sent about it.
|
||||
- Completely removed the freeze function (it's a toy unlike a command)
|
||||
- Changed abit of the GLINE adding notice.
|
||||
- Added logging to a file for glines (gline.log)
|
||||
- Implemented SOCKS checking (thx Rhom).
|
||||
- Changed channel lists only when 2 ppl in chan to 1.
|
||||
- Changed sendto_ops function in many places in s_user.c/s_serv.c to
|
||||
sendto_locfailops.
|
||||
- Changed GNOTICE in s_user.c/s_serv.c to GLOBOPS
|
||||
- Fixed hiddenhost bug with /kill (+w could see real host of oper)
|
||||
- Fixed hiddenhost bug with /oper (+s could see real host of oper)
|
||||
|
||||
[Special thanks goes out to Rhom for reporting/help patch bugs]
|
||||
|
||||
Version Elite1.1.1 (12/12/98)
|
||||
=============================
|
||||
- Fixed /whois bug (had problems with mIRC clients *sigh*)
|
||||
- Fixed /topic bug (didn't allow topic changes at all.)
|
||||
|
||||
Version Elite1.1 (12/6/98)
|
||||
============================
|
||||
- Fixed ./Config script (Net select)
|
||||
- Fixed /remgline bug.
|
||||
- If ULined clients, channels are not shown which they are in.
|
||||
- Fixed +e / +t / +b (non-opers could get +et before)
|
||||
- Fixed OperMode notice.
|
||||
- Fixed Gline sending extra Global on expire.
|
||||
- Fixed /whowas wrong hostname bug (by Thiago)
|
||||
- Fixed chkconf ZLINE error (by matt)
|
||||
- Added PhazeNet configuration
|
||||
- Added option for auto +x in ./Config
|
||||
- Freeze was disabled in this version (It will be back in 1.2)
|
||||
|
||||
Version Elite1.0 (09/20/98)
|
||||
============================
|
||||
- Changed Shadow3.9 to Elite1.0 (Starting a new IRCD)
|
||||
- Changed some numeric's around in src/s_err.c
|
||||
- Auto +x on Oper up.
|
||||
- Fixed small error in ./ircd script.
|
||||
- Made ./Config more Linux-redhat friendly.
|
||||
- Added RelicNet to the ircd.
|
||||
- include/config.h is much more compatible with all IRC nets.
|
||||
- Added /gline (works 100%) [/gline <user@host> <seconds> <reason>].
|
||||
- Fixed up /map.
|
||||
- Added UMODE's +e & +t
|
||||
* e: EYES [Can see ppl who /whois, and other notices.]
|
||||
* t: ALL [See's all net notices ie: See's all Client connectings...]
|
||||
- Fixed the hiddenhost bug with IP's...
|
||||
- Fixed major bug with hiddenhost which caused coredump.
|
||||
- Made a new script (makeconf) -- generates the ircd.conf file.
|
||||
@@ -1,195 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>UnrealIRCd - 3.2 - Offical Documentation</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p> <font size="-1">I M P O R T A N T R E A D I N G</font></p>
|
||||
<p><font size="-1">(YES, YOU WILL NEED TO READ ALL OF THIS)</font></p>
|
||||
<p><font size="-1">* Unreal3.2 is a lot different than Unreal3.1.1. Forget
|
||||
all you have learned about setting up Unreal3.1.1 - this is a lot different.
|
||||
We have got a new configuration format that integrates all the former config
|
||||
files,ircd.conf, vhost.conf, chrestrict.conf, unrealircd.conf, into to one newunrealircd.conf
|
||||
(what the ircd.conf is called now). See doc/ for more information on the configuration
|
||||
format</font></p>
|
||||
<p><font size="-1">* THIS IS A BETA VERSION, REPORT BUGS ON http://bugs.unrealircd.org</font></p>
|
||||
<p><font size="-1">* We have introduced a new cloaking algorithm (+x), which makes
|
||||
it incompatible with Unreal3.1.1 - these can however still link, but the hostname
|
||||
will look different. This is made of three big numbers, configured in the config
|
||||
file - and these MUST be the same on all servers on the network. Keep these
|
||||
numbers secret, and the cloaking algorithm is uncrackable (within 55 years,
|
||||
that is). The +x algorithm was changed slightly to fix a method of cracking
|
||||
that was found. #define COMPAT_BETA4_KEYS to use the beta4 system for compatibility
|
||||
with older betas.</font></p>
|
||||
<p><font size="-1">* If you use Linux and have problems where the IRCd complains
|
||||
that MAXCONNECTIONS is larger than FD_SETSIZE, you need to get your root to
|
||||
edit /usr/include/bits/types.h - #define __FD_SETSIZE 1024 to be somenumber
|
||||
that is equal or higher than MAXCONNECTIONS. This is a problem with Linux that
|
||||
it is hard coded and non override able in some distributions. We recommend you
|
||||
use FreeBSD or the variants of this if you need to run high load IRC servers.</font></p>
|
||||
<p><font size="-1">* We use autoconf to help with compilation, and this should
|
||||
make us able to a lot more platform (we have even ported to BeOS).</font></p>
|
||||
<p><font size="-1">* We require a pthreads library for the SOCKS scan now - and
|
||||
this is now done in the background (no more waiting!).</font></p>
|
||||
<p><font size="-1">* The IRCd is now modularized, and you load modules with the
|
||||
loadmodule command. You will most likely want to add these lines:<br>
|
||||
loadmodule "src/modules/commands.so";<br>
|
||||
loadmodule "src/modules/scan.so";<br>
|
||||
loadmodule "src/modules/scan_socks.so";<br>
|
||||
loadmodule "src/modules/scan_http.so";</font></p>
|
||||
<p><font size="-1"> If you would like to code a module, doc/ will contain a module
|
||||
guide,and we got an example module in src/modules/m_dummy.c.</font></p>
|
||||
<p><font size="-1">* We have some IPv6 support, and there are some minor bugs
|
||||
in it.</font></p>
|
||||
<p><font size="-1">* The documentation is NOT yet 100% complete</font></p>
|
||||
<p><font size="-1">* We have added snomask (similar to ircu), basically this allowed
|
||||
us to remove several modes. Modes +cfFkje are gone, but don't worry, you can
|
||||
still use them. They are now added like this:</font></p>
|
||||
<p><font size="-1"> /mode yournick +s +cF</font></p>
|
||||
<p><font size="-1"> You set the flags in the second parameter of the mode command
|
||||
for a mode change +s, setting -s with no parameters removes all your snomask.
|
||||
You can remove a specific snomask by doing:</font></p>
|
||||
<p><font size="-1"> /mode yournick -s -c</font></p>
|
||||
<p><font size="-1">The current snomasks are:</font></p>
|
||||
<p><font size="-1"> c - local connects<br>
|
||||
F - far connects<br>
|
||||
f - flood notices<br>
|
||||
k - kill notices<br>
|
||||
e - 'eyes' notices<br>
|
||||
j - 'junk' notices<br>
|
||||
v - vhost notices<br>
|
||||
G - gline/shun notices<br>
|
||||
n - nick change notices<br>
|
||||
q - deny nick (Q:line) rejection notices</font></p>
|
||||
<p><font size="-1"> It shouldn't be too hard to figure out, just play around with
|
||||
it a bit :)</font></p>
|
||||
<p><font size="-1">* /who needs testing it was recorded and may contain bugs</font></p>
|
||||
<p><font size="-1">* We have added alias {} which allows you to dynamically create
|
||||
commands such as /nickserv Read example.conf for more information on how to
|
||||
create your own. To use standard ones include one of the following files</font></p>
|
||||
<p><font size="-1"> aliases/ircservices.conf (IRCServices, Daylight)<br>
|
||||
aliases/epona.conf (Epona)<br>
|
||||
aliases/auspice.conf (Auspice)<br>
|
||||
aliases/generic.conf (Magick, Sirius, Wrecked)<br>
|
||||
aliases/operstats.conf (OperStats)<br>
|
||||
aliases/genericstats.conf (GeoStats, NeoStats)</font></p>
|
||||
<p><font size="-1">* You can now use an IP in the oper::from and vhost::from fields
|
||||
even if the host resolves</font></p>
|
||||
<p><font size="-1">* Added an http proxy scanner (scan_http.so)</font></p>
|
||||
<p><font size="-1">* Added oper::snomask to specify default oper snomask modes</font></p>
|
||||
<p><font size="-1">* /helpop text has been moved to a config directive, help {}.
|
||||
To keep the standard help text you need to include help.conf so add include
|
||||
"help.conf"; to your config file.</font></p>
|
||||
<p><font size="-1">* To be able to use G:lines you must now have the can_gkline
|
||||
flag (or t if old style flags)</font></p>
|
||||
<p><font size="-1">* Usermode +T (Tech Admin) has been removed, since it is 100%
|
||||
useless</font></p>
|
||||
<p><font size="-1">* Added a make install to copy files to the installation location</font></p>
|
||||
<p><font size="-1">* Removed ./ircd, ./killircd, crypt/mkpasswd, ./rehash and
|
||||
merged them into a new ./unreal [start|stop|rehash|mkpasswd] for mkpasswd the
|
||||
format is</font></p>
|
||||
<p><font size="-1"> ./unreal mkpasswd [method] [password]</font></p>
|
||||
<p><font size="-1">* Added a new system for crypting passwords. You now do for
|
||||
example password "my password" { crypt; }; This allows you to have
|
||||
some crypted passwords and others not. If you have SSL enabled you may also
|
||||
use the md5 and sha1 methods.</font></p>
|
||||
<p><font size="-1">* The old blackhole is now set::scan::endpoint and specifies
|
||||
an IP and port to tell proxies to connect to.</font></p>
|
||||
<p><font size="-1">* You can now specify a cipher list for SSL links (read doc/conf.doc
|
||||
for more info)</font></p>
|
||||
<p><font size="-1">* +I is now in invisibility.so so it is easily disabled</font></p>
|
||||
<p><font size="-1">* set::socks has been replaced by set::scan (read doc/conf.doc
|
||||
for more info)</font></p>
|
||||
<p><font size="-1">* If you experience problems with the scanners, perhaps check
|
||||
out BOPM (http://www.blitzed.org/bopm)</font></p>
|
||||
<p><font size="-1">* log {} syslog support added (read doc/unreal32docs.html for
|
||||
more info)</font></p>
|
||||
<p><font size="-1">* Added ripemd-160 password encryption support</font></p>
|
||||
<p><font size="-1">* Enabled sha1 and md5 password encryption on Win32 regardless
|
||||
of whether SSL is used.</font></p>
|
||||
<p><font size="-1">* Added WinNT/2k/XP service support (experimental) To use this
|
||||
you use the unreal.exe utility: unreal install -installs the service<br>
|
||||
unreal uninstall -uninstalls the service <br>
|
||||
unreal start -starts the service <br>
|
||||
unreal stop -stops the service<br>
|
||||
unreal restart -restarts the service<br>
|
||||
unreal rehash -rehashes the config file</font></p>
|
||||
<p><font size="-1"> Config errors and crashes are now logged to service.log when
|
||||
in service mode.</font></p>
|
||||
<p><font size="-1">* Implemented a new win32 debugger to make fixing bugs much
|
||||
easier.</font></p>
|
||||
<p><font size="-1">* Added a win32 installer to simplify installing under Windows.</font></p>
|
||||
<p><font size="-1">* AKILL/RAKILL is deprecated. Server command still works but
|
||||
will be removed eventually (aliases to TKL G). For normal opers it notices that
|
||||
the commands are deprecated.</font></p>
|
||||
<p><font size="-1">Made the config parser smarter when it comes to time values
|
||||
and size values. Entries are no longer limited to 1d2h1m. You can now enter
|
||||
"1day 2 hours 1 minute" for example. See doc/conf.doc for more information.</font></p>
|
||||
<p><font size="-1">* The oper override code has been rewritten to be less intrusive.
|
||||
You can now no longer automatically join a channel for which you must override
|
||||
a mode. You must /invite yourself to the channel. The idea behind this is it
|
||||
prevents the accidental "rejoin on kick" ban override and joining
|
||||
a +s channel without realizing it is +s and therefore you shouldn't know it
|
||||
exists.</font></p>
|
||||
<p><font size="-1">* If you use the SSL features of Unreal, you should use OpenSSL
|
||||
0.9.6e or later. This is important as the older versions may make the program
|
||||
exploitable. See http://www.openssl.org for more information</font></p>
|
||||
<p><font size="-1">* We have made a lot of changes to deal with SSL, and if you
|
||||
find any flaws or problems, please contact the coder team. We however think
|
||||
that the changes will make SSL more transparent and make it work more efficiently.</font></p>
|
||||
<p><font size="-1">* Added technical documentation in doc/technical. This directory
|
||||
will contain information about the protocol used by Unreal.</font></p>
|
||||
<p><font size="-1">* Added EGD support for SSL. EGD allows entropy to be gathered
|
||||
on systems that do not have a random device (/dev/random or /dev/urandom) or
|
||||
have an unreliable random device. Unreal has been tested using EGADS (http://www.securesoftware.com/egads.php)
|
||||
[With EGD support enabled], PRNGD (http://www.aet.tu-cottbus.de/personen/jaenicke/postfix_tls/prngd.html),
|
||||
and EGD (http://egd.sourceforge.net). Other EGD compatible programs should work
|
||||
as well.</font></p>
|
||||
<p><font size="-1">* We have created a new complete set of docs! doc/unreal32docs.html
|
||||
is now a complete<br>
|
||||
set of docs! It is still not finished, however it contains atleast what was
|
||||
already<br>
|
||||
avail. in the other doc files. <br>
|
||||
It can also be view online @ http://www.unrealircd.com/unreal32docs.html</font></p>
|
||||
<p><font size="-1">* We have removed ./Setup - Please read the new docs for information
|
||||
on configuring &<br>
|
||||
setting up Unreal3.2</font></p>
|
||||
<p><font size="-1">* Removed makeconf - Read the docs to make a config file</font></p>
|
||||
<p><font size="-1">* Added set::ssl::options with the following options:<br>
|
||||
fail-if-no-clientcert - If SSL client connects and doesn't provide a client<br>
|
||||
certificate, abort connection immediately<br>
|
||||
verify-certificate - Check the certificate's validity using X509 methods, check if<br>
|
||||
we trust CA's, etc. <br>
|
||||
It however does slip self signed certificates through UNLESS<br>
|
||||
no-self-signed - Don't allow self-signed certificates through (requires<br>
|
||||
verify-certificate)</font></p>
|
||||
|
||||
<p><font size="-1">* Added the ability specify which CA's are trusted using set::ssl::trusted-ca-file</font></p>
|
||||
|
||||
<p><font size="-1">* A new configuration system has been added. The system is a bit more strict (meaning it
|
||||
will complain more often) but it will never crash due to configuration errors, just
|
||||
display a message saying errors exist.</font></p>
|
||||
|
||||
<p><font size="-1">* SVSLUSERS was added to all U:lines to change local and global max user counts (this is
|
||||
NOT meant so you can make the max count higher than it really should be.)</font></p>
|
||||
|
||||
<p><font size="-1">* A new oper flag, can_override/v has been added. This is an attempt to stop oper abuse.
|
||||
All opers can no longer use oper-override, this oflag MUST be in place for oper-override
|
||||
to be allowed. Can_override is NOT assumed to be present no matter what your flags,
|
||||
meaning you could be +N but still not be allowed to use oper-override.</font></p>
|
||||
|
||||
<p><font size="-1">* UNKLINE and UNZLINE have been removed in favor of a system like G:lines, to remove you
|
||||
now /kline -user@host or /zline -user@host</font></p>
|
||||
<p><font size="-1">* MAKE SURE YOU RERUN ./Config AND RUN make clean BEFORE USING
|
||||
THIS VERSION!!!</font></p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p><font size="+2"><strong>Notes on compatibility</strong><a name="notesoncompatibility" id="notesoncompatibility"></a></font><br>
|
||||
</p>
|
||||
<p>Unreal 3.2 is ONLY compatible with Unreal3.1.4 and Unreal3.2 servers. DO NOT
|
||||
ATTEMPT to link to servers that it is NOT compatible with.</p>
|
||||
<p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,41 +0,0 @@
|
||||
|
||||
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.
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
==[ 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).
|
||||
|
||||
==[ HOW TO COMPILE UNREALIRCD WITHOUT SSL AT WINDOWS ]==
|
||||
First of all you need Microsoft Visual C++, compiling with cygwin
|
||||
is not supported.
|
||||
|
||||
== "old" VC++ 6.0 ==
|
||||
1. You need the Platform SDK (PSDK)
|
||||
Grab it at: http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ ->
|
||||
core sdk -> install this sdk.
|
||||
Note that this can take some time to download because it's >200Mb
|
||||
(450mb installed) [!].
|
||||
2. To compile:
|
||||
start -> programs -> platform sdk blabla -> open build env. -> (choose os) ->
|
||||
set blabla build env (debug). This will launch a DOS window.
|
||||
3. Go to your UnrealIrcd dir (like: cd \dev\unreal3.2) and then compile with:
|
||||
nmake -f makefile.win32
|
||||
This will generate a wircd.exe and unreal.exe
|
||||
4. Copy the src\win32\tre.dll to your UnrealIrcd main dir.
|
||||
5. Done!
|
||||
|
||||
== VC++ 7.x (.NET) ==
|
||||
1. Start the Visual Studio .NET Command Prompt
|
||||
2. Go to your UnrealIrcd dir (like: cd \dev\unreal3.2) and then compile with:
|
||||
nmake -f makefile.win32
|
||||
This will generate a wircd.exe and unreal.exe
|
||||
3. Copy the src\win32\tre.dll to your UnrealIrcd main dir.
|
||||
4. Done!
|
||||
|
||||
==[ HOW TO COMPILE UNREALIRCD WITH SSL AT WINDOWS ]==
|
||||
Ouch, that's much work ;).
|
||||
You need to compile openssl yourself.
|
||||
Then have a look at makefile.win32 for instruction on how
|
||||
to enable / specify path / etc...
|
||||
DO NOT ask us for help with compiling openssl!
|
||||
|
||||
==[ AND ZIP LINKS SUPPORT? ]==
|
||||
See makefile.win32 for instructions.
|
||||
@@ -1,784 +0,0 @@
|
||||
/*
|
||||
* example.conf by Daniel Hawton AKA Osiris (osiris@unrealircd.org).
|
||||
* $Id$
|
||||
*
|
||||
* Works for Unreal3.2 and up
|
||||
*
|
||||
* Okay guys. This is the new example.conf. Its look is much like C++, kinda.
|
||||
* Anyway it is time to go over this. It's hard to pick up at first, but
|
||||
* with some pratice and reading you'll understand.
|
||||
*
|
||||
* Just copy this file to your main unrealircd dir and call it 'unrealircd.conf'.
|
||||
*
|
||||
* NOTE: All lines, except the opening { line, end in an ;, including the
|
||||
* 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
|
||||
* It contains a lot information about the configfile: gives information about
|
||||
* every block, variable, etc..
|
||||
*/
|
||||
|
||||
/* Type of comments */
|
||||
#Comment type 1 (Shell type)
|
||||
// Comment type 2(C++ style)
|
||||
/* Comment type 3 (C Style) */
|
||||
#those lines are ignored by the ircd.
|
||||
|
||||
/*
|
||||
* At *NIX UnrealIrcd supports modules.
|
||||
* Loading the commands module is required:
|
||||
*/
|
||||
loadmodule "src/modules/commands.so";
|
||||
|
||||
/*
|
||||
* You can also include other configuration files.
|
||||
* help.conf contains all the /helpop text. The badwords.*.conf
|
||||
* files contain all the badword entries for mode +G...
|
||||
* spamfilter.conf contains some good rules for current trojans.
|
||||
* You probably want to include them:
|
||||
*/
|
||||
include "help.conf";
|
||||
include "badwords.channel.conf";
|
||||
include "badwords.message.conf";
|
||||
include "badwords.quit.conf";
|
||||
include "spamfilter.conf";
|
||||
|
||||
/*
|
||||
* NEW: me {}
|
||||
* OLD: M:Line
|
||||
* me {} defines the name, description and unreal server numeric for
|
||||
* this server. Syntax is as follows:
|
||||
* me {
|
||||
* name "server.name";
|
||||
* info "Server Description";
|
||||
* numeric (server numeric*);
|
||||
* };
|
||||
* If linking, this numeric may not be used by any other server on the network.
|
||||
*/
|
||||
me
|
||||
{
|
||||
name "irc.foonet.com";
|
||||
info "FooNet Server";
|
||||
numeric 1;
|
||||
};
|
||||
|
||||
/*
|
||||
* NEW: admin {}
|
||||
* OLD: A:Line Admin gives information on the server admin. you
|
||||
* may put as many lines under admin { as you wish.
|
||||
* Syntax is as follows:
|
||||
* admin {
|
||||
* "first line";
|
||||
* "second line";
|
||||
* [etc]
|
||||
* };
|
||||
*/
|
||||
admin {
|
||||
"Bob Smith";
|
||||
"bob";
|
||||
"widely@used.name";
|
||||
};
|
||||
|
||||
/*
|
||||
* NEW: class {}
|
||||
* OLD: Y:line (old was confusing)
|
||||
* These define settings for classes. A class is a group setting for
|
||||
* connections. Example, server connections, instead of going to a client's
|
||||
* class, you direct it to the server class. Syntax is as follows
|
||||
* class (class name)
|
||||
* {
|
||||
* pingfreq (how often to ping a user/server in seconds);
|
||||
* maxclients (how many connections for this class);
|
||||
* sendq (maximum send queue from a connection);
|
||||
* 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; /* Max servers we can have linked at a time */
|
||||
sendq 1000000;
|
||||
connfreq 100; /* How many seconds between each connection attempt */
|
||||
};
|
||||
|
||||
/*
|
||||
* NEW: allow {}
|
||||
* OLD: I:Line
|
||||
* This defines allowing of connections...
|
||||
* Basically for clients, it allows them to connect so you can have some
|
||||
* control and/or set a password.
|
||||
* Syntax is as follows:
|
||||
* allow {
|
||||
* ip (ip mask to allow);
|
||||
* hostname (host mask);
|
||||
* class (class to send them to [see class {}]);
|
||||
* password "(password)"; (optional)
|
||||
* maxperip (how many connections per 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 "f00Ness";
|
||||
maxperip 1;
|
||||
};
|
||||
|
||||
/*
|
||||
* NEW: allow channel {}
|
||||
* OLD: chrestrict
|
||||
* Allows a user to join a channel...
|
||||
* like an except from deny channel.
|
||||
* Syntax:
|
||||
* allow channel {
|
||||
* channel "channel name";
|
||||
* };
|
||||
*/
|
||||
allow channel {
|
||||
channel "#WarezSucks";
|
||||
};
|
||||
|
||||
/*
|
||||
* NEW: oper {}
|
||||
* OLD: O:Line
|
||||
* Defines an IRC Operator
|
||||
* IRC operators are there to keep sanity to the server and usually keep it
|
||||
* maintained and connected to the network.
|
||||
* The syntax is as follows:
|
||||
* 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
|
||||
* {
|
||||
* (flags here*);
|
||||
* };
|
||||
* OR
|
||||
* flags "old type flags, like OAaRD";
|
||||
* };
|
||||
*/
|
||||
|
||||
/* OLD OPER FLAG | NEW FLAG NAME
|
||||
O global
|
||||
o local
|
||||
a services-admin
|
||||
A admin
|
||||
r can_rehash
|
||||
D can_die
|
||||
R can_restart
|
||||
h helpop
|
||||
w can_wallops
|
||||
g can_globops
|
||||
c can_localroute
|
||||
L can_globalroute
|
||||
k can_localkill
|
||||
K can_globalkill
|
||||
b can_kline
|
||||
Z can_gzline
|
||||
t can_gkline
|
||||
B can_unkline
|
||||
n can_localnotice
|
||||
G can_globalnotice
|
||||
N netadmin
|
||||
C coadmin
|
||||
z can_zline
|
||||
W get_umodew
|
||||
H get_host
|
||||
v can_override
|
||||
*/
|
||||
|
||||
/*
|
||||
Note: netadmin gives you OaAN
|
||||
admin and services-admin give you o as well
|
||||
*/
|
||||
|
||||
oper bobsmith {
|
||||
class clients;
|
||||
from {
|
||||
userhost bob@smithco.com;
|
||||
};
|
||||
password "f00";
|
||||
flags
|
||||
{
|
||||
netadmin;
|
||||
global;
|
||||
};
|
||||
};
|
||||
/*
|
||||
* NEW: listen {}
|
||||
* OLD: P:Line
|
||||
* This defines a port for the ircd to bind to, to
|
||||
* allow users/servers to connect to the server.
|
||||
* Syntax is as follows:
|
||||
* listen (ip number):(port number)
|
||||
* {
|
||||
* 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
|
||||
*/
|
||||
|
||||
/* NOTE ON SSL PORTS: SSL ports are pretty non-standardized,
|
||||
* besides numerous high-SSL ports, some people say you should run
|
||||
* it at 994 because that's the official SSL port.. but that
|
||||
* requires root! Besides, port 194 is the official irc port and
|
||||
* have you ever seen an ircd running on that?
|
||||
* So, our suggestion is to use port 6697 for SSL, this is used by
|
||||
* quite some networks and is recognized by for example StunTour.
|
||||
* You are free to open up as many SSL ports as you want, but
|
||||
* by (also) using 6697 you help the world standardize a bit ;).
|
||||
*/
|
||||
listen *:6697
|
||||
{
|
||||
options
|
||||
{
|
||||
ssl;
|
||||
clientsonly;
|
||||
};
|
||||
};
|
||||
|
||||
listen *:8067;
|
||||
listen *:6667;
|
||||
|
||||
/*
|
||||
* NEW: link {}
|
||||
* OLD: C/N:Lines
|
||||
* This defines an okay for a server connection.
|
||||
* NOTE: BOTH SERVERS NEED A LINK {} SETTING TO CONNECT PROPERLY!
|
||||
* Syntax is as follows:
|
||||
* link (server name)
|
||||
* {
|
||||
* username (username, * works too);
|
||||
* hostname (ip number/hostmask);
|
||||
* bind-ip (What IP to bind to when connecting, or *);
|
||||
* port (port to connect to, if any);
|
||||
* hub (If this is a hub, * works, or servermasks it may bring in);
|
||||
* [or leaf *;]
|
||||
* password-connect "(pass to send)";
|
||||
* password-receive "(pass we should receive)";
|
||||
* class (class to direct servers into);
|
||||
* options {
|
||||
* (options here*);
|
||||
* };
|
||||
* /* 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";
|
||||
*
|
||||
* };
|
||||
*/
|
||||
|
||||
/*
|
||||
options:
|
||||
OLD | NEW
|
||||
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: You should not use autoconnect when linking
|
||||
* services
|
||||
*/
|
||||
autoconnect;
|
||||
ssl;
|
||||
zip;
|
||||
};
|
||||
};
|
||||
/*
|
||||
*
|
||||
* NEW: ulines {}
|
||||
* OLD: U:Line
|
||||
* U-lines give servers more power/commands, this should ONLY be set
|
||||
* for services/stats servers and NEVER for normal UnrealIRCd servers!
|
||||
* Syntax is as follows:
|
||||
* ulines {
|
||||
* (server to uline);
|
||||
* (server to uline);
|
||||
* [etc]
|
||||
* };
|
||||
*/
|
||||
ulines {
|
||||
services.roxnet.org;
|
||||
stats.roxnet.org;
|
||||
};
|
||||
|
||||
/*
|
||||
* NEW: drpass {}
|
||||
* OLD: X:Line
|
||||
* This defines the passwords for /die and /restart.
|
||||
* Syntax is as follows:
|
||||
* drpass {
|
||||
* restart "(password for restarting)";
|
||||
* die "(password for die)";
|
||||
* };
|
||||
*/
|
||||
drpass {
|
||||
restart "I-love-to-restart";
|
||||
die "die-you-stupid";
|
||||
};
|
||||
|
||||
/*
|
||||
* 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, kline, oper
|
||||
*
|
||||
* NOTICE: Right now, SEGV messages are *always* sent to ircd.log. codemastr is
|
||||
* working on a way to redirect the messages to this log file. *
|
||||
* Syntax:
|
||||
* log "log file"
|
||||
* {
|
||||
* flags
|
||||
* {
|
||||
* flag;
|
||||
* flag;
|
||||
* etc..
|
||||
* };
|
||||
* };
|
||||
*/
|
||||
|
||||
log "ircd.log" {
|
||||
/* Delete the log file and start a new one when it reaches 2MB, leave this out to always use the
|
||||
same log */
|
||||
maxsize 2097152;
|
||||
flags {
|
||||
oper;
|
||||
kline;
|
||||
connects;
|
||||
server-connects;
|
||||
kills;
|
||||
errors;
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* NEW: alias {}
|
||||
* OLD: N/A
|
||||
* This allows you to set command aliases such as /nickserv, /chanserv etc
|
||||
* FLAGS: services, stats, normal
|
||||
*
|
||||
* Syntax:
|
||||
* alias "name" {
|
||||
* nick "points to";
|
||||
* type aliastype;
|
||||
* };
|
||||
*
|
||||
* [NOTE: You could also include a pre-defined alias file here, see doc/unreal32docs.html section 2.9]
|
||||
*/
|
||||
|
||||
// This points the command /nickserv to the user NickServ who is connected to the set::services-server server
|
||||
/*alias NickServ {
|
||||
nick "NickServ";
|
||||
type services;
|
||||
};*/
|
||||
|
||||
// If you want the command to point to the same nick as the command, you can leave the nick entry out
|
||||
//alias ChanServ { type services; };
|
||||
|
||||
// Points the /statserv command to the user StatServ on the set::stats-name server
|
||||
//alias StatServ { type stats; };
|
||||
|
||||
// Points the /superbot command to the user SuperBot
|
||||
//alias SuperBot { type normal; };
|
||||
|
||||
|
||||
/* Standard 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
|
||||
* This allows you to set command aliases such as /identify, /services, etc
|
||||
*
|
||||
* Syntax:
|
||||
* alias "name" {
|
||||
* format "format string" {
|
||||
* nick "points to";
|
||||
* type aliastype;
|
||||
* parameters "parameters to send";
|
||||
* };
|
||||
* type command;
|
||||
* };
|
||||
*/
|
||||
/* This is shown seperately because even though it has teh same name as the previous directive, it is very
|
||||
* different in syntax, although it provides a similar function and relys on the standard aliases to work.
|
||||
*/
|
||||
/*
|
||||
alias "identify" {
|
||||
format "^#" {
|
||||
nick "chanserv";
|
||||
type services;
|
||||
parameters "IDENTIFY %1-";
|
||||
};
|
||||
format "^[^#]" {
|
||||
nick "nickserv";
|
||||
type services;
|
||||
parameters "IDENTIFY %1-";
|
||||
};
|
||||
type command;
|
||||
};
|
||||
*/
|
||||
/* The alias::format directive is a regular expression. The first format matches the /identify command when
|
||||
* the first character is a #. It then passes this along to the chanserv alias with the parameters IDENTIFY
|
||||
* %1-. The second format matches then /identify command when the first character is not a #. It then
|
||||
* passes the command to the nickserv alias with parameters IDENTIFY %1-.
|
||||
*/
|
||||
|
||||
/* The alias::format::parameters is similar to scripting languages. %N (where N is a number) represents a
|
||||
* parameter sent to the command (in this case /identify). If you specify %N- it means all parameters from
|
||||
* N until the last parameter in the string.
|
||||
*/
|
||||
|
||||
/* Standard aliases */
|
||||
alias "services" {
|
||||
format "^#" {
|
||||
nick "chanserv";
|
||||
type services;
|
||||
parameters "%1-";
|
||||
};
|
||||
format "^[^#]" {
|
||||
nick "nickserv";
|
||||
type services;
|
||||
parameters "%1-";
|
||||
};
|
||||
type command;
|
||||
};
|
||||
|
||||
alias "identify" {
|
||||
format "^#" {
|
||||
nick "chanserv";
|
||||
type services;
|
||||
parameters "IDENTIFY %1-";
|
||||
};
|
||||
format "^[^#]" {
|
||||
nick "nickserv";
|
||||
type services;
|
||||
parameters "IDENTIFY %1-";
|
||||
};
|
||||
type command;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* NEW: tld {}
|
||||
* OLD: T:Line
|
||||
* This sets a different motd and rules files
|
||||
* depending on the clients hostmask.
|
||||
* Syntax is as follows:
|
||||
* tld {
|
||||
* mask (ident@host);
|
||||
* motd "(motd file)";
|
||||
* rules "(rules file)";
|
||||
* };
|
||||
*/
|
||||
|
||||
tld {
|
||||
mask *@*.fr;
|
||||
motd "ircd.motd.fr";
|
||||
rules "ircd.rules.fr";
|
||||
};
|
||||
|
||||
/*
|
||||
* NEW: ban nick {}
|
||||
* OLD: Q:Line
|
||||
* Bans a nickname, so it can't be used.
|
||||
* Syntax is as follows:
|
||||
* ban nick {
|
||||
* mask "(nick to ban)";
|
||||
* reason "(reason)";
|
||||
* };
|
||||
*/
|
||||
ban nick {
|
||||
mask "*C*h*a*n*S*e*r*v*";
|
||||
reason "Reserved for Services";
|
||||
};
|
||||
/*
|
||||
* NEW: ban ip {}
|
||||
* OLD: Z:Line
|
||||
* Bans an ip from connecting to the network.
|
||||
* Syntax:
|
||||
* ban ip { mask (ip number/hostmask); reason "(reason)"; };
|
||||
*/
|
||||
ban ip {
|
||||
mask 195.86.232.81;
|
||||
reason "Delinked server";
|
||||
};
|
||||
/*
|
||||
* NEW: ban server {}
|
||||
* OLD: Server Q:Line
|
||||
* Disables a server from connecting to the network.
|
||||
* if the server links to a remote server, local server
|
||||
* will disconnect from the network.
|
||||
* Syntax is as follows:
|
||||
* ban server {
|
||||
* mask "(server name)";
|
||||
* reason "(reason to give)";
|
||||
* };
|
||||
*/
|
||||
|
||||
ban server {
|
||||
mask eris.berkeley.edu;
|
||||
reason "Get out of here.";
|
||||
};
|
||||
/*
|
||||
* NEW: ban user {}
|
||||
* OLD: K:Line
|
||||
* This makes it so a user from a certain mask can't connect
|
||||
* to your server.
|
||||
* Syntax:
|
||||
* ban user { mask (hostmask/ip number); reason "(reason)"; };
|
||||
*/
|
||||
|
||||
ban user {
|
||||
mask *tirc@*.saturn.bbn.com;
|
||||
reason "Idiot";
|
||||
};
|
||||
|
||||
/*
|
||||
* NEW: ban realname {}
|
||||
* OLD: n:Line
|
||||
* This bans a certain realname from being used.
|
||||
* Syntax:
|
||||
* ban realname {
|
||||
* mask "(real name)";
|
||||
* reason "(reason)";
|
||||
* };
|
||||
*/
|
||||
|
||||
ban realname {
|
||||
mask "Swat Team";
|
||||
reason "mIRKFORCE";
|
||||
};
|
||||
|
||||
ban realname {
|
||||
mask "sub7server";
|
||||
reason "sub7";
|
||||
};
|
||||
|
||||
/*
|
||||
* NOTE FOR ALL BANS, they may be repeated for addition entries!
|
||||
*
|
||||
* NEW: except ban {}
|
||||
* OLD: E:Line
|
||||
* This makes it so you can't get banned.
|
||||
* Syntax:
|
||||
* except ban { mask (ident@host); };
|
||||
* Repeat the except ban {} as many times
|
||||
* as you want for different hosts.
|
||||
*/
|
||||
|
||||
except ban {
|
||||
/* don't ban stskeeps */
|
||||
mask *stskeeps@212.*;
|
||||
};
|
||||
|
||||
/*
|
||||
* NEW: deny dcc {}
|
||||
* OLD: dccdeny.conf
|
||||
* Use this to block dcc send's... stops
|
||||
* viruses better.
|
||||
* Syntax:
|
||||
* deny dcc
|
||||
* {
|
||||
* filename "file to block (ie, *exe)";
|
||||
* reason "reason";
|
||||
* };
|
||||
*/
|
||||
deny dcc {
|
||||
filename "*sub7*";
|
||||
reason "Possible Sub7 Virus";
|
||||
};
|
||||
|
||||
/*
|
||||
* NEW: deny channel {}
|
||||
* OLD: N/A (NEW)
|
||||
* This blocks channels from being joined.
|
||||
* Syntax:
|
||||
* deny channel {
|
||||
* channel "(channel)";
|
||||
* reason "reason";
|
||||
* };
|
||||
*/
|
||||
deny channel {
|
||||
channel "*warez*";
|
||||
reason "Warez is illegal";
|
||||
};
|
||||
|
||||
/*
|
||||
* NEW: vhost {}
|
||||
* OLD: Vhost.conf file
|
||||
* This sets a fake ip for non-opers, or
|
||||
* opers too lazy to /sethost :P
|
||||
* Syntax:
|
||||
* 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 *@*.image.dk;
|
||||
};
|
||||
login stskeeps;
|
||||
password moocowsrulemyworld;
|
||||
};
|
||||
|
||||
/* You can include other configuration files */
|
||||
/* include "klines.conf"; */
|
||||
|
||||
/* Network configuration */
|
||||
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"; */
|
||||
/* Your cloak keys should be 3 random numbers between 10000 and 2147483646
|
||||
* and should be the same at all servers on the network.
|
||||
* They are used for generating masked hosts and should be kept secret.
|
||||
*/
|
||||
cloak-keys {
|
||||
9666;
|
||||
3333;
|
||||
3330;
|
||||
};
|
||||
/* 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 specific configuration */
|
||||
|
||||
set {
|
||||
kline-address "set.this.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;
|
||||
/* You can enable ident checking here if you want */
|
||||
/* identd-check; */
|
||||
show-connect-info;
|
||||
};
|
||||
|
||||
maxchannelsperuser 10;
|
||||
/* The minimum time a user must be connected before being allowed to use a QUIT message,
|
||||
* This will hopefully help stop spam */
|
||||
anti-spam-quit-message-time 10s;
|
||||
/* Make the message in static-quit show in all quits - meaning no
|
||||
custom quits are allowed on local server */
|
||||
/* static-quit "Client quit"; */
|
||||
|
||||
/* You can also block all part reasons by uncommenting this and say 'yes',
|
||||
* or specify some other text (eg: "Bye bye!") to always use as a comment.. */
|
||||
/* static-part yes; */
|
||||
|
||||
/* This allows you to make certain stats oper only, use * for all stats,
|
||||
* leave it out to allow users to see all stats. Type '/stats' for a full list.
|
||||
* Some admins might want to remove the 'kGs' to allow normal users to list
|
||||
* klines, glines and shuns.
|
||||
*/
|
||||
oper-only-stats "okfGsMRUEelLCXzdD";
|
||||
|
||||
/* Throttling: this example sets a limit of 3 connections per 60s (per host). */
|
||||
throttle {
|
||||
connections 3;
|
||||
period 60s;
|
||||
};
|
||||
|
||||
/* Anti flood protection */
|
||||
anti-flood {
|
||||
nick-flood 3:60; /* 3 nickchanges per 60 seconds (the default) */
|
||||
};
|
||||
|
||||
/* Spam filter */
|
||||
spamfilter {
|
||||
ban-time 1d; /* default duration of a *line ban set by spamfilter */
|
||||
ban-reason "Spam/Advertising"; /* default reason */
|
||||
virus-help-channel "#help"; /* channel to use for 'viruschan' action */
|
||||
/* except "#help"; channel to exempt from filtering */
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* 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.ircsystems.net #unreal-support,
|
||||
* note that we require you to READ THE DOCUMENTATION and FAQ first!
|
||||
*/
|
||||
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* Example set {} block
|
||||
*/
|
||||
|
||||
set {
|
||||
/*
|
||||
* This is the mail users will get shown when k-lined
|
||||
*/
|
||||
kline-address "mail.to.mail.to";
|
||||
/*
|
||||
* What modes will users get when connecting to this server
|
||||
*/
|
||||
modes-on-connect "+ix";
|
||||
/* What channels users will autojoin */
|
||||
auto-join "0";
|
||||
/* What channels opers will autojoin on connect*/
|
||||
oper-auto-join "0";
|
||||
dns {
|
||||
/* What IP has our DNS server got? */
|
||||
nameserver 127.0.0.1;
|
||||
/* How long time will we wait for each attempt? */
|
||||
timeout 2s;
|
||||
/* How many attempts will we do */
|
||||
retries 2s;
|
||||
};
|
||||
options {
|
||||
enable-opermotd;
|
||||
enable-chatops;
|
||||
hide-ulines;
|
||||
// webtv-support;
|
||||
identd-check;
|
||||
};
|
||||
|
||||
/*
|
||||
* How many channels each user can join
|
||||
*/
|
||||
maxchannelsperuser 10;
|
||||
/*
|
||||
* This is a new thing in Unreal3.2.
|
||||
* You _need_ to make three numbers up, bigger than 100000
|
||||
* These MUST be the SAME on EVERY server in your NETWORK
|
||||
* If people discover these keys, it is easier for them to crack
|
||||
* the +x algoritm.
|
||||
*/
|
||||
cloak-keys
|
||||
{
|
||||
0;
|
||||
0;
|
||||
0;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
-271
@@ -1,271 +0,0 @@
|
||||
|
||||
The Tao of Internet Relay Chat
|
||||
Copyright (C) Ove Ruben R Olsen 1994
|
||||
Version of 940110
|
||||
Contributing masters: Master ScottM
|
||||
|
||||
-----
|
||||
Something is formed by the electrons, born in the silent cable. Shaping
|
||||
and growing and ungrowing. It is there yet not there. It is the source of
|
||||
Internet Relay Chat. I do not know the name, thus I will call it the Tao
|
||||
of Internet Relay Chat.
|
||||
|
||||
If the Tao is great, then the IRC is running ceaselessly. If the IRC is
|
||||
great then the server is running without ever stoping. If the server is
|
||||
great then the client will always be the server. The luser is then pleased
|
||||
and there is Chat in the world.
|
||||
|
||||
The Tao of IRC squits far away and connects on returning.
|
||||
|
||||
|
||||
-----
|
||||
The genetic potential of birth, a lot to know, yet unknown.
|
||||
|
||||
In the begining there was nothing.
|
||||
|
||||
Out of nothing the Tao gave birth to tolsun.oulu.fi. tolsun gave birth to
|
||||
OuluBox.
|
||||
|
||||
OuluBox gave birth to rmsg.
|
||||
|
||||
rmsg was not Tao, so MUT gave birth to IRC.
|
||||
|
||||
No one knows when IRC came into existance, the mighty master WiZ have it
|
||||
to be at the end of the eight month in the year of the Dragon.
|
||||
|
||||
|
||||
-----
|
||||
Each channel has its purpose, however humble. Each channel is the Yin and
|
||||
Yang of IRC. Each channels has it's place within the IRC.
|
||||
|
||||
In the beginning there was only channel 0, thus channel 0 is the soil of
|
||||
IRC.
|
||||
|
||||
Channel 1 to channel 10 then was open as the sea. Channel 11 to 999 was the
|
||||
trees and forests of IRC. Channels above 999 should not be mentioned, and
|
||||
channels below 0 were unborn and contained many secrets.
|
||||
|
||||
This was not the right Tao, so IRC gave birth to +channels.
|
||||
|
||||
+channels had the yin and yang. Mode does not.
|
||||
|
||||
This was not the right Tao still, so IRC gave birth to #channels.
|
||||
|
||||
#channels have the yin and yang.
|
||||
|
||||
Only channel 0 is the right path to Tao, but avoid speaking on channel 0.
|
||||
|
||||
|
||||
-----
|
||||
There was a great dispute among the Broom-Walkers of the Relay. Some of them
|
||||
wanted neither yin nor yang. Out of this Eris came into existance. Some of the
|
||||
Broom-Walkers then created Eris Free-net.
|
||||
|
||||
This was the right Tao.
|
||||
|
||||
Kind Gentle and Boring Net was another wrong path to the Tao of Internet Relay
|
||||
Chat.
|
||||
|
||||
Some time later there was a quantity of some lusers who wanted to be
|
||||
Broom-Walkers also. The Eris Free Broom-Walkers did not agree with them,
|
||||
thus a new IRC was born. This IRC is called the Undernet.
|
||||
|
||||
But this is not the right Tao, either.
|
||||
|
||||
|
||||
-----
|
||||
There will always be disputes among the Broom-Walkers of Internet Relay Chat.
|
||||
|
||||
This is the very nature of the IRC.
|
||||
|
||||
|
||||
-----
|
||||
Lusers that do not understand the Tao is always using the yang of Mode on
|
||||
their channels. Lusers that do understand the Tao are always using Ignore
|
||||
on their channels.
|
||||
|
||||
How could this not be so ?
|
||||
|
||||
|
||||
-----
|
||||
The wise sage luser is told about the Chat and uses it. The luser is told
|
||||
about the IRC and is looking for it. The flock are told about the Tao and
|
||||
make a fool of the IRC.
|
||||
|
||||
If there was no laughter, there would be no Tao.
|
||||
|
||||
|
||||
-----
|
||||
The master says:
|
||||
"Without the Tao of Internet Relay Chat, life becomes meaningless."
|
||||
|
||||
The Relay of the old time was mysterious and sacred. We can neither imagine
|
||||
its thoughts nor path; we are left but to describe.
|
||||
|
||||
|
||||
-----
|
||||
The sage luser must be aware like a frog crossing the highway.
|
||||
|
||||
|
||||
-----
|
||||
The great master Wumpus once dreamed that he was an automaton. When he awoke
|
||||
he exclaimed:
|
||||
"I don't know whether I am Wumpus dreaming that I am a client,
|
||||
or a client dreaming that I am Wumpus!"
|
||||
|
||||
So was the first Automata born.
|
||||
|
||||
The master Nap then said:
|
||||
"Any automata should not speak unless spoken to.
|
||||
Any automata shall only whisper when spoken to."
|
||||
|
||||
Thus replied the master Gnarfer:
|
||||
"The lusers shall keep in mind that a automata can be either good or
|
||||
bad. Create good automata, and the IRC will hail you and you will
|
||||
gain fame and fortune. Create bad automata and people will start to
|
||||
hate you, and finaly you will be /KILLed to ethernal damnation"
|
||||
|
||||
Many lusers have fallen into the clutches of ethernal damnation. They where
|
||||
not following the Tao.
|
||||
|
||||
|
||||
-----
|
||||
There once was a luser who went to #BotSex. Each day he saw the automatons.
|
||||
The luser decided that he also would have such a automata.
|
||||
He asked another luser for his automata. The other luser gave his automata
|
||||
away.
|
||||
|
||||
The luser was not within the Tao, so he just started the automata. The automata
|
||||
had only Yang inside so all the lusers files where deleted.
|
||||
|
||||
Some moons laither the same luser then had become a sage luser, and did create
|
||||
his automata from the very grounds with materials found inside the IRC.
|
||||
The luser was now within the Tao and his automata lived happily ever after.
|
||||
|
||||
|
||||
-----
|
||||
There once was a master who wrote automatons without the help of master Phone.
|
||||
A novice luser, seeking to imitate him, began with the help of master Phone.
|
||||
When the novice luser asked the master to evaluate his automata the master
|
||||
replied: "What is a working automata for the master is not for the luser.
|
||||
You must must BE the IRC before automating."
|
||||
|
||||
|
||||
-----
|
||||
Master BigCheese gave birth to master Troy; his duty clear. Master Troy gave
|
||||
birth to master Phone, for the Tao of Irc must be eternal and must flow as the
|
||||
ceaseless river of Time itself.
|
||||
|
||||
|
||||
-----
|
||||
Master Phone once said about the ircII client:
|
||||
"public_msg is for a message from someone NOT on the channel
|
||||
public_other is for a message on a channel that doesn't belong to
|
||||
a window. public is for a message on a channel that belongs to a
|
||||
window!"
|
||||
|
||||
Out of this raised the mighty chaos.
|
||||
|
||||
|
||||
-----
|
||||
The sage luser came to the master who wrote automata without the help of
|
||||
master Phone. The sage luser asked the master who wrote automata: "Which is
|
||||
easiest to make. A automata with the help of master Phone or an automata
|
||||
made with the help of a language ?"
|
||||
|
||||
The master who wrote automata then replied:
|
||||
"With the help of a language."
|
||||
|
||||
The sage luser was disapointed and exclaimed: "But, with master Phone you
|
||||
do not need to know anything about the soil of IRC. Is not that the easiet
|
||||
way ?"
|
||||
|
||||
"Not really" said the master who wrote automata, "when using master Phone
|
||||
you are closed inside a box. For sure, it is a great box for the lusers,
|
||||
but the master will need more power, thus a language is the only path to go.
|
||||
With the language the master will never have to limit himself. When using
|
||||
such a language the master will seek the best between the need and the
|
||||
availibility."
|
||||
|
||||
"I see", said the sage luser.
|
||||
|
||||
This is the essence of Tao of IRC automatas.
|
||||
|
||||
|
||||
-----
|
||||
A client should be light and be used for communication. The spirit of a good
|
||||
client is that it should be very convinient for the luser to use, but hard
|
||||
for the luser who want to create automata.
|
||||
There should never ever be too many functions or too few functions.
|
||||
|
||||
There should always be a ignore.
|
||||
|
||||
Without ignore the client is not within the Tao of Chating.
|
||||
|
||||
The client should always respond the luser with messages that will not
|
||||
astnonish him too much. The server likewise. If the server does not, then it
|
||||
is the clients job to explain what the server says.
|
||||
|
||||
A client which fails this, will be useless and cause confusion for the lusers.
|
||||
The only way to correct this is to use another client or to write a new one.
|
||||
|
||||
|
||||
-----
|
||||
A luser asked the masters on #IrcHelp: "My client does not work".
|
||||
The masters replied: "Upgrade your client".
|
||||
The luser then wondered why the master knew. The master then told him about
|
||||
the Protocol.
|
||||
|
||||
"Your client does not work beaucse it does not understand the server. Why
|
||||
should it always work ? Only a fool would expect such. But, clients are made
|
||||
by humans, and humans are not perfect. Only Tao is.
|
||||
|
||||
The IRC is solid. The IRC is floating, and will always be dynamic. Live with
|
||||
that or /quit."
|
||||
|
||||
|
||||
-----
|
||||
The luser came to the masters of #IrcHelp, asking about the Tao of IRC within
|
||||
the client.
|
||||
The masters then said that the Tao of IRC always lies inside the client
|
||||
regardless of how the client connects to the server.
|
||||
|
||||
"Is the Tao in irc ?" asked the luser.
|
||||
"It so is" replied the masters of #IrcHelp.
|
||||
"Is the Tao in the ircII, Kiwi, rxirc, vms, rockers and msa ?" asked the
|
||||
luser.
|
||||
"In all of them and in the TPC, irchat, zenirc, zircon X11-irc and even the
|
||||
dos irc has the Tao" said the master quietly.
|
||||
"Is the Tao in a telnet connection directly to the server ?"
|
||||
|
||||
The master then was quiet for a long time and said. "Please leave, such
|
||||
questions are not within the Tao of IRC".
|
||||
|
||||
|
||||
-----
|
||||
The master says: "Without the Protocol of TCP the messages will not travel.
|
||||
Without the client, the server is useless."
|
||||
|
||||
|
||||
-----
|
||||
There once was a luser who used the ircII client. "ircII can do anything I
|
||||
ever need for using IRC" said the emacs client user, "I have /ON's, I have
|
||||
assignments, I have aliasing. Why don't you use this instead of the huge
|
||||
emacs client, which also has a messy screen?"
|
||||
The emacs client user then replied by saying that "it is better to have a
|
||||
scripting language that is the client instead of have a client that has
|
||||
a scripting language." Upon hearing this, the ircII client luser fell silent.
|
||||
|
||||
|
||||
-----
|
||||
The master Wumpus said: "Time for you to leave. I did, now I'm happy."
|
||||
The master Gnarfer replied: "Use, but never overuse IRC, then you will also
|
||||
be happy within IRC"
|
||||
|
||||
|
||||
-----
|
||||
A luser came unto the masters of #EU-Opers and asked, "How can I be, yet not
|
||||
be, a user@host within the IRC?"
|
||||
The masters of #EU-Opers replied: "To be Tao is to be ones true self. To hide
|
||||
ones self is not Tao, and is not IRC, you have much to learn before you shall
|
||||
be at rest within the Flow of Irc. Please leave"
|
||||
@@ -1,102 +0,0 @@
|
||||
Numeric 005 Documentation (c) 2002 codemastr (Dominick Meglio) [codemastr@unrealircd.com]
|
||||
(As of Unreal3.2-beta11)
|
||||
|
||||
Numeric 005 allows the server to inform the client of any protocol specific features in the
|
||||
IRCd. The numeric is sent at connection time immediately after numeric 004. Additionally
|
||||
the numeric is sent when a /version request is made by a local user, for remote users
|
||||
numeric 105 is used but contains the same information.
|
||||
|
||||
Due to the limit imposed by RFC1459 on both the buffer size (512) and the amount of
|
||||
parameters that can be sent in a single command (15) a total of 13 parameters may be
|
||||
specified in each 005. Because of this, a client must be able to accept multiple 005s
|
||||
consecutively. The format for the 005 message is as follows:
|
||||
|
||||
":" <servername> "005" SPACE <nickname> SPACE <token[=value]> SPACE ... ":are supported
|
||||
by this server"
|
||||
|
||||
Currently UnrealIRCd supports several tokens that are included in numeric 005. A list of
|
||||
all tokens, their respective value and a brief description are listed below.
|
||||
|
||||
Token Value Default Value Description
|
||||
------------------------------------------------------------------------------------------------
|
||||
MAP none none Informs the client that the /map
|
||||
command is present.
|
||||
|
||||
KNOCK none none Informs the client that the /knock
|
||||
command is present.
|
||||
|
||||
SAFELIST none none The LIST command is sent in
|
||||
multiple iterations so that the
|
||||
client's queue does not get filled
|
||||
causing the user to be killed.
|
||||
|
||||
HCN none none The server supports the HCN
|
||||
(Hybrid Connect Notice) protocol.
|
||||
|
||||
MAXCHANNELS number 10 The maximum number of channels a
|
||||
user may join.
|
||||
|
||||
MAXBANS number 60 The maximum number of bans that
|
||||
may be placed for a channel.
|
||||
|
||||
NICKLEN number 30 Maximum length of a user's
|
||||
nickname.
|
||||
|
||||
TOPICLEN number 307 Maximum length of a channel's
|
||||
topic.
|
||||
|
||||
KICKLEN number 307 Maximum length of a kick reason.
|
||||
|
||||
MAXTARGETS number 20 Maximum targets for the PRIVMSG
|
||||
command.
|
||||
|
||||
AWAYLEN number 307 Maximum length of an away message.
|
||||
|
||||
WALLCHOPS none none Indicates that you may use
|
||||
NOTICE/PRIVMSG to send to +ohv by
|
||||
using PRIVMSG/NOTICE [@|%|+]#channel.
|
||||
|
||||
WATCH number 128 Indicates the presence of the
|
||||
WATCH command and specifies the
|
||||
maximum number of watch entries.
|
||||
|
||||
SILENCE number 15 Indicates the maximum number of
|
||||
entries on the silence list.
|
||||
|
||||
MODES number 13 Indicates the number of channel
|
||||
modes with parameters that may be
|
||||
sent at one time.
|
||||
|
||||
CHANTYPES chars # Indicates the prefixes available
|
||||
for channels.
|
||||
|
||||
PREFIX (modes)prefixes (qaohv)~&@%+ Indicates the modes on a channel
|
||||
that corespond to the given
|
||||
nickname prefixes.
|
||||
|
||||
CHANMODES A,B,C,D be,k,lfL, Specifies how each channel mode is
|
||||
psmntirRcOAQKVHGCuzN set/unset. The A section specifies
|
||||
modes that add a nick/mask to a
|
||||
list. The B section specifies
|
||||
modes that require a parameter
|
||||
to be both set and unset. The C
|
||||
section specifies modes that
|
||||
only require a parameter to be
|
||||
set, and the D section
|
||||
specifies modes that require no
|
||||
parameters.
|
||||
|
||||
NETWORK string no default value Specifies the name of the
|
||||
network that the server is
|
||||
connected to.
|
||||
|
||||
CASEMAPPING string ascii Specifies what definition the
|
||||
server uses when determining if
|
||||
characters are upper/lowercase
|
||||
of eachother.
|
||||
|
||||
EXTBAN prefix,types ~,cqr Specifies what extbans are
|
||||
supported by the server. The prefix
|
||||
defines which character indicates
|
||||
an extban and the types defines
|
||||
which extbans the server supports.
|
||||
@@ -1,11 +0,0 @@
|
||||
base64 Documentation (c) 2002 codemastr (Dominick Meglio) [codemastr@unrealircd.com]
|
||||
(As of Unreal3.2-beta11)
|
||||
|
||||
The base64 system used by Unreal is defined as follows:
|
||||
|
||||
0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T
|
||||
U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x
|
||||
y z { }
|
||||
|
||||
These numbers are translated to and from their decimal equivilents of 0-64 in order to
|
||||
provide a shorter way of expressing a number.
|
||||
@@ -1,130 +0,0 @@
|
||||
PROTOCTL Documentation (c) 2002 codemastr (Dominick Meglio) [codemastr@unrealircd.com]
|
||||
(As of Unreal3.2-beta11)
|
||||
|
||||
The PROTOCTL command allows servers to negotiate protocol specific features when a link
|
||||
occurs. The PROTOCTL command is sent during a link before the SERVER and PASS commands. The
|
||||
command contains tokens that list what protocols the server supports.
|
||||
|
||||
PROTOCTL SPACE <token> SPACE ...
|
||||
|
||||
UnrealIRCd supports several tokens that add additional protocol support to the server. A
|
||||
list of all supported tokens and their function listed below.
|
||||
|
||||
Token Description
|
||||
------------------------------------------------------------------------------------------------
|
||||
NOQUIT Informs the server it need not send out a QUIT for each user on the server
|
||||
when an SQUIT occurs. Instead an SQUIT is sent out for each server that has
|
||||
been disconnected from the network and the server can then assume all users
|
||||
that were on those servers have left as well.
|
||||
|
||||
TOKEN Informs the server that it may send "tokenized commands", that is a shortened
|
||||
name for the commands. This allows the server to save bandwidth by sending
|
||||
less information to other servers. See doc/technical/token.txt for a list of
|
||||
all commands and their respective token.
|
||||
|
||||
NICKv2 Notifies the server that it supports the extended NICK command (version 2),
|
||||
this command allows the server to specify more information in the NICK
|
||||
command rather than having to send out a NICK, MODE, and CHGHOST
|
||||
command. This token only affects a NICK command introducing a client, not one
|
||||
in which a client is changing his/her nickname. The format for a NICKv2 NICK
|
||||
command is:
|
||||
|
||||
:<sender> NICK <nickname> <hops> <TS> <username> <host> <server>
|
||||
<servicestamp> <umodes> <vhost> :<info>
|
||||
|
||||
If the user has no modes set the umodes parameter is a +, if the user has no
|
||||
vhost set the vhost parameter is an *.
|
||||
|
||||
SJOIN SJOIN is an obsolete token that is only supported for backwards
|
||||
compatibility. It should not be used.
|
||||
|
||||
SJOIN2 SJOIN2 is an obsolete token that is only supported for backwards
|
||||
compatibility. It should not be used.
|
||||
|
||||
UMODE2 Informs the server that support for the UMODE2 command exists. The UMODE2
|
||||
command is a shortened form of the MODE command but only applys to
|
||||
usermodes. In a normal MODE command, when applied to usermodes, the nickname
|
||||
is specified two times. Both as the sender prefix and as the first parameter,
|
||||
UMODE2 solves this problem in order to save bandwidth, the format for UMODE2
|
||||
is as follows:
|
||||
|
||||
:<sender> UMODE2 <modes>
|
||||
|
||||
VL Notifies the server that Vline information is included in the info field of
|
||||
the SERVER command. Vline information consists of the protocol number of the
|
||||
server and compiletime options supported. This allows denial of a server
|
||||
based on version and/or features supported. The VL information is passed only
|
||||
during connection, it is not filtered to other servers on the network, only
|
||||
the uplink. The syntax for a VL supporting SERVER command is:
|
||||
|
||||
SERVER <servername> <hops> :U<protocol>-<versionflags> <info>
|
||||
|
||||
If an * appears for either protocol and/or versionflags no Vline checking is
|
||||
done, this is often used by services programs where support for all versions
|
||||
is desired. See doc/technical/vl.txt for a list of version flags and protocol
|
||||
numbers.
|
||||
|
||||
SJ3 Notifies the server that the SJOIN command with SJ3 syntax is
|
||||
supported. SJOIN is used at link time to inform servers about the channels on
|
||||
the server. It is a combination of the JOIN commands, and MODE commands
|
||||
associated with distribution of channel information. The syntax for the SJOIN
|
||||
command with SJ3 syntax is:
|
||||
|
||||
:<sender> SJOIN <ts> <chname> [<modes>] [<mode para> ...] :<[[*~@%+]member] ...
|
||||
[&"ban/except] ...>
|
||||
|
||||
The ts parameter is the time at which the channel, chname, was created. The
|
||||
modes parameter is only included if modes are set, if not modes and mode para
|
||||
are excluded. If modes exists and modes requiring parameters (+klLf) are set,
|
||||
one mode para parameter is included for each value. The last parameter
|
||||
specifies a list of channel members and the channel ban and except list. The
|
||||
members are listed with the prefixes they have. * = +q, ~ = +a, @ = +o, % =
|
||||
+h, + = +v. If no prefix is specified for the member then the user is a
|
||||
normal user. The & prefix is used to denote a +b, and the " prefix denotes a
|
||||
+e. It is important that if a & or " is encountered that you do not continue
|
||||
to check that entry for other prefixes as a ban/except may contain *~@
|
||||
characters which will intefere with prefixes.
|
||||
|
||||
When synching, if ts lower than the local value, the information supplied by
|
||||
the remote server replaces the local (ie remove local +ohv that are not
|
||||
recorded on the remote server). The opposite is true when the ts is
|
||||
higher. Bans/excepts do not apply to the previous rule. If the ts is the
|
||||
same, information is merged therefore the modes from both servers are added
|
||||
together. If +l is set and both servers have different values, the highest is
|
||||
choosen, for +f the highest of each param, N:M is chosen, and if one server
|
||||
has * set, then it is included. For +k and +L the "highest" in a string
|
||||
comparison is used.
|
||||
|
||||
NS When specified informs the server that numeric server names are
|
||||
supported. Numeric server names are a base64 number that is associated with
|
||||
each server. This number is used as a shorthand name for the server. It is
|
||||
used in the server parameter of the NICK command and can also be used in the
|
||||
prefix for a message. In the event that the prefix is an NS, rather than
|
||||
using :<sender>, the format is @<ns> the ns should be translated into the
|
||||
server name so that the message can be processed. The format for a SERVER
|
||||
message (at sync time) that supports NS is:
|
||||
|
||||
SERVER <servername> <hops> :U<protocol>-<versionflags>-<numeric> <info>
|
||||
|
||||
The VL protocol must also be supported. The numeric is passed to all servers
|
||||
on the network through the SERVER command using the syntax:
|
||||
|
||||
:<sender> SERVER <servername> <hops> <numeric> :<info>
|
||||
|
||||
Note: anywhere a :<sender> is expected an @<ns> may be received if the source
|
||||
is a server. See doc/technical/base64.txt for information on the base64
|
||||
system used.
|
||||
|
||||
SJB64 This token allows timestamps to be specified in base64 notation to conserve
|
||||
bandwidth. When SJB64 is supported, anywhere a timestamp can appear may be in
|
||||
base64 notation. A base64 timestamp is preceeded by a ! to identify that it
|
||||
is an sjb64 rather than a regular timestamp, if this is the case the
|
||||
characters following the ! represent the timestamp in base64. See
|
||||
doc/technical/base64.txt for information on the base64 system used.
|
||||
|
||||
ZIP If both servers have this set then the link will be (zlib) compressed after
|
||||
the SERVER message. If one of the servers does not have ZIP in his PROTOCTL
|
||||
message then the link stays uncompressed.
|
||||
|
||||
TKLEXT This allows 10 instead of 8 parameters in TKL's for spamfilter, see s_kline.c
|
||||
function m_tkl for more info on this (added in 3.2RC2).
|
||||
@@ -1,122 +0,0 @@
|
||||
Token List (c) 2002 codemastr (Dominick Meglio) [codemastr@unrealircd.com]
|
||||
(As of Unreal3.2-beta11)
|
||||
|
||||
Command Token
|
||||
------------------------------------------------------------------------------------------------
|
||||
PRIVMSG !
|
||||
WHO \
|
||||
WHOIS #
|
||||
WHOWAS $
|
||||
USER %
|
||||
NICK &
|
||||
SERVER '
|
||||
LIST (
|
||||
TOPIC )
|
||||
INVITE *
|
||||
VERSION +
|
||||
QUIT ,
|
||||
SQUIT -
|
||||
KILL .
|
||||
INFO /
|
||||
LINKS 0
|
||||
SUMMON 1
|
||||
STATS 2
|
||||
USERS 3
|
||||
HELP 4
|
||||
HELPOP 4
|
||||
ERROR 5
|
||||
AWAY 6
|
||||
CONNECT 7
|
||||
PING 8
|
||||
PONG 9
|
||||
OPER ;
|
||||
PASS <
|
||||
WALLOPS =
|
||||
TIME >
|
||||
NAMES ?
|
||||
ADMIN @
|
||||
NOTICE B
|
||||
JOIN C
|
||||
PART D
|
||||
LUSERS E
|
||||
MOTD F
|
||||
MODE G
|
||||
KICK H
|
||||
USERHOST J
|
||||
ISON K
|
||||
REHASH O
|
||||
RESTART P
|
||||
CLOSE Q
|
||||
DIE R
|
||||
HASH S
|
||||
DNS T
|
||||
SILENCE U
|
||||
AKILL V
|
||||
KLINE W
|
||||
UNKLINE X
|
||||
RAKILL Y
|
||||
GNOTICE Z
|
||||
GOPER [
|
||||
GLOBOPS ]
|
||||
LOCOPS ^
|
||||
PROTOCTL _
|
||||
WATCH `
|
||||
TRACE b
|
||||
SQLINE c
|
||||
UNSQLINE d
|
||||
SVSNICK e
|
||||
SVSNOOP f
|
||||
SVSKILL h
|
||||
SVSMODE n
|
||||
SAMODE o
|
||||
CHATOPS p
|
||||
ZLINE q
|
||||
UNZLINE r
|
||||
RULES t
|
||||
MAP u
|
||||
SVS2MODE v
|
||||
DALINFO w
|
||||
ADCHAT x
|
||||
MKPASSWD y
|
||||
ADDLINE z
|
||||
GLINE }
|
||||
SETHOST AA
|
||||
NACHAT AC
|
||||
SETIDENT AD
|
||||
SETNAME AE
|
||||
LAG AF
|
||||
SDESC AG
|
||||
KNOCK AI
|
||||
CREDITS AJ
|
||||
LICENSE AK
|
||||
CHGHOST AL
|
||||
RPING AM
|
||||
RPONG AN
|
||||
NETINFO AO
|
||||
SENDUMODE AP
|
||||
ADDMODE AQ
|
||||
ADDOMODE AR
|
||||
SVSMODE AS
|
||||
SMO AU
|
||||
OPERMOTD AV
|
||||
TSCTL AW
|
||||
SAJOIN AX
|
||||
SAPART AY
|
||||
CHGIDENT AZ
|
||||
SWHOIS BA
|
||||
SVSO BB
|
||||
SVSFLINE BC
|
||||
TKL BD
|
||||
VHOST BE
|
||||
BOTMOTD BF
|
||||
HTM BH
|
||||
SHUN BL
|
||||
SVSJOIN BR
|
||||
SVSPART BT
|
||||
SJOIN ~
|
||||
UMODE2 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
VL Information (c) 2002 codemastr (Dominick Meglio) [codemastr@unrealircd.com]
|
||||
(As of Unreal3.2-beta11)
|
||||
|
||||
Protocol Version
|
||||
------------------------------------------------------------------------------------------------
|
||||
2303 3.2-Selene
|
||||
2302 3.1.1-Darkshades, 3.1.2-Darkshades, 3.1.3-Komara, 3.1.4-Meadows
|
||||
2301 3.1-Silverheart
|
||||
2300 3.0-Morrigana
|
||||
|
||||
Flag Description
|
||||
------------------------------------------------------------------------------------------------
|
||||
c Server is chrooted
|
||||
C command line config enabled
|
||||
D Server is in debugmode
|
||||
F Using file descriptor lists
|
||||
h Compiled as a hub
|
||||
i Shows invisible users in /trace
|
||||
n NOSPOOF enabled
|
||||
V Uses valloc()
|
||||
W Windows version
|
||||
Y Syslog logging enabled
|
||||
K No ident checking (?)
|
||||
6 IPv6 supported
|
||||
X STRIPBADWORDS enabled (chmode/umode +G)
|
||||
P Uses poll()
|
||||
e SSL supported
|
||||
O OperOverride enabled
|
||||
o OperOverride without verify
|
||||
Z Zip links supported
|
||||
3 3rd party modules (were) loaded
|
||||
E Extended channel modes supported
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
-311
@@ -1,311 +0,0 @@
|
||||
/*
|
||||
** burst.c
|
||||
**
|
||||
** Nicolas Pioch, Dec 93
|
||||
** <Nicolas.Pioch@enst.fr>
|
||||
** Carsten V. Munk Nov 2000
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/signal.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/un.h>
|
||||
#include <netdb.h>
|
||||
#include <errno.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef POSIX
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#define MYBUFSIZE 2048
|
||||
|
||||
char *jupedservername, *uplinkservername, *jupereason;
|
||||
int options;
|
||||
char *password;
|
||||
typedef struct aClient {
|
||||
int socket;
|
||||
char buffer[MYBUFSIZE+1];
|
||||
int read;
|
||||
int write;
|
||||
} aClient;
|
||||
|
||||
void fatalrestart(aClient *robotptr, const char *s);
|
||||
|
||||
void fatal(const char *s) {
|
||||
perror(s);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
typedef void (*signalhandler)(int);
|
||||
static void signal_catcher(int sig, int code, struct sigcontext *scp) {
|
||||
fprintf(stderr, "Caught signal %d with code %d\n", sig, code);
|
||||
|
||||
switch(sig) {
|
||||
case SIGFPE: /* Floating point exception */
|
||||
case SIGILL: /* Illegal instruction */
|
||||
case SIGSEGV: /* Segmentation violation */
|
||||
case SIGBUS: /* Bus error */
|
||||
case SIGSYS: /* Bad argument to system call */
|
||||
fatal("Fatal signal received, aborting...");
|
||||
break;
|
||||
|
||||
case SIGQUIT:
|
||||
case SIGINT:
|
||||
case SIGTERM: /* On se barre */
|
||||
fatal("AAAAAAAAArrrrrrrrgh!");
|
||||
break;
|
||||
}
|
||||
|
||||
signal(sig, (signalhandler)signal_catcher);
|
||||
}
|
||||
|
||||
|
||||
typedef union socket_address {
|
||||
struct sockaddr_un unixx;
|
||||
struct sockaddr_in inet;
|
||||
} socket_address;
|
||||
|
||||
void name_to_number(int address_family, const char *hostname, int port,
|
||||
socket_address *addr, int *len2) {
|
||||
u_long iaddr;
|
||||
int len;
|
||||
struct hostent *host;
|
||||
char *inaddr;
|
||||
bzero ((char *) addr, sizeof (socket_address) );
|
||||
|
||||
if ( address_family == AF_UNIX ) {
|
||||
strcpy(addr->unixx.sun_path,hostname);
|
||||
*len2=sizeof( struct sockaddr_un );
|
||||
} else {
|
||||
if ((hostname) && (hostname[0])) {
|
||||
if (hostname[0] >= '0' && hostname[0] <= '9') {
|
||||
iaddr = inet_addr(hostname);
|
||||
inaddr = (char *) &iaddr;
|
||||
len=sizeof(iaddr);
|
||||
} else {
|
||||
host=gethostbyname (hostname);
|
||||
if (!host)
|
||||
fatal("Unknown host");
|
||||
inaddr=host->h_addr_list[0];
|
||||
len=host->h_length;
|
||||
}
|
||||
bcopy(inaddr, (char *)&addr->inet.sin_addr, len);
|
||||
}
|
||||
addr->inet.sin_port=htons((u_short) port);
|
||||
*len2=sizeof(struct sockaddr_in);
|
||||
}
|
||||
addr->inet.sin_family = address_family;
|
||||
}
|
||||
|
||||
int read_data(aClient *robotptr) {
|
||||
int nbytes;
|
||||
|
||||
if ((nbytes=read(robotptr->socket, &(robotptr->buffer[robotptr->write]),
|
||||
(sizeof(robotptr->buffer) - robotptr->write - 1))) < 0)
|
||||
fatalrestart(robotptr, "read on socket");
|
||||
|
||||
if (nbytes == 0) {
|
||||
close(robotptr->socket);
|
||||
fatalrestart(robotptr, "Connection Closed");
|
||||
}
|
||||
|
||||
robotptr->write+=nbytes;
|
||||
robotptr->buffer[robotptr->write]=0;
|
||||
|
||||
return(nbytes);
|
||||
}
|
||||
|
||||
void send_data(int socketfd, const char *data, int length) {
|
||||
int length2;
|
||||
length2=write(socketfd, data, length);
|
||||
if (length2 != length)
|
||||
fprintf(stderr, "*** write truncated to %d chars...\n", length2);
|
||||
}
|
||||
|
||||
int create_client(const char *hostname, const int hostport) {
|
||||
int descript;
|
||||
socket_address hostaddr;
|
||||
int adlen;
|
||||
|
||||
/* winlocal
|
||||
if ((descript=socket(PF_INET, SOCK_STREAM, 0)) < 0)
|
||||
*/
|
||||
if ((descript=socket(PF_INET, SOCK_STREAM, 0)) == -1) // winlocal
|
||||
fatal("socket");
|
||||
|
||||
name_to_number(AF_INET, hostname, hostport, &hostaddr, &adlen);
|
||||
|
||||
if (connect(descript, &hostaddr.inet, adlen) < 0)
|
||||
fatal("connect");
|
||||
|
||||
return(descript);
|
||||
}
|
||||
|
||||
void parse_line(aClient *robotptr) {
|
||||
char *toparse;
|
||||
|
||||
toparse=(robotptr->buffer + robotptr->read);
|
||||
|
||||
printf("%s\n",toparse);
|
||||
/* Special handling for PING messages */
|
||||
if (!strncasecmp(toparse, "PING ", 5) || !strncasecmp(toparse, "8 ", 2)){
|
||||
toparse=strtok(toparse, "\r\n");
|
||||
toparse[1]='\0';
|
||||
send_data(robotptr->socket, toparse, strlen(toparse));
|
||||
return;
|
||||
}
|
||||
if (!strncasecmp(toparse, "AO", 2) || !strncasecmp(toparse, "NETINFO", 7))
|
||||
{
|
||||
if (!(options & 0x80))
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
void parse_data(aClient *robotptr) {
|
||||
int next;
|
||||
|
||||
while((robotptr->read < robotptr->write)
|
||||
&& ((robotptr->buffer[robotptr->read] == '\r')
|
||||
|| (robotptr->buffer[robotptr->read] == '\n')))
|
||||
robotptr->read++;
|
||||
|
||||
for(next=robotptr->read; next<=robotptr->write; next++) {
|
||||
if ((robotptr->buffer[next] == '\r')
|
||||
|| (robotptr->buffer[next] == '\n'))
|
||||
break;
|
||||
}
|
||||
|
||||
if (next<robotptr->write) {
|
||||
robotptr->buffer[next]=0;
|
||||
next++;
|
||||
parse_line(robotptr);
|
||||
robotptr->read=next;
|
||||
parse_data(robotptr);
|
||||
}
|
||||
|
||||
if (robotptr->read == robotptr->write) {
|
||||
robotptr->read=robotptr->write=0;
|
||||
} else {
|
||||
bcopy((robotptr->buffer + robotptr->read),
|
||||
(robotptr->buffer), (robotptr->write-robotptr->read));
|
||||
robotptr->write-=robotptr->read;
|
||||
robotptr->read=0;
|
||||
}
|
||||
}
|
||||
|
||||
void run_client(aClient *robotptr) {
|
||||
fd_set mask, returnmask[3];
|
||||
int selectval;
|
||||
|
||||
FD_ZERO(&mask);
|
||||
FD_SET(robotptr->socket, &mask);
|
||||
|
||||
while (1) {
|
||||
bcopy((char *)&mask,(char *)returnmask,sizeof(fd_set));
|
||||
FD_ZERO(returnmask+1);
|
||||
bcopy((char *)&mask,(char *)(returnmask+2),sizeof(fd_set));
|
||||
|
||||
selectval=select(FD_SETSIZE,
|
||||
returnmask, returnmask+1, returnmask+2, NULL);
|
||||
|
||||
if (selectval) {
|
||||
read_data(robotptr);
|
||||
parse_data(robotptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void initialize(aClient *robotptr) {
|
||||
char passphrase[MYBUFSIZE];
|
||||
robotptr->socket=create_client(uplinkservername, atol(jupereason));
|
||||
sprintf(passphrase,
|
||||
"PROTOCTL %s %s %s %s %s %s %s %s %s\r\n",
|
||||
(options & 0x1) ? "NOQUIT" : "",
|
||||
(options & 0x2) ? "TOKEN" : "",
|
||||
(options & 0x4) ? "NICKv2" : "",
|
||||
(options & 0x8) ? "SJOIN" : "",
|
||||
(options & 0x10) ? "SJOIN2" : "",
|
||||
(options & 0x20) ? "UMODE2" : "",
|
||||
(options & 0x40) ? "NS" : "",
|
||||
(options & 0x100) ? "SJ3" : "",
|
||||
(options & 0x200) ? "SJB64" : "");
|
||||
write(robotptr->socket, passphrase, strlen(passphrase));
|
||||
sprintf(passphrase, "PASS %s\r\nSERVER %s 1 :[Burst analysis].\r\n",
|
||||
password,jupedservername);
|
||||
write(robotptr->socket, passphrase, strlen(passphrase));
|
||||
}
|
||||
|
||||
void fatalrestart(aClient *robotptr, const char *s) {
|
||||
perror(s);
|
||||
close(robotptr->socket);
|
||||
sleep(10);
|
||||
initialize(robotptr);
|
||||
run_client(robotptr);
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
aClient robot;
|
||||
char *p;
|
||||
|
||||
if (argc != 6) {
|
||||
fprintf(stderr, "IRCd burst generator, by Carsten V. Munk 2000, based off jupe.c by Nicolas Pioch\n");
|
||||
fprintf(stderr,
|
||||
"Usage: %s <burstservername> <uplink> <port> <options> <password>\n", argv[0]);
|
||||
fprintf(stderr, "Options can be a combination of these:\n");
|
||||
fprintf(stderr, "1 = Enable NOQUIT 2 = Enable TOKEN\n");
|
||||
fprintf(stderr, "3 = Enable NICKv2 4 = Enable SJOIN\n");
|
||||
fprintf(stderr, "5 = Enable SJOIN2 6 = Enable UMODE2\n");
|
||||
fprintf(stderr, "7 = Enable NS 8 = Ignore end of burst\n");
|
||||
fprintf(stderr, "9 = Enable SJ3 a = Enable SJB64\n");
|
||||
fatal("incorrect argument count");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
jupedservername=argv[1];
|
||||
uplinkservername=argv[2];
|
||||
jupereason=argv[3];
|
||||
password = argv[5];
|
||||
p = argv[4];
|
||||
for (; *p; p++)
|
||||
{
|
||||
if (*p == '1')
|
||||
options |= 0x1;
|
||||
if (*p == '2')
|
||||
options |= 0x2;
|
||||
if (*p == '3')
|
||||
options |= 0x4;
|
||||
if (*p == '4')
|
||||
options |= 0x8;
|
||||
if (*p == '5')
|
||||
options |= 0x10;
|
||||
if (*p == '6')
|
||||
options |= 0x20;
|
||||
if (*p == '7')
|
||||
options |= 0x40;
|
||||
if (*p == '8')
|
||||
options |= 0x80;
|
||||
if (*p == '9')
|
||||
options |= 0x100;
|
||||
if (*p == 'a')
|
||||
options |= 0x200;
|
||||
}
|
||||
/* installe le signal_catcher */
|
||||
signal(SIGTERM,(signalhandler)signal_catcher);
|
||||
|
||||
robot.read=robot.write=0;
|
||||
|
||||
initialize(&robot);
|
||||
run_client(&robot);
|
||||
|
||||
exit(0);
|
||||
}
|
||||
@@ -1,128 +0,0 @@
|
||||
/*
|
||||
* IRC - Internet Relay Chat, src/modules/channeldumper.c
|
||||
* (C) 2002 Carsten V. Munk <stskeeps@tspre.org>
|
||||
*
|
||||
*
|
||||
* See file AUTHORS in IRC package for additional names of
|
||||
* the programmers.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
#include "config.h"
|
||||
#include "struct.h"
|
||||
#include "common.h"
|
||||
#include "sys.h"
|
||||
#include "numeric.h"
|
||||
#include "msg.h"
|
||||
#include "channel.h"
|
||||
#include <time.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include "h.h"
|
||||
#include "proto.h"
|
||||
#ifdef STRIPBADWORDS
|
||||
#include "badwords.h"
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#include "version.h"
|
||||
#endif
|
||||
|
||||
#ifndef DYNAMIC_LINKING
|
||||
ModuleHeader channeldumper_Header
|
||||
#else
|
||||
#define channeldumper_Header Mod_Header
|
||||
ModuleHeader Mod_Header
|
||||
#endif
|
||||
= {
|
||||
"channeldumper",
|
||||
"$Id$",
|
||||
"Channel dump to text timed",
|
||||
"3.2-b8-1",
|
||||
NULL
|
||||
};
|
||||
|
||||
static ModuleInfo ChannelDumperModInfo;
|
||||
|
||||
#ifdef DYNAMIC_LINKING
|
||||
DLLFUNC int Mod_Init(ModuleInfo *modinfo)
|
||||
#else
|
||||
int channeldumper_Init(ModuleInfo *modinfo)
|
||||
#endif
|
||||
{
|
||||
tainted++;
|
||||
bcopy(modinfo,&ChannelDumperModInfo, modinfo->size);
|
||||
return MOD_SUCCESS;
|
||||
}
|
||||
|
||||
EVENT(e_channeldump);
|
||||
static Event *ChannelDumpEvent = NULL;
|
||||
#ifdef DYNAMIC_LINKING
|
||||
DLLFUNC int Mod_Load(int module_load)
|
||||
#else
|
||||
int channeldumper_Load(int module_load)
|
||||
#endif
|
||||
{
|
||||
LockEventSystem();
|
||||
ChannelDumpEvent = EventAddEx(ChannelDumperModInfo.handle, "e_channeldump", 5, 0, e_channeldump, NULL);
|
||||
UnlockEventSystem();
|
||||
return MOD_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef DYNAMIC_LINKING
|
||||
DLLFUNC int Mod_Unload(int module_unload)
|
||||
#else
|
||||
int channeldumper_Unload(int module_unload)
|
||||
#endif
|
||||
{
|
||||
tainted--;
|
||||
LockEventSystem();
|
||||
EventDel(ChannelDumpEvent);
|
||||
UnlockEventSystem();
|
||||
return MOD_SUCCESS;
|
||||
}
|
||||
|
||||
EVENT(e_channeldump)
|
||||
{
|
||||
aChannel *chptr;
|
||||
unsigned int hashnum;
|
||||
Member *m;
|
||||
FILE *f;
|
||||
|
||||
f = fopen("ircd.channeldump", "w");
|
||||
if (!f)
|
||||
return;
|
||||
for (hashnum = 0; hashnum < CH_MAX; hashnum++)
|
||||
{
|
||||
for (chptr = (aChannel *)hash_get_chan_bucket(hashnum); chptr; chptr
|
||||
= chptr->hnextch)
|
||||
{
|
||||
if (SecretChannel(chptr))
|
||||
continue;
|
||||
fprintf(f, "C %s %s\r\n",
|
||||
chptr->chname, chptr->topic ? chptr->topic : "");
|
||||
for (m = chptr->members; m; m = m->next)
|
||||
fprintf(f, "M %s\r\n",
|
||||
m->cptr->name);
|
||||
}
|
||||
}
|
||||
fclose(f);
|
||||
return;
|
||||
}
|
||||
@@ -1,151 +0,0 @@
|
||||
/*
|
||||
* Defizzer, 3rd party module for Unreal3.2-beta15 and up
|
||||
* (C) Carsten V. Munk 2003 <stskeeps@tspre.org>
|
||||
* You can do everything you desire with this module, under the condition that if you
|
||||
* meet the author, you must buy him a drink of his choice.
|
||||
* Copyright notice must ALWAYS stay in place.
|
||||
*
|
||||
* Removes unidented fizzer clients from the network pre-local-connect
|
||||
*/
|
||||
#include "config.h"
|
||||
#include "struct.h"
|
||||
#include "common.h"
|
||||
#include "sys.h"
|
||||
#include "numeric.h"
|
||||
#include "msg.h"
|
||||
#include "channel.h"
|
||||
#include <time.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include "h.h"
|
||||
#ifdef STRIPBADWORDS
|
||||
#include "badwords.h"
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#include "version.h"
|
||||
#endif
|
||||
DLLFUNC int h_defizzer_connect(aClient *sptr);
|
||||
|
||||
static Hook *LocConnect = NULL;
|
||||
ModuleInfo DefizzerModInfo;
|
||||
|
||||
#ifndef DYNAMIC_LINKING
|
||||
ModuleHeader defizzer_Header
|
||||
#else
|
||||
#define defizzer_Header Mod_Header
|
||||
ModuleHeader Mod_Header
|
||||
#endif
|
||||
= {
|
||||
"defizzer", /* Name of module */
|
||||
"$Id$", /* Version */
|
||||
"de-Fizzer", /* Short description of module */
|
||||
"3.2-b8-1",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
/* The purpose of these ifdefs, are that we can "static" link the ircd if we
|
||||
* want to
|
||||
*/
|
||||
|
||||
/* This is called on module init, before Server Ready */
|
||||
#ifdef DYNAMIC_LINKING
|
||||
DLLFUNC int Mod_Init(ModuleInfo *modinfo)
|
||||
#else
|
||||
int defizzer_Init(ModuleInfo *modinfo)
|
||||
#endif
|
||||
{
|
||||
bcopy(modinfo,&DefizzerModInfo,modinfo->size);
|
||||
LocConnect = HookAddEx(DefizzerModInfo.handle, HOOKTYPE_PRE_LOCAL_CONNECT, h_defizzer_connect);
|
||||
return MOD_SUCCESS;
|
||||
}
|
||||
|
||||
/* Is first run when server is 100% ready */
|
||||
#ifdef DYNAMIC_LINKING
|
||||
DLLFUNC int Mod_Load(int module_load)
|
||||
#else
|
||||
int defizzer_Load(int module_load)
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/* Called when module is unloaded */
|
||||
#ifdef DYNAMIC_LINKING
|
||||
DLLFUNC int Mod_Unload(int module_unload)
|
||||
#else
|
||||
int defizzer_Unload(int module_unload)
|
||||
#endif
|
||||
{
|
||||
HookDel(LocConnect);
|
||||
return MOD_SUCCESS;
|
||||
}
|
||||
static void ban_fizzer(aClient *cptr)
|
||||
{
|
||||
int i;
|
||||
aClient *acptr;
|
||||
char hostip[128], mo[100], mo2[100];
|
||||
char *tkllayer[9] = {
|
||||
me.name, /*0 server.name */
|
||||
"+", /*1 +|- */
|
||||
"z", /*2 G */
|
||||
"*", /*3 user */
|
||||
NULL, /*4 host */
|
||||
NULL,
|
||||
NULL, /*6 expire_at */
|
||||
NULL, /*7 set_at */
|
||||
NULL /*8 reason */
|
||||
};
|
||||
|
||||
strlcpy(hostip, Inet_ia2p(&cptr->ip), sizeof(hostip));
|
||||
|
||||
tkllayer[4] = hostip;
|
||||
tkllayer[5] = me.name;
|
||||
ircsprintf(mo, "%li", 86400 + TStime());
|
||||
ircsprintf(mo2, "%li", TStime());
|
||||
tkllayer[6] = mo;
|
||||
tkllayer[7] = mo2;
|
||||
tkllayer[8] = "Fizzer";
|
||||
m_tkl(&me, &me, 9, tkllayer);
|
||||
return;
|
||||
}
|
||||
|
||||
DLLFUNC int h_defizzer_connect(aClient *sptr)
|
||||
{
|
||||
char user[USERLEN + 1];
|
||||
char *infobackup;
|
||||
char *s1, *s2;
|
||||
|
||||
/*
|
||||
* Algorithm is basically like this, inspired by Zaphod:
|
||||
* Exchange first word with second in realname, prepend with
|
||||
* ~, then add in second word and first word upto limit of username.
|
||||
* sounds fun?
|
||||
*/
|
||||
infobackup = strdup(sptr->info);
|
||||
if (!(s1 = strtok(infobackup, " ")))
|
||||
{
|
||||
free(infobackup);
|
||||
return 0;
|
||||
}
|
||||
if (!(s2 = strtok(NULL, " ")))
|
||||
{
|
||||
free(infobackup);
|
||||
return 0;
|
||||
}
|
||||
snprintf(user, sizeof(user), "%s%s%s", (IDENT_CHECK ? "~" : ""), s2, s1);
|
||||
free(infobackup);
|
||||
if (!strcmp(user, sptr->user->username))
|
||||
{
|
||||
ircstp->is_ref++;
|
||||
ban_fizzer(sptr);
|
||||
return exit_client(sptr, sptr, &me, "Fizzer client");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
|
||||
These are 3rd party programs modules, or unsupported modules.
|
||||
|
||||
Custom modules are compiled by copying them to src/modules
|
||||
and running from the root directory
|
||||
|
||||
$ make custommodule MODULEFILE=modulename
|
||||
|
||||
This will produce a .so you can load. Upon load, this will show a "3" in the
|
||||
/version flags, as it contains third party modules (we do not support if it
|
||||
crashes because of the tainted module)
|
||||
|
||||
======================
|
||||
Name: burst.c
|
||||
Description:
|
||||
Little program to test out the different aspects of the unreal protocol and
|
||||
produce net.burst dumps
|
||||
|
||||
=======================
|
||||
Name: m_rawto.c
|
||||
Is a 3rd party module
|
||||
Description:
|
||||
|
||||
Implements the RAWTO command, will allow U:lines to send raw data to
|
||||
anywhere it pleases.
|
||||
|
||||
:uline.server RAWTO towho :what to send
|
||||
|
||||
=========================
|
||||
|
||||
Name: channeldumper.c
|
||||
Is a 3rd party module
|
||||
Description:
|
||||
|
||||
Dumps a list of non secret channels to ircd.channels or something every 5 seconds,
|
||||
|
||||
C #channel topic
|
||||
M member1
|
||||
M member2
|
||||
C #channel2 topic
|
||||
M member3
|
||||
|
||||
You can't rely on topic being there
|
||||
@@ -1,157 +0,0 @@
|
||||
/*
|
||||
* Unreal Internet Relay Chat Daemon, m_rawto.c
|
||||
* (C) 2002 Carsten V. Munk
|
||||
* RAWTO Module - 3rd party
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* Use of this module will make it a 3rd party module, and will
|
||||
* add to your /version thing. We DO NOT SUPPORT THIS.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "struct.h"
|
||||
#include "common.h"
|
||||
#include "sys.h"
|
||||
#include "numeric.h"
|
||||
#include "msg.h"
|
||||
#include "channel.h"
|
||||
#include <time.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include "h.h"
|
||||
#include "proto.h"
|
||||
#ifdef STRIPBADWORDS
|
||||
#include "badwords.h"
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#include "version.h"
|
||||
#endif
|
||||
|
||||
DLLFUNC int m_rawto(aClient *cptr, aClient *sptr, int parc, char *parv[]);
|
||||
|
||||
/* Place includes here */
|
||||
#define MSG_RAWTO "RAWTO" /* */
|
||||
#define TOK_RAWTO "3A" /* 112 */
|
||||
|
||||
|
||||
#ifndef DYNAMIC_LINKING
|
||||
ModuleHeader m_rawto_Header
|
||||
#else
|
||||
#define m_rawto_Header Mod_Header
|
||||
ModuleHeader Mod_Header
|
||||
#endif
|
||||
= {
|
||||
"rawto", /* Name of module */
|
||||
"$Id$", /* Version */
|
||||
"command /rawto", /* Short description of module */
|
||||
"3.2-b5",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
/* The purpose of these ifdefs, are that we can "static" link the ircd if we
|
||||
* want to
|
||||
*/
|
||||
|
||||
/* This is called on module init, before Server Ready */
|
||||
#ifdef DYNAMIC_LINKING
|
||||
DLLFUNC int Mod_Init(int module_load)
|
||||
#else
|
||||
int m_rawto_Init(int module_load)
|
||||
#endif
|
||||
{
|
||||
/*
|
||||
* We call our add_Command crap here
|
||||
*/
|
||||
add_Command(MSG_RAWTO, TOK_RAWTO, m_rawto, 2);
|
||||
tainted++;
|
||||
return MOD_SUCCESS;
|
||||
}
|
||||
|
||||
/* Is first run when server is 100% ready */
|
||||
#ifdef DYNAMIC_LINKING
|
||||
DLLFUNC int Mod_Load(int module_load)
|
||||
#else
|
||||
int m_rawto_Load(int module_load)
|
||||
#endif
|
||||
{
|
||||
|
||||
return MOD_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/* Called when module is unloaded */
|
||||
#ifdef DYNAMIC_LINKING
|
||||
DLLFUNC int Mod_Unload(int module_unload)
|
||||
#else
|
||||
int m_rawto_Unload(int module_unload)
|
||||
#endif
|
||||
{
|
||||
if (del_Command(MSG_RAWTO, TOK_RAWTO, m_rawto) < 0)
|
||||
{
|
||||
sendto_realops("Failed to delete commands when unloading %s",
|
||||
m_rawto_Header.name);
|
||||
}
|
||||
tainted--;
|
||||
return MOD_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* m_rawto Send a raw string to anywhere
|
||||
* if you are U:line
|
||||
* parv[0] = sender prefix
|
||||
* parv[1] = whoto
|
||||
* parv[2] = string
|
||||
*/
|
||||
|
||||
DLLFUNC int m_rawto(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
{
|
||||
aClient *acptr = NULL;
|
||||
if (!IsULine(sptr))
|
||||
{
|
||||
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
|
||||
return -1;
|
||||
}
|
||||
if (parc < 3)
|
||||
{
|
||||
sendto_one(sptr, err_str(ERR_NEEDMOREPARAMS),
|
||||
me.name, parv[0], "RAWTO");
|
||||
return -1;
|
||||
}
|
||||
if ((acptr = find_client(parv[1], NULL)))
|
||||
{
|
||||
if (MyConnect(acptr))
|
||||
{
|
||||
sendto_one(acptr, "%s", parv[2]);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
sendto_one(acptr, ":%s %s %s :%s",
|
||||
parv[0], IsToken(acptr->from) ? TOK_RAWTO : MSG_RAWTO,
|
||||
parv[1], parv[2]);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
-5563
File diff suppressed because it is too large
Load Diff
@@ -1,98 +0,0 @@
|
||||
# Makefile for regex.
|
||||
#
|
||||
# Copyright (C) 1992, 1993 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
version = 0.12
|
||||
|
||||
# You can define CPPFLAGS on the command line. Aside from system-specific
|
||||
# flags, you can define:
|
||||
# -DREGEX_MALLOC to use malloc/realloc/free instead of alloca.
|
||||
# -DDEBUG to enable the compiled pattern disassembler and execution
|
||||
# tracing; code runs substantially slower.
|
||||
# -DEXTRACT_MACROS to use the macros EXTRACT_* (as opposed to
|
||||
# the corresponding C procedures). If not -DDEBUG, the macros
|
||||
# are used.
|
||||
CPPFLAGS =
|
||||
|
||||
# Likewise, you can override CFLAGS to optimize, use -Wall, etc.
|
||||
CFLAGS = -g
|
||||
|
||||
# Ditto for LDFLAGS and LOADLIBES.
|
||||
LDFLAGS =
|
||||
LOADLIBES =
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
CC = @CC@
|
||||
DEFS = @DEFS@
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
subdirs = moo
|
||||
|
||||
default all:: regex.o
|
||||
.PHONY: default all
|
||||
|
||||
regex.o: regex.c regex.h
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) -c $<
|
||||
|
||||
clean mostlyclean::
|
||||
rm -f *.o
|
||||
|
||||
distclean:: clean
|
||||
rm -f Makefile config.status
|
||||
|
||||
extraclean:: distclean
|
||||
rm -f patch* *~* *\#* *.orig *.rej *.bak core a.out
|
||||
|
||||
configure: configure.in
|
||||
autoconf
|
||||
|
||||
config.status: configure
|
||||
sh configure --no-create
|
||||
|
||||
Makefile: Makefile.in config.status
|
||||
sh config.status
|
||||
|
||||
makeargs = $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' CC='$(CC)' \
|
||||
DEFS='$(DEFS)' LDFLAGS='$(LDFLAGS)' LOADLIBES='$(LOADLIBES)'
|
||||
|
||||
default all install \
|
||||
mostlyclean clean distclean extraclean realclean \
|
||||
TAGS check::
|
||||
for d in $(subdirs); do (cd $$d; $(MAKE) $(makeargs) $@); done
|
||||
.PHONY: install mostlyclean clean distclean extraclean realclean TAGS check
|
||||
|
||||
# Prevent GNU make 3 from overflowing arg limit on system V.
|
||||
.NOEXPORT:
|
||||
|
||||
distfiles = AUTHORS ChangeLog COPYING INSTALL NEWS README \
|
||||
*.in configure regex.c regex.h
|
||||
distdir = regex-$(version)
|
||||
distargs = version=$(version) distdir=../$(distdir)/$$d
|
||||
dist: TAGS configure
|
||||
@echo "Version numbers in: Makefile.in, ChangeLog, NEWS,"
|
||||
@echo " regex.c, regex.h,"
|
||||
@echo " and doc/xregex.texi (if modified)."
|
||||
rm -rf $(distdir)
|
||||
mkdir $(distdir)
|
||||
ln $(distfiles) $(distdir)
|
||||
for d in $(subdirs); do (cd $$d; $(MAKE) $(distargs) dist); done
|
||||
tar czhf $(distdir).tar.Z $(distdir)
|
||||
rm -rf $(distdir)
|
||||
.PHONY: dist
|
||||
@@ -1,60 +0,0 @@
|
||||
This directory contains the GNU regex library. It is compliant with
|
||||
POSIX.2, except for internationalization features.
|
||||
|
||||
See the file NEWS for a list of major changes in the current release.
|
||||
|
||||
See the file INSTALL for compilation instructions. (The only thing
|
||||
installed is the documentation; regex.c is compiled into regex.o, but
|
||||
not installed anywhere.)
|
||||
|
||||
The subdirectory `doc' contains a (programmers') manual for the library.
|
||||
It's probably out-of-date. Improvements are welcome.
|
||||
|
||||
The subdirectory `test' contains the various tests we've written.
|
||||
|
||||
We know this code is not as fast as it might be. If you have specific
|
||||
suggestions, profiling results, or other such useful information to
|
||||
report, please do.
|
||||
|
||||
Emacs 18 is not going use this revised regex (but Emacs 19 will). If
|
||||
you want to try it with Emacs 18, apply the patch at the end of this
|
||||
file first.
|
||||
|
||||
Mail bug reports to bug-gnu-utils@prep.ai.mit.edu.
|
||||
|
||||
Please include an actual regular expression that fails (and the syntax
|
||||
used to compile it); without that, there's no way to reproduce the bug,
|
||||
so there's no way we can fix it. Even if you include a patch, also
|
||||
include the regular expression in error; otherwise, we can't know for
|
||||
sure what you're trying to fix.
|
||||
|
||||
Here is the patch to make this version of regex work with Emacs 18.
|
||||
|
||||
*** ORIG/search.c Tue Jan 8 13:04:55 1991
|
||||
--- search.c Sun Jan 5 10:57:00 1992
|
||||
***************
|
||||
*** 25,26 ****
|
||||
--- 25,28 ----
|
||||
#include "commands.h"
|
||||
+
|
||||
+ #include <sys/types.h>
|
||||
#include "regex.h"
|
||||
***************
|
||||
*** 477,479 ****
|
||||
/* really needed. */
|
||||
! && *(searchbuf.buffer) == (char) exactn /* first item is "exact match" */
|
||||
&& searchbuf.buffer[1] + 2 == searchbuf.used) /*first is ONLY item */
|
||||
--- 479,482 ----
|
||||
/* really needed. */
|
||||
! /* first item is "exact match" */
|
||||
! && *(searchbuf.buffer) == (char) RE_EXACTN_VALUE
|
||||
&& searchbuf.buffer[1] + 2 == searchbuf.used) /*first is ONLY item */
|
||||
***************
|
||||
*** 1273,1275 ****
|
||||
searchbuf.allocated = 100;
|
||||
! searchbuf.buffer = (char *) malloc (searchbuf.allocated);
|
||||
searchbuf.fastmap = search_fastmap;
|
||||
--- 1276,1278 ----
|
||||
searchbuf.allocated = 100;
|
||||
! searchbuf.buffer = (unsigned char *) malloc (searchbuf.allocated);
|
||||
searchbuf.fastmap = search_fastmap;
|
||||
Vendored
-462
@@ -1,462 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated automatically using autoconf.
|
||||
# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
# Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] [--no-create]
|
||||
# [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE] [TARGET]
|
||||
# Ignores all args except --srcdir, --prefix, --exec-prefix, --no-create, and
|
||||
# --with-PACKAGE unless this script has special code to handle it.
|
||||
|
||||
|
||||
for arg
|
||||
do
|
||||
# Handle --exec-prefix with a space before the argument.
|
||||
if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
|
||||
# Handle --host with a space before the argument.
|
||||
elif test x$next_host = xyes; then next_host=
|
||||
# Handle --prefix with a space before the argument.
|
||||
elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
|
||||
# Handle --srcdir with a space before the argument.
|
||||
elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
|
||||
else
|
||||
case $arg in
|
||||
# For backward compatibility, also recognize exact --exec_prefix.
|
||||
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
|
||||
exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
|
||||
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
|
||||
next_exec_prefix=yes ;;
|
||||
|
||||
-gas | --gas | --ga | --g) ;;
|
||||
|
||||
-host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
|
||||
-host | --host | --hos | --ho | --h)
|
||||
next_host=yes ;;
|
||||
|
||||
-nfp | --nfp | --nf) ;;
|
||||
|
||||
-no-create | --no-create | --no-creat | --no-crea | --no-cre | --no-cr | --no-c | --no- | --no)
|
||||
no_create=1 ;;
|
||||
|
||||
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
|
||||
prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
|
||||
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
|
||||
next_prefix=yes ;;
|
||||
|
||||
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
|
||||
srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
|
||||
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
|
||||
next_srcdir=yes ;;
|
||||
|
||||
-with-* | --with-*)
|
||||
package=`echo $arg|sed 's/-*with-//'`
|
||||
# Delete all the valid chars; see if any are left.
|
||||
if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then
|
||||
echo "configure: $package: invalid package name" >&2; exit 1
|
||||
fi
|
||||
eval "with_`echo $package|sed s/-/_/g`=1" ;;
|
||||
|
||||
*) ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
|
||||
trap 'rm -f conftest* core; exit 1' 1 3 15
|
||||
|
||||
rm -f conftest*
|
||||
compile='${CC-cc} $CFLAGS $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1'
|
||||
|
||||
# A filename unique to this package, relative to the directory that
|
||||
# configure is in, which we can look for to find out if srcdir is correct.
|
||||
unique_file=regex.c
|
||||
|
||||
# Find the source files, if location was not specified.
|
||||
if test -z "$srcdir"; then
|
||||
srcdirdefaulted=yes
|
||||
# Try the directory containing this script, then `..'.
|
||||
prog=$0
|
||||
confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
|
||||
test "X$confdir" = "X$prog" && confdir=.
|
||||
srcdir=$confdir
|
||||
if test ! -r $srcdir/$unique_file; then
|
||||
srcdir=..
|
||||
fi
|
||||
fi
|
||||
if test ! -r $srcdir/$unique_file; then
|
||||
if test x$srcdirdefaulted = xyes; then
|
||||
echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
|
||||
else
|
||||
echo "configure: Can not find sources in \`${srcdir}'." 1>&2
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
# Preserve a srcdir of `.' to avoid automounter screwups with pwd.
|
||||
# But we can't avoid them for `..', to make subdirectories work.
|
||||
case $srcdir in
|
||||
.|/*|~*) ;;
|
||||
*) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
|
||||
esac
|
||||
|
||||
|
||||
if test -z "$CC"; then
|
||||
echo checking for gcc
|
||||
saveifs="$IFS"; IFS="${IFS}:"
|
||||
for dir in $PATH; do
|
||||
test -z "$dir" && dir=.
|
||||
if test -f $dir/gcc; then
|
||||
CC="gcc"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$saveifs"
|
||||
fi
|
||||
test -z "$CC" && CC="cc"
|
||||
|
||||
# Find out if we are using GNU C, under whatever name.
|
||||
cat > conftest.c <<EOF
|
||||
#ifdef __GNUC__
|
||||
yes
|
||||
#endif
|
||||
EOF
|
||||
${CC-cc} -E conftest.c > conftest.out 2>&1
|
||||
if egrep yes conftest.out >/dev/null 2>&1; then
|
||||
GCC=1 # For later tests.
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
# Make sure to not get the incompatible SysV /etc/install and
|
||||
# /usr/sbin/install, which might be in PATH before a BSD-like install,
|
||||
# or the SunOS /usr/etc/install directory, or the AIX /bin/install,
|
||||
# or the AFS install, which mishandles nonexistent args. (Sigh.)
|
||||
if test -z "$INSTALL"; then
|
||||
echo checking for install
|
||||
saveifs="$IFS"; IFS="${IFS}:"
|
||||
for dir in $PATH; do
|
||||
test -z "$dir" && dir=.
|
||||
case $dir in
|
||||
/etc|/usr/sbin|/usr/etc|/usr/afsws/bin) ;;
|
||||
*)
|
||||
if test -f $dir/install; then
|
||||
if grep dspmsg $dir/install >/dev/null 2>&1; then
|
||||
: # AIX
|
||||
else
|
||||
INSTALL="$dir/install -c"
|
||||
INSTALL_PROGRAM='$(INSTALL)'
|
||||
INSTALL_DATA='$(INSTALL) -m 644'
|
||||
break
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
IFS="$saveifs"
|
||||
fi
|
||||
INSTALL=${INSTALL-cp}
|
||||
INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}
|
||||
INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}
|
||||
|
||||
|
||||
echo checking for AIX
|
||||
echo checking how to run the C preprocessor
|
||||
if test -z "$CPP"; then
|
||||
CPP='${CC-cc} -E'
|
||||
cat > conftest.c <<EOF
|
||||
#include <stdio.h>
|
||||
EOF
|
||||
err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
|
||||
if test -z "$err"; then
|
||||
:
|
||||
else
|
||||
CPP=/lib/cpp
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
|
||||
cat > conftest.c <<EOF
|
||||
#ifdef _AIX
|
||||
yes
|
||||
#endif
|
||||
|
||||
EOF
|
||||
eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
|
||||
if egrep "yes" conftest.out >/dev/null 2>&1; then
|
||||
DEFS="$DEFS -D_ALL_SOURCE=1"
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
|
||||
echo checking for DYNIX/ptx libseq
|
||||
cat > conftest.c <<EOF
|
||||
#if defined(_SEQUENT_)
|
||||
yes
|
||||
#endif
|
||||
|
||||
EOF
|
||||
eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
|
||||
if egrep "yes" conftest.out >/dev/null 2>&1; then
|
||||
SEQUENT=1
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
test -n "$SEQUENT" && test -f /usr/lib/libseq.a &&
|
||||
LIBS="$LIBS -lseq"
|
||||
|
||||
echo checking for POSIXized ISC
|
||||
if test -d /etc/conf/kconfig.d &&
|
||||
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
|
||||
then
|
||||
ISC=1 # If later tests want to check for ISC.
|
||||
DEFS="$DEFS -D_POSIX_SOURCE=1"
|
||||
if test -n "$GCC"; then
|
||||
CC="$CC -posix"
|
||||
else
|
||||
CC="$CC -Xp"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo checking for minix/config.h
|
||||
cat > conftest.c <<EOF
|
||||
#include <minix/config.h>
|
||||
EOF
|
||||
err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
|
||||
if test -z "$err"; then
|
||||
MINIX=1
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
# The Minix shell can't assign to the same variable on the same line!
|
||||
if test -n "$MINIX"; then
|
||||
DEFS="$DEFS -D_POSIX_SOURCE=1"
|
||||
DEFS="$DEFS -D_POSIX_1_SOURCE=2"
|
||||
DEFS="$DEFS -D_MINIX=1"
|
||||
fi
|
||||
|
||||
|
||||
echo checking for ANSI C header files
|
||||
cat > conftest.c <<EOF
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <float.h>
|
||||
EOF
|
||||
err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
|
||||
if test -z "$err"; then
|
||||
# SunOS string.h does not declare mem*, contrary to ANSI.
|
||||
echo '#include <string.h>' > conftest.c
|
||||
eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
|
||||
if egrep "memchr" conftest.out >/dev/null 2>&1; then
|
||||
# SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
|
||||
cat > conftest.c <<EOF
|
||||
#include <ctype.h>
|
||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
|
||||
#define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
|
||||
int main () { int i; for (i = 0; i < 256; i++)
|
||||
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
|
||||
exit (0); }
|
||||
|
||||
EOF
|
||||
eval $compile
|
||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||
DEFS="$DEFS -DSTDC_HEADERS=1"
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
for hdr in string.h
|
||||
do
|
||||
trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
|
||||
echo checking for ${hdr}
|
||||
cat > conftest.c <<EOF
|
||||
#include <${hdr}>
|
||||
EOF
|
||||
err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
|
||||
if test -z "$err"; then
|
||||
DEFS="$DEFS -D${trhdr}=1"
|
||||
fi
|
||||
rm -f conftest*
|
||||
done
|
||||
|
||||
|
||||
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
|
||||
# for constant arguments. Useless!
|
||||
echo checking for working alloca.h
|
||||
cat > conftest.c <<EOF
|
||||
#include <alloca.h>
|
||||
main() { exit(0); }
|
||||
t() { char *p = alloca(2 * sizeof(int)); }
|
||||
EOF
|
||||
if eval $compile; then
|
||||
DEFS="$DEFS -DHAVE_ALLOCA_H=1"
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
decl="#ifdef __GNUC__
|
||||
#define alloca __builtin_alloca
|
||||
#else
|
||||
#if HAVE_ALLOCA_H
|
||||
#include <alloca.h>
|
||||
#else
|
||||
#ifdef _AIX
|
||||
#pragma alloca
|
||||
#else
|
||||
char *alloca ();
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
"
|
||||
echo checking for alloca
|
||||
cat > conftest.c <<EOF
|
||||
$decl
|
||||
main() { exit(0); }
|
||||
t() { char *p = (char *) alloca(1); }
|
||||
EOF
|
||||
if eval $compile; then
|
||||
:
|
||||
else
|
||||
alloca_missing=1
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
if test -n "$alloca_missing"; then
|
||||
# The SVR3 libPW and SVR4 libucb both contain incompatible functions
|
||||
# that cause trouble. Some versions do not even contain alloca or
|
||||
# contain a buggy version. If you still want to use their alloca,
|
||||
# use ar to extract alloca.o from them instead of compiling alloca.c.
|
||||
ALLOCA=alloca.o
|
||||
fi
|
||||
|
||||
prog='/* Ultrix mips cc rejects this. */
|
||||
typedef int charset[2]; const charset x;
|
||||
/* SunOS 4.1.1 cc rejects this. */
|
||||
char const *const *p;
|
||||
char **p2;
|
||||
/* HPUX 7.0 cc rejects these. */
|
||||
++p;
|
||||
p2 = (char const* const*) p;'
|
||||
echo checking for working const
|
||||
cat > conftest.c <<EOF
|
||||
|
||||
main() { exit(0); }
|
||||
t() { $prog }
|
||||
EOF
|
||||
if eval $compile; then
|
||||
:
|
||||
else
|
||||
DEFS="$DEFS -Dconst="
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
|
||||
if test -z "$prefix"
|
||||
then
|
||||
echo checking for gcc to derive installation directory prefix
|
||||
saveifs="$IFS"; IFS="$IFS:"
|
||||
for dir in $PATH; do
|
||||
test -z "$dir" && dir=.
|
||||
if test $dir != . && test -f $dir/gcc; then
|
||||
# Not all systems have dirname.
|
||||
prefix=`echo $dir|sed 's%/[^/][^/]*$%%'`
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$saveifs"
|
||||
fi
|
||||
|
||||
|
||||
if test -n "$prefix"; then
|
||||
test -z "$exec_prefix" && exec_prefix='${prefix}'
|
||||
prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%"
|
||||
fi
|
||||
if test -n "$exec_prefix"; then
|
||||
prsub="$prsub
|
||||
s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%\
|
||||
exec_prefix\\1=\\2$exec_prefix%"
|
||||
fi
|
||||
|
||||
trap 'rm -f config.status; exit 1' 1 3 15
|
||||
echo creating config.status
|
||||
rm -f config.status
|
||||
cat > config.status <<EOF
|
||||
#!/bin/sh
|
||||
# Generated automatically by configure.
|
||||
# Run this file to recreate the current configuration.
|
||||
# This directory was configured as follows,
|
||||
# on host `(hostname || uname -n) 2>/dev/null`:
|
||||
#
|
||||
# $0 $*
|
||||
|
||||
for arg
|
||||
do
|
||||
case "\$arg" in
|
||||
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
|
||||
exec /bin/sh $0 $* ;;
|
||||
*) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
trap 'rm -f Makefile; exit 1' 1 3 15
|
||||
CC='$CC'
|
||||
INSTALL='$INSTALL'
|
||||
INSTALL_PROGRAM='$INSTALL_PROGRAM'
|
||||
INSTALL_DATA='$INSTALL_DATA'
|
||||
CPP='$CPP'
|
||||
ALLOCA='$ALLOCA'
|
||||
LIBS='$LIBS'
|
||||
srcdir='$srcdir'
|
||||
DEFS='$DEFS'
|
||||
prefix='$prefix'
|
||||
exec_prefix='$exec_prefix'
|
||||
prsub='$prsub'
|
||||
EOF
|
||||
cat >> config.status <<\EOF
|
||||
|
||||
top_srcdir=$srcdir
|
||||
for file in .. Makefile; do if [ "x$file" != "x.." ]; then
|
||||
srcdir=$top_srcdir
|
||||
# Remove last slash and all that follows it. Not all systems have dirname.
|
||||
dir=`echo $file|sed 's%/[^/][^/]*$%%'`
|
||||
if test "$dir" != "$file"; then
|
||||
test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
|
||||
test ! -d $dir && mkdir $dir
|
||||
fi
|
||||
echo creating $file
|
||||
rm -f $file
|
||||
echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file
|
||||
sed -e "
|
||||
$prsub
|
||||
s%@CC@%$CC%g
|
||||
s%@INSTALL@%$INSTALL%g
|
||||
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
|
||||
s%@INSTALL_DATA@%$INSTALL_DATA%g
|
||||
s%@CPP@%$CPP%g
|
||||
s%@ALLOCA@%$ALLOCA%g
|
||||
s%@LIBS@%$LIBS%g
|
||||
s%@srcdir@%$srcdir%g
|
||||
s%@DEFS@%$DEFS%
|
||||
" $top_srcdir/${file}.in >> $file
|
||||
fi; done
|
||||
|
||||
exit 0
|
||||
EOF
|
||||
chmod +x config.status
|
||||
test -n "$no_create" || ./config.status
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(regex.c)
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
dnl I'm not sure if AC_AIX and AC_DYNIX_SEQ are really necessary. The
|
||||
dnl Autoconf documentation isn't specific about which BSD functions they
|
||||
dnl provide.
|
||||
AC_AIX
|
||||
AC_DYNIX_SEQ
|
||||
AC_ISC_POSIX
|
||||
AC_MINIX
|
||||
|
||||
AC_STDC_HEADERS
|
||||
AC_HAVE_HEADERS(string.h)
|
||||
|
||||
AC_ALLOCA
|
||||
AC_CONST
|
||||
|
||||
AC_PREFIX(gcc)
|
||||
|
||||
AC_OUTPUT(Makefile doc/Makefile test/Makefile)
|
||||
@@ -1,4 +0,0 @@
|
||||
clean:
|
||||
default:
|
||||
all:
|
||||
echo "."
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,490 +0,0 @@
|
||||
/* Definitions for data structures and routines for the regular
|
||||
expression library, version 0.12.
|
||||
|
||||
Copyright (C) 1985, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#ifndef __REGEXP_LIBRARY_H__
|
||||
#define __REGEXP_LIBRARY_H__
|
||||
|
||||
/* POSIX says that <sys/types.h> must be included (by the caller) before
|
||||
<regex.h>. */
|
||||
|
||||
#ifdef VMS
|
||||
/* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it
|
||||
should be there. */
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
|
||||
/* The following bits are used to determine the regexp syntax we
|
||||
recognize. The set/not-set meanings are chosen so that Emacs syntax
|
||||
remains the value 0. The bits are given in alphabetical order, and
|
||||
the definitions shifted by one from the previous bit; thus, when we
|
||||
add or remove a bit, only one other definition need change. */
|
||||
typedef unsigned reg_syntax_t;
|
||||
|
||||
/* If this bit is not set, then \ inside a bracket expression is literal.
|
||||
If set, then such a \ quotes the following character. */
|
||||
#define RE_BACKSLASH_ESCAPE_IN_LISTS (1)
|
||||
|
||||
/* If this bit is not set, then + and ? are operators, and \+ and \? are
|
||||
literals.
|
||||
If set, then \+ and \? are operators and + and ? are literals. */
|
||||
#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
|
||||
|
||||
/* If this bit is set, then character classes are supported. They are:
|
||||
[:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:],
|
||||
[:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
|
||||
If not set, then character classes are not supported. */
|
||||
#define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
|
||||
|
||||
/* If this bit is set, then ^ and $ are always anchors (outside bracket
|
||||
expressions, of course).
|
||||
If this bit is not set, then it depends:
|
||||
^ is an anchor if it is at the beginning of a regular
|
||||
expression or after an open-group or an alternation operator;
|
||||
$ is an anchor if it is at the end of a regular expression, or
|
||||
before a close-group or an alternation operator.
|
||||
|
||||
This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
|
||||
POSIX draft 11.2 says that * etc. in leading positions is undefined.
|
||||
We already implemented a previous draft which made those constructs
|
||||
invalid, though, so we haven't changed the code back. */
|
||||
#define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
|
||||
|
||||
/* If this bit is set, then special characters are always special
|
||||
regardless of where they are in the pattern.
|
||||
If this bit is not set, then special characters are special only in
|
||||
some contexts; otherwise they are ordinary. Specifically,
|
||||
* + ? and intervals are only special when not after the beginning,
|
||||
open-group, or alternation operator. */
|
||||
#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
|
||||
|
||||
/* If this bit is set, then *, +, ?, and { cannot be first in an re or
|
||||
immediately after an alternation or begin-group operator. */
|
||||
#define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
|
||||
|
||||
/* If this bit is set, then . matches newline.
|
||||
If not set, then it doesn't. */
|
||||
#define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
|
||||
|
||||
/* If this bit is set, then . doesn't match NUL.
|
||||
If not set, then it does. */
|
||||
#define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
|
||||
|
||||
/* If this bit is set, nonmatching lists [^...] do not match newline.
|
||||
If not set, they do. */
|
||||
#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
|
||||
|
||||
/* If this bit is set, either \{...\} or {...} defines an
|
||||
interval, depending on RE_NO_BK_BRACES.
|
||||
If not set, \{, \}, {, and } are literals. */
|
||||
#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
|
||||
|
||||
/* If this bit is set, +, ? and | aren't recognized as operators.
|
||||
If not set, they are. */
|
||||
#define RE_LIMITED_OPS (RE_INTERVALS << 1)
|
||||
|
||||
/* If this bit is set, newline is an alternation operator.
|
||||
If not set, newline is literal. */
|
||||
#define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
|
||||
|
||||
/* If this bit is set, then `{...}' defines an interval, and \{ and \}
|
||||
are literals.
|
||||
If not set, then `\{...\}' defines an interval. */
|
||||
#define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
|
||||
|
||||
/* If this bit is set, (...) defines a group, and \( and \) are literals.
|
||||
If not set, \(...\) defines a group, and ( and ) are literals. */
|
||||
#define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
|
||||
|
||||
/* If this bit is set, then \<digit> matches <digit>.
|
||||
If not set, then \<digit> is a back-reference. */
|
||||
#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
|
||||
|
||||
/* If this bit is set, then | is an alternation operator, and \| is literal.
|
||||
If not set, then \| is an alternation operator, and | is literal. */
|
||||
#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
|
||||
|
||||
/* If this bit is set, then an ending range point collating higher
|
||||
than the starting range point, as in [z-a], is invalid.
|
||||
If not set, then when ending range point collates higher than the
|
||||
starting range point, the range is ignored. */
|
||||
#define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
|
||||
|
||||
/* If this bit is set, then an unmatched ) is ordinary.
|
||||
If not set, then an unmatched ) is invalid. */
|
||||
#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
|
||||
|
||||
/* This global variable defines the particular regexp syntax to use (for
|
||||
some interfaces). When a regexp is compiled, the syntax used is
|
||||
stored in the pattern buffer, so changing this does not affect
|
||||
already-compiled regexps. */
|
||||
extern reg_syntax_t re_syntax_options;
|
||||
|
||||
/* Define combinations of the above bits for the standard possibilities.
|
||||
(The [[[ comments delimit what gets put into the Texinfo file, so
|
||||
don't delete them!) */
|
||||
/* [[[begin syntaxes]]] */
|
||||
#define RE_SYNTAX_EMACS 0
|
||||
|
||||
#define RE_SYNTAX_AWK \
|
||||
(RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \
|
||||
| RE_NO_BK_PARENS | RE_NO_BK_REFS \
|
||||
| RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
|
||||
| RE_UNMATCHED_RIGHT_PAREN_ORD)
|
||||
|
||||
#define RE_SYNTAX_POSIX_AWK \
|
||||
(RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS)
|
||||
|
||||
#define RE_SYNTAX_GREP \
|
||||
(RE_BK_PLUS_QM | RE_CHAR_CLASSES \
|
||||
| RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \
|
||||
| RE_NEWLINE_ALT)
|
||||
|
||||
#define RE_SYNTAX_EGREP \
|
||||
(RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \
|
||||
| RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \
|
||||
| RE_NEWLINE_ALT | RE_NO_BK_PARENS \
|
||||
| RE_NO_BK_VBAR)
|
||||
|
||||
#define RE_SYNTAX_POSIX_EGREP \
|
||||
(RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES)
|
||||
|
||||
/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
|
||||
#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
|
||||
|
||||
#define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
|
||||
|
||||
/* Syntax bits common to both basic and extended POSIX regex syntax. */
|
||||
#define _RE_SYNTAX_POSIX_COMMON \
|
||||
(RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \
|
||||
| RE_INTERVALS | RE_NO_EMPTY_RANGES)
|
||||
|
||||
#define RE_SYNTAX_POSIX_BASIC \
|
||||
(_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM)
|
||||
|
||||
/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
|
||||
RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this
|
||||
isn't minimal, since other operators, such as \`, aren't disabled. */
|
||||
#define RE_SYNTAX_POSIX_MINIMAL_BASIC \
|
||||
(_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
|
||||
|
||||
#define RE_SYNTAX_POSIX_EXTENDED \
|
||||
(_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
|
||||
| RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \
|
||||
| RE_NO_BK_PARENS | RE_NO_BK_VBAR \
|
||||
| RE_UNMATCHED_RIGHT_PAREN_ORD)
|
||||
|
||||
/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS
|
||||
replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added. */
|
||||
#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \
|
||||
(_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
|
||||
| RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \
|
||||
| RE_NO_BK_PARENS | RE_NO_BK_REFS \
|
||||
| RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD)
|
||||
/* [[[end syntaxes]]] */
|
||||
|
||||
/* Maximum number of duplicates an interval can allow. Some systems
|
||||
(erroneously) define this in other header files, but we want our
|
||||
value, so remove any previous define. */
|
||||
#ifdef RE_DUP_MAX
|
||||
#undef RE_DUP_MAX
|
||||
#endif
|
||||
#define RE_DUP_MAX ((1 << 15) - 1)
|
||||
|
||||
|
||||
/* POSIX `cflags' bits (i.e., information for `regcomp'). */
|
||||
|
||||
/* If this bit is set, then use extended regular expression syntax.
|
||||
If not set, then use basic regular expression syntax. */
|
||||
#define REG_EXTENDED 1
|
||||
|
||||
/* If this bit is set, then ignore case when matching.
|
||||
If not set, then case is significant. */
|
||||
#define REG_ICASE (REG_EXTENDED << 1)
|
||||
|
||||
/* If this bit is set, then anchors do not match at newline
|
||||
characters in the string.
|
||||
If not set, then anchors do match at newlines. */
|
||||
#define REG_NEWLINE (REG_ICASE << 1)
|
||||
|
||||
/* If this bit is set, then report only success or fail in regexec.
|
||||
If not set, then returns differ between not matching and errors. */
|
||||
#define REG_NOSUB (REG_NEWLINE << 1)
|
||||
|
||||
|
||||
/* POSIX `eflags' bits (i.e., information for regexec). */
|
||||
|
||||
/* If this bit is set, then the beginning-of-line operator doesn't match
|
||||
the beginning of the string (presumably because it's not the
|
||||
beginning of a line).
|
||||
If not set, then the beginning-of-line operator does match the
|
||||
beginning of the string. */
|
||||
#define REG_NOTBOL 1
|
||||
|
||||
/* Like REG_NOTBOL, except for the end-of-line. */
|
||||
#define REG_NOTEOL (1 << 1)
|
||||
|
||||
|
||||
/* If any error codes are removed, changed, or added, update the
|
||||
`re_error_msg' table in regex.c. */
|
||||
typedef enum
|
||||
{
|
||||
REG_NOERROR = 0, /* Success. */
|
||||
REG_NOMATCH, /* Didn't find a match (for regexec). */
|
||||
|
||||
/* POSIX regcomp return error codes. (In the order listed in the
|
||||
standard.) */
|
||||
REG_BADPAT, /* Invalid pattern. */
|
||||
REG_ECOLLATE, /* Not implemented. */
|
||||
REG_ECTYPE, /* Invalid character class name. */
|
||||
REG_EESCAPE, /* Trailing backslash. */
|
||||
REG_ESUBREG, /* Invalid back reference. */
|
||||
REG_EBRACK, /* Unmatched left bracket. */
|
||||
REG_EPAREN, /* Parenthesis imbalance. */
|
||||
REG_EBRACE, /* Unmatched \{. */
|
||||
REG_BADBR, /* Invalid contents of \{\}. */
|
||||
REG_ERANGE, /* Invalid range end. */
|
||||
REG_ESPACE, /* Ran out of memory. */
|
||||
REG_BADRPT, /* No preceding re for repetition op. */
|
||||
|
||||
/* Error codes we've added. */
|
||||
REG_EEND, /* Premature end. */
|
||||
REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */
|
||||
REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */
|
||||
} reg_errcode_t;
|
||||
|
||||
/* This data structure represents a compiled pattern. Before calling
|
||||
the pattern compiler, the fields `buffer', `allocated', `fastmap',
|
||||
`translate', and `no_sub' can be set. After the pattern has been
|
||||
compiled, the `re_nsub' field is available. All other fields are
|
||||
private to the regex routines. */
|
||||
|
||||
struct re_pattern_buffer
|
||||
{
|
||||
/* [[[begin pattern_buffer]]] */
|
||||
/* Space that holds the compiled pattern. It is declared as
|
||||
`unsigned char *' because its elements are
|
||||
sometimes used as array indexes. */
|
||||
unsigned char *buffer;
|
||||
|
||||
/* Number of bytes to which `buffer' points. */
|
||||
unsigned long allocated;
|
||||
|
||||
/* Number of bytes actually used in `buffer'. */
|
||||
unsigned long used;
|
||||
|
||||
/* Syntax setting with which the pattern was compiled. */
|
||||
reg_syntax_t syntax;
|
||||
|
||||
/* Pointer to a fastmap, if any, otherwise zero. re_search uses
|
||||
the fastmap, if there is one, to skip over impossible
|
||||
starting points for matches. */
|
||||
char *fastmap;
|
||||
|
||||
/* Either a translate table to apply to all characters before
|
||||
comparing them, or zero for no translation. The translation
|
||||
is applied to a pattern when it is compiled and to a string
|
||||
when it is matched. */
|
||||
char *translate;
|
||||
|
||||
/* Number of subexpressions found by the compiler. */
|
||||
size_t re_nsub;
|
||||
|
||||
/* Zero if this pattern cannot match the empty string, one else.
|
||||
Well, in truth it's used only in `re_search_2', to see
|
||||
whether or not we should use the fastmap, so we don't set
|
||||
this absolutely perfectly; see `re_compile_fastmap' (the
|
||||
`duplicate' case). */
|
||||
unsigned can_be_null : 1;
|
||||
|
||||
/* If REGS_UNALLOCATED, allocate space in the `regs' structure
|
||||
for `max (RE_NREGS, re_nsub + 1)' groups.
|
||||
If REGS_REALLOCATE, reallocate space if necessary.
|
||||
If REGS_FIXED, use what's there. */
|
||||
#define REGS_UNALLOCATED 0
|
||||
#define REGS_REALLOCATE 1
|
||||
#define REGS_FIXED 2
|
||||
unsigned regs_allocated : 2;
|
||||
|
||||
/* Set to zero when `regex_compile' compiles a pattern; set to one
|
||||
by `re_compile_fastmap' if it updates the fastmap. */
|
||||
unsigned fastmap_accurate : 1;
|
||||
|
||||
/* If set, `re_match_2' does not return information about
|
||||
subexpressions. */
|
||||
unsigned no_sub : 1;
|
||||
|
||||
/* If set, a beginning-of-line anchor doesn't match at the
|
||||
beginning of the string. */
|
||||
unsigned not_bol : 1;
|
||||
|
||||
/* Similarly for an end-of-line anchor. */
|
||||
unsigned not_eol : 1;
|
||||
|
||||
/* If true, an anchor at a newline matches. */
|
||||
unsigned newline_anchor : 1;
|
||||
|
||||
/* [[[end pattern_buffer]]] */
|
||||
};
|
||||
|
||||
typedef struct re_pattern_buffer regex_t;
|
||||
|
||||
|
||||
/* search.c (search_buffer) in Emacs needs this one opcode value. It is
|
||||
defined both in `regex.c' and here. */
|
||||
#define RE_EXACTN_VALUE 1
|
||||
|
||||
/* Type for byte offsets within the string. POSIX mandates this. */
|
||||
typedef int regoff_t;
|
||||
|
||||
|
||||
/* This is the structure we store register match data in. See
|
||||
regex.texinfo for a full description of what registers match. */
|
||||
struct re_registers
|
||||
{
|
||||
unsigned num_regs;
|
||||
regoff_t *start;
|
||||
regoff_t *end;
|
||||
};
|
||||
|
||||
|
||||
/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
|
||||
`re_match_2' returns information about at least this many registers
|
||||
the first time a `regs' structure is passed. */
|
||||
#ifndef RE_NREGS
|
||||
#define RE_NREGS 30
|
||||
#endif
|
||||
|
||||
|
||||
/* POSIX specification for registers. Aside from the different names than
|
||||
`re_registers', POSIX uses an array of structures, instead of a
|
||||
structure of arrays. */
|
||||
typedef struct
|
||||
{
|
||||
regoff_t rm_so; /* Byte offset from string's start to substring's start. */
|
||||
regoff_t rm_eo; /* Byte offset from string's start to substring's end. */
|
||||
} regmatch_t;
|
||||
|
||||
/* Declarations for routines. */
|
||||
|
||||
/* To avoid duplicating every routine declaration -- once with a
|
||||
prototype (if we are ANSI), and once without (if we aren't) -- we
|
||||
use the following macro to declare argument types. This
|
||||
unfortunately clutters up the declarations a bit, but I think it's
|
||||
worth it. */
|
||||
|
||||
#if __STDC__
|
||||
|
||||
#define _RE_ARGS(args) args
|
||||
|
||||
#else /* not __STDC__ */
|
||||
|
||||
#define _RE_ARGS(args) ()
|
||||
|
||||
#endif /* not __STDC__ */
|
||||
|
||||
/* Sets the current default syntax to SYNTAX, and return the old syntax.
|
||||
You can also simply assign to the `re_syntax_options' variable. */
|
||||
extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax));
|
||||
|
||||
/* Compile the regular expression PATTERN, with length LENGTH
|
||||
and syntax given by the global `re_syntax_options', into the buffer
|
||||
BUFFER. Return NULL if successful, and an error string if not. */
|
||||
extern const char *re_compile_pattern
|
||||
_RE_ARGS ((const char *pattern, int length,
|
||||
struct re_pattern_buffer *buffer));
|
||||
|
||||
|
||||
/* Compile a fastmap for the compiled pattern in BUFFER; used to
|
||||
accelerate searches. Return 0 if successful and -2 if was an
|
||||
internal error. */
|
||||
extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer));
|
||||
|
||||
|
||||
/* Search in the string STRING (with length LENGTH) for the pattern
|
||||
compiled into BUFFER. Start searching at position START, for RANGE
|
||||
characters. Return the starting position of the match, -1 for no
|
||||
match, or -2 for an internal error. Also return register
|
||||
information in REGS (if REGS and BUFFER->no_sub are nonzero). */
|
||||
extern int re_search
|
||||
_RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
|
||||
int length, int start, int range, struct re_registers *regs));
|
||||
|
||||
|
||||
/* Like `re_search', but search in the concatenation of STRING1 and
|
||||
STRING2. Also, stop searching at index START + STOP. */
|
||||
extern int re_search_2
|
||||
_RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
|
||||
int length1, const char *string2, int length2,
|
||||
int start, int range, struct re_registers *regs, int stop));
|
||||
|
||||
|
||||
/* Like `re_search', but return how many characters in STRING the regexp
|
||||
in BUFFER matched, starting at position START. */
|
||||
extern int re_match
|
||||
_RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
|
||||
int length, int start, struct re_registers *regs));
|
||||
|
||||
|
||||
/* Relates to `re_match' as `re_search_2' relates to `re_search'. */
|
||||
extern int re_match_2
|
||||
_RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
|
||||
int length1, const char *string2, int length2,
|
||||
int start, struct re_registers *regs, int stop));
|
||||
|
||||
|
||||
/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
|
||||
ENDS. Subsequent matches using BUFFER and REGS will use this memory
|
||||
for recording register information. STARTS and ENDS must be
|
||||
allocated with malloc, and must each be at least `NUM_REGS * sizeof
|
||||
(regoff_t)' bytes long.
|
||||
|
||||
If NUM_REGS == 0, then subsequent matches should allocate their own
|
||||
register data.
|
||||
|
||||
Unless this function is called, the first search or match using
|
||||
PATTERN_BUFFER will allocate its own register data, without
|
||||
freeing the old data. */
|
||||
extern void re_set_registers
|
||||
_RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs,
|
||||
unsigned num_regs, regoff_t *starts, regoff_t *ends));
|
||||
|
||||
/* 4.2 bsd compatibility. */
|
||||
extern char *re_comp _RE_ARGS ((const char *));
|
||||
extern int re_exec _RE_ARGS ((const char *));
|
||||
|
||||
/* POSIX compatibility. */
|
||||
extern int regcomp _RE_ARGS ((regex_t *preg, const char *pattern, int cflags));
|
||||
extern int regexec
|
||||
_RE_ARGS ((const regex_t *preg, const char *string, size_t nmatch,
|
||||
regmatch_t pmatch[], int eflags));
|
||||
extern size_t regerror
|
||||
_RE_ARGS ((int errcode, const regex_t *preg, char *errbuf,
|
||||
size_t errbuf_size));
|
||||
extern void regfree _RE_ARGS ((regex_t *preg));
|
||||
|
||||
#endif /* not __REGEXP_LIBRARY_H__ */
|
||||
|
||||
/*
|
||||
Local variables:
|
||||
make-backup-files: t
|
||||
version-control: t
|
||||
trim-versions-without-asking: nil
|
||||
End:
|
||||
*/
|
||||
Binary file not shown.
@@ -1,61 +0,0 @@
|
||||
/************************************************************************
|
||||
* Unreal Internet Relay Chat Daemon, include/auth.h
|
||||
* Copyright (C) 2001 Carsten V. Munk (stskeeps@tspre.org)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
char *data;
|
||||
short type;
|
||||
} anAuthStruct;
|
||||
|
||||
#define AUTHTYPE_PLAINTEXT 0
|
||||
#define AUTHTYPE_UNIXCRYPT 1
|
||||
#define AUTHTYPE_MD5 2
|
||||
#define AUTHTYPE_SHA1 3
|
||||
#define AUTHTYPE_SSL_CLIENTCERT 4
|
||||
#define AUTHTYPE_RIPEMD160 5
|
||||
|
||||
#ifdef USE_SSL
|
||||
#define AUTHENABLE_MD5
|
||||
#define AUTHENABLE_SHA1
|
||||
#define AUTHENABLE_SSL_CLIENTCERT
|
||||
#define AUTHENABLE_RIPEMD160
|
||||
/* OpenSSL provides a crypt() */
|
||||
#ifndef AUTHENABLE_UNIXCRYPT
|
||||
#define AUTHENABLE_UNIXCRYPT
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x0090700fL
|
||||
#ifndef HAVE_CRYPT
|
||||
#define crypt DES_crypt
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifndef AUTHENABLE_MD5
|
||||
#define AUTHENABLE_MD5
|
||||
#endif
|
||||
#ifndef AUTHENABLE_SHA1
|
||||
#define AUTHENABLE_SHA1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
+6
-6
@@ -4,17 +4,17 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include "tre/regex.h"
|
||||
#else
|
||||
#include "win32/regex.h"
|
||||
#endif
|
||||
#include <regex.h>
|
||||
|
||||
#define MAX_MATCH 1
|
||||
#define MAX_WORDLEN 64
|
||||
#define MAX_WORDS 30
|
||||
|
||||
#define PATTERN "\\w*%s\\w*"
|
||||
#define REPLACEWORD "<censored>"
|
||||
|
||||
char *stripbadwords(char *, int);
|
||||
int loadbadwords(char *, int);
|
||||
void freebadwords(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/************************************************************************
|
||||
* Unreal Internet Relay Chat Daemon, ircd/channel.h
|
||||
* Copyright (C) 1990 Jarkko Oikarinen
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __channel_include__
|
||||
#define __channel_include__
|
||||
#define CREATE 1 /* whether a channel should be
|
||||
created or just tested for existance */
|
||||
|
||||
#define MODEBUFLEN 200
|
||||
|
||||
#define NullChn ((aChannel *)0)
|
||||
|
||||
#define ChannelExists(n) (find_channel(n, NullChn) != NullChn)
|
||||
|
||||
#define IsULine(sptr) (sptr->flags & FLAGS_ULINE)
|
||||
|
||||
/* NOTE: Timestamps will be added to MODE-commands, so never make
|
||||
* RESYNCMODES and MODEPARAMS higher than MAXPARA-3. DALnet servers
|
||||
* before Dreamforge aren't safe with more than six. -Donwulff
|
||||
*/
|
||||
#include "msg.h"
|
||||
#define MAXMODEPARAMS (MAXPARA-3) /* Maximum modes processed */
|
||||
#define RESYNCMODES 12 /* Max modes per MODE in resync */
|
||||
#define MODEPARAMS 6 /* Max modes from user */
|
||||
|
||||
#endif
|
||||
@@ -1,63 +0,0 @@
|
||||
/************************************************************************
|
||||
* Unreal Internet Relay Chat Daemon, include/class.h
|
||||
* Copyright (C) 1990 Darren Reed
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __class_include__
|
||||
#define __class_include__
|
||||
|
||||
typedef struct Class {
|
||||
int class;
|
||||
int conFreq;
|
||||
int pingFreq;
|
||||
int maxLinks;
|
||||
long maxSendq;
|
||||
int links;
|
||||
struct Class *next;
|
||||
} aClass;
|
||||
|
||||
#define Class(x) ((x)->class)
|
||||
#define ConFreq(x) ((x)->conFreq)
|
||||
#define PingFreq(x) ((x)->pingFreq)
|
||||
#define MaxLinks(x) ((x)->maxLinks)
|
||||
#define MaxSendq(x) ((x)->maxSendq)
|
||||
#define Links(x) ((x)->links)
|
||||
|
||||
#define ConfLinks(x) (Class(x)->links)
|
||||
#define ConfMaxLinks(x) (Class(x)->maxLinks)
|
||||
#define ConfClass(x) (Class(x)->class)
|
||||
#define ConfConFreq(x) (Class(x)->conFreq)
|
||||
#define ConfPingFreq(x) (Class(x)->pingFreq)
|
||||
#define ConfSendq(x) (Class(x)->maxSendq)
|
||||
|
||||
#define FirstClass() classes
|
||||
#define NextClass(x) ((x)->next)
|
||||
|
||||
extern aClass *classes;
|
||||
|
||||
extern aClass *find_class(int);
|
||||
extern int get_conf_class(aConfItem *);
|
||||
extern int get_client_class(aClient *);
|
||||
extern int get_client_ping(aClient *);
|
||||
extern int get_con_freq(aClass *);
|
||||
extern void add_class(int, int, int, int, long);
|
||||
extern void check_class(void);
|
||||
extern void initclass(void);
|
||||
|
||||
#endif /* __class_include__ */
|
||||
@@ -1,366 +0,0 @@
|
||||
/************************************************************************
|
||||
* Unreal Internet Relay Chat Daemon, include/common.h
|
||||
* Copyright (C) 1990 Armin Gruner
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __common_include__
|
||||
#define __common_include__
|
||||
|
||||
#include <time.h>
|
||||
#ifdef _WIN32
|
||||
#include <malloc.h>
|
||||
#ifdef INET6
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#ifndef INET6
|
||||
#include <winsock.h>
|
||||
#endif
|
||||
#include <process.h>
|
||||
#include <io.h>
|
||||
#endif
|
||||
//#include "dynconf.h"
|
||||
#include "config.h"
|
||||
#ifdef PARAMH
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#if !defined(IN_ADDR)
|
||||
#include "sys.h"
|
||||
#endif
|
||||
|
||||
#include "ircsprintf.h"
|
||||
|
||||
|
||||
#ifdef DEVELOP_CVS
|
||||
#define ID_Copyright(x) static char id_copyright[] = x
|
||||
#define ID_Notes(x) static char id_notes[] = x
|
||||
#else
|
||||
#define ID_Copyright(x)
|
||||
#define ID_Notes(x)
|
||||
#endif
|
||||
|
||||
#define BMAGIC 0x4675636B596F754661736369737473
|
||||
|
||||
#define BASE_VERSION "Unreal"
|
||||
#ifndef _WIN32
|
||||
#define FDwrite(x,y,z) write(x, y, z)
|
||||
#else
|
||||
#define FDwrite(x,y,z) send(x, y, z, 0)
|
||||
#endif
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
#ifdef TRUE
|
||||
#undef TRUE
|
||||
#endif
|
||||
|
||||
#ifdef FALSE
|
||||
#undef FALSE
|
||||
#endif
|
||||
|
||||
#define FALSE (0)
|
||||
#define TRUE (!FALSE)
|
||||
|
||||
#ifndef UNSURE
|
||||
#define UNSURE (2)
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#ifndef MALLOCH
|
||||
char *malloc(), *calloc();
|
||||
void free();
|
||||
#else
|
||||
#include MALLOCH
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define TS time_t
|
||||
|
||||
|
||||
extern int match(char *, char *);
|
||||
#define mycmp(a,b) \
|
||||
( (toupper(a[0])!=toupper(b[0])) || smycmp((a)+1,(b)+1) )
|
||||
extern int smycmp(char *, char *);
|
||||
#ifndef GLIBC2_x
|
||||
extern int myncmp(char *, char *, int);
|
||||
#endif
|
||||
|
||||
#ifdef NEED_STRTOK
|
||||
extern char *strtok2(char *, char *);
|
||||
#endif
|
||||
#ifdef NEED_STRTOKEN
|
||||
extern char *strtoken(char **, char *, char *);
|
||||
#endif
|
||||
#ifdef NEED_INET_ADDR
|
||||
extern unsigned long inet_addr(char *);
|
||||
#endif
|
||||
|
||||
#if defined(NEED_INET_NTOA) || defined(NEED_INET_NETOF) && !defined(_WIN32)
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef NEED_INET_NTOA
|
||||
extern char *inet_ntoa(struct IN_ADDR);
|
||||
#endif
|
||||
|
||||
#ifdef NEED_INET_NETOF
|
||||
extern int inet_netof(struct IN_ADDR);
|
||||
#endif
|
||||
|
||||
int global_count, max_global_count;
|
||||
extern char *myctime(time_t);
|
||||
extern char *strtoken(char **, char *, char *);
|
||||
|
||||
#define PRECISE_CHECK
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#endif
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#define DupString(x,y) do{int l=strlen(y);x=MyMalloc(l+1);(void)memcpy(x,y, l+1);}while(0)
|
||||
|
||||
extern u_char tolowertab[], touppertab[];
|
||||
|
||||
#if defined(CHINESE_NICK) || defined(JAPANESE_NICK)
|
||||
#define USE_LOCALE
|
||||
#endif
|
||||
|
||||
#ifndef USE_LOCALE
|
||||
#undef tolower
|
||||
#define tolower(c) (tolowertab[(u_char)(c)])
|
||||
|
||||
#undef toupper
|
||||
#define toupper(c) (touppertab[(u_char)(c)])
|
||||
|
||||
#undef isalpha
|
||||
#undef isdigit
|
||||
#undef isxdigit
|
||||
#undef isalnum
|
||||
#undef isprint
|
||||
#undef isascii
|
||||
#undef isgraph
|
||||
#undef ispunct
|
||||
#undef islower
|
||||
#undef isupper
|
||||
#undef isspace
|
||||
#undef iscntrl
|
||||
#endif
|
||||
extern unsigned char char_atribs[];
|
||||
|
||||
#define PRINT 1
|
||||
#define CNTRL 2
|
||||
#define ALPHA 4
|
||||
#define PUNCT 8
|
||||
#define DIGIT 16
|
||||
#define SPACE 32
|
||||
#define ALLOW 64
|
||||
|
||||
#ifndef KLINE_TEMP
|
||||
#define KLINE_PERM 0
|
||||
#define KLINE_TEMP 1
|
||||
#define KLINE_AKILL 2
|
||||
#define KLINE_EXCEPT 3
|
||||
#endif
|
||||
|
||||
#define isallowed(c) (char_atribs[(u_char)(c)]&ALLOW)
|
||||
#ifndef USE_LOCALE
|
||||
#define iscntrl(c) (char_atribs[(u_char)(c)]&CNTRL)
|
||||
#define isalpha(c) (char_atribs[(u_char)(c)]&ALPHA)
|
||||
#define isspace(c) (char_atribs[(u_char)(c)]&SPACE)
|
||||
#define islower(c) ((char_atribs[(u_char)(c)]&ALPHA) && ((u_char)(c) > 0x5f))
|
||||
#define isupper(c) ((char_atribs[(u_char)(c)]&ALPHA) && ((u_char)(c) < 0x60))
|
||||
#define isdigit(c) (char_atribs[(u_char)(c)]&DIGIT)
|
||||
#define isxdigit(c) (isdigit(c) || ('a' <= (c) && (c) <= 'f') || \
|
||||
('A' <= (c) && (c) <= 'F'))
|
||||
#define isalnum(c) (char_atribs[(u_char)(c)]&(DIGIT|ALPHA))
|
||||
#define isprint(c) (char_atribs[(u_char)(c)]&PRINT)
|
||||
#define isascii(c) ((u_char)(c) >= 0 && (u_char)(c) <= 0x7f)
|
||||
#define isgraph(c) ((char_atribs[(u_char)(c)]&PRINT) && ((u_char)(c) != 0x32))
|
||||
#define ispunct(c) (!(char_atribs[(u_char)(c)]&(CNTRL|ALPHA|DIGIT)))
|
||||
#endif
|
||||
|
||||
#ifndef MALLOCD
|
||||
#define MyFree free
|
||||
#define MyMalloc malloc
|
||||
#define MyRealloc realloc
|
||||
#else
|
||||
#define MyFree(x) do {debug(DEBUG_MALLOC, "%s:%i: free %02x", __FILE__, __LINE__, x); free(x); } while(0)
|
||||
#define MyMalloc(x) StsMalloc(x, __FILE__, __LINE__)
|
||||
#define MyRealloc realloc
|
||||
static char *StsMalloc(size_t size, char *file, long line)
|
||||
{
|
||||
void *x;
|
||||
|
||||
x = malloc(size);
|
||||
debug(DEBUG_MALLOC, "%s:%i: malloc %02x", file, line, x);
|
||||
return x;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
extern struct SLink *find_user_link( /* struct SLink *, struct Client * */ );
|
||||
|
||||
/*
|
||||
* Protocol support text. DO NO CHANGE THIS unless you know what
|
||||
* you are doing.
|
||||
*/
|
||||
|
||||
/* IRCu/Hybrid/Unreal way now :) -Stskeeps */
|
||||
|
||||
#ifdef EXTCMODE
|
||||
#define EXPAR1 extchmstr[0]
|
||||
#define EXPAR2 extchmstr[1]
|
||||
#define EXPAR3 extchmstr[2]
|
||||
#define EXPAR4 extchmstr[3]
|
||||
#else
|
||||
#define EXPAR1 ""
|
||||
#define EXPAR2 ""
|
||||
#define EXPAR3 ""
|
||||
#define EXPAR4 ""
|
||||
#endif /* EXTCMODE */
|
||||
|
||||
#define PROTOCTL_CLIENT_1 \
|
||||
"MAP" \
|
||||
" KNOCK" \
|
||||
" SAFELIST" \
|
||||
" HCN" \
|
||||
" MAXCHANNELS=%i" \
|
||||
" MAXBANS=%i" \
|
||||
" NICKLEN=%i" \
|
||||
" TOPICLEN=%i" \
|
||||
" KICKLEN=%i" \
|
||||
" MAXTARGETS=%i" \
|
||||
" AWAYLEN=%i" \
|
||||
" :are supported by this server"
|
||||
#define PROTOCTL_PARAMETERS_1 \
|
||||
MAXCHANNELSPERUSER, \
|
||||
MAXBANS, \
|
||||
NICKLEN, \
|
||||
TOPICLEN, \
|
||||
TOPICLEN, \
|
||||
MAXTARGETS, \
|
||||
TOPICLEN
|
||||
|
||||
#ifdef PREFIX_AQ
|
||||
#define CHPFIX "(qaohv)~&@%+"
|
||||
#define CHPAR1 "be"
|
||||
#else
|
||||
#define CHPFIX "(ohv)@%+"
|
||||
#define CHPAR1 "beqa"
|
||||
#endif /* PREFIX_AQ */
|
||||
|
||||
#define CHPAR2 "kfL"
|
||||
#define CHPAR3 "l"
|
||||
#define CHPAR4 "psmntirRcOAQKVGCuzNSM"
|
||||
|
||||
#define PROTOCTL_CLIENT_2 \
|
||||
"WALLCHOPS" \
|
||||
" WATCH=%i" \
|
||||
" SILENCE=%i" \
|
||||
" MODES=%i" \
|
||||
" CHANTYPES=%s" \
|
||||
" PREFIX=%s" \
|
||||
" CHANMODES=%s%s,%s%s,%s%s,%s%s" \
|
||||
" NETWORK=%s" \
|
||||
" CASEMAPPING=%s" \
|
||||
" EXTBAN=~,%s" \
|
||||
" :are supported by this server"
|
||||
|
||||
#define PROTOCTL_PARAMETERS_2 \
|
||||
MAXWATCH, \
|
||||
SILENCE_LIMIT, \
|
||||
MAXMODEPARAMS, \
|
||||
"#", \
|
||||
CHPFIX, \
|
||||
CHPAR1, EXPAR1, \
|
||||
CHPAR2, EXPAR2, \
|
||||
CHPAR3, EXPAR3, \
|
||||
"psmntirRcOAQKVGCuzNSM", EXPAR4, \
|
||||
ircnet005, \
|
||||
"ascii", \
|
||||
extbanstr
|
||||
|
||||
/* Server-Server PROTOCTL -Stskeeps
|
||||
* Please check send_proto() for more. -- Syzop
|
||||
*/
|
||||
#define PROTOCTL_SERVER "NOQUIT" \
|
||||
" TOKEN" \
|
||||
" NICKv2" \
|
||||
" SJOIN" \
|
||||
" SJOIN2" \
|
||||
" UMODE2" \
|
||||
" VL" \
|
||||
" SJ3" \
|
||||
" NS" \
|
||||
" SJB64" \
|
||||
" TKLEXT"
|
||||
|
||||
#ifdef _WIN32
|
||||
/*
|
||||
* Used to display a string to the GUI interface.
|
||||
* Windows' internal strerror() function doesn't work with socket errors.
|
||||
*/
|
||||
extern int DisplayString(HWND hWnd, char *InBuf, ...);
|
||||
#undef strerror
|
||||
#else
|
||||
typedef int SOCKET;
|
||||
#define INVALID_SOCKET -1
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__APPLE__)
|
||||
extern char *malloc_options;
|
||||
#endif
|
||||
|
||||
extern int lu_noninv, lu_inv, lu_serv, lu_oper,
|
||||
lu_unknown, lu_channel, lu_lu, lu_lulocal, lu_lserv,
|
||||
lu_clu, lu_mlu, lu_cglobalu, lu_mglobalu;
|
||||
|
||||
TS now;
|
||||
|
||||
#if defined(__STDC__)
|
||||
#define __const const
|
||||
#define __signed signed
|
||||
#define __volatile volatile
|
||||
#ifndef __GNUC__
|
||||
#define __inline
|
||||
#endif
|
||||
|
||||
#else
|
||||
#ifndef __GNUC__
|
||||
#define __const
|
||||
#define __inline
|
||||
#define __signed
|
||||
#define __volatile
|
||||
#ifndef NO_ANSI_KEYWORDS
|
||||
#define const /* delete ANSI C keywords */
|
||||
#define inline
|
||||
#define signed
|
||||
#define volatile
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define READBUF_SIZE 8192
|
||||
|
||||
#endif /* __common_include__ */
|
||||
@@ -1,653 +0,0 @@
|
||||
/*
|
||||
* Unreal Internet Relay Chat Daemon, include/config.h
|
||||
* Copyright (C) 1990 Jarkko Oikarinen
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __config_include__
|
||||
#define __config_include__
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
/*
|
||||
*
|
||||
* NOTICE
|
||||
*
|
||||
* Under normal conditions, you should not have to edit this file. Run
|
||||
* the Config script in the root directory instead!
|
||||
*
|
||||
* Windows is not a normal condition, edit this file if you use it. :-)
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Define this if you're testing/debugging/programming.
|
||||
#undef DEBUG
|
||||
*/
|
||||
|
||||
/* Type of host. These should be made redundant somehow. -avalon */
|
||||
|
||||
/* BSD Nothing Needed 4.{2,3} BSD, SunOS 3.x, 4.x */
|
||||
/* HPUX Nothing needed (A.08/A.09) */
|
||||
/* ULTRIX Nothing needed (4.2) */
|
||||
/* OSF Nothing needed (1.2) */
|
||||
/* #undef AIX IBM ugly so-called Unix, AIX */
|
||||
/* #undef MIPS MIPS Unix */
|
||||
/* SGI Nothing needed (IRIX 4.0.4) */
|
||||
/* #undef SVR3 SVR3 stuff - being worked on where poss. */
|
||||
/* #undef DYNIXPTX Sequents Brain-dead Posix implement. */
|
||||
/* #undef SOL20 Solaris2 */
|
||||
/* #undef ESIX ESIX */
|
||||
/* #undef NEXT NeXTStep */
|
||||
/* #undef SVR4 */
|
||||
|
||||
/* Additional flags to give FreeBSD's malloc, only play with this if you
|
||||
* know what you're doing.
|
||||
*/
|
||||
|
||||
#define MALLOC_FLAGS_EXTRA ""
|
||||
|
||||
/*
|
||||
dog3/comstud ircd fdlists
|
||||
undef this to make them work
|
||||
*/
|
||||
|
||||
#undef NO_FDLIST
|
||||
|
||||
/*
|
||||
* Defining this will allow all ircops to see people in +s channels
|
||||
* By default, only net/tech admins can see this
|
||||
*/
|
||||
#define SHOW_SECRET
|
||||
|
||||
/*
|
||||
* This allows you to see modes in /list
|
||||
*/
|
||||
#define LIST_SHOW_MODES
|
||||
|
||||
/*
|
||||
* Admin's chat...
|
||||
*/
|
||||
#define ADMINCHAT 1
|
||||
|
||||
/*
|
||||
* If channel mode is +z, only send to secure links & people
|
||||
*
|
||||
*/
|
||||
#undef SECURECHANMSGSONLYGOTOSECURE
|
||||
|
||||
/*
|
||||
* be compatible with older cloak keys? If you link to servers beta4 and
|
||||
* earlier without this the cloak keys will produce diff results
|
||||
* Not recommended, however, as beta4 and earlier 3.2 has an insecure
|
||||
* cloak algo -griever
|
||||
*/
|
||||
#undef COMPAT_BETA4_KEYS
|
||||
|
||||
/*
|
||||
If you want SHUN_NOTICES, define this
|
||||
*/
|
||||
#undef SHUN_NOTICES
|
||||
|
||||
/*
|
||||
If you want to support chinese and/or japanese nicks
|
||||
*/
|
||||
#undef CHINESE_NICK
|
||||
#undef JAPANESE_NICK
|
||||
|
||||
/*
|
||||
Remote rehash
|
||||
*/
|
||||
#define REMOTE_REHASH
|
||||
|
||||
/*
|
||||
Stripbadwords patch
|
||||
*/
|
||||
#define STRIPBADWORDS
|
||||
|
||||
/*
|
||||
* Always strip badwords in channels? (channel does not have to be +G)
|
||||
*/
|
||||
#undef STRIPBADWORDS_CHAN_ALWAYS
|
||||
|
||||
/*
|
||||
* NO_OPEROVERRIDE
|
||||
* This will disable OperMode, OperTopic and Banwalks
|
||||
*/
|
||||
#undef NO_OPEROVERRIDE
|
||||
|
||||
/*
|
||||
* OPEROVERRIDE_VERIFY
|
||||
* This will prompt opers before permitting them to join +p/+s
|
||||
* channels, decreasing the chances of someone "accidentally"
|
||||
* entering a random channel.
|
||||
*/
|
||||
#undef OPEROVERRIDE_VERIFY
|
||||
|
||||
/*
|
||||
* THROTTLING
|
||||
* This will only allow 1 connection per ip in set::throttle::period time
|
||||
*/
|
||||
#define THROTTLING
|
||||
|
||||
/*
|
||||
* NAZIISH_CHBAN_HANDLING (formerly ANNOYING_BAN_THING)
|
||||
* Reject bans that are matched by existing bans, causes chanserv
|
||||
* To flood-kick an akicked user if their akick is matched by another
|
||||
* Ban, but if you don't mind, this can free up ban list space I guess
|
||||
*/
|
||||
#undef NAZIISH_CHBAN_HANDLING
|
||||
|
||||
/*
|
||||
* Disable /sethost, /setident, /chgname, /chghost, /chgident
|
||||
*/
|
||||
#undef DISABLE_USERMOD
|
||||
|
||||
/*
|
||||
* No spoof code
|
||||
*
|
||||
* This enables the spoof protection.
|
||||
*/
|
||||
/* #define NOSPOOF 1 */
|
||||
|
||||
|
||||
/*
|
||||
* Enables locops to override the RFC1459 flood control too
|
||||
*/
|
||||
#undef NO_FAKE_LAG_FOR_LOCOPS
|
||||
|
||||
/*
|
||||
* HOSTILENAME - Define this if you want the hostile username patch included,
|
||||
* it will strip characters that are not 0-9,a-z,A-Z,_,- or .
|
||||
*/
|
||||
#define HOSTILENAME /* [DO NOT CHANGE!] */
|
||||
|
||||
/*
|
||||
* This makes topics include nick!user@host instead of nick in topic whoset,
|
||||
* ALL servers must be Unreal3.2-beta12 or higher, and services may have some
|
||||
* problems with this
|
||||
*/
|
||||
#undef TOPIC_NICK_IS_NUHOST
|
||||
|
||||
/*
|
||||
* Use JOIN instead of SJOIN on every remotely sent JOIN
|
||||
*/
|
||||
#undef JOIN_INSTEAD_OF_SJOIN_ON_REMOTEJOIN
|
||||
|
||||
/*
|
||||
** Freelinks garbage collector -Stskeeps
|
||||
**
|
||||
** GARBAGE_COLLECT_EVERY - how many seconds between every garbage collect
|
||||
** HOW_MANY_FREELINKS_ALLOWED - how many freelinks allowed
|
||||
*/
|
||||
#ifndef GARBAGE_COLLECT_EVERY
|
||||
#define GARBAGE_COLLECT_EVERY 600 /* default: 600 (10 mins) */
|
||||
#endif
|
||||
|
||||
#define HOW_MANY_FREELINKS_ALLOWED 200 /* default: 200 */
|
||||
|
||||
/*
|
||||
* MAXUNKNOWNCONNECTIONSPERIP
|
||||
*/
|
||||
#define MAXUNKNOWNCONNECTIONSPERIP 3
|
||||
|
||||
|
||||
/* Do these work? I dunno... */
|
||||
|
||||
/* #undef VMS Should work for IRC client, not server */
|
||||
/* #undef MAIL50 If you're running VMS 5.0 */
|
||||
/* #undef PCS PCS Cadmus MUNIX, use with BSD flag! */
|
||||
|
||||
/*
|
||||
* NOTE: On some systems, valloc() causes many problems.
|
||||
*/
|
||||
#undef VALLOC /* Define this if you have valloc(3) */
|
||||
|
||||
/*
|
||||
* read/write are restarted after signals defining this 1, gets
|
||||
* siginterrupt call compiled, which attempts to remove this
|
||||
* behaviour (apollo sr10.1/bsd4.3 needs this)
|
||||
*/
|
||||
#ifdef APOLLO
|
||||
#define RESTARTING_SYSTEMCALLS
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If your host supports varargs and has vsprintf(), vprintf() and vscanf()
|
||||
* C calls in its library, then you can define USE_VARARGS to use varargs
|
||||
* instead of imitation variable arg passing.
|
||||
*/
|
||||
#define USE_VARARGS
|
||||
|
||||
/* NOTE: with current server code, varargs doesn't survive because it can't
|
||||
* be used in a chain of 3 or more funtions which all have a variable
|
||||
* number of params. If anyone has a solution to this, please notify
|
||||
* the maintainer.
|
||||
*/
|
||||
|
||||
/* #undef DEBUGMODE define DEBUGMODE to enable debugging mode.*/
|
||||
|
||||
/*
|
||||
* Full pathnames and defaults of irc system's support files. Please note that
|
||||
* these are only the recommened names and paths. Change as needed.
|
||||
* You must define these to something, even if you don't really want them.
|
||||
*/
|
||||
#define CPATH "unrealircd.conf" /* server configuration file */
|
||||
#define MPATH "ircd.motd" /* server MOTD file */
|
||||
#define SMPATH "ircd.smotd" /* short MOTD file */
|
||||
#define RPATH "ircd.rules" /* server rules file */
|
||||
#define OPATH "oper.motd" /* Operators MOTD file */
|
||||
#define LPATH "debug.log" /* Where the debug file lives, if DEBUGMODE */
|
||||
#define PPATH "ircd.pid" /* file for server pid */
|
||||
#define lPATH "ircd.log" /* server log file */
|
||||
#define VPATH "ircd.svsmotd" /* Services MOTD append. */
|
||||
#define BPATH "bot.motd" /* Bot MOTD */
|
||||
#define IRCDTUNE "ircd.tune" /* tuning .. */
|
||||
|
||||
/* CHROOTDIR
|
||||
*
|
||||
* Define for value added security if you are a rooter.
|
||||
*
|
||||
* 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)
|
||||
*
|
||||
* You may want to define IRC_UID and IRC_GID
|
||||
*/
|
||||
/* #define CHROOTDIR */
|
||||
|
||||
/* SHOW_INVISIBLE_LUSERS
|
||||
*
|
||||
* As defined this will show the correct invisible count for anyone who does
|
||||
* LUSERS on your server. On a large net this doesnt mean much, but on a
|
||||
* small net it might be an advantage to undefine it.
|
||||
* (This will get defined for you if you're using userload (stats w). -mlv)
|
||||
*/
|
||||
#define SHOW_INVISIBLE_LUSERS
|
||||
|
||||
/*
|
||||
* NOTE: defining CMDLINE_CONFIG and installing ircd SUID or SGID is a MAJOR
|
||||
* security problem - they can use the "-f" option to read any files
|
||||
* that the 'new' access lets them. Note also that defining this is
|
||||
* a major security hole if your ircd goes down and some other user
|
||||
* starts up the server with a new conf file that has some extra
|
||||
* O-lines. So don't use this unless you're debugging.
|
||||
*/
|
||||
#undef CMDLINE_CONFIG /* allow conf-file to be specified on command line */
|
||||
|
||||
/*
|
||||
* Size of the LISTEN request. Some machines handle this large
|
||||
* without problem, but not all. It defaults to 5, but can be
|
||||
* raised if you know your machine handles it.
|
||||
*/
|
||||
#ifndef LISTEN_SIZE
|
||||
#define LISTEN_SIZE 5
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Max amount of internal send buffering when socket is stuck (bytes)
|
||||
*/
|
||||
#ifndef MAXSENDQLENGTH
|
||||
#define MAXSENDQLENGTH 3000000
|
||||
#endif
|
||||
/*
|
||||
* BUFFERPOOL is the maximum size of the total of all sendq's.
|
||||
* Recommended value is 2 * MAXSENDQLENGTH, for hubs, 5 *.
|
||||
*/
|
||||
#ifndef BUFFERPOOL
|
||||
#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
|
||||
*
|
||||
* this controls the number of bytes the server will allow a client to
|
||||
* send to the server without processing before disconnecting the client for
|
||||
* flooding it. Values greater than 8000 make no difference to the server.
|
||||
* NOTE: you can now also set this in class::recvq, if that's not present,
|
||||
* this default value will be used.
|
||||
*/
|
||||
#define CLIENT_FLOOD 8000
|
||||
|
||||
/* Anti-Flood options
|
||||
* NO_FLOOD_AWAY - enables limiting of how frequently a client can set /away
|
||||
*/
|
||||
|
||||
#define NO_FLOOD_AWAY
|
||||
|
||||
/*
|
||||
* 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
|
||||
* inviting them?
|
||||
*/
|
||||
|
||||
#define MAXTARGETS 20
|
||||
#define TARGET_DELAY 15
|
||||
|
||||
/* STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP */
|
||||
|
||||
/* You shouldn't change anything below this line, unless absolutely needed. */
|
||||
|
||||
/*
|
||||
* Port where ircd resides. NOTE: This *MUST* be greater than 1024 if you
|
||||
* plan to run ircd under any other uid than root.
|
||||
*/
|
||||
#define PORTNUM 6667 /* 6667 is default */
|
||||
|
||||
/*
|
||||
* Maximum number of network connections your server will allow. This should
|
||||
* never exceed max. number of open file descrpitors and wont increase this.
|
||||
* Should remain LOW as possible. Most sites will usually have under 30 or so
|
||||
* connections. A busy hub or server may need this to be as high as 50 or 60.
|
||||
* Making it over 100 decreases any performance boost gained from it being low.
|
||||
* if you have a lot of server connections, it may be worth splitting the load
|
||||
* over 2 or more servers.
|
||||
* 1 server = 1 connection, 1 user = 1 connection.
|
||||
* This should be at *least* 3: 1 listen port, 1 dns port + 1 client
|
||||
*
|
||||
* Note: this figure will be too high for most systems. If you get an
|
||||
* fd-related error on compile, change this to 256.
|
||||
*
|
||||
* Windows users: This should be a fairly high number. Some operations
|
||||
* will slow down because of this, but it is _required_ because of the way
|
||||
* windows NT(and possibly 95) allocate fd handles. A good number is 16384.
|
||||
*/
|
||||
#ifndef MAXCONNECTIONS
|
||||
#define MAXCONNECTIONS 1024
|
||||
#endif
|
||||
|
||||
/*
|
||||
* this defines the length of the nickname history. each time a user changes
|
||||
* nickname or signs off, their old nickname is added to the top of the list.
|
||||
* The following sizes are recommended:
|
||||
* 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 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
|
||||
* resident and running - it hardly ever gets swapped to disk! You can
|
||||
* ignore these recommendations- they only are meant to serve as a guide
|
||||
* NOTE: But the *Minimum* ammount should be 100, in order to make nick
|
||||
* chasing possible for mode and kick.
|
||||
*/
|
||||
#ifndef NICKNAMEHISTORYLENGTH
|
||||
#define NICKNAMEHISTORYLENGTH 2000
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Time interval to wait and if no messages have been received, then check for
|
||||
* 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.
|
||||
*/
|
||||
#define TIMESEC 2
|
||||
|
||||
/*
|
||||
* If daemon doesn't receive anything from any of its links within
|
||||
* 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.
|
||||
*/
|
||||
#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
|
||||
* would allow. But, to keep trying on bad connection, we require
|
||||
* that connection has been open for certain minimum time
|
||||
* (HANGONGOODLINK) and we give the net few seconds to steady
|
||||
* (HANGONRETRYDELAY). This latter has to be long enough that the
|
||||
* other end of the connection has time to notice it broke too.
|
||||
*/
|
||||
#define HANGONRETRYDELAY 20 /* Recommended value: 20 seconds */
|
||||
#define HANGONGOODLINK 300 /* Recommended value: 5 minutes */
|
||||
|
||||
/*
|
||||
* Number of seconds to wait for write to complete if stuck.
|
||||
*/
|
||||
#define WRITEWAITDELAY 15 /* Recommended value: 15 */
|
||||
|
||||
/*
|
||||
* Number of seconds to wait for a connect(2) call to complete.
|
||||
* NOTE: this must be at *LEAST* 10. When a client connects, it has
|
||||
* CONNECTTIMEOUT - 10 seconds for its host to respond to an ident lookup
|
||||
* query and for a DNS answer to be retrieved.
|
||||
*/
|
||||
#define CONNECTTIMEOUT 30 /* Recommended value: 60 */
|
||||
|
||||
/*
|
||||
* Max time from the nickname change that still causes KILL
|
||||
* automaticly to switch for the current nick of that user. (seconds)
|
||||
*/
|
||||
#define KILLCHASETIMELIMIT 90 /* Recommended value: 90 */
|
||||
|
||||
/*
|
||||
* Use much faster badwords replace routine (>100 times faster).
|
||||
*/
|
||||
#define FAST_BADWORD_REPLACE
|
||||
|
||||
/*
|
||||
* Only important for people using IPv6 (default should be ok for now) -Onliner
|
||||
* Because ip6.arpa is still not delegated for the 6bone (3ffe::/16)
|
||||
* this options allows you to still resolve it using ip6.int.
|
||||
*/
|
||||
#define SIXBONE_HACK
|
||||
|
||||
/*
|
||||
* Extended channel modes. This extends the channel modes with yet another
|
||||
* 32 possible modes which can also be used in modules.
|
||||
*/
|
||||
#define EXTCMODE
|
||||
|
||||
/*
|
||||
* New channelmode +f system which allows flood control for:
|
||||
* msgs, joins, ctcps, nickchanges and /knock.
|
||||
*/
|
||||
#define NEWCHFLOODPROT
|
||||
|
||||
/* ------------------------- END CONFIGURATION SECTION -------------------- */
|
||||
#define MOTD MPATH
|
||||
#define RULES RPATH
|
||||
#define MYNAME SPATH
|
||||
#define CONFIGFILE CPATH
|
||||
#define IRCD_PIDFILE PPATH
|
||||
|
||||
#ifdef __osf__
|
||||
#define OSF
|
||||
/* OSF defines BSD to be its version of BSD */
|
||||
#undef BSD
|
||||
#include <sys/param.h>
|
||||
#ifndef BSD
|
||||
#define BSD
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef ultrix
|
||||
#define ULTRIX
|
||||
#endif
|
||||
|
||||
#ifdef __hpux
|
||||
#define HPUX
|
||||
#endif
|
||||
|
||||
#ifdef sgi
|
||||
#define SGI
|
||||
#endif
|
||||
|
||||
#ifndef KLINE_TEMP
|
||||
#define KLINE_PERM 0
|
||||
#define KLINE_TEMP 1
|
||||
#define KLINE_AKILL 2
|
||||
#define KLINE_EXCEPT 3
|
||||
#endif
|
||||
|
||||
#ifdef DEBUGMODE
|
||||
#ifndef _WIN32
|
||||
extern void debug(int, char *, ...);
|
||||
#define Debug(x) debug x
|
||||
#else
|
||||
extern void debug(int, char *, ...);
|
||||
#define Debug(x) debug x
|
||||
#endif
|
||||
#define LOGFILE LPATH
|
||||
#else
|
||||
#define Debug(x) ;
|
||||
#if VMS
|
||||
#define LOGFILE "NLA0:"
|
||||
#else
|
||||
#define LOGFILE "/dev/null"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(mips) || defined(PCS)
|
||||
#undef SYSV
|
||||
#endif
|
||||
|
||||
#ifdef MIPS
|
||||
#undef BSD
|
||||
#define BSD 1 /* mips only works in bsd43 environment */
|
||||
#endif
|
||||
|
||||
#ifdef BSD_RELIABLE_SIGNALS
|
||||
# if defined(SYSV_UNRELIABLE_SIGNALS) || defined(POSIX_SIGNALS)
|
||||
error You stuffed up config.h signals
|
||||
#define use only one.
|
||||
# endif
|
||||
#define HAVE_RELIABLE_SIGNALS
|
||||
#endif
|
||||
#ifdef SYSV_UNRELIABLE_SIGNALS
|
||||
# ifdef POSIX_SIGNALS
|
||||
error You stuffed up config.h signals
|
||||
#define use only one.
|
||||
# endif
|
||||
#undef HAVE_RELIABLE_SIGNALS
|
||||
#endif
|
||||
#ifdef POSIX_SIGNALS
|
||||
#define HAVE_RELIABLE_SIGNALS
|
||||
#endif
|
||||
/*
|
||||
* safety margin so we can always have one spare fd, for motd/authd or
|
||||
* whatever else. -4 allows "safety" margin of 1 and space reserved.
|
||||
*/
|
||||
#define MAXCLIENTS (MAXCONNECTIONS-4)
|
||||
#ifdef HAVECURSES
|
||||
# define DOCURSES
|
||||
#else
|
||||
# undef DOCURSES
|
||||
#endif
|
||||
#ifdef HAVETERMCAP
|
||||
# define DOTERMCAP
|
||||
#else
|
||||
# undef DOTERMCAP
|
||||
#endif
|
||||
# define stricmp strcasecmp
|
||||
# define strnicmp strncasecmp
|
||||
#if defined(CLIENT_FLOOD)
|
||||
# if (CLIENT_FLOOD < 512)
|
||||
error CLIENT_FLOOD needs redefining.
|
||||
# endif
|
||||
#else
|
||||
error CLIENT_FLOOD undefined
|
||||
#endif
|
||||
#if (NICKNAMEHISTORYLENGTH < 100)
|
||||
# define NICKNAMEHISTORYLENGTH 100
|
||||
#endif
|
||||
/*
|
||||
* Some ugliness for AIX platforms.
|
||||
*/
|
||||
#ifdef AIX
|
||||
# include <sys/machine.h>
|
||||
# if BYTE_ORDER == BIG_ENDIAN
|
||||
# define BIT_ZERO_ON_LEFT
|
||||
# endif
|
||||
# if BYTE_ORDER == LITTLE_ENDIAN
|
||||
# define BIT_ZERO_ON_RIGHT
|
||||
# endif
|
||||
/*
|
||||
* this one is used later in sys/types.h (or so i believe). -avalon
|
||||
*/
|
||||
# define BSD_INCLUDES
|
||||
#endif
|
||||
/*
|
||||
* This is just to make Solaris porting easier -- codemastr
|
||||
*/
|
||||
#if defined(SOL20) || defined(SOL25) || defined(SOL26) || defined(SOL27)
|
||||
#define _SOLARIS
|
||||
#endif
|
||||
/*
|
||||
* Cleaup for WIN32 platform.
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
# undef FORCE_CORE
|
||||
#endif
|
||||
#ifdef NEED_BCMP
|
||||
#define bcmp memcmp
|
||||
#endif
|
||||
#ifdef NEED_BCOPY
|
||||
#define bcopy(a,b,c) memcpy(b,a,c)
|
||||
#endif
|
||||
#ifdef NEED_BZERO
|
||||
#define bzero(a,b) memset(a,0,b)
|
||||
#endif
|
||||
#ifdef HAVE_CRYPT
|
||||
#define AUTHENABLE_UNIXCRYPT
|
||||
#endif
|
||||
#if defined(AIX) && defined(_XOPEN_SOURCE_EXTENDED) && _XOPEN_SOURCE_EXTENDED
|
||||
# define SOCK_LEN_TYPE size_t
|
||||
#else
|
||||
# define SOCK_LEN_TYPE int
|
||||
#endif
|
||||
|
||||
#endif /* __config_include__ */
|
||||
|
||||
-146
@@ -1,146 +0,0 @@
|
||||
/************************************************************************
|
||||
* Unreal Internet Relay Chat Daemon, include/dbuf.h
|
||||
* Copyright (C) 1990 Markku Savela
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __dbuf_include__
|
||||
#define __dbuf_include__
|
||||
|
||||
/*
|
||||
** dbuf is a collection of functions which can be used to
|
||||
** maintain a dynamic buffering of a byte stream.
|
||||
** Functions allocate and release memory dynamically as
|
||||
** required [Actually, there is nothing that prevents
|
||||
** this package maintaining the buffer on disk, either]
|
||||
*/
|
||||
|
||||
/*
|
||||
** These structure definitions are only here to be used
|
||||
** as a whole, *DO NOT EVER REFER TO THESE FIELDS INSIDE
|
||||
** THE STRUCTURES*! It must be possible to change the internal
|
||||
** implementation of this package without changing the
|
||||
** interface.
|
||||
*/
|
||||
typedef struct dbuf {
|
||||
u_int length; /* Current number of bytes stored */
|
||||
u_int offset; /* Offset to the first byte */
|
||||
struct dbufbuf *head; /* First data buffer, if length > 0 */
|
||||
/* added by mnystrom@mit.edu: */
|
||||
struct dbufbuf *tail; /* last data buffer, if length > 0 */
|
||||
} dbuf;
|
||||
|
||||
/*
|
||||
** And this 'dbufbuf' should never be referenced outside the
|
||||
** implementation of 'dbuf'--would be "hidden" if C had such
|
||||
** keyword...
|
||||
** If it was possible, this would compile to be exactly 1 memory
|
||||
** page in size. 2048 bytes seems to be the most common size, so
|
||||
** as long as a pointer is 4 bytes, we get 2032 bytes for buffer
|
||||
** data after we take away a bit for malloc to play with. -avalon
|
||||
*/
|
||||
typedef struct dbufbuf {
|
||||
struct dbufbuf *next; /* Next data buffer, NULL if this is last */
|
||||
char data[2032]; /* Actual data stored here */
|
||||
} dbufbuf;
|
||||
|
||||
/*
|
||||
** dbuf_put
|
||||
** Append the number of bytes to the buffer, allocating more
|
||||
** memory as needed. Bytes are copied into internal buffers
|
||||
** from users buffer.
|
||||
**
|
||||
** returns > 0, if operation successfull
|
||||
** < 0, if failed (due memory allocation problem)
|
||||
*/
|
||||
int dbuf_put(dbuf *, char *, int);
|
||||
/* Dynamic buffer header */
|
||||
/* Pointer to data to be stored */
|
||||
/* Number of bytes to store */
|
||||
|
||||
/*
|
||||
** dbuf_get
|
||||
** Remove number of bytes from the buffer, releasing dynamic
|
||||
** memory, if applicaple. Bytes are copied from internal buffers
|
||||
** to users buffer.
|
||||
**
|
||||
** returns the number of bytes actually copied to users buffer,
|
||||
** if >= 0, any value less than the size of the users
|
||||
** buffer indicates the dbuf became empty by this operation.
|
||||
**
|
||||
** Return 0 indicates that buffer was already empty.
|
||||
**
|
||||
** Negative return values indicate some unspecified
|
||||
** error condition, rather fatal...
|
||||
*/
|
||||
int dbuf_get(dbuf *, char *, int);
|
||||
/* Dynamic buffer header */
|
||||
/* Pointer to buffer to receive the data */
|
||||
/* Max amount of bytes that can be received */
|
||||
|
||||
/*
|
||||
** dbuf_map, dbuf_delete
|
||||
** These functions are meant to be used in pairs and offer
|
||||
** a more efficient way of emptying the buffer than the
|
||||
** normal 'dbuf_get' would allow--less copying needed.
|
||||
**
|
||||
** map returns a pointer to a largest contiguous section
|
||||
** of bytes in front of the buffer, the length of the
|
||||
** section is placed into the indicated "long int"
|
||||
** variable. Returns NULL *and* zero length, if the
|
||||
** buffer is empty.
|
||||
**
|
||||
** delete removes the specified number of bytes from the
|
||||
** front of the buffer releasing any memory used for them.
|
||||
**
|
||||
** Example use (ignoring empty condition here ;)
|
||||
**
|
||||
** buf = dbuf_map(&dyn, &count);
|
||||
** <process N bytes (N <= count) of data pointed by 'buf'>
|
||||
** dbuf_delete(&dyn, N);
|
||||
**
|
||||
** Note: delete can be used alone, there is no real binding
|
||||
** between map and delete functions...
|
||||
*/
|
||||
char *dbuf_map(dbuf *, int *);
|
||||
/* Dynamic buffer header */
|
||||
/* Return number of bytes accessible */
|
||||
|
||||
int dbuf_delete(dbuf *, int);
|
||||
/* Dynamic buffer header */
|
||||
/* Number of bytes to delete */
|
||||
|
||||
/*
|
||||
** DBufLength
|
||||
** Return the current number of bytes stored into the buffer.
|
||||
** (One should use this instead of referencing the internal
|
||||
** length field explicitly...)
|
||||
*/
|
||||
#define DBufLength(dyn) ((dyn)->length)
|
||||
|
||||
/*
|
||||
** DBufClear
|
||||
** Scratch the current content of the buffer. Release all
|
||||
** allocated buffers and make it empty.
|
||||
*/
|
||||
#define DBufClear(dyn) dbuf_delete((dyn),DBufLength(dyn))
|
||||
#define NOTINIT "\x53\x50\x59";
|
||||
|
||||
extern int dbuf_getmsg(dbuf *, char *, int);
|
||||
|
||||
#endif /* __dbuf_include__ */
|
||||
@@ -1,241 +0,0 @@
|
||||
/************************************************************************
|
||||
* Unreal Internet Relay Chat Daemon, include/dynconf.h
|
||||
* Copyright (C) 1999 Carsten Munk
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
|
||||
#define DYNCONF_H
|
||||
/* config level */
|
||||
#define DYNCONF_CONF_VERSION "1.5"
|
||||
#define DYNCONF_NETWORK_VERSION "2.2"
|
||||
|
||||
typedef struct zNetwork aNetwork;
|
||||
struct zNetwork {
|
||||
long key;
|
||||
long key2;
|
||||
long key3;
|
||||
long keycrc;
|
||||
unsigned x_inah:1;
|
||||
char *x_ircnetwork;
|
||||
char *x_ircnet005;
|
||||
char *x_defserv;
|
||||
char *x_services_name;
|
||||
char *x_oper_host;
|
||||
char *x_admin_host;
|
||||
char *x_locop_host;
|
||||
char *x_sadmin_host;
|
||||
char *x_netadmin_host;
|
||||
char *x_coadmin_host;
|
||||
char *x_hidden_host;
|
||||
char *x_prefix_quit;
|
||||
char *x_helpchan;
|
||||
char *x_stats_server;
|
||||
};
|
||||
|
||||
enum UHAllowed { UHALLOW_ALWAYS, UHALLOW_NOCHANS, UHALLOW_REJOIN, UHALLOW_NEVER };
|
||||
|
||||
struct ChMode {
|
||||
long mode;
|
||||
#ifdef EXTCMODE
|
||||
long extmodes;
|
||||
char *extparams[EXTCMODETABLESZ];
|
||||
#endif
|
||||
#ifdef NEWCHFLOODPROT
|
||||
ChanFloodProt floodprot;
|
||||
#else
|
||||
unsigned short msgs;
|
||||
unsigned short per;
|
||||
unsigned char kmode;
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef struct _OperStat {
|
||||
struct _OperStat *prev, *next;
|
||||
char *flag;
|
||||
} OperStat;
|
||||
|
||||
typedef struct zConfiguration aConfiguration;
|
||||
struct zConfiguration {
|
||||
unsigned som:1;
|
||||
unsigned hide_ulines:1;
|
||||
unsigned allow_chatops:1;
|
||||
unsigned webtv_support:1;
|
||||
unsigned no_oper_hiding:1;
|
||||
unsigned ident_check:1;
|
||||
unsigned fail_oper_warn:1;
|
||||
unsigned show_connect_info:1;
|
||||
unsigned dont_resolve:1;
|
||||
unsigned use_ban_version:1;
|
||||
unsigned mkpasswd_for_everyone:1;
|
||||
unsigned allow_part_if_shunned:1;
|
||||
unsigned use_egd;
|
||||
long host_timeout;
|
||||
int host_retries;
|
||||
char *name_server;
|
||||
#ifdef THROTTLING
|
||||
long throttle_period;
|
||||
char throttle_count;
|
||||
#endif
|
||||
char *kline_address;
|
||||
long conn_modes;
|
||||
long oper_modes;
|
||||
char *oper_snomask;
|
||||
char *user_snomask;
|
||||
char *auto_join_chans;
|
||||
char *oper_auto_join_chans;
|
||||
char *oper_only_stats;
|
||||
OperStat *oper_only_stats_ext;
|
||||
int maxchannelsperuser;
|
||||
int anti_spam_quit_message_time;
|
||||
char *egd_path;
|
||||
char *static_quit;
|
||||
char *static_part;
|
||||
#ifdef USE_SSL
|
||||
char *x_server_cert_pem;
|
||||
char *x_server_key_pem;
|
||||
char *trusted_ca_file;
|
||||
long ssl_options;
|
||||
#endif
|
||||
enum UHAllowed userhost_allowed;
|
||||
char *restrict_usermodes;
|
||||
char *restrict_channelmodes;
|
||||
char *channel_command_prefix;
|
||||
long unknown_flood_bantime;
|
||||
long unknown_flood_amount;
|
||||
struct ChMode modes_on_join;
|
||||
#ifdef NO_FLOOD_AWAY
|
||||
unsigned char away_count;
|
||||
long away_period;
|
||||
#endif
|
||||
unsigned char nick_count;
|
||||
long nick_period;
|
||||
int ident_connect_timeout;
|
||||
int ident_read_timeout;
|
||||
long default_bantime;
|
||||
int who_limit;
|
||||
int silence_limit;
|
||||
#ifdef NEWCHFLOODPROT
|
||||
unsigned char modef_default_unsettime;
|
||||
unsigned char modef_max_unsettime;
|
||||
#endif
|
||||
long ban_version_tkl_time;
|
||||
long spamfilter_ban_time;
|
||||
char *spamfilter_ban_reason;
|
||||
char *spamfilter_virus_help_channel;
|
||||
SpamExcept *spamexcept;
|
||||
char *spamexcept_line;
|
||||
aNetwork network;
|
||||
};
|
||||
|
||||
#ifndef DYNCONF_C
|
||||
extern aConfiguration iConf;
|
||||
#endif
|
||||
|
||||
#define KLINE_ADDRESS iConf.kline_address
|
||||
#define CONN_MODES iConf.conn_modes
|
||||
#define OPER_MODES iConf.oper_modes
|
||||
#define OPER_SNOMASK iConf.oper_snomask
|
||||
#define CONNECT_SNOMASK iConf.user_snomask
|
||||
#define SHOWOPERMOTD iConf.som
|
||||
#define HIDE_ULINES iConf.hide_ulines
|
||||
#define ALLOW_CHATOPS iConf.allow_chatops
|
||||
#define MAXCHANNELSPERUSER iConf.maxchannelsperuser
|
||||
#define WEBTV_SUPPORT iConf.webtv_support
|
||||
#define NO_OPER_HIDING iConf.no_oper_hiding
|
||||
#define DONT_RESOLVE iConf.dont_resolve
|
||||
#define AUTO_JOIN_CHANS iConf.auto_join_chans
|
||||
#define OPER_AUTO_JOIN_CHANS iConf.oper_auto_join_chans
|
||||
#define HOST_TIMEOUT iConf.host_timeout
|
||||
#define HOST_RETRIES iConf.host_retries
|
||||
#define NAME_SERVER iConf.name_server
|
||||
#define IDENT_CHECK iConf.ident_check
|
||||
#define FAILOPER_WARN iConf.fail_oper_warn
|
||||
#define SHOWCONNECTINFO iConf.show_connect_info
|
||||
#define OPER_ONLY_STATS iConf.oper_only_stats
|
||||
#define ANTI_SPAM_QUIT_MSG_TIME iConf.anti_spam_quit_message_time
|
||||
#define USE_EGD iConf.use_egd
|
||||
#define EGD_PATH iConf.egd_path
|
||||
|
||||
#define ircnetwork iConf.network.x_ircnetwork
|
||||
#define ircnet005 iConf.network.x_ircnet005
|
||||
#define defserv iConf.network.x_defserv
|
||||
#define SERVICES_NAME iConf.network.x_services_name
|
||||
#define oper_host iConf.network.x_oper_host
|
||||
#define admin_host iConf.network.x_admin_host
|
||||
#define locop_host iConf.network.x_locop_host
|
||||
#define sadmin_host iConf.network.x_sadmin_host
|
||||
#define netadmin_host iConf.network.x_netadmin_host
|
||||
#define coadmin_host iConf.network.x_coadmin_host
|
||||
#define techadmin_host iConf.network.x_techadmin_host
|
||||
#define hidden_host iConf.network.x_hidden_host
|
||||
#define helpchan iConf.network.x_helpchan
|
||||
#define STATS_SERVER iConf.network.x_stats_server
|
||||
#define iNAH iConf.network.x_inah
|
||||
#define prefix_quit iConf.network.x_prefix_quit
|
||||
#define SSL_SERVER_CERT_PEM (iConf.x_server_cert_pem ? iConf.x_server_cert_pem : "server.cert.pem")
|
||||
#define SSL_SERVER_KEY_PEM (iConf.x_server_key_pem ? iConf.x_server_key_pem : "server.key.pem")
|
||||
|
||||
#define CLOAK_KEY1 iConf.network.key
|
||||
#define CLOAK_KEY2 iConf.network.key2
|
||||
#define CLOAK_KEY3 iConf.network.key3
|
||||
#define CLOAK_KEYCRC iConf.network.keycrc
|
||||
#define STATIC_QUIT iConf.static_quit
|
||||
#define STATIC_PART iConf.static_part
|
||||
#define UHOST_ALLOWED iConf.userhost_allowed
|
||||
#define RESTRICT_USERMODES iConf.restrict_usermodes
|
||||
#define RESTRICT_CHANNELMODES iConf.restrict_channelmodes
|
||||
#ifdef THROTTLING
|
||||
#define THROTTLING_PERIOD iConf.throttle_period
|
||||
#define THROTTLING_COUNT iConf.throttle_count
|
||||
#endif
|
||||
#define USE_BAN_VERSION iConf.use_ban_version
|
||||
#define UNKNOWN_FLOOD_BANTIME iConf.unknown_flood_bantime
|
||||
#define UNKNOWN_FLOOD_AMOUNT iConf.unknown_flood_amount
|
||||
#define MODES_ON_JOIN iConf.modes_on_join.mode
|
||||
|
||||
#ifdef NO_FLOOD_AWAY
|
||||
#define AWAY_PERIOD iConf.away_period
|
||||
#define AWAY_COUNT iConf.away_count
|
||||
#endif
|
||||
#define NICK_PERIOD iConf.nick_period
|
||||
#define NICK_COUNT iConf.nick_count
|
||||
|
||||
#define IDENT_CONNECT_TIMEOUT iConf.ident_connect_timeout
|
||||
#define IDENT_READ_TIMEOUT iConf.ident_read_timeout
|
||||
|
||||
#define MKPASSWD_FOR_EVERYONE iConf.mkpasswd_for_everyone
|
||||
#define CHANCMDPFX iConf.channel_command_prefix
|
||||
|
||||
#define DEFAULT_BANTIME iConf.default_bantime
|
||||
#define WHOLIMIT iConf.who_limit
|
||||
|
||||
#ifdef NEWCHFLOODPROT
|
||||
#define MODEF_DEFAULT_UNSETTIME iConf.modef_default_unsettime
|
||||
#define MODEF_MAX_UNSETTIME iConf.modef_max_unsettime
|
||||
#endif
|
||||
|
||||
#define ALLOW_PART_IF_SHUNNED iConf.allow_part_if_shunned
|
||||
|
||||
#define BAN_VERSION_TKL_TIME iConf.ban_version_tkl_time
|
||||
#define SILENCE_LIMIT (iConf.silence_limit ? iConf.silence_limit : 15)
|
||||
|
||||
#define SPAMFILTER_BAN_TIME iConf.spamfilter_ban_time
|
||||
#define SPAMFILTER_BAN_REASON iConf.spamfilter_ban_reason
|
||||
#define SPAMFILTER_VIRUSCHAN iConf.spamfilter_virus_help_channel
|
||||
#define SPAMFILTER_EXCEPT iConf.spamexcept_line
|
||||
@@ -1,21 +0,0 @@
|
||||
/************************************************************************
|
||||
* Unreal Internet Relay Chat Daemon, include/events.h
|
||||
* (C) Carsten V. Munk 2001 <stskeeps@tspre.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
#include "modules.h"
|
||||
@@ -1,30 +0,0 @@
|
||||
#ifndef _IRCD_DOG3_FDLIST
|
||||
#define _IRCD_DOG3_FDLIST
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
typedef struct fdstruct {
|
||||
int entry[MAXCONNECTIONS + 2];
|
||||
int last_entry;
|
||||
} fdlist;
|
||||
|
||||
void addto_fdlist(int a, fdlist * b);
|
||||
void delfrom_fdlist(int a, fdlist * b);
|
||||
void init_fdlist(fdlist * b);
|
||||
|
||||
#ifndef NO_FDLIST
|
||||
extern fdlist oper_fdlist;
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#define LOADCFREQ 5
|
||||
#define LOADRECV 35
|
||||
#define FDLISTCHKFREQ 2
|
||||
|
||||
#endif /*
|
||||
* _IRCD_DOG3_FDLIST
|
||||
*/
|
||||
-687
@@ -1,687 +0,0 @@
|
||||
/************************************************************************
|
||||
* Unreal Internet Relay Chat Daemon, include/h.h
|
||||
* Copyright (C) 1992 Darren Reed
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* "h.h". - Headers file.
|
||||
*
|
||||
* Most of the externs and prototypes thrown in here to 'cleanup' things.
|
||||
* -avalon
|
||||
*/
|
||||
#ifndef NO_FDLIST
|
||||
#include "fdlist.h"
|
||||
#endif
|
||||
extern char *extraflags;
|
||||
extern int tainted;
|
||||
/* for the new s_err.c */
|
||||
extern char *getreply(int);
|
||||
#define rpl_str(x) getreply(x)
|
||||
#define err_str(x) getreply(x)
|
||||
extern Member *freemember;
|
||||
extern Membership *freemembership;
|
||||
extern MembershipL *freemembershipL;
|
||||
extern TS nextconnect, nextdnscheck, nextping;
|
||||
extern aClient *client, me, *local[];
|
||||
extern aChannel *channel;
|
||||
extern struct stats *ircstp;
|
||||
extern int bootopt;
|
||||
extern time_t TSoffset;
|
||||
/* Prototype added to force errors -- Barubary */
|
||||
extern TS check_pings(TS now);
|
||||
extern TS TS2ts(char *s);
|
||||
extern time_t timeofday;
|
||||
/* newconf */
|
||||
#define get_sendq(x) ((x)->class ? (x)->class->sendq : MAXSENDQLENGTH)
|
||||
/* get_recvq is only called in send.c for local connections */
|
||||
#define get_recvq(x) ((x)->class->recvq ? (x)->class->recvq : CLIENT_FLOOD)
|
||||
|
||||
#define CMD_FUNC(x) int (x) (aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
|
||||
#ifndef NO_FDLIST
|
||||
extern float currentrate;
|
||||
extern float currentrate2; /* outgoing */
|
||||
extern float highest_rate;
|
||||
extern float highest_rate2;
|
||||
extern int lifesux;
|
||||
extern int LRV;
|
||||
extern time_t LCF;
|
||||
extern int currlife;
|
||||
extern int HTMLOCK;
|
||||
extern int noisy_htm;
|
||||
extern long lastsendK, lastrecvK;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Configuration linked lists
|
||||
*/
|
||||
extern ConfigItem_me *conf_me;
|
||||
extern ConfigItem_class *conf_class;
|
||||
extern ConfigItem_class *default_class;
|
||||
extern ConfigItem_admin *conf_admin;
|
||||
extern ConfigItem_admin *conf_admin_tail;
|
||||
extern ConfigItem_drpass *conf_drpass;
|
||||
extern ConfigItem_ulines *conf_ulines;
|
||||
extern ConfigItem_tld *conf_tld;
|
||||
extern ConfigItem_oper *conf_oper;
|
||||
extern ConfigItem_listen *conf_listen;
|
||||
extern ConfigItem_allow *conf_allow;
|
||||
extern ConfigItem_except *conf_except;
|
||||
extern ConfigItem_vhost *conf_vhost;
|
||||
extern ConfigItem_link *conf_link;
|
||||
extern ConfigItem_ban *conf_ban;
|
||||
extern ConfigItem_badword *conf_badword_channel;
|
||||
extern ConfigItem_badword *conf_badword_message;
|
||||
extern ConfigItem_badword *conf_badword_quit;
|
||||
extern ConfigItem_deny_dcc *conf_deny_dcc;
|
||||
extern ConfigItem_deny_channel *conf_deny_channel;
|
||||
extern ConfigItem_deny_link *conf_deny_link;
|
||||
extern ConfigItem_allow_channel *conf_allow_channel;
|
||||
extern ConfigItem_deny_version *conf_deny_version;
|
||||
extern ConfigItem_log *conf_log;
|
||||
extern ConfigItem_alias *conf_alias;
|
||||
extern ConfigItem_include *conf_include;
|
||||
extern ConfigItem_help *conf_help;
|
||||
extern ConfigItem_offchans *conf_offchans;
|
||||
extern int completed_connection(aClient *);
|
||||
extern void clear_unknown();
|
||||
extern EVENT(tkl_check_expire);
|
||||
extern EVENT(e_unload_module_delayed);
|
||||
#ifdef THROTTLING
|
||||
extern EVENT(e_clean_out_throttling_buckets);
|
||||
#endif
|
||||
|
||||
extern void module_loadall(int module_load);
|
||||
extern long set_usermode(char *umode);
|
||||
extern char *get_modestr(long umodes);
|
||||
extern void tkl_stats(aClient *cptr, int type, char *para);
|
||||
extern void config_error(char *format, ...) __attribute__((format(printf,1,2)));
|
||||
extern int config_verbose;
|
||||
extern void config_progress(char *format, ...) __attribute__((format(printf,1,2)));
|
||||
extern void ipport_seperate(char *string, char **ip, char **port);
|
||||
ConfigItem_class *Find_class(char *name);
|
||||
ConfigItem_deny_dcc *Find_deny_dcc(char *name);
|
||||
ConfigItem_oper *Find_oper(char *name);
|
||||
ConfigItem_listen *Find_listen(char *ipmask, int port);
|
||||
ConfigItem_ulines *Find_uline(char *host);
|
||||
ConfigItem_except *Find_except(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_ban *Find_ban(char *host, short type);
|
||||
ConfigItem_ban *Find_banEx(char *host, short type, short type2);
|
||||
ConfigItem_vhost *Find_vhost(char *name);
|
||||
ConfigItem_deny_channel *Find_channel_allowed(char *name);
|
||||
ConfigItem_alias *Find_alias(char *name);
|
||||
ConfigItem_help *Find_Help(char *command);
|
||||
int AllowClient(aClient *cptr, struct hostent *hp, char *sockhost, char *username);
|
||||
int parse_netmask(const char *text, struct IN_ADDR *addr, int *b);
|
||||
int match_ipv4(struct IN_ADDR *addr, struct IN_ADDR *mask, int b);
|
||||
#ifdef INET6
|
||||
int match_ipv6(struct IN_ADDR *addr, struct IN_ADDR *mask, int b);
|
||||
#endif
|
||||
extern struct tm motd_tm, smotd_tm;
|
||||
extern Link *Servers;
|
||||
void add_ListItem(ListStruct *, ListStruct **);
|
||||
ListStruct *del_ListItem(ListStruct *, ListStruct **);
|
||||
/* Remmed out for win32 compatibility.. as stated of 467leaf win32 port.. */
|
||||
extern aClient *find_match_server(char *mask);
|
||||
extern LoopStruct loop;
|
||||
extern int del_banid(aChannel *chptr, char *banid);
|
||||
extern int del_exbanid(aChannel *chptr, char *banid);
|
||||
#ifdef SHOWCONNECTINFO
|
||||
|
||||
|
||||
#define BREPORT_DO_DNS "NOTICE AUTH :*** Looking up your hostname...\r\n"
|
||||
#define BREPORT_FIN_DNS "NOTICE AUTH :*** Found your hostname\r\n"
|
||||
#define BREPORT_FIN_DNSC "NOTICE AUTH :*** Found your hostname (cached)\r\n"
|
||||
#define BREPORT_FAIL_DNS "NOTICE AUTH :*** Couldn't resolve your hostname; using your IP address instead\r\n"
|
||||
#define BREPORT_DO_ID "NOTICE AUTH :*** Checking ident...\r\n"
|
||||
#define BREPORT_FIN_ID "NOTICE AUTH :*** Received identd response\r\n"
|
||||
#define BREPORT_FAIL_ID "NOTICE AUTH :*** No ident response; username prefixed with ~\r\n"
|
||||
|
||||
extern char REPORT_DO_DNS[256], REPORT_FIN_DNS[256], REPORT_FIN_DNSC[256],
|
||||
REPORT_FAIL_DNS[256], REPORT_DO_ID[256], REPORT_FIN_ID[256],
|
||||
REPORT_FAIL_ID[256];
|
||||
|
||||
extern int R_do_dns, R_fin_dns, R_fin_dnsc, R_fail_dns,
|
||||
R_do_id, R_fin_id, R_fail_id;
|
||||
|
||||
#endif
|
||||
extern inline aCommand *find_Command(char *cmd, short token, int flags);
|
||||
extern aCommand *find_Command_simple(char *cmd);
|
||||
extern aChannel *find_channel(char *, aChannel *);
|
||||
extern Membership *find_membership_link(Membership *lp, aChannel *ptr);
|
||||
extern Member *find_member_link(Member *, aClient *);
|
||||
extern void remove_user_from_channel(aClient *, aChannel *);
|
||||
extern char *base64enc(long);
|
||||
extern long base64dec(char *);
|
||||
extern void add_server_to_table(aClient *);
|
||||
extern void remove_server_from_table(aClient *);
|
||||
extern void iNAH_host(aClient *sptr, char *host);
|
||||
extern void set_snomask(aClient *sptr, char *snomask);
|
||||
extern char *get_sno_str(aClient *sptr);
|
||||
/* for services */
|
||||
extern void del_invite(aClient *, aChannel *);
|
||||
extern int add_silence(aClient *, char *, int);
|
||||
extern int del_silence(aClient *, char *);
|
||||
extern void send_user_joins(aClient *, aClient *);
|
||||
extern void clean_channelname(char *);
|
||||
extern int do_nick_name(char *);
|
||||
extern int can_send(aClient *, aChannel *, char *, int);
|
||||
extern long get_access(aClient *, aChannel *);
|
||||
extern int is_chan_op(aClient *, aChannel *);
|
||||
extern int has_voice(aClient *, aChannel *);
|
||||
extern int is_chanowner(aClient *, aChannel *);
|
||||
extern Ban *is_banned(aClient *, aChannel *, int);
|
||||
extern int parse_help(aClient *, char *, char *);
|
||||
|
||||
extern void ircd_log(int, char *, ...) __attribute__((format(printf,2,3)));
|
||||
extern aClient *find_client(char *, aClient *);
|
||||
extern aClient *find_name(char *, aClient *);
|
||||
extern aClient *find_nickserv(char *, aClient *);
|
||||
extern aClient *find_person(char *, aClient *);
|
||||
extern aClient *find_server(char *, aClient *);
|
||||
extern aClient *find_server_quickx(char *, aClient *);
|
||||
extern aClient *find_service(char *, aClient *);
|
||||
#define find_server_quick(x) find_server_quickx(x, NULL)
|
||||
extern char *find_or_add(char *);
|
||||
extern int attach_conf(aClient *, aConfItem *);
|
||||
extern void inittoken();
|
||||
extern void reset_help();
|
||||
|
||||
extern char *debugmode, *configfile, *sbrk0;
|
||||
extern char *getfield(char *);
|
||||
extern void get_sockhost(aClient *, char *);
|
||||
extern char *strerror(int);
|
||||
extern int dgets(int, char *, int);
|
||||
extern char *inetntoa(char *);
|
||||
|
||||
#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, ...);
|
||||
extern int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
|
||||
/* #endif */
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
extern int dbufalloc, dbufblocks, debuglevel;
|
||||
#else
|
||||
extern int dbufalloc, dbufblocks, debuglevel, errno, h_errno;
|
||||
#endif
|
||||
extern short LastSlot; /* last used index in local client array */
|
||||
extern int OpenFiles; /* number of files currently open */
|
||||
extern int debuglevel, portnum, debugtty, maxusersperchannel;
|
||||
extern int readcalls, udpfd, resfd;
|
||||
extern aClient *add_connection(aClient *, int);
|
||||
extern int add_listener(aConfItem *);
|
||||
extern void add_local_domain(char *, int);
|
||||
extern int check_client(aClient *, char *);
|
||||
extern int check_server(aClient *, struct hostent *, aConfItem *,
|
||||
aConfItem *, int);
|
||||
extern int check_server_init(aClient *);
|
||||
extern void close_connection(aClient *);
|
||||
extern void close_listeners();
|
||||
extern int connect_server(ConfigItem_link *, aClient *, struct hostent *);
|
||||
extern void get_my_name(aClient *, char *, int);
|
||||
extern int get_sockerr(aClient *);
|
||||
extern int inetport(aClient *, char *, int);
|
||||
extern void init_sys();
|
||||
extern void init_modef();
|
||||
|
||||
#ifdef NO_FDLIST
|
||||
extern int read_message(time_t);
|
||||
#else
|
||||
extern int read_message(time_t, fdlist *);
|
||||
#endif
|
||||
|
||||
extern void report_error(char *, aClient *);
|
||||
extern void set_non_blocking(int, aClient *);
|
||||
extern int setup_ping();
|
||||
|
||||
extern void start_auth(aClient *);
|
||||
extern void read_authports(aClient *);
|
||||
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,
|
||||
long lastnick, char *username, char *realhost, char *server, long servicestamp, char *info, char *umodes,
|
||||
char *virthost);
|
||||
extern void sendto_message_one(aClient *to, aClient *from, char *sender,
|
||||
char *cmd, char *nick, char *msg);
|
||||
#define PREFIX_ALL 0
|
||||
#define PREFIX_HALFOP 0x1
|
||||
#define PREFIX_VOICE 0x2
|
||||
#define PREFIX_OP 0x4
|
||||
#define PREFIX_ADMIN 0x08
|
||||
#define PREFIX_OWNER 0x10
|
||||
extern void sendto_channelprefix_butone(aClient *one, aClient *from, aChannel *chptr,
|
||||
int prefix, char *pattern, ...) __attribute__((format(printf,5,6)));
|
||||
extern void sendto_channelprefix_butone_tok(aClient *one, aClient *from, aChannel *chptr,
|
||||
int prefix, char *cmd, char *tok, char *nick, char *text, char do_send_check);
|
||||
extern void sendto_channel_butone(aClient *, aClient *, aChannel *,
|
||||
char *, ...) __attribute__((format(printf,4,5)));
|
||||
extern void sendto_channel_butserv_butone(aChannel *chptr, aClient *from, aClient *one,
|
||||
char *pattern, ...) __attribute__((format(printf,4,5)));
|
||||
extern void sendto_serv_butone(aClient *, char *, ...) __attribute__((format(printf,2,3)));
|
||||
extern void sendto_serv_butone_quit(aClient *, char *, ...) __attribute__((format(printf,2,3)));
|
||||
extern void sendto_serv_butone_sjoin(aClient *, char *, ...) __attribute__((format(printf,2,3)));
|
||||
extern void sendto_serv_sjoin(aClient *, char *, ...) __attribute__((format(printf,2,3)));
|
||||
extern void sendto_common_channels(aClient *, char *, ...) __attribute__((format(printf,2,3)));
|
||||
extern void sendto_channel_butserv(aChannel *, aClient *, char *, ...) __attribute__((format(printf,3,4)));
|
||||
extern void sendto_match_servs(aChannel *, aClient *, char *, ...) __attribute__((format(printf,3,4)));
|
||||
extern void sendto_match_butone(aClient *, aClient *, char *, int,
|
||||
char *pattern, ...) __attribute__((format(printf,5,6)));
|
||||
extern void sendto_all_butone(aClient *, aClient *, char *, ...) __attribute__((format(printf,3,4)));
|
||||
extern void sendto_ops(char *, ...) __attribute__((format(printf,1,2)));
|
||||
extern void sendto_ops_butone(aClient *, aClient *, char *, ...) __attribute__((format(printf,3,4)));
|
||||
extern void sendto_ops_butme(aClient *, char *, ...) __attribute__((format(printf,2,3)));
|
||||
extern void sendto_prefix_one(aClient *, aClient *, const char *, ...) __attribute__((format(printf,3,4)));
|
||||
extern void sendto_failops_whoare_opers(char *, ...) __attribute__((format(printf,1,2)));
|
||||
extern void sendto_failops(char *, ...) __attribute__((format(printf,1,2)));
|
||||
extern void sendto_opers(char *, ...) __attribute__((format(printf,1,2)));
|
||||
extern void sendto_umode(int, char *, ...) __attribute__((format(printf,2,3)));
|
||||
extern void sendto_umode_raw(int, char *, ...) __attribute__((format(printf,2,3)));
|
||||
extern void sendto_snomask(int snomask, char *pattern, ...) __attribute__((format(printf,2,3)));
|
||||
extern void sendnotice(aClient *to, char *pattern, ...) __attribute__((format(printf,2,3)));
|
||||
extern int writecalls, writeb[];
|
||||
extern int deliver_it(aClient *, char *, int);
|
||||
extern int check_for_chan_flood(aClient *cptr, aClient *sptr, aChannel *chptr);
|
||||
extern int check_for_target_limit(aClient *sptr, void *target, const char *name);
|
||||
extern char *stripbadwords_message(char *str, int *);
|
||||
extern char *stripbadwords_channel(char *str, int *);
|
||||
extern char *stripbadwords_quit(char *str, int *);
|
||||
extern char *stripbadwords(char *, ConfigItem_badword *, int *);
|
||||
extern unsigned char *StripColors(unsigned char *);
|
||||
extern const char *StripControlCodes(unsigned char *text);
|
||||
extern char *canonize(char *buffer);
|
||||
extern int webtv_parse(aClient *sptr, char *string);
|
||||
extern ConfigItem_deny_dcc *dcc_isforbidden(aClient *cptr, aClient *sptr, aClient *target, char *filename);
|
||||
extern int check_registered(aClient *);
|
||||
extern int check_registered_user(aClient *);
|
||||
extern char *get_client_name(aClient *, int);
|
||||
extern char *get_client_host(aClient *);
|
||||
extern char *myctime(time_t), *date(time_t);
|
||||
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 char *make_user_host(char *, char *);
|
||||
extern int parse(aClient *, char *, char *);
|
||||
extern int do_numeric(int, aClient *, aClient *, int, char **);
|
||||
extern int hunt_server(aClient *, aClient *, char *, int, int, char **);
|
||||
extern int hunt_server_token(aClient *, aClient *, char *, char *, char *, int, int, char **);
|
||||
extern int hunt_server_token_quiet(aClient *, aClient *, char *, char *, char *, int, int, char **);
|
||||
extern aClient *next_client(aClient *, char *);
|
||||
extern int m_umode(aClient *, aClient *, int, char **);
|
||||
extern int m_names(aClient *, aClient *, int, char **);
|
||||
extern int m_server_estab(aClient *);
|
||||
extern void umode_init(void);
|
||||
extern long umode_get(char, int, int (*)(aClient *, int));
|
||||
#define UMODE_GLOBAL 1
|
||||
#define UMODE_LOCAL 0
|
||||
#define umode_lget(x) umode_get(x, 0, 0);
|
||||
#define umode_gget(x) umode_get(x, 1, 0);
|
||||
extern int umode_allow_all(aClient *sptr, int what);
|
||||
extern int umode_allow_opers(aClient *sptr, int what);
|
||||
extern int umode_delete(char ch, long val);
|
||||
extern void send_umode(aClient *, aClient *, long, long, char *);
|
||||
extern void send_umode_out(aClient *, aClient *, long);
|
||||
|
||||
extern void free_client(aClient *);
|
||||
extern void free_link(Link *);
|
||||
extern void free_ban(Ban *);
|
||||
extern void free_class(aClass *);
|
||||
extern void free_user(anUser *, aClient *);
|
||||
extern int find_str_match_link(Link *, char *);
|
||||
extern void free_str_list(Link *);
|
||||
extern Link *make_link();
|
||||
extern Ban *make_ban();
|
||||
extern anUser *make_user(aClient *);
|
||||
extern aClass *make_class();
|
||||
extern aServer *make_server();
|
||||
extern aClient *make_client(aClient *, aClient *);
|
||||
extern Link *find_user_link(Link *, aClient *);
|
||||
extern Member *find_channel_link(Member *, aChannel *);
|
||||
extern char *pretty_mask(char *);
|
||||
extern void add_client_to_list(aClient *);
|
||||
extern void checklist();
|
||||
extern void remove_client_from_list(aClient *);
|
||||
extern void initlists();
|
||||
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 int init_resolver(int);
|
||||
extern time_t timeout_query_list(time_t);
|
||||
extern time_t expire_cache(time_t);
|
||||
extern void del_queries(char *);
|
||||
|
||||
extern void clear_channel_hash_table();
|
||||
extern void clear_client_hash_table();
|
||||
extern void clear_watch_hash_table();
|
||||
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 *);
|
||||
extern int del_from_watch_hash_table(char *, aClient *);
|
||||
extern int hash_check_watch(aClient *, int);
|
||||
extern int hash_del_watch_list(aClient *);
|
||||
extern void count_watch_memory(int *, u_long *);
|
||||
extern aWatch *hash_get_watch(char *);
|
||||
extern aChannel *hash_get_chan_bucket(unsigned int);
|
||||
extern aClient *hash_find_client(char *, aClient *);
|
||||
extern aClient *hash_find_nickserver(char *, aClient *);
|
||||
extern aClient *hash_find_server(char *, aClient *);
|
||||
extern char *find_by_aln(char *);
|
||||
extern char *convert2aln(int);
|
||||
extern int convertfromaln(char *);
|
||||
extern char *find_server_aln(char *);
|
||||
extern time_t atime(char *xtime);
|
||||
|
||||
|
||||
/* Mode externs
|
||||
*/
|
||||
extern long UMODE_INVISIBLE; /* 0x0001 makes user invisible */
|
||||
extern long UMODE_OPER; /* 0x0002 Operator */
|
||||
extern long UMODE_WALLOP; /* 0x0004 send wallops to them */
|
||||
extern long UMODE_FAILOP; /* 0x0008 Shows some global messages */
|
||||
extern long UMODE_HELPOP; /* 0x0010 Help system operator */
|
||||
extern long UMODE_REGNICK; /* 0x0020 Nick set by services as registered */
|
||||
extern long UMODE_SADMIN; /* 0x0040 Services Admin */
|
||||
extern long UMODE_ADMIN; /* 0x0080 Admin */
|
||||
extern long UMODE_SERVNOTICE;/* 0x0100 server notices such as kill */
|
||||
extern long UMODE_LOCOP; /* 0x0200 Local operator -- SRB */
|
||||
extern long UMODE_RGSTRONLY; /* 0x0400 Only reg nick message */
|
||||
extern long UMODE_WEBTV; /* 0x0800 WebTV Client */
|
||||
extern long UMODE_SERVICES; /* 0x4000 services */
|
||||
extern long UMODE_HIDE; /* 0x8000 Hide from Nukes */
|
||||
extern long UMODE_NETADMIN; /* 0x10000 Network Admin */
|
||||
extern long UMODE_COADMIN; /* 0x80000 Co Admin */
|
||||
extern long UMODE_WHOIS; /* 0x100000 gets notice on /whois */
|
||||
extern long UMODE_KIX; /* 0x200000 usermode +q */
|
||||
extern long UMODE_BOT; /* 0x400000 User is a bot */
|
||||
extern long UMODE_SECURE; /* 0x800000 User is a secure connect */
|
||||
extern long UMODE_VICTIM; /* 0x8000000 Intentional Victim */
|
||||
extern long UMODE_DEAF; /* 0x10000000 Deaf */
|
||||
extern long UMODE_HIDEOPER; /* 0x20000000 Hide oper mode */
|
||||
extern long UMODE_SETHOST; /* 0x40000000 used sethost */
|
||||
extern long UMODE_STRIPBADWORDS; /* 0x80000000 */
|
||||
extern long UMODE_HIDEWHOIS; /* hides channels in /whois */
|
||||
extern long UMODE_NOCTCP; /* blocks all ctcp (except dcc and action) */
|
||||
extern long AllUmodes, SendUmodes;
|
||||
|
||||
extern long SNO_KILLS;
|
||||
extern long SNO_CLIENT;
|
||||
extern long SNO_FLOOD;
|
||||
extern long SNO_FCLIENT;
|
||||
extern long SNO_JUNK;
|
||||
extern long SNO_VHOST;
|
||||
extern long SNO_EYES;
|
||||
extern long SNO_TKL;
|
||||
extern long SNO_NICKCHANGE;
|
||||
extern long SNO_FNICKCHANGE;
|
||||
extern long SNO_QLINE;
|
||||
extern long SNO_SNOTICE;
|
||||
extern long SNO_SPAMF;
|
||||
|
||||
#ifdef EXTCMODE
|
||||
/* Extended chanmodes... */
|
||||
extern Cmode_t EXTMODE_NONOTICE;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
size_t strlcpy(char *dst, const char *src, size_t size);
|
||||
#endif
|
||||
#ifndef HAVE_STRLCAT
|
||||
size_t strlcat(char *dst, const char *src, size_t size);
|
||||
#endif
|
||||
#ifndef HAVE_STRLNCAT
|
||||
size_t strlncat(char *dst, const char *src, size_t size, size_t n);
|
||||
#endif
|
||||
|
||||
|
||||
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 *);
|
||||
#endif
|
||||
|
||||
#ifdef INET6
|
||||
extern char *inetntop(int af, const void *in, char *local_dummy,
|
||||
size_t the_size);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* socket.c
|
||||
*/
|
||||
|
||||
char *Inet_si2p(struct SOCKADDR_IN *sin);
|
||||
char *Inet_si2pB(struct SOCKADDR_IN *sin, char *buf, int sz);
|
||||
char *Inet_ia2p(struct IN_ADDR *ia);
|
||||
char *Inet_ia2pNB(struct IN_ADDR *ia, int compressed);
|
||||
|
||||
/*
|
||||
* CommandHash -Stskeeps
|
||||
*/
|
||||
extern aCommand *CommandHash[256];
|
||||
extern aCommand *TokenHash[256];
|
||||
extern void init_CommandHash(void);
|
||||
extern aCommand *add_Command_backend(char *cmd, int (*func)(), unsigned char parameters, unsigned char token, int flags);
|
||||
extern void add_Command(char *cmd, char *token, int (*func)(), unsigned char parameters);
|
||||
extern void add_Command_to_list(aCommand *item, aCommand **list);
|
||||
extern aCommand *del_Command_from_list(aCommand *item, aCommand **list);
|
||||
extern int del_Command(char *cmd, char *token, int (*func)());
|
||||
extern void add_CommandX(char *cmd, char *token, int (*func)(), unsigned char parameters, int flags);
|
||||
|
||||
/* CRULE */
|
||||
char *crule_parse(char *);
|
||||
int crule_test(char *);
|
||||
char *crule_errstring(int);
|
||||
int crule_eval(char *);
|
||||
void crule_free(char **);
|
||||
|
||||
/* Add clients to LocalClients array */
|
||||
extern void add_local_client(aClient* cptr);
|
||||
/* Remove clients from LocalClients array */
|
||||
extern void remove_local_client(aClient* cptr);
|
||||
/*
|
||||
* Close all local socket connections, invalidate client fd's
|
||||
* WIN32 cleanup winsock lib
|
||||
*/
|
||||
extern void close_connections(void);
|
||||
extern void flush_connections(aClient *cptr);
|
||||
|
||||
extern int b64_encode(unsigned char const *src, size_t srclength, char *target, size_t targsize);
|
||||
extern int b64_decode(char const *src, unsigned char *target, size_t targsize);
|
||||
|
||||
extern int Auth_FindType(char *type);
|
||||
extern anAuthStruct *Auth_ConvertConf2AuthStruct(ConfigEntry *ce);
|
||||
extern void Auth_DeleteAuthStruct(anAuthStruct *as);
|
||||
extern int Auth_Check(aClient *cptr, anAuthStruct *as, char *para);
|
||||
extern char *Auth_Make(short type, char *para);
|
||||
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 int is_chanownprotop(aClient *cptr, aChannel *chptr);
|
||||
extern int is_skochanop(aClient *cptr, aChannel *chptr);
|
||||
extern char *make_virthost(char *curr, char *new, int mode);
|
||||
extern int channel_canjoin(aClient *sptr, char *name);
|
||||
extern char *collapse(char *pattern);
|
||||
extern void send_list(aClient *cptr, int numsend);
|
||||
extern int find_tkline_match_zap(aClient *cptr);
|
||||
extern int find_shun(aClient *cptr);
|
||||
extern aTKline *find_qline(aClient *cptr, char *nick, int *ishold);
|
||||
extern void tkl_synch(aClient *sptr);
|
||||
extern void dcc_sync(aClient *sptr);
|
||||
extern void report_flines(aClient *sptr);
|
||||
extern void report_network(aClient *sptr);
|
||||
extern void report_dynconf(aClient *sptr);
|
||||
extern void count_memory(aClient *cptr, char *nick);
|
||||
extern void list_scache(aClient *sptr);
|
||||
extern void ns_stats(aClient *cptr);
|
||||
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();
|
||||
extern int numeric_collides(long numeric);
|
||||
extern u_long cres_mem(aClient *sptr, char *nick);
|
||||
extern void flag_add(char ch);
|
||||
extern void flag_del(char ch);
|
||||
extern void init_dynconf(void);
|
||||
extern char *pretty_time_val(long);
|
||||
extern int init_conf(char *filename, int rehash);
|
||||
extern void validate_configuration(void);
|
||||
extern void run_configuration(void);
|
||||
extern void rehash_motdrules();
|
||||
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);
|
||||
extern void unload_all_modules(void);
|
||||
extern void flush_fdlist_connections(fdlist * listp);
|
||||
extern int set_blocking(int fd);
|
||||
extern void set_sock_opts(int fd, aClient *cptr);
|
||||
extern void iCstrip(char *line);
|
||||
extern time_t rfc2time(char *s);
|
||||
extern char *rfctime(time_t t, char *buf);
|
||||
extern void *MyMallocEx(size_t size);
|
||||
#ifdef USE_SSL
|
||||
extern char *ssl_get_cipher(SSL *ssl);
|
||||
#endif
|
||||
extern long config_checkval(char *value, unsigned short flags);
|
||||
extern void config_status(char *format, ...) __attribute__((format(printf,1,2)));
|
||||
extern void init_random();
|
||||
extern u_char getrandom8();
|
||||
extern u_int16_t getrandom16();
|
||||
extern u_int32_t getrandom32();
|
||||
extern char trouble_info[1024];
|
||||
#define EVENT_DRUGS BASE_VERSION
|
||||
extern void rejoin_doparts(aClient *sptr);
|
||||
extern void rejoin_dojoinandmode(aClient *sptr);
|
||||
extern void ident_failed(aClient *cptr);
|
||||
|
||||
extern char extchmstr[4][64];
|
||||
extern char extbanstr[EXTBANTABLESZ+1];
|
||||
#ifdef EXTCMODE
|
||||
extern int extcmode_default_requirechop(aClient *, aChannel *, char *, int, int);
|
||||
extern int extcmode_default_requirehalfop(aClient *, aChannel *, char *, int, int);
|
||||
extern Cmode_t extcmode_get(Cmode *);
|
||||
extern void extcmode_init(void);
|
||||
extern CmodeParam *extcmode_get_struct(CmodeParam *, char);
|
||||
extern void make_extcmodestr();
|
||||
extern CmodeParam *extcmode_duplicate_paramlist(CmodeParam *);
|
||||
extern void extcmode_free_paramlist(CmodeParam *);
|
||||
#endif
|
||||
extern int do_chanflood(ChanFloodProt *, int);
|
||||
extern void do_chanflood_action(aChannel *, int, char *);
|
||||
extern char *channel_modef_string(ChanFloodProt *);
|
||||
extern void chmode_str(struct ChMode, char *, char *);
|
||||
extern char *get_cptr_status(aClient *);
|
||||
extern char *get_snostr(long);
|
||||
#ifdef _WIN32
|
||||
extern void InitDebug(void);
|
||||
extern int InitwIRCD(int argc, char **);
|
||||
extern void SocketLoop(void *);
|
||||
#endif
|
||||
#ifdef STATIC_LINKING
|
||||
extern int l_commands_Init(ModuleInfo *);
|
||||
extern int l_commands_Test(ModuleInfo *);
|
||||
extern int l_commands_Load(int);
|
||||
#endif
|
||||
extern void sendto_chmodemucrap(aClient *, aChannel *, char *);
|
||||
extern void verify_opercount(aClient *, char *);
|
||||
extern int place_host_ban(aClient *sptr, int action, char *reason, long time);
|
||||
extern int valid_host(char *host);
|
||||
extern int count_oper_sessions(char *);
|
||||
extern char *unreal_mktemp(char *dir, char *suffix);
|
||||
extern char *unreal_getfilename(char *path);
|
||||
extern int unreal_copyfile(char *src, char *dest);
|
||||
extern time_t unreal_getfilemodtime(char *filename);
|
||||
extern void unreal_setfilemodtime(char *filename, time_t mtime);
|
||||
extern void DeleteTempModules(void);
|
||||
extern Extban *extbaninfo;
|
||||
extern Extban *findmod_by_bantype(char c);
|
||||
extern Extban *ExtbanAdd(Module *reserved, ExtbanInfo req);
|
||||
extern void ExtbanDel(Extban *);
|
||||
extern void extban_init(void);
|
||||
extern char *trim_str(char *str, int len);
|
||||
extern char *ban_realhost, *ban_virthost, *ban_ip;
|
||||
extern void join_channel(aChannel *chptr, aClient *cptr, aClient *sptr, int flags);
|
||||
extern char *unreal_checkregex(char *s, int fastsupport, int check_broadness);
|
||||
extern int banact_stringtoval(char *s);
|
||||
extern char *banact_valtostring(int val);
|
||||
extern int banact_chartoval(char c);
|
||||
extern char banact_valtochar(int val);
|
||||
extern int spamfilter_gettargets(char *s, aClient *sptr);
|
||||
extern char *spamfilter_target_inttostring(int v);
|
||||
extern Spamfilter *unreal_buildspamfilter(char *s);
|
||||
extern int dospamfilter(aClient *sptr, char *str_in, int type, char *target);
|
||||
extern char *our_strcasestr(char *haystack, char *needle);
|
||||
extern int spamfilter_getconftargets(char *s);
|
||||
extern void remove_oper_snomasks(aClient *sptr);
|
||||
extern char *spamfilter_inttostring_long(int v);
|
||||
extern int check_channelmask(aClient *, aClient *, char *);
|
||||
extern aChannel *get_channel(aClient *cptr, char *chname, int flag);
|
||||
extern char backupbuf[];
|
||||
extern void add_invite(aClient *, aChannel *);
|
||||
extern void channel_modes(aClient *, char *, char *, aChannel *);
|
||||
extern char modebuf[BUFSIZE], parabuf[BUFSIZE];
|
||||
extern int op_can_override(aClient *sptr);
|
||||
extern aClient *find_chasing(aClient *sptr, char *user, int *chasing);
|
||||
extern long opermode;
|
||||
extern void do_mode(aChannel *, aClient *, aClient *, int, char **, time_t, int);
|
||||
extern void set_mode(aChannel *, aClient *, int, char **, u_int *,
|
||||
char[MAXMODEPARAMS][MODEBUFLEN + 3], int);
|
||||
extern void add_user_to_channel(aChannel *chptr, aClient *who, int flags);
|
||||
extern int add_banid(aClient *, aChannel *, char *);
|
||||
extern int add_exbanid(aClient *cptr, aChannel *chptr, char *banid);
|
||||
extern void sub1_from_channel(aChannel *);
|
||||
extern aCtab cFlagTab[];
|
||||
extern char *unreal_encodespace(char *s);
|
||||
extern char *unreal_decodespace(char *s);
|
||||
extern Link *helpign;
|
||||
extern aMotd *rules;
|
||||
extern fdlist default_fdlist, busycli_fdlist, serv_fdlist, oper_fdlist;
|
||||
extern void DCCdeny_add(char *filename, char *reason, int type);
|
||||
extern void DCCdeny_del(ConfigItem_deny_dcc *deny);
|
||||
extern void dcc_wipe_services(void);
|
||||
extern void reread_motdsandrules();
|
||||
@@ -1,75 +0,0 @@
|
||||
/************************************************************************
|
||||
* Unreal Internet Relay Chat Daemon, include/hash.h
|
||||
* Copyright (C) 1991 Darren Reed
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __hash_include__
|
||||
#define __hash_include__
|
||||
|
||||
typedef struct hashentry {
|
||||
int hits;
|
||||
int links;
|
||||
void *list;
|
||||
} aHashEntry;
|
||||
|
||||
/* Taner had BITS_PER_COL 4 BITS_PER_COL_MASK 0xF - Dianora */
|
||||
|
||||
#define BITS_PER_COL 3
|
||||
#define BITS_PER_COL_MASK 0x7
|
||||
#define MAX_SUB (1<<BITS_PER_COL)
|
||||
|
||||
/* Client hash table
|
||||
* used in hash.c
|
||||
*/
|
||||
|
||||
#define U_MAX_INITIAL 2048
|
||||
#define U_MAX_INITIAL_MASK (U_MAX_INITIAL-1)
|
||||
#define U_MAX (U_MAX_INITIAL*MAX_SUB)
|
||||
|
||||
/* Channel hash table
|
||||
* used in hash.c
|
||||
*/
|
||||
|
||||
#define CH_MAX_INITIAL 2048
|
||||
#define CH_MAX_INITIAL_MASK (CH_MAX_INITIAL-1)
|
||||
#define CH_MAX (CH_MAX_INITIAL*MAX_SUB)
|
||||
|
||||
/* Who was hash table
|
||||
* used in whowas.c
|
||||
*/
|
||||
|
||||
#define WW_MAX_INITIAL 16
|
||||
#define WW_MAX_INITIAL_MASK (WW_MAX_INITIAL-1)
|
||||
#define WW_MAX (WW_MAX_INITIAL*MAX_SUB)
|
||||
|
||||
#define WATCHHASHSIZE 10007 /* prime number */
|
||||
|
||||
/*
|
||||
* Throttling
|
||||
*/
|
||||
#ifdef THROTTLING
|
||||
#define THROTTLING_HASH_SIZE 1019 /* prime number */
|
||||
#endif
|
||||
|
||||
|
||||
#define NullChn ((aChannel *)0)
|
||||
|
||||
#define find_channel hash_find_channel
|
||||
|
||||
#endif /* __hash_include__ */
|
||||
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1983 Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted
|
||||
* provided that: (1) source distributions retain this entire copyright
|
||||
* notice and comment, and (2) distributions including binaries display
|
||||
* the following acknowledgement: ``This product includes software
|
||||
* developed by the University of California, Berkeley and its contributors''
|
||||
* in the documentation or other materials provided with the distribution
|
||||
* and in all advertising materials mentioning features or use of this
|
||||
* software. 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* @(#)inet.h 5.4 (Berkeley) 6/1/90
|
||||
*/
|
||||
|
||||
/* External definitions for functions in inet(3) */
|
||||
#include "config.h" /* for system definitions */
|
||||
|
||||
#ifdef __alpha
|
||||
#define __u_l unsigned int
|
||||
#else
|
||||
#define __u_l unsigned long
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
# ifndef _WIN32
|
||||
extern __u_l inet_addr(char *);
|
||||
extern char *inet_ntoa(struct in_addr);
|
||||
extern int inet_aton(const char *, struct in_addr *);
|
||||
extern int inet_netof(struct in_addr);
|
||||
# endif
|
||||
extern __u_l inet_makeaddr(int, int);
|
||||
extern __u_l inet_network(char *);
|
||||
extern __u_l inet_lnaof(struct in_addr);
|
||||
#else
|
||||
# ifndef _WIN32
|
||||
extern __u_l inet_addr();
|
||||
extern char *inet_ntoa();
|
||||
# endif
|
||||
#ifndef HPUX
|
||||
extern __u_l inet_makeaddr();
|
||||
#endif
|
||||
#endif
|
||||
#ifndef HPUX
|
||||
extern __u_l inet_network();
|
||||
extern __u_l inet_lnaof();
|
||||
#endif
|
||||
#undef __u_l
|
||||
@@ -14,16 +14,8 @@
|
||||
* Proto types
|
||||
*/
|
||||
|
||||
/* You do want it to work in debug mode yes ? --DrBin */
|
||||
|
||||
/* ugly hack GRR */
|
||||
#if !defined(__GNUC__) && !defined(__common_include__)
|
||||
#define __attribute__(x) /* nothing */
|
||||
#endif
|
||||
|
||||
extern char *ircvsprintf(char *str, const char *format, va_list);
|
||||
extern char *ircsprintf(char *str, const char *format, ...) __attribute__((format(printf,2,3)));
|
||||
|
||||
extern char *ircsprintf(char *str, const char *format, ...);
|
||||
extern const char atoi_tab[4000];
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Unreal Internet Relay Chat Daemon, include/license.h
|
||||
* Copyright (C) 1999 Carsten Munk
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* GNU License converted by Techie <stskeeps@tspre.org>
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
char *gnulicense[] = {
|
||||
" \2UnrealIRCd License\2",
|
||||
"This program is free software; you can redistribute it and/or modify",
|
||||
"it under the terms of the GNU General Public License as published by",
|
||||
"the Free Software Foundation; either version 1, or (at your option)",
|
||||
"any later version.",
|
||||
"",
|
||||
"This program is distributed in the hope that it will be useful,",
|
||||
"but WITHOUT ANY WARRANTY; without even the implied warranty of",
|
||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the",
|
||||
"GNU General Public License for more details.",
|
||||
"",
|
||||
"You should have received a copy of the GNU General Public License",
|
||||
"along with this program; if not, write to the Free Software",
|
||||
"Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.",
|
||||
"",
|
||||
"To see the UnrealIRCd License, please point your browser",
|
||||
"at http://www.gnu.org/copyleft/gpl.html or look in the",
|
||||
"file LICENSE in the UnrealIRCd dist",
|
||||
0
|
||||
};
|
||||
@@ -1,587 +0,0 @@
|
||||
/************************************************************************
|
||||
* Unreal Internet Relay Chat Daemon, include/modules.h
|
||||
* (C) Carsten V. Munk 2000 <stskeeps@tspre.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
#ifndef MODULES_H
|
||||
#define MODULES_H
|
||||
#include "types.h"
|
||||
#define MOD_VERSION "3.2-b5-1"
|
||||
#define MOD_WE_SUPPORT "3.2-b5*"
|
||||
#define MAXCUSTOMHOOKS 30
|
||||
#define MAXHOOKTYPES 70
|
||||
#if defined(_WIN32)
|
||||
#define DLLFUNC _declspec(dllexport)
|
||||
#define irc_dlopen(x,y) LoadLibrary(x)
|
||||
#define irc_dlclose FreeLibrary
|
||||
#define irc_dlsym(x,y,z) z = (void *)GetProcAddress(x,y)
|
||||
#undef irc_dlerror
|
||||
#elif defined(HPUX)
|
||||
#define irc_dlopen(x,y) shl_load(x,y,0L)
|
||||
#define irc_dlsym(x,y,z) shl_findsym(x,y,z)
|
||||
#define irc_dlclose shl_unload
|
||||
#define irc_dlerror() strerror(errno)
|
||||
#else
|
||||
#define irc_dlopen dlopen
|
||||
#define irc_dlclose dlclose
|
||||
#if defined(UNDERSCORE)
|
||||
#define irc_dlsym(x,y,z) z = obsd_dlsym(x,y)
|
||||
#else
|
||||
#define irc_dlsym(x,y,z) z = dlsym(x,y)
|
||||
#endif
|
||||
#define irc_dlerror dlerror
|
||||
#define DLLFUNC
|
||||
#endif
|
||||
|
||||
#define EVENT(x) void (x) (void *data)
|
||||
|
||||
typedef struct _mod_symboltable Mod_SymbolDepTable;
|
||||
typedef struct _event Event;
|
||||
typedef struct _eventinfo EventInfo;
|
||||
typedef struct _irchook Hook;
|
||||
typedef struct _hooktype Hooktype;
|
||||
|
||||
/*
|
||||
* Module header that every module must include, with the name of
|
||||
* mod_header
|
||||
*/
|
||||
|
||||
typedef struct _ModuleHeader {
|
||||
char *name;
|
||||
char *version;
|
||||
char *description;
|
||||
char *modversion;
|
||||
Mod_SymbolDepTable *symdep;
|
||||
} ModuleHeader;
|
||||
|
||||
/*
|
||||
* One piece of Borg ass..
|
||||
*/
|
||||
typedef struct _Module Module;
|
||||
|
||||
typedef struct _ModuleChild
|
||||
{
|
||||
struct _ModuleChild *prev, *next;
|
||||
Module *child; /* Aww. aint it cute? */
|
||||
} ModuleChild;
|
||||
|
||||
typedef struct {
|
||||
int size;
|
||||
int module_load;
|
||||
Module *handle;
|
||||
} ModuleInfo;
|
||||
|
||||
|
||||
#define MOBJ_EVENT 0x0001
|
||||
#define MOBJ_HOOK 0x0002
|
||||
#define MOBJ_COMMAND 0x0004
|
||||
#define MOBJ_HOOKTYPE 0x0008
|
||||
#define MOBJ_VERSIONFLAG 0x0010
|
||||
#define MOBJ_SNOMASK 0x0020
|
||||
#define MOBJ_UMODE 0x0040
|
||||
#define MOBJ_CMDOVERRIDE 0x0080
|
||||
#define MOBJ_EXTBAN 0x0100
|
||||
|
||||
typedef struct {
|
||||
long mode;
|
||||
char flag;
|
||||
int (*allowed)(aClient *sptr, int what);
|
||||
char unloaded;
|
||||
Module *owner;
|
||||
} Umode;
|
||||
|
||||
typedef struct {
|
||||
long mode;
|
||||
char flag;
|
||||
int (*allowed)(aClient *sptr, int what);
|
||||
char unloaded;
|
||||
Module *owner;
|
||||
} Snomask;
|
||||
|
||||
#ifdef EXTCMODE
|
||||
#define EXCHK_ACCESS 0 /* Check access */
|
||||
#define EXCHK_ACCESS_ERR 1 /* Check access and send error if needed */
|
||||
#define EXCHK_PARAM 2 /* Check parameter and send error if needed */
|
||||
|
||||
#define EXSJ_SAME 0 /* Parameters are the same */
|
||||
#define EXSJ_WEWON 1 /* We won! w00t */
|
||||
#define EXSJ_THEYWON 2 /* They won :( */
|
||||
|
||||
/* return values for EXCHK_ACCESS*: */
|
||||
#define EX_DENY 0 /* Disallowed, except in case of operoverride */
|
||||
#define EX_ALLOW 1 /* Allowed */
|
||||
#define EX_ALWAYS_DENY -1 /* Disallowed, even in case of operoverride
|
||||
* (eg: for operlevel modes like +A)
|
||||
*/
|
||||
|
||||
/** Extended channel mode table.
|
||||
* This table contains all extended channelmode info like the flag, mode, their
|
||||
* functions, etc..
|
||||
*/
|
||||
typedef unsigned long Cmode_t;
|
||||
|
||||
#define EXTCM_PAR_HEADER struct _CmodeParam *prev, *next; char flag;
|
||||
|
||||
typedef struct _CmodeParam {
|
||||
EXTCM_PAR_HEADER
|
||||
/** other fields are placed after this header in your own paramstruct */
|
||||
} CmodeParam;
|
||||
|
||||
typedef struct {
|
||||
/** mode character (like 'Z') */
|
||||
char flag;
|
||||
|
||||
/** unique flag (like 0x10) */
|
||||
Cmode_t mode;
|
||||
|
||||
/** # of paramters (1 or 0) */
|
||||
int paracount;
|
||||
|
||||
/** access and parameter checking.
|
||||
* aClient *: the client
|
||||
* aChannel *: the channel
|
||||
* para *: the parameter (NULL for paramless modes)
|
||||
* int: check type (see EXCHK_*)
|
||||
* int: what (MODE_ADD or MODE_DEL)
|
||||
* return value: 1=ok, 0=bad
|
||||
*/
|
||||
int (*is_ok)(aClient *,aChannel *, char *para, int, int);
|
||||
|
||||
/** NOTE: The routines below are NULL for paramless modes */
|
||||
|
||||
/** Store parameter in memory for channel.
|
||||
* aExtCMtableParam *: the list (usually chptr->mode.extmodeparams).
|
||||
* char *: the parameter.
|
||||
* return value: the head of the list, RTFS if you wonder why.
|
||||
* design notes: only alloc a new paramstruct if you need to, search for
|
||||
* any current one first (like in case of mode +y 5 and then +y 6 later without -y).
|
||||
*/
|
||||
CmodeParam * (*put_param)(CmodeParam *, char *);
|
||||
|
||||
/** Get readable string version" of the stored parameter.
|
||||
* aExtCMtableParam *: the list (usually chptr->mode.extmodeparams).
|
||||
* return value: a pointer to the string (temp. storage)
|
||||
*/
|
||||
char * (*get_param)(CmodeParam *);
|
||||
|
||||
/** Convert input parameter to output.
|
||||
* Like +l "1aaa" becomes "1".
|
||||
* char *: the input parameter.
|
||||
* return value: pointer to output string (temp. storage)
|
||||
*/
|
||||
char * (*conv_param)(char *);
|
||||
|
||||
/** free and remove parameter from list.
|
||||
* aExtCMtableParam *: the list (usually chptr->mode.extmodeparams).
|
||||
*/
|
||||
void (*free_param)(CmodeParam *);
|
||||
|
||||
/** duplicate a struct and return a pointer to duplicate.
|
||||
* This is usually just a malloc + memcpy.
|
||||
* aExtCMtableParam *: source struct itself (no list).
|
||||
* return value: pointer to newly allocated struct.
|
||||
*/
|
||||
CmodeParam * (*dup_struct)(CmodeParam *);
|
||||
|
||||
/** Compares 2 parameters and decides who wins the sjoin fight.
|
||||
* When syncing channel modes (m_sjoin) a parameter conflict may occur, things like
|
||||
* +l 5 vs +l 10. This function should determinate who wins the fight, this decision
|
||||
* should of course not be random but the same at every server on the net.
|
||||
* examples of such comparisons are "highest wins" (+l) and a strcmp() check (+k/+L).
|
||||
* aChannel *: channel the fight is about.
|
||||
* aExtCMtableParam *: our parameter
|
||||
* aExtCMtableParam *: their parameter
|
||||
*/
|
||||
int (*sjoin_check)(aChannel *, CmodeParam *, CmodeParam *);
|
||||
} Cmode;
|
||||
|
||||
typedef struct {
|
||||
char flag;
|
||||
int paracount;
|
||||
int (*is_ok)(aClient *,aChannel *, char *para, int, int);
|
||||
CmodeParam * (*put_param)(CmodeParam *, char *);
|
||||
char * (*get_param)(CmodeParam *);
|
||||
char * (*conv_param)(char *);
|
||||
void (*free_param)(CmodeParam *);
|
||||
CmodeParam * (*dup_struct)(CmodeParam *);
|
||||
int (*sjoin_check)(aChannel *, CmodeParam *, CmodeParam *);
|
||||
} CmodeInfo;
|
||||
#endif
|
||||
|
||||
/*** Extended bans ***/
|
||||
|
||||
#define EXBCHK_ACCESS 0 /* Check access */
|
||||
#define EXBCHK_ACCESS_ERR 1 /* Check access and send error */
|
||||
#define EXBCHK_PARAM 2 /* Check if the parameter is valid */
|
||||
|
||||
#define EXBTYPE_BAN 0 /* a ban */
|
||||
#define EXBTYPE_EXCEPT 1 /* an except */
|
||||
|
||||
#define EXTBANTABLESZ 32
|
||||
|
||||
typedef struct {
|
||||
/** extbans module */
|
||||
Module *owner;
|
||||
/** extended ban character */
|
||||
char flag;
|
||||
|
||||
/** access checking [optional].
|
||||
* aClient *: the client
|
||||
* aChannel *: the channel
|
||||
* para: the ban parameter
|
||||
* int: check type (see EXBCHK_*)
|
||||
* int: what (MODE_ADD or MODE_DEL)
|
||||
* int: what2 (EXBTYPE_BAN or EXBTYPE_EXCEPT)
|
||||
* return value: 1=ok, 0=bad
|
||||
* NOTE: just set this of NULL if you want only +hoaq to place/remove bans as usual.
|
||||
* NOTE2: This has not been tested yet!!
|
||||
*/
|
||||
int (*is_ok)(aClient *, aChannel *, char *para, int, int, int);
|
||||
|
||||
/** Convert input parameter to output [optional].
|
||||
* like with normal bans '+b blah' gets '+b blah!*@*', and it allows
|
||||
* you to limit the length of the ban too. You can set this to NULL however
|
||||
* to use the value as-is.
|
||||
* char *: the input parameter.
|
||||
* return value: pointer to output string (temp. storage)
|
||||
*/
|
||||
char * (*conv_param)(char *);
|
||||
|
||||
/** Checks if the user is affected by this ban [required].
|
||||
* Called from is_banned.
|
||||
* aClient *: the client
|
||||
* aChannel *: the channel
|
||||
* para: the ban entry
|
||||
* int: a value of BANCHK_* (see struct.h)
|
||||
*/
|
||||
int (*is_banned)(aClient *, aChannel *, char *, int);
|
||||
} Extban;
|
||||
|
||||
typedef struct {
|
||||
char flag;
|
||||
int (*is_ok)(aClient *, aChannel *, char *para, int, int, int);
|
||||
char * (*conv_param)(char *);
|
||||
int (*is_banned)(aClient *, aChannel *, char *, int);
|
||||
} ExtbanInfo;
|
||||
|
||||
|
||||
typedef struct _command {
|
||||
struct _command *prev, *next;
|
||||
aCommand *cmd, *tok;
|
||||
} Command;
|
||||
|
||||
typedef struct _versionflag {
|
||||
struct _versionflag *prev, *next;
|
||||
char flag;
|
||||
ModuleChild *parents;
|
||||
} Versionflag;
|
||||
|
||||
typedef struct _ModuleObject {
|
||||
struct _ModuleObject *prev, *next;
|
||||
short type;
|
||||
union {
|
||||
Event *event;
|
||||
Hook *hook;
|
||||
Command *command;
|
||||
Hooktype *hooktype;
|
||||
Versionflag *versionflag;
|
||||
Snomask *snomask;
|
||||
Umode *umode;
|
||||
Cmdoverride *cmdoverride;
|
||||
Extban *extban;
|
||||
} object;
|
||||
} ModuleObject;
|
||||
|
||||
struct _irchook {
|
||||
Hook *prev, *next;
|
||||
short type;
|
||||
union {
|
||||
int (*intfunc)();
|
||||
void (*voidfunc)();
|
||||
char *(*pcharfunc)();
|
||||
} func;
|
||||
Module *owner;
|
||||
};
|
||||
|
||||
struct _hooktype {
|
||||
short id;
|
||||
char *string;
|
||||
ModuleChild *parents;
|
||||
};
|
||||
/*
|
||||
* What we use to keep track internally of the modules
|
||||
*/
|
||||
|
||||
#define MODERR_NOERROR 0
|
||||
#define MODERR_EXISTS 1
|
||||
#define MODERR_NOSPACE 2
|
||||
#define MODERR_INVALID 3
|
||||
#define MODERR_NOTFOUND 4
|
||||
|
||||
unsigned int ModuleGetError(Module *module);
|
||||
const char *ModuleGetErrorStr(Module *module);
|
||||
unsigned int ModuleGetOptions(Module *module);
|
||||
unsigned int ModuleSetOptions(Module *module, unsigned int options);
|
||||
|
||||
struct _Module
|
||||
{
|
||||
struct _Module *prev, *next;
|
||||
ModuleHeader *header; /* The module's header */
|
||||
#ifdef _WIN32
|
||||
HMODULE dll; /* Return value of LoadLibrary */
|
||||
#elif defined(HPUX)
|
||||
shl_t dll;
|
||||
#else
|
||||
void *dll; /* Return value of dlopen */
|
||||
#endif
|
||||
unsigned char flags; /* 8-bits for flags .. [<- this is misleading, there's mod->flags = .. everywhere] */
|
||||
ModuleChild *children;
|
||||
ModuleObject *objects;
|
||||
ModuleInfo modinfo; /* Used to store handle info for module */
|
||||
unsigned char options;
|
||||
unsigned char errorcode;
|
||||
char *tmp_file;
|
||||
unsigned char compilecheck; /* feel free to rename this mess, but mod->flags sucks :[. */
|
||||
};
|
||||
/*
|
||||
* Symbol table
|
||||
*/
|
||||
|
||||
#define MOD_OPT_PERM 0x0001 /* Permanent module (not unloadable) */
|
||||
#define MOD_OPT_OFFICIAL 0x0002 /* Official module, do not set "tainted" */
|
||||
|
||||
struct _mod_symboltable
|
||||
{
|
||||
#ifndef STATIC_LINKING
|
||||
char *symbol;
|
||||
#else
|
||||
void *realfunc;
|
||||
#endif
|
||||
vFP *pointer;
|
||||
#ifndef STATIC_LINKING
|
||||
char *module;
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifndef STATIC_LINKING
|
||||
#define MOD_Dep(name, container,module) {#name, (vFP *) &container, module}
|
||||
#else
|
||||
#define MOD_Dep(name, container,module) {(void *)&name, (vFP *) &container}
|
||||
#endif
|
||||
/* Event structs */
|
||||
struct _event {
|
||||
Event *prev, *next;
|
||||
char *name;
|
||||
time_t every;
|
||||
long howmany;
|
||||
vFP event;
|
||||
void *data;
|
||||
time_t last;
|
||||
Module *owner;
|
||||
};
|
||||
|
||||
#define EMOD_EVERY 0x0001
|
||||
#define EMOD_HOWMANY 0x0002
|
||||
#define EMOD_NAME 0x0004
|
||||
#define EMOD_EVENT 0x0008
|
||||
#define EMOD_DATA 0x0010
|
||||
|
||||
struct _eventinfo {
|
||||
int flags;
|
||||
long howmany;
|
||||
time_t every;
|
||||
char *name;
|
||||
vFP event;
|
||||
void *data;
|
||||
};
|
||||
|
||||
|
||||
/* Huh? Why are those not marked as extern?? -- Syzop */
|
||||
|
||||
#define EventAdd(name, every, howmany, event, data) EventAddEx(NULL, name, every, howmany, event, data)
|
||||
Event *EventAddEx(Module *, char *name, long every, long howmany,
|
||||
vFP event, void *data);
|
||||
Event *EventDel(Event *event);
|
||||
Event *EventMarkDel(Event *event);
|
||||
Event *EventFind(char *name);
|
||||
int EventMod(Event *event, EventInfo *mods);
|
||||
void DoEvents(void);
|
||||
void EventStatus(aClient *sptr);
|
||||
void SetupEvents(void);
|
||||
void LockEventSystem(void);
|
||||
void UnlockEventSystem(void);
|
||||
extern Hook *Hooks[MAXHOOKTYPES];
|
||||
extern Hooktype Hooktypes[MAXCUSTOMHOOKS];
|
||||
|
||||
void Module_Init(void);
|
||||
char *Module_Create(char *path);
|
||||
void Init_all_testing_modules(void);
|
||||
void Unload_all_loaded_modules(void);
|
||||
void Unload_all_testing_modules(void);
|
||||
int Module_Unload(char *name, int unload);
|
||||
vFP Module_Sym(char *name);
|
||||
vFP Module_SymX(char *name, Module **mptr);
|
||||
int Module_free(Module *mod);
|
||||
|
||||
#ifdef __OpenBSD__
|
||||
void *obsd_dlsym(void *handle, char *symbol);
|
||||
#endif
|
||||
|
||||
Versionflag *VersionflagAdd(Module *module, char flag);
|
||||
void VersionflagDel(Versionflag *vflag, Module *module);
|
||||
|
||||
#define add_Hook(hooktype, func) HookAddMain(NULL, hooktype, func, NULL, NULL)
|
||||
#define HookAdd(hooktype, func) HookAddMain(NULL, hooktype, func, NULL, NULL)
|
||||
#define HookAddEx(module, hooktype, func) HookAddMain(module, hooktype, func, NULL, NULL)
|
||||
#define HookAddVoid(hooktype, func) HookAddMain(NULL, hooktype, NULL, func, NULL)
|
||||
#define HookAddVoidEx(module, hooktype, func) HookAddMain(module, hooktype, NULL, func, NULL)
|
||||
#define HookAddPChar(hooktype, func) HookAddMain(NULL, hooktype, NULL, NULL, func)
|
||||
#define HookAddPCharEx(module, hooktype, func) HookAddMain(module, hooktype, NULL, NULL, func)
|
||||
#define add_HookX(hooktype, func1, func2, func3) HookAddMain(NULL, hooktype, func1, func2, func3)
|
||||
|
||||
Hook *HookAddMain(Module *module, int hooktype, int (*intfunc)(), void (*voidfunc)(), char *(*pcharfunc)());
|
||||
Hook *HookDel(Hook *hook);
|
||||
|
||||
Hooktype *HooktypeAdd(Module *module, char *string, int *type);
|
||||
void HooktypeDel(Hooktype *hooktype, Module *module);
|
||||
|
||||
#define RunHook0(hooktype) do { Hook *h; for (h = Hooks[hooktype]; h; h = h->next)(*(h->func.intfunc))(); } while(0)
|
||||
#define RunHook(hooktype,x) do { Hook *h; for (h = Hooks[hooktype]; h; h = h->next) (*(h->func.intfunc))(x); } while(0)
|
||||
#define RunHookReturn(hooktype,x,ret) do { Hook *h; for (h = Hooks[hooktype]; h; h = h->next) if((*(h->func.intfunc))(x) ret) return -1; } while(0)
|
||||
#define RunHookReturnInt(hooktype,x,retchk) \
|
||||
{ \
|
||||
int retval; \
|
||||
Hook *h; \
|
||||
for (h = Hooks[hooktype]; h; h = h->next) \
|
||||
{ \
|
||||
retval = (*(h->func.intfunc))(x); \
|
||||
if (retval retchk) return retval; \
|
||||
} \
|
||||
}
|
||||
#define RunHookReturnInt2(hooktype,x,y,retchk) \
|
||||
{ \
|
||||
int retval; \
|
||||
Hook *h; \
|
||||
for (h = Hooks[hooktype]; h; h = h->next) \
|
||||
{ \
|
||||
retval = (*(h->func.intfunc))(x,y); \
|
||||
if (retval retchk) return retval; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define RunHookReturnVoid(hooktype,x,ret) do { Hook *h; for (h = Hooks[hooktype]; h; h = h->next) if((*(h->func.intfunc))(x) ret) return; } while(0)
|
||||
#define RunHook2(hooktype,x,y) do { Hook *h; for (h = Hooks[hooktype]; h; h = h->next) (*(h->func.intfunc))(x,y); } while(0)
|
||||
#define RunHook3(hooktype,a,b,c) do { Hook *h; for (h = Hooks[hooktype]; h; h = h->next) (*(h->func.intfunc))(a,b,c); } while(0)
|
||||
#define RunHook4(hooktype,a,b,c,d) do { Hook *h; for (h = Hooks[hooktype]; h; h = h->next) (*(h->func.intfunc))(a,b,c,d); } while(0)
|
||||
#define RunHook5(hooktype,a,b,c,d,e) do { Hook *h; for (h = Hooks[hooktype]; h; h = h->next) (*(h->func.intfunc))(a,b,c,d,e); } while(0)
|
||||
#define RunHook6(hooktype,a,b,c,d,e,f) do { Hook *h; for (h = Hooks[hooktype]; h; h = h->next) (*(h->func.intfunc))(a,b,c,d,e,f); } while(0)
|
||||
#define RunHook7(hooktype,a,b,c,d,e,f,g) do { Hook *h; for (h = Hooks[hooktype]; h; h = h->next) (*(h->func.intfunc))(a,b,c,d,e,f,g); } while(0)
|
||||
|
||||
Command *CommandAdd(Module *module, char *cmd, char *tok, int (*func)(), unsigned char params, int flags);
|
||||
void CommandDel(Command *command);
|
||||
int CommandExists(char *name);
|
||||
Cmdoverride *CmdoverrideAdd(Module *module, char *cmd, iFP function);
|
||||
void CmdoverrideDel(Cmdoverride *ovr);
|
||||
int CallCmdoverride(Cmdoverride *ovr, aClient *cptr, aClient *sptr, int parc, char *parv[]);
|
||||
|
||||
/* Hook types */
|
||||
#define HOOKTYPE_LOCAL_QUIT 1
|
||||
#define HOOKTYPE_LOCAL_NICKCHANGE 2
|
||||
#define HOOKTYPE_LOCAL_CONNECT 3
|
||||
#define HOOKTYPE_REHASHFLAG 4
|
||||
#define HOOKTYPE_PRE_LOCAL_PART 5
|
||||
#define HOOKTYPE_CONFIGPOSTTEST 6
|
||||
#define HOOKTYPE_REHASH 7
|
||||
#define HOOKTYPE_PRE_LOCAL_CONNECT 8
|
||||
#define HOOKTYPE_PRE_LOCAL_QUIT 9
|
||||
#define HOOKTYPE_GUEST 10
|
||||
#define HOOKTYPE_SERVER_CONNECT 11
|
||||
#define HOOKTYPE_SERVER_QUIT 12
|
||||
#define HOOKTYPE_STATS 13
|
||||
#define HOOKTYPE_LOCAL_JOIN 14
|
||||
#define HOOKTYPE_CONFIGTEST 15
|
||||
#define HOOKTYPE_CONFIGRUN 16
|
||||
/* If you ever change the number of usermsg & chanmsg, notify Syzop first, kthx! ;p */
|
||||
#define HOOKTYPE_USERMSG 17
|
||||
#define HOOKTYPE_CHANMSG 18
|
||||
#define HOOKTYPE_LOCAL_PART 19
|
||||
#define HOOKTYPE_LOCAL_KICK 20
|
||||
#define HOOKTYPE_LOCAL_CHANMODE 21
|
||||
#define HOOKTYPE_LOCAL_TOPIC 22
|
||||
#define HOOKTYPE_LOCAL_OPER 23
|
||||
#define HOOKTYPE_UNKUSER_QUIT 24
|
||||
#define HOOKTYPE_LOCAL_PASS 25
|
||||
#define HOOKTYPE_REMOTE_CONNECT 26
|
||||
#define HOOKTYPE_REMOTE_QUIT 27
|
||||
#define HOOKTYPE_PRE_LOCAL_JOIN 28
|
||||
#define HOOKTYPE_PRE_LOCAL_KICK 29
|
||||
#define HOOKTYPE_PRE_LOCAL_TOPIC 30
|
||||
#define HOOKTYPE_REMOTE_NICKCHANGE 31
|
||||
#define HOOKTYPE_CHANNEL_CREATE 32
|
||||
#define HOOKTYPE_CHANNEL_DESTROY 33
|
||||
#define HOOKTYPE_REMOTE_CHANMODE 34
|
||||
#define HOOKTYPE_TKL_EXCEPT 35
|
||||
#define HOOKTYPE_UMODE_CHANGE 36
|
||||
#define HOOKTYPE_TOPIC 37
|
||||
#define HOOKTYPE_REHASH_COMPLETE 38
|
||||
|
||||
/* Hook return values */
|
||||
#define HOOK_CONTINUE 0
|
||||
#define HOOK_ALLOW -1
|
||||
#define HOOK_DENY 1
|
||||
|
||||
/* Module flags */
|
||||
#define MODFLAG_NONE 0x0000
|
||||
#define MODFLAG_LOADED 0x0001 /* Fully loaded */
|
||||
#define MODFLAG_TESTING 0x0002 /* Not yet initialized */
|
||||
#define MODFLAG_INIT 0x0004 /* Initialized */
|
||||
#define MODFLAG_DELAYED 0x0008 /* Delayed unload */
|
||||
|
||||
/* Module function return values */
|
||||
#define MOD_SUCCESS 0
|
||||
#define MOD_FAILED -1
|
||||
#define MOD_DELAY 2
|
||||
|
||||
#define CONFIG_MAIN 1
|
||||
#define CONFIG_SET 2
|
||||
#define CONFIG_BAN 3
|
||||
#define CONFIG_EXCEPT 4
|
||||
#define CONFIG_DENY 5
|
||||
#define CONFIG_ALLOW 6
|
||||
|
||||
#ifdef DYNAMIC_LINKING
|
||||
#define MOD_HEADER(name) Mod_Header
|
||||
#define MOD_TEST(name) Mod_Test
|
||||
#define MOD_INIT(name) Mod_Init
|
||||
#define MOD_LOAD(name) Mod_Load
|
||||
#define MOD_UNLOAD(name) Mod_Unload
|
||||
#else
|
||||
#define MOD_HEADER(name) name##_Header
|
||||
#define MOD_TEST(name) name##_Test
|
||||
#define MOD_INIT(name) name##_Init
|
||||
#define MOD_LOAD(name) name##_Load
|
||||
#define MOD_UNLOAD(name) name##_Unload
|
||||
#endif
|
||||
|
||||
#ifdef DYNAMIC_LINKING
|
||||
/* ugly alert!!!! */
|
||||
#include "version.h"
|
||||
char Mod_Version[] = BASE_VERSION PATCH1 PATCH2 PATCH3 PATCH4 PATCH5 PATCH6 PATCH7 PATCH8 PATCH9;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
-322
@@ -1,322 +0,0 @@
|
||||
|
||||
/************************************************************************
|
||||
* Unreal Internet Relay Chat Daemon, include/msg.h
|
||||
* Copyright (C) 1990 Jarkko Oikarinen and
|
||||
* University of Oulu, Computing Center
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __msg_include__
|
||||
#define __msg_include__
|
||||
|
||||
#define MSG_PRIVATE "PRIVMSG" /* PRIV */
|
||||
#define TOK_PRIVATE "!" /* 33 */
|
||||
#define MSG_WHOIS "WHOIS" /* WHOI */
|
||||
#define TOK_WHOIS "#" /* 35 */
|
||||
#define MSG_WHOWAS "WHOWAS" /* WHOW */
|
||||
#define TOK_WHOWAS "$" /* 36 */
|
||||
#define MSG_USER "USER" /* USER */
|
||||
#define TOK_USER "%" /* 37 */
|
||||
#define MSG_NICK "NICK" /* NICK */
|
||||
#define TOK_NICK "&" /* 38 */
|
||||
#define MSG_SERVER "SERVER" /* SERV */
|
||||
#define TOK_SERVER "'" /* 39 */
|
||||
#define MSG_LIST "LIST" /* LIST */
|
||||
#define TOK_LIST "(" /* 40 */
|
||||
#define MSG_TOPIC "TOPIC" /* TOPI */
|
||||
#define TOK_TOPIC ")" /* 41 */
|
||||
#define MSG_INVITE "INVITE" /* INVI */
|
||||
#define TOK_INVITE "*" /* 42 */
|
||||
#define MSG_VERSION "VERSION" /* VERS */
|
||||
#define TOK_VERSION "+" /* 43 */
|
||||
#define MSG_QUIT "QUIT" /* QUIT */
|
||||
#define TOK_QUIT "," /* 44 */
|
||||
#define MSG_SQUIT "SQUIT" /* SQUI */
|
||||
#define TOK_SQUIT "-" /* 45 */
|
||||
#define MSG_KILL "KILL" /* KILL */
|
||||
#define TOK_KILL "." /* 46 */
|
||||
#define MSG_INFO "INFO" /* INFO */
|
||||
#define TOK_INFO "/" /* 47 */
|
||||
#define MSG_LINKS "LINKS" /* LINK */
|
||||
#define TOK_LINKS "0" /* 48 */
|
||||
#define MSG_SUMMON "SUMMON" /* SUMM */
|
||||
#define TOK_SUMMON "1" /* 49 */
|
||||
#define MSG_STATS "STATS" /* STAT */
|
||||
#define TOK_STATS "2" /* 50 */
|
||||
#define MSG_USERS "USERS" /* USER -> USRS */
|
||||
#define TOK_USERS "3" /* 51 */
|
||||
#define MSG_HELP "HELP" /* HELP */
|
||||
#define MSG_HELPOP "HELPOP" /* HELP */
|
||||
#define TOK_HELP "4" /* 52 */
|
||||
#define MSG_ERROR "ERROR" /* ERRO */
|
||||
#define TOK_ERROR "5" /* 53 */
|
||||
#define MSG_AWAY "AWAY" /* AWAY */
|
||||
#define TOK_AWAY "6" /* 54 */
|
||||
#define MSG_CONNECT "CONNECT" /* CONN */
|
||||
#define TOK_CONNECT "7" /* 55 */
|
||||
#define MSG_PING "PING" /* PING */
|
||||
#define TOK_PING "8" /* 56 */
|
||||
#define MSG_PONG "PONG" /* PONG */
|
||||
#define TOK_PONG "9" /* 57 */
|
||||
#define MSG_OPER "OPER" /* OPER */
|
||||
#define TOK_OPER ";" /* 59 */
|
||||
#define MSG_PASS "PASS" /* PASS */
|
||||
#define TOK_PASS "<" /* 60 */
|
||||
#define MSG_WALLOPS "WALLOPS" /* WALL */
|
||||
#define TOK_WALLOPS "=" /* 61 */
|
||||
#define MSG_TIME "TIME" /* TIME */
|
||||
#define TOK_TIME ">" /* 62 */
|
||||
#define MSG_NAMES "NAMES" /* NAME */
|
||||
#define TOK_NAMES "?" /* 63 */
|
||||
#define MSG_ADMIN "ADMIN" /* ADMI */
|
||||
#define TOK_ADMIN "@" /* 64 */
|
||||
#define MSG_NOTICE "NOTICE" /* NOTI */
|
||||
#define TOK_NOTICE "B" /* 66 */
|
||||
#define MSG_JOIN "JOIN" /* JOIN */
|
||||
#define TOK_JOIN "C" /* 67 */
|
||||
#define MSG_PART "PART" /* PART */
|
||||
#define TOK_PART "D" /* 68 */
|
||||
#define MSG_LUSERS "LUSERS" /* LUSE */
|
||||
#define TOK_LUSERS "E" /* 69 */
|
||||
#define MSG_MOTD "MOTD" /* MOTD */
|
||||
#define TOK_MOTD "F" /* 70 */
|
||||
#define MSG_MODE "MODE" /* MODE */
|
||||
#define TOK_MODE "G" /* 71 */
|
||||
#define MSG_KICK "KICK" /* KICK */
|
||||
#define TOK_KICK "H" /* 72 */
|
||||
#define MSG_SERVICE "SERVICE" /* SERV -> SRVI */
|
||||
#define TOK_SERVICE "I" /* 73 */
|
||||
#define MSG_USERHOST "USERHOST" /* USER -> USRH */
|
||||
#define TOK_USERHOST "J" /* 74 */
|
||||
#define MSG_ISON "ISON" /* ISON */
|
||||
#define TOK_ISON "K" /* 75 */
|
||||
#define MSG_REHASH "REHASH" /* REHA */
|
||||
#define TOK_REHASH "O" /* 79 */
|
||||
#define MSG_RESTART "RESTART" /* REST */
|
||||
#define TOK_RESTART "P" /* 80 */
|
||||
#define MSG_CLOSE "CLOSE" /* CLOS */
|
||||
#define TOK_CLOSE "Q" /* 81 */
|
||||
#define MSG_DIE "DIE" /* DIE */
|
||||
#define TOK_DIE "R" /* 82 */
|
||||
#define MSG_HASH "HASH" /* HASH */
|
||||
#define TOK_HASH "S" /* 83 */
|
||||
#define MSG_DNS "DNS" /* DNS -> DNSS */
|
||||
#define TOK_DNS "T" /* 84 */
|
||||
#define MSG_SILENCE "SILENCE" /* SILE */
|
||||
#define TOK_SILENCE "U" /* 85 */
|
||||
#define MSG_AKILL "AKILL" /* AKILL */
|
||||
#define TOK_AKILL "V" /* 86 */
|
||||
#define MSG_KLINE "KLINE" /* KLINE */
|
||||
#define TOK_KLINE "W" /* 87 */
|
||||
#define MSG_UNKLINE "UNKLINE" /* UNKLINE */
|
||||
#define TOK_UNKLINE "X" /* 88 */
|
||||
#define MSG_RAKILL "RAKILL" /* RAKILL */
|
||||
#define TOK_RAKILL "Y" /* 89 */
|
||||
#define MSG_GNOTICE "GNOTICE" /* GNOTICE */
|
||||
#define TOK_GNOTICE "Z" /* 90 */
|
||||
#define MSG_GOPER "GOPER" /* GOPER */
|
||||
#define TOK_GOPER "[" /* 91 */
|
||||
#define MSG_GLOBOPS "GLOBOPS" /* GLOBOPS */
|
||||
#define TOK_GLOBOPS "]" /* 93 */
|
||||
#define MSG_LOCOPS "LOCOPS" /* LOCOPS */
|
||||
#define TOK_LOCOPS "^" /* 94 */
|
||||
#define MSG_PROTOCTL "PROTOCTL" /* PROTOCTL */
|
||||
#define TOK_PROTOCTL "_" /* 95 */
|
||||
#define MSG_WATCH "WATCH" /* WATCH */
|
||||
#define TOK_WATCH "`" /* 96 */
|
||||
#define MSG_TRACE "TRACE" /* TRAC */
|
||||
#define TOK_TRACE "b" /* 97 */
|
||||
#define MSG_SQLINE "SQLINE" /* SQLINE */
|
||||
#define TOK_SQLINE "c" /* 98 */
|
||||
#define MSG_UNSQLINE "UNSQLINE" /* UNSQLINE */
|
||||
#define TOK_UNSQLINE "d" /* 99 */
|
||||
#define MSG_SVSNICK "SVSNICK" /* SVSNICK */
|
||||
#define TOK_SVSNICK "e" /* 100 */
|
||||
#define MSG_SVSNOOP "SVSNOOP" /* SVSNOOP */
|
||||
#define TOK_SVSNOOP "f" /* 101 */
|
||||
#define MSG_IDENTIFY "IDENTIFY" /* IDENTIFY */
|
||||
#define TOK_IDENTIFY "g" /* 102 */
|
||||
#define MSG_SVSKILL "SVSKILL" /* SVSKILL */
|
||||
#define TOK_SVSKILL "h" /* 103 */
|
||||
#define MSG_NICKSERV "NICKSERV" /* NICKSERV */
|
||||
#define MSG_NS "NS"
|
||||
#define TOK_NICKSERV "i" /* 104 */
|
||||
#define MSG_CHANSERV "CHANSERV" /* CHANSERV */
|
||||
#define MSG_CS "CS"
|
||||
#define TOK_CHANSERV "j" /* 105 */
|
||||
#define MSG_OPERSERV "OPERSERV" /* OPERSERV */
|
||||
#define MSG_OS "OS"
|
||||
#define TOK_OPERSERV "k" /* 106 */
|
||||
#define MSG_MEMOSERV "MEMOSERV" /* MEMOSERV */
|
||||
#define MSG_MS "MS"
|
||||
#define TOK_MEMOSERV "l" /* 107 */
|
||||
#define MSG_SERVICES "SERVICES" /* SERVICES */
|
||||
#define TOK_SERVICES "m" /* 108 */
|
||||
#define MSG_SVSMODE "SVSMODE" /* SVSMODE */
|
||||
#define TOK_SVSMODE "n" /* 109 */
|
||||
#define MSG_SAMODE "SAMODE" /* SAMODE */
|
||||
#define TOK_SAMODE "o" /* 110 */
|
||||
#define MSG_CHATOPS "CHATOPS" /* CHATOPS */
|
||||
#define TOK_CHATOPS "p" /* 111 */
|
||||
#define MSG_ZLINE "ZLINE" /* ZLINE */
|
||||
#define TOK_ZLINE "q" /* 112 */
|
||||
#define MSG_UNZLINE "UNZLINE" /* UNZLINE */
|
||||
#define TOK_UNZLINE "r" /* 113 */
|
||||
#define MSG_HELPSERV "HELPSERV" /* HELPSERV */
|
||||
#define MSG_HS "HS"
|
||||
#define TOK_HELPSERV "s" /* 114 */
|
||||
#define MSG_RULES "RULES" /* RULES */
|
||||
#define TOK_RULES "t" /* 115 */
|
||||
#define MSG_MAP "MAP" /* MAP */
|
||||
#define TOK_MAP "u" /* 117 */
|
||||
#define MSG_SVS2MODE "SVS2MODE" /* SVS2MODE */
|
||||
#define TOK_SVS2MODE "v" /* 118 */
|
||||
#define MSG_DALINFO "DALINFO" /* dalinfo */
|
||||
#define TOK_DALINFO "w" /* 119 */
|
||||
#define MSG_ADMINCHAT "ADCHAT" /* Admin chat */
|
||||
#define TOK_ADMINCHAT "x" /* 120 */
|
||||
#define MSG_MKPASSWD "MKPASSWD" /* MKPASSWD */
|
||||
#define TOK_MKPASSWD "y" /* 121 */
|
||||
#define MSG_ADDLINE "ADDLINE" /* ADDLINE */
|
||||
#define TOK_ADDLINE "z" /* 122 */
|
||||
#define MSG_GLINE "GLINE" /* The awesome g-line */
|
||||
#define TOK_GLINE "}" /* 125 */
|
||||
#define MSG_SJOIN "SJOIN"
|
||||
#define TOK_SJOIN "~"
|
||||
#define MSG_SETHOST "SETHOST" /* sethost */
|
||||
#define TOK_SETHOST "AA" /* 127 4ever !;) */
|
||||
#define MSG_NACHAT "NACHAT" /* netadmin chat */
|
||||
#define TOK_NACHAT "AC" /* *beep* */
|
||||
#define MSG_SETIDENT "SETIDENT"
|
||||
#define TOK_SETIDENT "AD"
|
||||
#define MSG_SETNAME "SETNAME" /* set GECOS */
|
||||
#define TOK_SETNAME "AE" /* its almost unreeaaall... */
|
||||
#define MSG_LAG "LAG" /* Lag detect */
|
||||
#define TOK_LAG "AF" /* a or ? */
|
||||
#define MSG_STATSERV "STATSERV" /* alias */
|
||||
#define TOK_STATSERV "AH"
|
||||
#define MSG_KNOCK "KNOCK"
|
||||
#define TOK_KNOCK "AI"
|
||||
#define MSG_CREDITS "CREDITS"
|
||||
#define TOK_CREDITS "AJ"
|
||||
#define MSG_LICENSE "LICENSE"
|
||||
#define TOK_LICENSE "AK"
|
||||
#define MSG_CHGHOST "CHGHOST"
|
||||
#define TOK_CHGHOST "AL"
|
||||
#define MSG_RPING "RPING"
|
||||
#define TOK_RPING "AM"
|
||||
#define MSG_RPONG "RPONG"
|
||||
#define TOK_RPONG "AN"
|
||||
#define MSG_NETINFO "NETINFO"
|
||||
#define TOK_NETINFO "AO"
|
||||
#define MSG_SENDUMODE "SENDUMODE"
|
||||
#define TOK_SENDUMODE "AP"
|
||||
#define MSG_ADDMOTD "ADDMOTD"
|
||||
#define TOK_ADDMOTD "AQ"
|
||||
#define MSG_ADDOMOTD "ADDOMOTD"
|
||||
#define TOK_ADDOMOTD "AR"
|
||||
#define MSG_SVSMOTD "SVSMOTD"
|
||||
#define TOK_SVSMOTD "AS"
|
||||
#define MSG_SMO "SMO"
|
||||
#define TOK_SMO "AU"
|
||||
#define MSG_OPERMOTD "OPERMOTD"
|
||||
#define TOK_OPERMOTD "AV"
|
||||
#define MSG_TSCTL "TSCTL"
|
||||
#define TOK_TSCTL "AW"
|
||||
#define MSG_SVSJOIN "SVSJOIN"
|
||||
#define TOK_SVSJOIN "BR"
|
||||
#define MSG_SAJOIN "SAJOIN"
|
||||
#define TOK_SAJOIN "AX"
|
||||
#define MSG_SVSPART "SVSPART"
|
||||
#define TOK_SVSPART "BT"
|
||||
#define MSG_SAPART "SAPART"
|
||||
#define TOK_SAPART "AY"
|
||||
#define MSG_CHGIDENT "CHGIDENT"
|
||||
#define TOK_CHGIDENT "AZ"
|
||||
#define MSG_SWHOIS "SWHOIS"
|
||||
#define TOK_SWHOIS "BA"
|
||||
#define MSG_SVSO "SVSO"
|
||||
#define TOK_SVSO "BB"
|
||||
#define MSG_SVSFLINE "SVSFLINE"
|
||||
#define TOK_SVSFLINE "BC"
|
||||
#define MSG_TKL "TKL"
|
||||
#define TOK_TKL "BD"
|
||||
#define MSG_VHOST "VHOST"
|
||||
#define TOK_VHOST "BE"
|
||||
#define MSG_BOTMOTD "BOTMOTD"
|
||||
#define TOK_BOTMOTD "BF"
|
||||
#define MSG_REMGLINE "REMGLINE" /* remove g-line */
|
||||
#define TOK_REMGLINE "BG"
|
||||
#define MSG_HTM "HTM"
|
||||
#define TOK_HTM "BH"
|
||||
#define MSG_UMODE2 "UMODE2"
|
||||
#define TOK_UMODE2 "|"
|
||||
#define MSG_DCCDENY "DCCDENY"
|
||||
#define TOK_DCCDENY "BI"
|
||||
#define MSG_UNDCCDENY "UNDCCDENY"
|
||||
#define TOK_UNDCCDENY "BJ"
|
||||
#define MSG_CHGNAME "CHGNAME"
|
||||
#define MSG_SVSNAME "SVSNAME"
|
||||
#define TOK_CHGNAME "BK"
|
||||
#define MSG_SHUN "SHUN"
|
||||
#define TOK_SHUN "BL"
|
||||
#define MSG_NEWJOIN "NEWJOIN" /* For CR Java Chat */
|
||||
#define MSG_POST "POST"
|
||||
#define TOK_POST "BN"
|
||||
#define MSG_INFOSERV "INFOSERV"
|
||||
#define MSG_IS "IS"
|
||||
#define TOK_INFOSERV "BO"
|
||||
|
||||
#define MSG_BOTSERV "BOTSERV"
|
||||
#define TOK_BOTSERV "BS"
|
||||
|
||||
#define MSG_CYCLE "CYCLE"
|
||||
#define TOK_CYCLE "BP"
|
||||
|
||||
#define MSG_MODULE "MODULE"
|
||||
#define TOK_MODULE "BQ"
|
||||
/* BR and BT are in use */
|
||||
|
||||
#define MSG_SENDSNO "SENDSNO"
|
||||
#define TOK_SENDSNO "Ss"
|
||||
|
||||
#define MSG_EOS "EOS"
|
||||
#define TOK_EOS "ES"
|
||||
|
||||
#define MAXPARA 15
|
||||
|
||||
extern int m_join(), m_part(), m_mode();
|
||||
extern int m_nick(), m_error();
|
||||
extern int m_dns();
|
||||
extern int m_tkl();
|
||||
extern int m_motd(), m_user();
|
||||
extern int m_info(), m_summon();
|
||||
extern int m_users(), m_version();
|
||||
extern int m_names();
|
||||
extern int m_lusers(), m_umode();
|
||||
extern int m_motd();
|
||||
extern int m_service(), m_watch();
|
||||
extern int m_dalinfo();
|
||||
extern int m_credits();
|
||||
extern int m_license();
|
||||
extern int m_botmotd();
|
||||
extern int m_opermotd();
|
||||
extern int m_module(), m_alias(), m_tkl(), m_opermotd();
|
||||
extern int m_rehash(), m_die(), m_restart();
|
||||
#endif
|
||||
|
||||
@@ -1,388 +0,0 @@
|
||||
/*
|
||||
* ++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_ */
|
||||
|
||||
@@ -1,339 +0,0 @@
|
||||
/************************************************************************
|
||||
* Unreal Internet Relay Chat Daemon, include/numeric.h
|
||||
* Copyright (C) 1990 Jarkko Oikarinen
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Added numerics 600-799 as numeric_replies2[], we ran out
|
||||
*/
|
||||
|
||||
/*
|
||||
* Reserve numerics 000-099 for server-client connections where the client
|
||||
* is local to the server. If any server is passed a numeric in this range
|
||||
* from another server then it is remapped to 100-199.
|
||||
*/
|
||||
|
||||
#define RPL_WELCOME 001
|
||||
#define RPL_YOURHOST 002
|
||||
#define RPL_CREATED 003
|
||||
#define RPL_MYINFO 004
|
||||
#define RPL_PROTOCTL 005
|
||||
|
||||
#define RPL_REDIR 10
|
||||
|
||||
#define RPL_REMOTEPROTOCTL 105
|
||||
|
||||
/*
|
||||
* Errors are in the range from 400-599 currently and are grouped by what
|
||||
* commands they come from.
|
||||
*/
|
||||
#define ERR_NOSUCHNICK 401
|
||||
#define ERR_NOSUCHSERVER 402
|
||||
#define ERR_NOSUCHCHANNEL 403
|
||||
#define ERR_CANNOTSENDTOCHAN 404
|
||||
#define ERR_TOOMANYCHANNELS 405
|
||||
#define ERR_WASNOSUCHNICK 406
|
||||
#define ERR_TOOMANYTARGETS 407
|
||||
#define ERR_NOSUCHSERVICE 408
|
||||
#define ERR_NOORIGIN 409
|
||||
|
||||
#define ERR_NORECIPIENT 411
|
||||
#define ERR_NOTEXTTOSEND 412
|
||||
#define ERR_NOTOPLEVEL 413
|
||||
#define ERR_WILDTOPLEVEL 414
|
||||
|
||||
#define ERR_UNKNOWNCOMMAND 421
|
||||
#define ERR_NOMOTD 422
|
||||
#define ERR_NOADMININFO 423
|
||||
#define ERR_FILEERROR 424
|
||||
#define ERR_NOOPERMOTD 425
|
||||
#ifdef NO_FLOOD_AWAY
|
||||
#define ERR_TOOMANYAWAY 429
|
||||
#endif
|
||||
#define ERR_NONICKNAMEGIVEN 431
|
||||
#define ERR_ERRONEUSNICKNAME 432
|
||||
#define ERR_NICKNAMEINUSE 433
|
||||
#define ERR_NORULES 434
|
||||
#define ERR_SERVICECONFUSED 435
|
||||
#define ERR_NICKCOLLISION 436
|
||||
#define ERR_BANNICKCHANGE 437
|
||||
#define ERR_NCHANGETOOFAST 438
|
||||
#define ERR_TARGETTOOFAST 439
|
||||
#define ERR_SERVICESDOWN 440
|
||||
|
||||
#define ERR_USERNOTINCHANNEL 441
|
||||
#define ERR_NOTONCHANNEL 442
|
||||
#define ERR_USERONCHANNEL 443
|
||||
#define ERR_NOLOGIN 444
|
||||
#define ERR_SUMMONDISABLED 445
|
||||
#define ERR_USERSDISABLED 446
|
||||
#define ERR_NONICKCHANGE 447
|
||||
|
||||
|
||||
#define ERR_NOTREGISTERED 451
|
||||
|
||||
#define ERR_HOSTILENAME 455
|
||||
|
||||
#define ERR_NOHIDING 459
|
||||
#define ERR_NOTFORHALFOPS 460
|
||||
#define ERR_NEEDMOREPARAMS 461
|
||||
#define ERR_ALREADYREGISTRED 462
|
||||
#define ERR_NOPERMFORHOST 463
|
||||
#define ERR_PASSWDMISMATCH 464
|
||||
#define ERR_YOUREBANNEDCREEP 465
|
||||
#define ERR_YOUWILLBEBANNED 466
|
||||
#define ERR_KEYSET 467
|
||||
#define ERR_ONLYSERVERSCANCHANGE 468
|
||||
#define ERR_LINKSET 469
|
||||
#define ERR_LINKCHANNEL 470
|
||||
#define ERR_CHANNELISFULL 471
|
||||
#define ERR_UNKNOWNMODE 472
|
||||
#define ERR_INVITEONLYCHAN 473
|
||||
#define ERR_BANNEDFROMCHAN 474
|
||||
#define ERR_BADCHANNELKEY 475
|
||||
#define ERR_BADCHANMASK 476
|
||||
#define ERR_NEEDREGGEDNICK 477
|
||||
#define ERR_BANLISTFULL 478
|
||||
#define ERR_LINKFAIL 479
|
||||
#define ERR_CANNOTKNOCK 480
|
||||
|
||||
#define ERR_NOPRIVILEGES 481
|
||||
#define ERR_CHANOPRIVSNEEDED 482
|
||||
#define ERR_CANTKILLSERVER 483
|
||||
#define ERR_ATTACKDENY 484
|
||||
#define ERR_KILLDENY 485
|
||||
|
||||
#define ERR_NONONREG 486
|
||||
#define ERR_NOTFORUSERS 487
|
||||
#define ERR_HTMDISABLED 488
|
||||
#define ERR_SECUREONLYCHAN 489
|
||||
#define ERR_NOSWEAR 490
|
||||
#define ERR_NOOPERHOST 491
|
||||
#define ERR_NOCTCP 492
|
||||
|
||||
#define ERR_UMODEUNKNOWNFLAG 501
|
||||
#define ERR_USERSDONTMATCH 502
|
||||
|
||||
#define ERR_SILELISTFULL 511
|
||||
#define ERR_TOOMANYWATCH 512
|
||||
#define ERR_NEEDPONG 513
|
||||
|
||||
#define ERR_NOINVITE 518
|
||||
#define ERR_ADMONLY 519
|
||||
#define ERR_OPERONLY 520
|
||||
#define ERR_LISTSYNTAX 521
|
||||
|
||||
/*
|
||||
* Numberic replies from server commands.
|
||||
* These are currently in the range 200-399.
|
||||
*/
|
||||
#define RPL_NONE 300
|
||||
#define RPL_AWAY 301
|
||||
#define RPL_USERHOST 302
|
||||
#define RPL_ISON 303
|
||||
#define RPL_TEXT 304
|
||||
#define RPL_UNAWAY 305
|
||||
#define RPL_NOWAWAY 306
|
||||
#define RPL_WHOISREGNICK 307
|
||||
#define RPL_RULESSTART 308
|
||||
#define RPL_ENDOFRULES 309
|
||||
#define RPL_WHOISHELPOP 310 /* -Donwulff */
|
||||
|
||||
#define RPL_WHOISUSER 311
|
||||
#define RPL_WHOISSERVER 312
|
||||
#define RPL_WHOISOPERATOR 313
|
||||
|
||||
#define RPL_WHOWASUSER 314
|
||||
/* rpl_endofwho below (315) */
|
||||
#define RPL_ENDOFWHOWAS 369
|
||||
|
||||
#define RPL_WHOISCHANOP 316 /* redundant and not needed but reserved */
|
||||
#define RPL_WHOISIDLE 317
|
||||
|
||||
#define RPL_ENDOFWHOIS 318
|
||||
#define RPL_WHOISCHANNELS 319
|
||||
#define RPL_WHOISSPECIAL 320
|
||||
#define RPL_LISTSTART 321
|
||||
#define RPL_LIST 322
|
||||
#define RPL_LISTEND 323
|
||||
#define RPL_CHANNELMODEIS 324
|
||||
#define RPL_CREATIONTIME 329
|
||||
#define RPL_NOTOPIC 331
|
||||
#define RPL_TOPIC 332
|
||||
#define RPL_TOPICWHOTIME 333
|
||||
|
||||
#define RPL_LISTSYNTAX 334
|
||||
#define RPL_WHOISBOT 335
|
||||
#define RPL_INVITING 341
|
||||
#define RPL_SUMMONING 342
|
||||
|
||||
#define RPL_VERSION 351
|
||||
|
||||
#define RPL_WHOREPLY 352
|
||||
#define RPL_ENDOFWHO 315
|
||||
#define RPL_NAMREPLY 353
|
||||
#define RPL_ENDOFNAMES 366
|
||||
#define RPL_INVITELIST 346
|
||||
#define RPL_ENDOFINVITELIST 347
|
||||
|
||||
#define RPL_EXLIST 348
|
||||
#define RPL_ENDOFEXLIST 349
|
||||
#define RPL_KILLDONE 361
|
||||
#define RPL_CLOSING 362
|
||||
#define RPL_CLOSEEND 363
|
||||
#define RPL_LINKS 364
|
||||
#define RPL_ENDOFLINKS 365
|
||||
/* rpl_endofnames above (366) */
|
||||
#define RPL_BANLIST 367
|
||||
#define RPL_ENDOFBANLIST 368
|
||||
/* rpl_endofwhowas above (369) */
|
||||
|
||||
#define RPL_INFO 371
|
||||
#define RPL_MOTD 372
|
||||
#define RPL_INFOSTART 373
|
||||
#define RPL_ENDOFINFO 374
|
||||
#define RPL_MOTDSTART 375
|
||||
#define RPL_ENDOFMOTD 376
|
||||
|
||||
#define RPL_WHOISHOST 378
|
||||
#define RPL_WHOISMODES 379
|
||||
#define RPL_YOUREOPER 381
|
||||
#define RPL_REHASHING 382
|
||||
#define RPL_YOURESERVICE 383
|
||||
#define RPL_MYPORTIS 384
|
||||
#define RPL_NOTOPERANYMORE 385
|
||||
#define RPL_QLIST 386
|
||||
#define RPL_ENDOFQLIST 387
|
||||
#define RPL_ALIST 388
|
||||
#define RPL_ENDOFALIST 389
|
||||
|
||||
#define RPL_TIME 391
|
||||
#define RPL_USERSSTART 392
|
||||
#define RPL_USERS 393
|
||||
#define RPL_ENDOFUSERS 394
|
||||
#define RPL_NOUSERS 395
|
||||
|
||||
#define RPL_TRACELINK 200
|
||||
#define RPL_TRACECONNECTING 201
|
||||
#define RPL_TRACEHANDSHAKE 202
|
||||
#define RPL_TRACEUNKNOWN 203
|
||||
|
||||
#define RPL_TRACEOPERATOR 204
|
||||
#define RPL_TRACEUSER 205
|
||||
#define RPL_TRACESERVER 206
|
||||
#define RPL_TRACESERVICE 207
|
||||
#define RPL_TRACENEWTYPE 208
|
||||
#define RPL_TRACECLASS 209
|
||||
|
||||
#define RPL_STATSHELP 210
|
||||
#define RPL_STATSLINKINFO 211
|
||||
#define RPL_STATSCOMMANDS 212
|
||||
#define RPL_STATSCLINE 213
|
||||
#define RPL_STATSOLDNLINE 214
|
||||
|
||||
#define RPL_STATSILINE 215
|
||||
#define RPL_STATSKLINE 216
|
||||
#define RPL_STATSQLINE 217
|
||||
#define RPL_STATSYLINE 218
|
||||
#define RPL_ENDOFSTATS 219
|
||||
#define RPL_STATSBLINE 220
|
||||
|
||||
|
||||
#define RPL_UMODEIS 221
|
||||
#define RPL_SQLINE_NICK 222
|
||||
#define RPL_STATSGLINE 223
|
||||
#define RPL_STATSTLINE 224
|
||||
#define RPL_STATSELINE 225
|
||||
#define RPL_STATSNLINE 226
|
||||
#define RPL_STATSVLINE 227
|
||||
#define RPL_STATSBANVER 228
|
||||
#define RPL_STATSSPAMF 229
|
||||
#define RPL_SERVICEINFO 231
|
||||
#define RPL_RULES 232
|
||||
#define RPL_SERVICE 233
|
||||
#define RPL_SERVLIST 234
|
||||
#define RPL_SERVLISTEND 235
|
||||
|
||||
#define RPL_STATSLLINE 241
|
||||
#define RPL_STATSUPTIME 242
|
||||
#define RPL_STATSOLINE 243
|
||||
#define RPL_STATSHLINE 244
|
||||
#define RPL_STATSSLINE 245
|
||||
#define RPL_STATSXLINE 247
|
||||
#define RPL_STATSULINE 248
|
||||
#define RPL_STATSDEBUG 249
|
||||
#define RPL_STATSCONN 250
|
||||
|
||||
#define RPL_LUSERCLIENT 251
|
||||
#define RPL_LUSEROP 252
|
||||
#define RPL_LUSERUNKNOWN 253
|
||||
#define RPL_LUSERCHANNELS 254
|
||||
#define RPL_LUSERME 255
|
||||
#define RPL_ADMINME 256
|
||||
#define RPL_ADMINLOC1 257
|
||||
#define RPL_ADMINLOC2 258
|
||||
#define RPL_ADMINEMAIL 259
|
||||
|
||||
#define RPL_TRACELOG 261
|
||||
#define RPL_LOCALUSERS 265
|
||||
#define RPL_GLOBALUSERS 266
|
||||
|
||||
#define RPL_SILELIST 271
|
||||
#define RPL_ENDOFSILELIST 272
|
||||
#define RPL_STATSDLINE 275
|
||||
|
||||
#define RPL_HELPHDR 290
|
||||
#define RPL_HELPOP 291
|
||||
#define RPL_HELPTLR 292
|
||||
#define RPL_HELPHLP 293
|
||||
#define RPL_HELPFWD 294
|
||||
#define RPL_HELPIGN 295
|
||||
|
||||
/*
|
||||
* New /MAP format.
|
||||
*/
|
||||
#define RPL_MAP 006
|
||||
#define RPL_MAPMORE 610
|
||||
#define RPL_MAPEND 007
|
||||
|
||||
|
||||
#define ERR_WHOSYNTAX 522
|
||||
#define ERR_WHOLIMEXCEED 523
|
||||
#define ERR_OPERSPVERIFY 524
|
||||
|
||||
#define RPL_SNOMASK 8
|
||||
|
||||
/*
|
||||
* Numberic replies from server commands.
|
||||
* These are also in the range 600-799.
|
||||
*/
|
||||
|
||||
#define RPL_LOGON 600
|
||||
#define RPL_LOGOFF 601
|
||||
#define RPL_WATCHOFF 602
|
||||
#define RPL_WATCHSTAT 603
|
||||
#define RPL_NOWON 604
|
||||
#define RPL_NOWOFF 605
|
||||
#define RPL_WATCHLIST 606
|
||||
#define RPL_ENDOFWATCHLIST 607
|
||||
#define RPL_DUMPING 640
|
||||
#define RPL_DUMPRPL 641
|
||||
#define RPL_EODUMP 642
|
||||
|
||||
#define ERR_NUMERICERR 999
|
||||
@@ -1,80 +0,0 @@
|
||||
/************************************************************************
|
||||
* Unreal Internet Relay Chat Daemon, include/proto.h
|
||||
* (C) Dominick Meglio <codemastr@unrealircd.com> 2000
|
||||
*
|
||||
* See file AUTHORS in IRC package for additional names of
|
||||
* the programmers.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef proto_h
|
||||
#define proto_h
|
||||
/* channel.c */
|
||||
int sendmodeto_one(aClient *cptr, char *from, char *name, char *mode, char *param, TS creationtime);
|
||||
void make_cmodestr(void);
|
||||
|
||||
/* lusers.c */
|
||||
void init_ircstats(void);
|
||||
|
||||
/* match.c */
|
||||
char *collapse(char *pattern);
|
||||
|
||||
/* scache.c */
|
||||
void clear_scache_hash_table(void);
|
||||
|
||||
/* send.c */
|
||||
void sendto_one(aClient *, char *, ...) __attribute__((format(printf,2,3)));
|
||||
void sendto_chanops_butone(aClient *one, aChannel *chptr, char *pattern, ...) __attribute__((format(printf,3,4)));
|
||||
void sendto_realops(char *pattern, ...) __attribute__((format(printf,1,2)));
|
||||
void sendto_serv_butone_token(aClient *one, char *prefix, char *command,
|
||||
char *token, char *pattern, ...) __attribute__((format(printf,5,6)));
|
||||
void sendto_serv_butone_token_opt(aClient *one, int opt, char *prefix,
|
||||
char *command, char *token, char *pattern, ...) __attribute__((format(printf,6,7)));
|
||||
void sendto_channel_ntadmins(aClient *from, aChannel *chptr, char *pattern, ...) __attribute__((format(printf,3,4)));
|
||||
|
||||
/* fdlist.c */
|
||||
EVENT(lcf_check);
|
||||
EVENT(htm_calc);
|
||||
/* ircd.c */
|
||||
EVENT(e_check_fdlists);
|
||||
EVENT(garbage_collect);
|
||||
EVENT(loop_event);
|
||||
/* support.c */
|
||||
char *my_itoa(int i);
|
||||
|
||||
/* s_kline.c */
|
||||
int find_tkline_match(aClient *cptr, int xx);
|
||||
extern EVENT(tkl_check_expire);
|
||||
|
||||
/* s_serv.c */
|
||||
void load_tunefile(void);
|
||||
extern EVENT(save_tunefile);
|
||||
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);
|
||||
void make_umodestr(void);
|
||||
|
||||
/* webtv.c */
|
||||
int is_halfop(aClient *cptr, aChannel *chptr);
|
||||
int is_chanprot(aClient *cptr, aChannel *chptr);
|
||||
char *convert_time(time_t ltime);
|
||||
char *get_mode_str(aClient *acptr);
|
||||
|
||||
/* whowas.c */
|
||||
void initwhowas(void);
|
||||
#endif /* proto_h */
|
||||
@@ -1,74 +0,0 @@
|
||||
/*
|
||||
* ircd/res_def.h (C)opyright 1992 Darren Reed.
|
||||
*/
|
||||
|
||||
#define RES_INITLIST 1
|
||||
#define RES_CALLINIT 2
|
||||
#define RES_INITSOCK 4
|
||||
#define RES_INITDEBG 8
|
||||
#define RES_INITCACH 16
|
||||
|
||||
#define MAXPACKET 1024
|
||||
#define MAXALIASES 35
|
||||
#define MAXADDRS 35
|
||||
|
||||
#define AR_TTL 300 /* minimum TTL in seconds for dns cache entries */
|
||||
|
||||
struct hent {
|
||||
char *h_name; /* official name of host */
|
||||
char *h_aliases[MAXALIASES]; /* alias list */
|
||||
int h_addrtype; /* host address type */
|
||||
int h_length; /* length of address */
|
||||
/* list of addresses from name server */
|
||||
struct IN_ADDR h_addr_list[MAXADDRS];
|
||||
#define h_addr h_addr_list[0] /* address, for backward compatiblity */
|
||||
};
|
||||
|
||||
typedef struct reslist {
|
||||
int id;
|
||||
int sent; /* number of requests sent */
|
||||
int srch;
|
||||
time_t ttl;
|
||||
char type;
|
||||
char retries; /* retry counter */
|
||||
char sends; /* number of sends (>1 means resent) */
|
||||
char resend; /* send flag. 0 == dont resend */
|
||||
time_t sentat;
|
||||
time_t timeout;
|
||||
struct IN_ADDR addr;
|
||||
char *name;
|
||||
struct reslist *next;
|
||||
Link cinfo;
|
||||
struct hent he;
|
||||
} ResRQ;
|
||||
|
||||
typedef struct cache {
|
||||
time_t expireat;
|
||||
time_t ttl;
|
||||
struct hostent he;
|
||||
struct cache *hname_next, *hnum_next, *list_next;
|
||||
} aCache;
|
||||
|
||||
typedef struct cachetable {
|
||||
aCache *num_list;
|
||||
aCache *name_list;
|
||||
} CacheTable;
|
||||
|
||||
#define ARES_CACSIZE 101
|
||||
|
||||
#define MAXCACHED 81
|
||||
#ifdef _WIN32
|
||||
typedef unsigned short u_int16_t;
|
||||
#endif
|
||||
extern struct __res_state ircd_res;
|
||||
extern int ircd_res_init();
|
||||
extern u_int ircd_res_randomid();
|
||||
extern u_int16_t ircd_getshort(const u_char *msgp);
|
||||
extern u_int32_t ircd_getlong(const u_char *msgp);
|
||||
extern void ircd__putshort(register u_int16_t s, register u_char *msgp);
|
||||
extern void ircd__putlong(register u_int32_t l,register u_char *msgp);
|
||||
extern int ircd_dn_expand(const u_char *msg, const u_char *eom, const u_char *src, char *dst, int dstsiz);
|
||||
extern int __ircd_dn_skipname(const u_char *ptr, const u_char *eom);
|
||||
extern int ircd_dn_comp(const char *src, u_char *dst, int dstsiz, u_char **dnptrs, u_char **lastdnptr);
|
||||
extern int ircd_res_mkquery(int op, const char *dname, int class, int type, const u_char *data,
|
||||
int datalen, const u_char *newrr_in, u_char *buf, int buflen);
|
||||
@@ -1,220 +0,0 @@
|
||||
/*
|
||||
* ++Copyright++ 1983, 1987, 1989, 1993
|
||||
* -
|
||||
* Copyright (c) 1983, 1987, 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.
|
||||
* -
|
||||
* --Copyright--
|
||||
*/
|
||||
|
||||
/*
|
||||
* @(#)resolv.h 8.1 (Berkeley) 6/2/93
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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 (__RES > 19931104)". Do not
|
||||
* compare for equality; rather, use it to determine whether your resolver
|
||||
* is new enough to contain a certain feature.
|
||||
*/
|
||||
|
||||
#define __RES 19960801
|
||||
|
||||
/*
|
||||
* Global defines and variables for resolver stub.
|
||||
*/
|
||||
#define MAXNS 3 /* max # name servers we'll track */
|
||||
#define MAXDFLSRCH 3 /* # default domain levels to try */
|
||||
#define MAXDNSRCH 6 /* max # domains in search path */
|
||||
#define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */
|
||||
|
||||
#define RES_TIMEOUT 5 /* min. seconds between retries */
|
||||
#define MAXRESOLVSORT 10 /* number of net to sort on */
|
||||
#define RES_MAXNDOTS 15 /* should reflect bit field size */
|
||||
|
||||
struct __res_state {
|
||||
int retrans; /* retransmition time interval */
|
||||
int retry; /* number of times to retransmit */
|
||||
u_long options; /* option flags - see below. */
|
||||
int nscount; /* number of name servers */
|
||||
struct sockaddr_in
|
||||
nsaddr_list[MAXNS]; /* address of name server */
|
||||
#define nsaddr nsaddr_list[0] /* for backward compatibility */
|
||||
u_short id; /* current message id */
|
||||
char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
|
||||
char defdname[256]; /* default domain (deprecated) */
|
||||
u_long pfcode; /* RES_PRF_ flags - see below. */
|
||||
unsigned ndots:4; /* threshold for initial abs. query */
|
||||
unsigned nsort:4; /* number of elements in sort_list[] */
|
||||
char unused[3];
|
||||
struct {
|
||||
struct in_addr addr;
|
||||
u_int32_t mask;
|
||||
} sort_list[MAXRESOLVSORT];
|
||||
char pad[72]; /* on an i386 this means 512b total */
|
||||
};
|
||||
|
||||
/*
|
||||
* Resolver options (keep these in synch with res_debug.c, please)
|
||||
*/
|
||||
#define RES_INIT 0x00000001 /* address initialized */
|
||||
#define RES_DEBUG 0x00000002 /* print debug messages */
|
||||
#define RES_AAONLY 0x00000004 /* authoritative answers only (!IMPL)*/
|
||||
#define RES_USEVC 0x00000008 /* use virtual circuit */
|
||||
#define RES_PRIMARY 0x00000010 /* query primary server only (!IMPL) */
|
||||
#define RES_IGNTC 0x00000020 /* ignore trucation errors */
|
||||
#define RES_RECURSE 0x00000040 /* recursion desired */
|
||||
#define RES_DEFNAMES 0x00000080 /* use default domain name */
|
||||
#define RES_STAYOPEN 0x00000100 /* Keep TCP socket open */
|
||||
#define RES_DNSRCH 0x00000200 /* search up local domain tree */
|
||||
#define RES_INSECURE1 0x00000400 /* type 1 security disabled */
|
||||
#define RES_INSECURE2 0x00000800 /* type 2 security disabled */
|
||||
#define RES_NOALIASES 0x00001000 /* shuts off HOSTALIASES feature */
|
||||
#define RES_USE_INET6 0x00002000 /* use/map IPv6 in gethostbyname() */
|
||||
|
||||
#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
|
||||
|
||||
/*
|
||||
* Resolver "pfcode" values. Used by dig.
|
||||
*/
|
||||
#define RES_PRF_STATS 0x00000001
|
||||
/* 0x00000002 */
|
||||
#define RES_PRF_CLASS 0x00000004
|
||||
#define RES_PRF_CMD 0x00000008
|
||||
#define RES_PRF_QUES 0x00000010
|
||||
#define RES_PRF_ANS 0x00000020
|
||||
#define RES_PRF_AUTH 0x00000040
|
||||
#define RES_PRF_ADD 0x00000080
|
||||
#define RES_PRF_HEAD1 0x00000100
|
||||
#define RES_PRF_HEAD2 0x00000200
|
||||
#define RES_PRF_TTLID 0x00000400
|
||||
#define RES_PRF_HEADX 0x00000800
|
||||
#define RES_PRF_QUERY 0x00001000
|
||||
#define RES_PRF_REPLY 0x00002000
|
||||
#define RES_PRF_INIT 0x00004000
|
||||
/* 0x00008000 */
|
||||
|
||||
/* hooks are still experimental as of 4.9.2 */
|
||||
#if defined(INET6) && defined(__GNUC__)
|
||||
|
||||
#else
|
||||
|
||||
typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
|
||||
res_sendhookact;
|
||||
|
||||
typedef res_sendhookact (*res_send_qhook)(struct SOCKADDR_IN * const *ns,
|
||||
const u_char **query,
|
||||
int *querylen,
|
||||
u_char *ans,
|
||||
int anssiz,
|
||||
int *resplen);
|
||||
|
||||
typedef res_sendhookact (*res_send_rhook)(const struct SOCKADDR_IN *ns,
|
||||
const u_char *query,
|
||||
int querylen,
|
||||
u_char *ans,
|
||||
int anssiz,
|
||||
int *resplen);
|
||||
#endif
|
||||
|
||||
struct res_sym {
|
||||
int number; /* Identifying number, like T_MX */
|
||||
char * name; /* Its symbolic name, like "MX" */
|
||||
char * humanname; /* Its fun name, like "mail exchanger" */
|
||||
};
|
||||
|
||||
/* Private routines shared between libc/net, named, nslookup and others. */
|
||||
#define res_hnok __res_hnok
|
||||
#define res_ownok __res_ownok
|
||||
#define res_mailok __res_mailok
|
||||
#define res_dnok __res_dnok
|
||||
#define sym_ston __sym_ston
|
||||
#define sym_ntos __sym_ntos
|
||||
#define sym_ntop __sym_ntop
|
||||
#define b64_ntop __b64_ntop
|
||||
#define b64_pton __b64_pton
|
||||
#define loc_ntoa __loc_ntoa
|
||||
#define loc_aton __loc_aton
|
||||
#define dn_skipname __dn_skipname
|
||||
#define fp_resstat __fp_resstat
|
||||
#define fp_query __fp_query
|
||||
#define fp_nquery __fp_nquery
|
||||
#define hostalias __hostalias
|
||||
#define putlong __putlong
|
||||
#define putshort __putshort
|
||||
#define p_class __p_class
|
||||
#define p_time __p_time
|
||||
#define p_type __p_type
|
||||
#define p_query __p_query
|
||||
#define p_cdnname __p_cdnname
|
||||
#define p_cdname __p_cdname
|
||||
#define p_fqnname __p_fqnname
|
||||
#define p_fqname __p_fqname
|
||||
#define p_rr __p_rr
|
||||
#define p_option __p_option
|
||||
#define p_secstodate __p_secstodate
|
||||
#define dn_count_labels __dn_count_labels
|
||||
#define dn_comp __dn_comp
|
||||
#define res_randomid __res_randomid
|
||||
#define res_isourserver __res_isourserver
|
||||
#define res_nameinquery __res_nameinquery
|
||||
#define res_queriesmatch __res_queriesmatch
|
||||
#define res_close __res_close
|
||||
|
||||
#ifdef BIND_RES_POSIX3
|
||||
#define dn_expand __dn_expand
|
||||
#define res_init __res_init
|
||||
#define res_query __res_query
|
||||
#define res_search __res_search
|
||||
#define res_querydomain __res_querydomain
|
||||
#define res_mkquery __res_mkquery
|
||||
#define res_send __res_send
|
||||
#endif
|
||||
@@ -1,59 +0,0 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by GENERIC.RC
|
||||
// $Id$
|
||||
#define IDC_USERID 1051
|
||||
#define IDC_REALNAME 1052
|
||||
#define IDC_PNICK 1053
|
||||
#define IDC_ANICK 1054
|
||||
#define IDC_SERVERLIST 1057
|
||||
#define IDC_NEWSERVER 1058
|
||||
#define IDC_EDITSERVER 1059
|
||||
#define IDC_IRCDCONF 1059
|
||||
#define IDC_DELSERVER 1060
|
||||
#define IDC_SHOW_GLOBOPS 1060
|
||||
#define IDC_SHOW_WALLOPS 1061
|
||||
#define IDC_SHOW_HELPOPS 1062
|
||||
#define IDC_SHOW_SERVNOTICE 1063
|
||||
#define IDC_INFOTEXT 1063
|
||||
#define IDM_OPEN 40001
|
||||
#define IDM_SAVE 40002
|
||||
#define IDM_SAVEAS 40003
|
||||
#define IDM_EXIT 40004
|
||||
#define IDM_ABOUT 40005
|
||||
#define IDM_WINDOWCHILD 40006
|
||||
#define IDM_REHASH 40007
|
||||
#define IDM_OPTIONS 40008
|
||||
#define IDM_CREDITS 40009
|
||||
#define IDM_DF 40010
|
||||
#define IDM_LICENSE 40011
|
||||
#define IDM_DBGOFF 41099
|
||||
#define IDM_DBGFATAL 41100
|
||||
#define IDM_DBGERROR 41101
|
||||
#define IDM_DBGNOTICE 41103
|
||||
#define IDM_DBGDNS 41104
|
||||
#define IDM_DBGINFO 41105
|
||||
#define IDM_DBGNUM 41106
|
||||
#define IDM_DBGSEND 41107
|
||||
#define IDM_DBGDEBUG 41108
|
||||
#define IDM_DBGMALLOC 41109
|
||||
#define IDM_DBGLIST 41110
|
||||
#define IDM_POPUP 50000
|
||||
#define IDC_STATIC -1
|
||||
#define IDM_IRCDRULES 65530
|
||||
#define IDM_IRCDMOTD 65531
|
||||
#define IDC_VERSION 65532
|
||||
#define IDM_SETUP 65536
|
||||
#define IDM_IRCDCONF 65535
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 113
|
||||
#define _APS_NEXT_COMMAND_VALUE 40011
|
||||
#define _APS_NEXT_CONTROL_VALUE 1064
|
||||
#define _APS_NEXT_SYMED_VALUE 104
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,256 +0,0 @@
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Define if using alloca.c. */
|
||||
#undef C_ALLOCA
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
#undef const
|
||||
|
||||
/* 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 `int' if <sys/types.h> doesn't define. */
|
||||
#undef gid_t
|
||||
|
||||
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
#undef HAVE_SYS_WAIT_H
|
||||
|
||||
/* Define if you have the vprintf function. */
|
||||
#undef HAVE_VPRINTF
|
||||
|
||||
/* Define as __inline if that's what the C compiler calls it. */
|
||||
#undef inline
|
||||
|
||||
/* 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 if you need inet_addr */
|
||||
#undef NEED_INET_ADDR
|
||||
|
||||
/* Define if you need inet_ntoa */
|
||||
#undef NEED_INET_NTOA
|
||||
|
||||
/* Define if you need inet_netof */
|
||||
#undef NEED_INET_NETOF
|
||||
|
||||
/* Define if you have gettimeofday */
|
||||
#undef GETTIMEOFDAY
|
||||
|
||||
/* Define if you have lrand48 */
|
||||
#undef LRAND48
|
||||
|
||||
/* Define if you have getrusage */
|
||||
#undef GETRUSAGE_2
|
||||
|
||||
/* Define if you have times */
|
||||
#undef TIMES_2
|
||||
|
||||
/* Define if you have O_NONBLOCK */
|
||||
#undef NBLOCK_POSIX
|
||||
|
||||
/* Define if you have O_NDELAY */
|
||||
#undef NBLOCK_BSD
|
||||
|
||||
/* Define if you have FIONBIO */
|
||||
#undef NBLOCK_SYSV
|
||||
|
||||
/* Define if you have POSIX signals */
|
||||
#undef POSIX_SIGNALS
|
||||
|
||||
/* Define if you have BSD signals */
|
||||
#undef RELIABLE_BSD_SIGNALS
|
||||
|
||||
/* Define if you have SYSV signals */
|
||||
#undef UNRELIABLE_SYSV_SIGNALS
|
||||
|
||||
/* 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 if you have setproctitle */
|
||||
#undef HAVE_SETPROCTITLE
|
||||
|
||||
/* Define if you have PS_STRINGS */
|
||||
#undef HAVE_PSSTRINGS
|
||||
|
||||
/* Define if you have pstat */
|
||||
#undef HAVE_PSTAT
|
||||
|
||||
/* Define if you have crypt */
|
||||
#undef HAVE_CRYPT
|
||||
|
||||
/* Local hostname of the server */
|
||||
#undef DOMAINNAME
|
||||
|
||||
/* The OS name and version of the server */
|
||||
#undef MYOSNAME
|
||||
|
||||
/* The default permissions for configuration files */
|
||||
#undef DEFAULT_PERMISSIONS
|
||||
|
||||
/* Define if you want spoof protection */
|
||||
#undef NOSPOOF
|
||||
|
||||
/* 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 your system prepends an underscore to symbols */
|
||||
#undef UNDERSCORE
|
||||
|
||||
/* Define if you have gethostbyname_r with 3 parameters */
|
||||
#undef HAVE_GETHOSTBYNAME_R_3
|
||||
|
||||
/* Define if you have gethostbyname_r with 5 parameters */
|
||||
#undef HAVE_GETHOSTBYNAME_R_5
|
||||
|
||||
/* Define if you have gethostbyname_r with 6 parameters */
|
||||
#undef HAVE_GETHOSTBYNAME_R_6
|
||||
|
||||
/* Define if rlim_t is long long */
|
||||
#undef LONG_LONG_RLIM_T
|
||||
|
||||
/* Define if you have snprintf */
|
||||
#undef HAVE_SNPRINTF
|
||||
|
||||
/* Define if you have vsnprintf */
|
||||
#undef HAVE_VSNPRINTF
|
||||
|
||||
/* Define if you have strlcpy */
|
||||
#undef HAVE_STRLCPY
|
||||
|
||||
/* Define if you have strlcat */
|
||||
#undef HAVE_STRLCAT
|
||||
|
||||
/* Define if you have strlncat */
|
||||
#undef HAVE_STRLNCAT
|
||||
@@ -1,51 +0,0 @@
|
||||
/************************************************************************
|
||||
* Unreal Internet Relay Chat Daemon, include/sjoin.h
|
||||
* (C) Carsten Munk 2000
|
||||
* Contains code from StarChat IRCd, (C) their respective authors
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
|
||||
typedef struct SynchList aSynchList;
|
||||
|
||||
/* SJOIN synch structure */
|
||||
struct SynchList {
|
||||
aClient *cptr;
|
||||
long setflags;
|
||||
aSynchList *next, *prev;
|
||||
};
|
||||
|
||||
aSynchList *SJSynchList = NULL;
|
||||
|
||||
aSynchList *make_synchlist()
|
||||
{
|
||||
register aSynchList *synchptr;
|
||||
|
||||
synchptr = (aSynchList *) MyMalloc(sizeof(aSynchList));
|
||||
synchptr->cptr = NULL;
|
||||
synchptr->setflags = 0;
|
||||
synchptr->prev = synchptr->next = NULL;
|
||||
|
||||
return synchptr;
|
||||
}
|
||||
|
||||
void free_synchlist(synchptr)
|
||||
aSynchList *synchptr;
|
||||
{
|
||||
MyFree((char *)synchptr);
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
|
||||
/************************************************************************
|
||||
* Unreal Internet Relay Chat Daemon, include/sock.h
|
||||
* Copyright (C) 1990 Jarkko Oikarinen and
|
||||
* University of Oulu, Computing Center
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.1.1.1.6.1.2.1 2000/07/14 20:22:57 stskeeps
|
||||
* +- Indentation and more SJ3 fixes
|
||||
*
|
||||
* Revision 1.1.1.1.6.1 2000/05/28 08:55:24 cmunk
|
||||
* Import of Unreal3.1-beta3
|
||||
*
|
||||
* Revision 1.2 2000/03/02 21:22:37 stskeeps
|
||||
* ...........
|
||||
*
|
||||
* Revision 1.1.1.1 2000/01/30 12:16:33 stskeeps
|
||||
* Begin of CVS at cvs.unreal.sourceforge.net
|
||||
*
|
||||
*
|
||||
* Revision 1.1.1.1 1999/09/01 23:20:37 stskeeps
|
||||
*
|
||||
* Revision 1.2 1999/07/22 14:09:26 stskeeps
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.1.1.1 1999/07/22 13:56:40 stskeeps
|
||||
* 16:56 22-07-99 techie
|
||||
* - Started on using CVS to develop Unreal
|
||||
*
|
||||
*
|
||||
* Revision 1.1.1.1 1999/07/21 10:48:18 stskeeps
|
||||
* 12:47 GMT+2 21 July 1999 - Techie
|
||||
* Starting Unreal with CVS..
|
||||
*
|
||||
* Revision 1.2 1997/12/29 07:17:35 wd
|
||||
* df4.6.2
|
||||
* ee CHANGES for updates
|
||||
* -wd
|
||||
*
|
||||
* Revision 1.1.1.1 1997/08/22 17:23:01 donwulff
|
||||
* Original import from the "deadlined" version.
|
||||
*
|
||||
* Revision 1.1.1.1 1996/11/18 07:53:41 explorer
|
||||
* ircd 4.3.3 -- about time
|
||||
*
|
||||
* Revision 1.1.1.1.4.1 1996/09/16 02:45:38 donwulff
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 6.1 1991/07/04 21:04:35 gruner
|
||||
* Revision 2.6.1 [released]
|
||||
*
|
||||
* Revision 6.0 1991/07/04 18:05:04 gruner
|
||||
* frozen beta revision 2.6.1
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef FD_ZERO
|
||||
#define FD_ZERO(set) (((set)->fds_bits[0]) = 0)
|
||||
#define FD_SET(s1, set) (((set)->fds_bits[0]) |= 1 << (s1))
|
||||
#define FD_ISSET(s1, set) (((set)->fds_bits[0]) & (1 << (s1)))
|
||||
#define FD_SETSIZE 30
|
||||
#endif
|
||||
|
||||
#ifdef RCVTIMEO
|
||||
#define SO_RCVTIMEO 0x1006 /* receive timeout */
|
||||
#endif
|
||||
@@ -1,15 +0,0 @@
|
||||
extern SSL_CTX * ctx;
|
||||
extern SSL_CTX *ctx_server;
|
||||
extern SSL_CTX *ctx_client;
|
||||
|
||||
extern SSL_METHOD *meth;
|
||||
extern void init_ssl();
|
||||
extern int ssl_handshake(aClient *); /* Handshake the accpeted con.*/
|
||||
extern int ssl_client_handshake(aClient *, ConfigItem_link *); /* and the initiated con.*/
|
||||
extern int ircd_SSL_read(aClient *acptr, void *buf, int sz);
|
||||
extern int ircd_SSL_write(aClient *acptr, const void *buf, int sz);
|
||||
extern int ircd_SSL_accept(aClient *acptr, int fd);
|
||||
extern int ircd_SSL_connect(aClient *acptr);
|
||||
extern int SSL_smart_shutdown(SSL *ssl);
|
||||
extern int ircd_SSL_client_handshake(aClient *acptr);
|
||||
extern void SSL_set_nonblocking(SSL *s);
|
||||
-1693
File diff suppressed because it is too large
Load Diff
-258
@@ -1,258 +0,0 @@
|
||||
/*
|
||||
* Unreal Internet Relay Chat Daemon, include/sys.h
|
||||
* Copyright (C) 1990 University of Oulu, Computing Center
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __sys_include__
|
||||
#define __sys_include__
|
||||
#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>
|
||||
#include <sys/types.h>
|
||||
#ifndef _WIN32
|
||||
#include <sys/param.h>
|
||||
#else
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#ifdef UNISTDH
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef STDLIBH
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef STRINGSH
|
||||
#include <strings.h>
|
||||
#else
|
||||
# ifdef STRINGH
|
||||
# include <string.h>
|
||||
# endif
|
||||
#endif
|
||||
#ifdef SSL
|
||||
#include <openssl/ssl.h>
|
||||
#endif
|
||||
#ifdef INET6
|
||||
#ifndef _WIN32
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#else
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
#endif
|
||||
#ifndef GOT_STRCASECMP
|
||||
#define strcasecmp mycmp
|
||||
#define strncasecmp myncmp
|
||||
#endif
|
||||
|
||||
#ifdef NOINDEX
|
||||
#define index strchr
|
||||
#define rindex strrchr
|
||||
/*
|
||||
extern char *index(char *, char);
|
||||
extern char *rindex(char *, char);
|
||||
*/
|
||||
#endif
|
||||
#ifdef NOBCOPY
|
||||
#define bcopy(x,y,z) memcpy(y,x,z)
|
||||
#define bcmp(x,y,z) memcmp(x,y,z)
|
||||
#define bzero(p,s) memset(p,0,s)
|
||||
#endif
|
||||
|
||||
#ifdef AIX
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#if defined(HPUX )|| defined(AIX) || defined(_WIN32)
|
||||
#include <time.h>
|
||||
#ifdef AIX
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#ifdef NEXT
|
||||
#define VOIDSIG int /* whether signal() returns int of void */
|
||||
#else
|
||||
#define VOIDSIG void /* whether signal() returns int of void */
|
||||
#endif
|
||||
|
||||
#ifdef _SOLARIS
|
||||
#define OPT_TYPE char /* opt type for get/setsockopt */
|
||||
#else
|
||||
#define OPT_TYPE void
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Different name on NetBSD, FreeBSD, and BSDI
|
||||
*/
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__bsdi__) || defined(__linux__) || defined(__APPLE__)
|
||||
#define dn_skipname __dn_skipname
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
extern VOIDSIG dummy();
|
||||
#endif
|
||||
|
||||
#ifdef NO_U_TYPES
|
||||
typedef unsigned char u_char;
|
||||
typedef unsigned short u_short;
|
||||
typedef unsigned long u_long;
|
||||
typedef unsigned int u_int;
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define MYOSNAME OSName
|
||||
extern char OSName[256];
|
||||
#define PATH_MAX MAX_PATH
|
||||
#endif
|
||||
#ifdef DEBUGMODE
|
||||
// #define ircsprintf sprintf
|
||||
//#define ircvsprintf vsprintf
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
typedef unsigned short u_int16_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* IPv4 or IPv6 structures?
|
||||
*/
|
||||
|
||||
#ifdef INET6
|
||||
|
||||
# define AND16(x) ((x)[0]&(x)[1]&(x)[2]&(x)[3]&(x)[4]&(x)[5]&(x)[6]&(x)[7]&(x)[8]&(x)[9]&(x)[10]&(x)[11]&(x)[12]&(x)[13]&(x)[14]&(x)[15])
|
||||
# define WHOSTENTP(x) ((x)[0]|(x)[1]|(x)[2]|(x)[3]|(x)[4]|(x)[5]|(x)[6]|(x)[7]|(x)[8]|(x)[9]|(x)[10]|(x)[11]|(x)[12]|(x)[13]|(x)[14]|(x)[15])
|
||||
|
||||
# define AFINET AF_INET6
|
||||
# define SOCKADDR_IN sockaddr_in6
|
||||
# define SOCKADDR sockaddr
|
||||
# define SIN_FAMILY sin6_family
|
||||
# define SIN_PORT sin6_port
|
||||
# define SIN_ADDR sin6_addr
|
||||
# define S_ADDR s6_addr
|
||||
# define IN_ADDR in6_addr
|
||||
|
||||
// # ifndef uint32_t
|
||||
//# define uint32_t __u32
|
||||
// # endif
|
||||
|
||||
# define MYDUMMY_SIZE 128
|
||||
char mydummy[MYDUMMY_SIZE];
|
||||
char mydummy2[MYDUMMY_SIZE];
|
||||
|
||||
# if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(bsdi)
|
||||
# ifndef s6_laddr
|
||||
# define s6_laddr s6_addr32
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if defined(linux)
|
||||
static const struct in6_addr in6addr_any = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0
|
||||
};
|
||||
|
||||
# endif
|
||||
|
||||
# define IRCDCONF_DELIMITER '%'
|
||||
|
||||
#else
|
||||
# define AFINET AF_INET
|
||||
# define SOCKADDR_IN sockaddr_in
|
||||
# define SOCKADDR sockaddr
|
||||
# define SIN_FAMILY sin_family
|
||||
# define SIN_PORT sin_port
|
||||
# define SIN_ADDR sin_addr
|
||||
# define S_ADDR s_addr
|
||||
# define IN_ADDR in_addr
|
||||
|
||||
# define WHOSTENTP(x) (x)
|
||||
# define IRCDCONF_DELIMITER ':'
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Socket, File, and Error portability macros
|
||||
*/
|
||||
#ifndef _WIN32
|
||||
#define SET_ERRNO(x) errno = x
|
||||
#define READ_SOCK(fd, buf, len) read((fd), (buf), (len))
|
||||
#define WRITE_SOCK(fd, buf, len) write((fd), (buf), (len))
|
||||
#define CLOSE_SOCK(fd) close(fd)
|
||||
#define IOCTL(x, y, z) ioctl((x), (y), (z))
|
||||
#define ERRNO errno
|
||||
#define STRERROR(x) strerror(x)
|
||||
|
||||
/* error constant portability */
|
||||
#define P_EMFILE EMFILE
|
||||
#define P_ENOBUFS ENOBUFS
|
||||
#define P_EWOULDBLOCK EWOULDBLOCK
|
||||
#define P_EAGAIN EAGAIN
|
||||
#define P_EINPROGRESS EINPROGRESS
|
||||
#define P_EWORKING EINPROGRESS
|
||||
#define P_EINTR EINTR
|
||||
#define P_ETIMEDOUT ETIMEDOUT
|
||||
#define P_ENOTSOCK ENOTSOCK
|
||||
#define P_EIO EIO
|
||||
#define P_ECONNABORTED ECONNABORTED
|
||||
#define P_ECONNRESET ECONNRESET
|
||||
#define P_ENOTCONN ENOTCONN
|
||||
#define P_EMSGSIZE EMSGSIZE
|
||||
#else
|
||||
/* WIN32 */
|
||||
|
||||
#define NETDB_INTERNAL -1 /* see errno */
|
||||
#define NETDB_SUCCESS 0 /* no problem */
|
||||
|
||||
/* IO and Error portability macros */
|
||||
#define READ_SOCK(fd, buf, len) recv((fd), (buf), (len), 0)
|
||||
#define WRITE_SOCK(fd, buf, len) send((fd), (buf), (len), 0)
|
||||
#define CLOSE_SOCK(fd) closesocket(fd)
|
||||
#define IOCTL(x, y, z) ioctlsocket((x), (y), (z))
|
||||
#define ERRNO WSAGetLastError()
|
||||
#define STRERROR(x) nt_strerror(x)
|
||||
#define SET_ERRNO(x) WSASetLastError(x)
|
||||
/* Error constant portability */
|
||||
#define P_EMFILE WSAEMFILE
|
||||
#define P_ENOBUFS WSAENOBUFS
|
||||
#define P_EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#define P_EAGAIN WSAEWOULDBLOCK
|
||||
#define P_EINPROGRESS WSAEINPROGRESS
|
||||
#define P_EWORKING WSAEWOULDBLOCK
|
||||
#define P_EINTR WSAEINTR
|
||||
#define P_ETIMEDOUT WSAETIMEDOUT
|
||||
#define P_ENOTSOCK WSAENOTSOCK
|
||||
#define P_EIO EIO
|
||||
#define P_ECONNABORTED WSAECONNABORTED
|
||||
#define P_ECONNRESET WSAECONNRESET
|
||||
#define P_ENOTCONN WSAENOTCONN
|
||||
#define P_EMSGSIZE WSAEMSGSIZE
|
||||
#endif
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define __attribute__(x) /* nothing */
|
||||
#endif
|
||||
|
||||
#endif /* __sys_include__ */
|
||||
@@ -1,73 +0,0 @@
|
||||
/*
|
||||
* IRC - Internet Relay Chat, include/threads.h
|
||||
* (C) 2001 The UnrealIRCd Team - coders@lists.unrealircd.org
|
||||
* See file AUTHORS in IRC package for additional names of
|
||||
* the programmers.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_NO_THREADING
|
||||
#error "You need threading for this to work"
|
||||
#endif
|
||||
|
||||
#ifndef _INCLUDE_THREADS_H
|
||||
#define _INCLUDE_THREADS_H
|
||||
/* Allow it to work on Windows and linux easily -- codemastr */
|
||||
#ifndef THREAD_DEBUGGING
|
||||
#define TDebug(x)
|
||||
#else
|
||||
#define TDebug(x) ircd_log(LOG_ERROR, "%s:%i: %s", __FILE__, __LINE__, #x)
|
||||
#endif
|
||||
#if !defined(_WIN32) || defined(USE_PTHREADS)
|
||||
#include <pthread.h>
|
||||
typedef pthread_t THREAD;
|
||||
typedef pthread_mutex_t MUTEX;
|
||||
#define IRCCreateThreadEx(thread, start, arg, id) TDebug(CreateThread); pthread_create(&thread, NULL, (void*)start, arg)
|
||||
#define IRCCreateThread(thread, start, arg) TDebug(CreateThread); pthread_create(&thread, NULL, (void*)start, arg)
|
||||
#define IRCMutexLock(mutex) TDebug(MutexLock); pthread_mutex_lock(&mutex)
|
||||
#define IRCMutexTryLock(mutex) TDebug(MutexTryLock); pthread_mutex_trylock(&mutex);
|
||||
#define IRCMutexUnlock(mutex) TDebug(MutexUnlcok); pthread_mutex_unlock(&mutex)
|
||||
#define IRCCreateMutex(mutex) TDebug(CreateMutex); pthread_mutex_init(&mutex, NULL)
|
||||
#define IRCMutexDestroy(mutex) TDebug(MutexDestroy); pthread_mutex_destroy(&mutex)
|
||||
#define IRCJoinThread(thread,ppvalue) TDebug(JoinThread); pthread_join(thread, (void **)ppvalue)
|
||||
#define IRCExitThreadEx(value) TDebug(ExitThread); pthread_exit(value)
|
||||
#define IRCExitThread(value) TDebug(ExitThread); pthread_exit(value)
|
||||
#define IRCDetachThread(value) TDebug(DetachThread); pthread_detach(value);
|
||||
#define IRCTerminateThread(thread, value) pthread_cancel(&thread)
|
||||
#define IRCThreadSelf() pthread_self()
|
||||
#define IRCThreadEqual(thread1, thread2) pthread_equal(thread1,thread2)
|
||||
#else
|
||||
typedef HANDLE THREAD;
|
||||
typedef HANDLE MUTEX;
|
||||
typedef unsigned (__stdcall *PTHREAD_START) (void *);
|
||||
#define IRCCreateThreadEx(thread, start, arg, id) thread = (THREAD)_beginthreadex(NULL, 0, (PTHREAD_START)start, arg, 0, id)
|
||||
#define IRCCreateThread(thread, start, arg) thread = _beginthread((void *)start, 0, arg)
|
||||
#define IRCMutexLock(mutex) WaitForSingleObject(mutex, INFINITE)
|
||||
#define IRCMutexTryLock(mutex) WaitForSingleObject(mutex, 0)
|
||||
#define IRCMutexUnlock(mutex) ReleaseMutex(mutex)
|
||||
#define IRCCreateMutex(mutex) mutex = CreateMutex(NULL, FALSE, NULL)
|
||||
#define IRCMutexDestroy(mutex) CloseHandle(mutex)
|
||||
#define IRCJoinThread(thread,pdwRc) { WaitForSingleObject((HANDLE)thread, INFINITE); GetExitCodeThread((HANDLE)thread, pdwRc); CloseHandle((HANDLE)thread); }
|
||||
#define IRCExitThreadEx(value) _endthreadex((unsigned int)value)
|
||||
#define IRCExitThread(value) _endthread()
|
||||
#define IRCTerminateThread(thread, value) TerminateThread((HANDLE)thread, value)
|
||||
#define IRCThreadSelf() GetCurrentThread()
|
||||
#define IRCThreadEqual(thread1, thread2) thread1 == thread2 ? 1 : 0
|
||||
#define IRCDetachThread(value) ;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* Unreal Internet Relay Chat Daemon, src/url.c
|
||||
* (C) 2003 The UnrealIRCd Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef TYPES_H
|
||||
#define TYPES_H
|
||||
|
||||
typedef void (*vFP)(); /* Void function pointer */
|
||||
typedef int (*iFP)(); /* Integer function pointer */
|
||||
typedef char (*cFP)(); /* char * function pointer */
|
||||
|
||||
#endif
|
||||
@@ -1,11 +0,0 @@
|
||||
#ifndef URL_H
|
||||
#define URL_H
|
||||
|
||||
int url_is_valid(char *);
|
||||
char *url_getfilename(char *);
|
||||
char *download_file(char *, char **);
|
||||
void download_file_async(char *, time_t, vFP);
|
||||
void url_do_transfers_async(void);
|
||||
void url_init(void);
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user