Initial commit

This commit is contained in:
agatha 2023-08-20 13:26:10 -04:00
commit 62da4c26fa
512 changed files with 468804 additions and 0 deletions

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# ircd-ratbox
Mirror of the latest ratbox source because ratbox.org is gay and blocks
VPNs.

BIN
ircd-ratbox-3.0.10.tar.bz2 Normal file

Binary file not shown.

View File

@ -0,0 +1,17 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAABAgAGBQJWlqjhAAoJEGk+LSMgH/V+RNEP+gOe5C879xWj9Bp+beW0tqLs
QxwIkQj+r1QlHfWtYmERcEk87PZXWacOYlvTMuUhvIzyXc3Kl2t3W3JN/yAinbxC
yUzkkOoejcHTXHx/mSlNek/HtpLoluNnKSVPVa91nBFYn8agphAJ1Xhz05N46FGE
uWpDWXWVCEAmubEPB4wjCHKtdGd38oWmgqfI70yJ+GaiBrXZn59L9/yJZ0XDzMqF
Z3fGpq7tsqsnYw5dHduUvSUalpqCP+FNtad3hMpLch3MVf69laK4uBOiT70KMqTk
O3gr+qOYX5Uyn4MRN+DU/oXc4zDfSjtoBnjzWYRebo+ZGmT2CFOarvpNhwTWaWwW
0W8wC2cVMOFMvpjJ0uAIvDeXF7/x7QS3Kq8JnkjNVQ6W/eAyRjXebl8Hyt5QO0Cb
8PZFGTn8dxjVmX9B++knilIS5Un1dUkPUK1WWEV0wm6ptlTwE6yhn2SkCVM8Mtsw
1oEmKmLKUUteldj2RmsIEDEttaV92MjkvsY9D9c5PUZmz1iRR1OxvNjWM7fzOpBY
xEr6Ye2FqreaAcNXyZAoy9ei4KsV99guwj8lHJdQVxjYcStctXJHmfCNBGt5L3vv
dS4NQuBnvS/QeSfXYri1JM6uffW1SNZnYYcI9ozL14gExniN8OybqGhgAwHKZcgi
js0owvQ6TC/j/41VLFZR
=N2bF
-----END PGP SIGNATURE-----

2
ircd-ratbox-3.0.10/.indent.pro vendored Normal file
View File

@ -0,0 +1,2 @@
-i8 -bli0 -ut -nsai -l100 -npcs -nprs -ncs -nsaf -nsai -nsaw -T uint64_t -T uint32_t -T uint8_t -T int64_t -T int32_t -T int8_t -T uintptr_t -T rb_bh -T size_t -T rb_fde_t -T rb_helper -T rb_prefix_t -T rb_dlink_node -T rb_dlink_list -T rb_patricia_node_t -T rb_patricia_tree_t -T rb_bh_usage_cb

30
ircd-ratbox-3.0.10/BUGS Normal file
View File

@ -0,0 +1,30 @@
Known Bugs worthy of a mention:
--------------------------------------------------------------------------------
1. /MODUNLOAD causes cores:
- If a module is modified before being unloaded, /MODUNLOAD (and
therefore /MODRELOAD) may cause a core.
This problem is caused by the behaviour of the OS, which treats
shared libraries differently to executables (modifying the ircd
binary whilst it is running would also cause a core, but is denied
by the OS). There is no way to fix this at the application level,
and fixing the OS to do the right thing is also difficult.
A workaround to avoid coring is possible however. To install new
modules, first remove or rename the old module, then copy/move the
new file into place. /MODUNLOAD will then work successfully.
Alternatively, running ./configure with the --disable-shared-modules
argument will link all the commands statically, losing the advantages
of upgrading at runtime, but reducing the chances of accidentally
coring your server.
BUG REPORTS: If you run this code and encounter problems, you must report
the bug in by E-MAIL to ircd-ratbox@lists.ratbox.org
Please include a gdb backtrace and keep your binaries, modules and core file
in case the developers need more information.
--------------------------------------------------------------------------------
$Id: BUGS 23020 2006-09-01 18:20:19Z androsyn $

View File

@ -0,0 +1,20 @@
$Id: CREDITS 27348 2012-01-16 22:05:21Z androsyn $
ircd-ratbox is an evolution where ircd-hybrid left off around version 7-rc1.
Currently the ircd-ratbox team consists of the following developers:
AndroSyn, Aaron Sethman <androsyn -at- ratbox.org>
anfl, Lee Hardy <lee -at- leeh.co.uk>
jilles, Jilles Tjoelker <jilles -at- stack.nl>
Special thanks for support, code and ideas to:
dubkat, Daniel Reidy <dubkat -at- gmail.com>
Hwy, W. Campbell <wcampbel -at- botbay.net>
larne, Edward Brocklesby <ejb -at- sdf.lonestar.org>
Of course our work is based on the work of many, many others over the past
10 or so years since irc has existed, including the work done by the Hybrid
team, our thanks goes to them.

View File

@ -0,0 +1,884 @@
androsyn 2016/01/13 19:33:49 UTC (20160113_12-29315)
Log:
tag ircd-ratbox RATBOX_3_0_10
Modified:
ircd-ratbox/tags/RATBOX_3_0_10/ (File Added)
androsyn 2016/01/13 19:14:52 UTC (20160113_11-29311)
Log:
force commit
Modified:
ircd-ratbox/branches/RATBOX_3_0/libltdl/config-h.in (File Modified)
androsyn 2016/01/13 19:00:10 UTC (20160113_10-29309)
Log:
disable dependency tracking for libltdl
Modified:
ircd-ratbox/branches/RATBOX_3_0/libltdl/Makefile.in (File Modified)
androsyn 2016/01/13 18:59:05 UTC (20160113_9-29307)
Log:
blah..i hate this autoconf crap
Modified:
ircd-ratbox/branches/RATBOX_3_0/configure (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/setup.h.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/aclocal.m4 (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/configure (File Modified)
androsyn 2016/01/13 18:50:25 UTC (20160113_8-29305)
Log:
rebuild automake with automake 1.11
Modified:
ircd-ratbox/branches/RATBOX_3_0/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/RELNOTES (File Modified)
ircd-ratbox/branches/RATBOX_3_0/aclocal.m4 (File Modified)
ircd-ratbox/branches/RATBOX_3_0/bandb/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/bandb/sqlite3/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/contrib/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/help/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/patchlevel.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/resolver/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/ssld/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/tools/Makefile.in (File Modified)
androsyn 2016/01/13 18:48:24 UTC (20160113_7-29303)
Log:
i hate autotools
Modified:
ircd-ratbox/branches/RATBOX_3_0/libltdl/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/aclocal.m4 (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/configure (File Modified)
androsyn 2016/01/13 18:37:34 UTC (20160113_6-29301)
Log:
update svn:keywords
Modified:
ircd-ratbox/branches/RATBOX_3_0/libltdl/aclocal.m4 (Property Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/argz.c (Property Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/argz_.h (Property Modified)
androsyn 2016/01/13 18:34:48 UTC (20160113_5-29299)
Log:
rerun libtoolize etc
Modified:
ircd-ratbox/branches/RATBOX_3_0/libltdl/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/aclocal.m4 (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/configure (File Modified)
androsyn 2016/01/13 18:27:07 UTC (20160113_4-29297)
Log:
rerun autotools
Modified:
ircd-ratbox/branches/RATBOX_3_0/libltdl/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/aclocal.m4 (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/configure (File Modified)
androsyn 2016/01/13 18:23:43 UTC (20160113_3-29295)
Log:
update sqlite amalgamation
Modified:
ircd-ratbox/branches/RATBOX_3_0/bandb/sqlite3/shell.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/bandb/sqlite3/sqlite3.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/bandb/sqlite3/sqlite3.h (File Modified)
androsyn 2016/01/13 18:07:49 UTC (20160113_2-29291)
Log:
change the ordering of the ssl_cert setup, this allows the server to work without dhparam amongst other things
Modified:
ircd-ratbox/branches/RATBOX_3_0/src/newconf.c (File Modified)
androsyn 2016/01/13 18:07:13 UTC (20160113_1-29289)
Log:
correctly clear our ServerInfo. This fixes rehashing for ssl related parameters
Modified:
ircd-ratbox/branches/RATBOX_3_0/src/s_conf.c (File Modified)
androsyn 2016/01/13 18:01:32 UTC (20160113_0-29287)
Log:
log to stderr if -foreground is passed
Modified:
ircd-ratbox/branches/RATBOX_3_0/src/s_log.c (File Modified)
androsyn 2015/12/29 02:38:25 UTC (20151229_0-29271)
Log:
sigh...make monitor, you know, work
Modified:
ircd-ratbox/branches/RATBOX_3_0/modules/core/m_nick.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_info.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_services.c (File Modified)
androsyn 2015/12/20 04:35:39 UTC (20151220_0-29265)
Log:
backport signal handling fixes
Modified:
ircd-ratbox/branches/RATBOX_3_0/bandb/bandb.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/resolver/resolver.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/ircd_signal.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/ssld/ssld.c (File Modified)
androsyn 2015/12/18 17:15:54 UTC (20151218_1-29251)
Log:
update the echo to say 2048 bits as well
Modified:
ircd-ratbox/branches/RATBOX_3_0/doc/genssl.sh (File Modified)
androsyn 2015/12/18 00:07:15 UTC (20151218_0-29235)
Log:
change default key sizes to 2048 bits and self sign using sha256
Modified:
ircd-ratbox/branches/RATBOX_3_0/doc/genssl.sh (File Modified)
androsyn 2015/12/15 19:47:49 UTC (20151215_0-29233)
Log:
rerun autotools
Modified:
ircd-ratbox/branches/RATBOX_3_0/libltdl/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/aclocal.m4 (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/configure (File Modified)
androsyn 2015/12/10 20:14:50 UTC (20151210_5-29223)
Log:
rebuild ircd_parser.c,h
Modified:
ircd-ratbox/branches/RATBOX_3_0/src/ircd_parser.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/ircd_parser.h (File Modified)
androsyn 2015/12/10 19:54:15 UTC (20151210_4-29221)
Log:
call rb_setselect to handle res_readreply rather than calling it directly to avoid a minor race condition, backported from trunk
Modified:
ircd-ratbox/branches/RATBOX_3_0/resolver/res.c (File Modified)
androsyn 2015/12/10 18:35:59 UTC (20151210_3-29219)
Log:
remove fprintf
Modified:
ircd-ratbox/branches/RATBOX_3_0/src/newconf.c (File Modified)
androsyn 2015/12/10 14:02:24 UTC (20151210_2-29217)
Log:
don't add hub/leaf masks to the hubleaf list until after the connect block is ended. Also cleanup remote_confs correctly
Modified:
ircd-ratbox/branches/RATBOX_3_0/src/newconf.c (File Modified)
androsyn 2015/12/10 13:57:05 UTC (20151210_1-29215)
Log:
remove exempts on rehash...
Modified:
ircd-ratbox/branches/RATBOX_3_0/include/reject.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/reject.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/s_conf.c (File Modified)
androsyn 2015/12/10 13:48:53 UTC (20151210_0-29213)
Log:
first batch of backports for various memory leaks from trunk
Modified:
ircd-ratbox/branches/RATBOX_3_0/include/patchlevel.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_stats.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/ircd.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/ircd_parser.y (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/newconf.c (File Modified)
androsyn 2015/12/04 20:30:15 UTC (20151204_0-29191)
Log:
don't remove dlines while walking the patricia trie or corruption will result
Modified:
ircd-ratbox/branches/RATBOX_3_0/src/reject.c (File Modified)
androsyn 2015/10/13 15:05:40 UTC (20151013_7-28763)
Log:
update RELNOTES
Modified:
ircd-ratbox/branches/RATBOX_3_0/RELNOTES (File Modified)
androsyn 2015/10/13 15:04:20 UTC (20151013_6-28761)
Log:
update relnotes and patchlevel still not quite ready though..
Modified:
ircd-ratbox/branches/RATBOX_3_0/include/patchlevel.h (File Modified)
androsyn 2015/10/13 15:00:04 UTC (20151013_5-28759)
Log:
yay autotools
Modified:
ircd-ratbox/branches/RATBOX_3_0/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/aclocal.m4 (File Modified)
ircd-ratbox/branches/RATBOX_3_0/bandb/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/bandb/sqlite3/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/configure (File Modified)
ircd-ratbox/branches/RATBOX_3_0/contrib/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/help/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/setup.h.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/config/compile (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/config/depcomp (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/config/install-sh (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/config/missing (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/config/ylwrap (File Modified) (Property Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/resolver/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/ssld/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/tools/Makefile.in (File Modified)
androsyn 2015/10/13 14:55:16 UTC (20151013_4-28757)
Log:
remove some old support code for gcc 3.3, we don't support that anymore i don't think
Modified:
ircd-ratbox/branches/RATBOX_3_0/src/ircd_lexer.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/ircd_lexer.l (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/ircd_parser.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/ircd_parser.h (File Modified)
androsyn 2015/10/13 14:48:47 UTC (20151013_3-28755)
Log:
remove the rest of EGD
Modified:
ircd-ratbox/branches/RATBOX_3_0/include/s_conf.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/ircd.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/newconf.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/s_conf.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/sslproc.c (File Modified)
androsyn 2015/10/13 14:47:21 UTC (20151013_2-28753)
Log:
keep signedness on this shift
Modified:
ircd-ratbox/branches/RATBOX_3_0/ssld/ssld.c (File Modified)
androsyn 2015/10/13 14:46:54 UTC (20151013_1-28751)
Log:
keep signedness on this shift
Modified:
ircd-ratbox/branches/RATBOX_3_0/bandb/bandb.c (File Modified)
androsyn 2015/10/13 14:41:38 UTC (20151013_0-28749)
Log:
initialize arglen
Modified:
ircd-ratbox/branches/RATBOX_3_0/src/channel.c (File Modified)
androsyn 2015/10/12 15:49:10 UTC (20151012_1-28739)
Log:
unconditionally send MAP isupport
Modified:
ircd-ratbox/branches/RATBOX_3_0/src/supported.c (File Modified)
androsyn 2015/10/12 14:09:49 UTC (20151012_0-28737)
Log:
add ACCEPT/MAP supported strings
Modified:
ircd-ratbox/branches/RATBOX_3_0/src/supported.c (File Modified)
androsyn 2015/10/11 13:56:06 UTC (20151011_0-28735)
Log:
actually free_monitor on delete
Modified:
ircd-ratbox/branches/RATBOX_3_0/modules/m_monitor.c (File Modified)
androsyn 2015/10/06 18:41:56 UTC (20151006_2-28725)
Log:
use relative paths for libratbox svn:external
Modified:
ircd-ratbox/branches/RATBOX_3_0/ (Property Modified)
androsyn 2015/10/06 18:40:21 UTC (20151006_1-28723)
Log:
more updates to RELNOTES
Modified:
ircd-ratbox/branches/RATBOX_3_0/RELNOTES (File Modified)
androsyn 2015/10/06 18:39:36 UTC (20151006_0-28721)
Log:
use relative paths for libratbox svn:external
Modified:
ircd-ratbox/branches/RATBOX_3_0/ (Property Modified)
ircd-ratbox/branches/RATBOX_3_0/RELNOTES (File Modified)
androsyn 2015/10/02 20:57:42 UTC (20151002_1-28697)
Log:
backport trunk monitor changes
Modified:
ircd-ratbox/branches/RATBOX_3_0/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/bandb/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/bandb/sqlite3/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/contrib/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/help/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/monitor.h (File Added)
ircd-ratbox/branches/RATBOX_3_0/include/s_conf.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/send.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/struct.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/config/ylwrap (File Added)
ircd-ratbox/branches/RATBOX_3_0/modules/Makefile.am (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_monitor.c (File Added)
ircd-ratbox/branches/RATBOX_3_0/resolver/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/Makefile.am (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/client.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/monitor.c (File Added)
ircd-ratbox/branches/RATBOX_3_0/src/newconf.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/s_conf.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/s_user.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/send.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/supported.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/ssld/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/tools/Makefile.in (File Modified)
androsyn 2015/10/02 16:49:39 UTC (20151002_0-28681)
Log:
use libratbox functions
Modified:
ircd-ratbox/branches/RATBOX_3_0/contrib/m_flags.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/contrib/m_mkpasswd.c (File Modified)
androsyn 2015/09/29 18:04:32 UTC (20150929_4-28679)
Log:
update libltdl
Modified:
ircd-ratbox/branches/RATBOX_3_0/libltdl/COPYING.LIB (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/aclocal.m4 (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/argz.c (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/argz_.h (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/config/ (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/config/compile (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/config/config.guess (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/config/config.sub (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/config/depcomp (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/config/install-sh (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/config/ltmain.sh (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/config/missing (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/configure (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/libltdl/ (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/libltdl/lt__alloc.h (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/libltdl/lt__dirent.h (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/libltdl/lt__glibc.h (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/libltdl/lt__private.h (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/libltdl/lt__strl.h (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/libltdl/lt_dlloader.h (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/libltdl/lt_error.h (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/libltdl/lt_system.h (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/libltdl/slist.h (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/loaders/ (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/loaders/dld_link.c (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/loaders/dlopen.c (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/loaders/dyld.c (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/loaders/load_add_on.c (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/loaders/loadlibrary.c (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/loaders/preopen.c (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/loaders/shl_load.c (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/lt__alloc.c (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/lt__dirent.c (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/lt__strl.c (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/lt_dlloader.c (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/lt_error.c (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/m4/ (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/m4/argz.m4 (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/m4/libtool.m4 (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/m4/ltdl.m4 (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/m4/ltoptions.m4 (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/m4/ltsugar.m4 (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/m4/ltversion.m4 (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/m4/lt~obsolete.m4 (File Added)
ircd-ratbox/branches/RATBOX_3_0/libltdl/slist.c (File Added)
androsyn 2015/09/29 17:51:20 UTC (20150929_3-28677)
Log:
fix the time_t 64bit on 32bit openbsd mess
Modified:
ircd-ratbox/branches/RATBOX_3_0/modules/core/m_join.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/core/m_mode.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/core/m_nick.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/core/m_server.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_services.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_stats.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_svinfo.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_tb.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/bandbi.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/channel.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/client.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/s_conf.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/s_user.c (File Modified)
androsyn 2015/09/29 17:09:18 UTC (20150929_2-28675)
Log:
check for sizeof(time_t) and setup format specifiers
Modified:
ircd-ratbox/branches/RATBOX_3_0/configure (File Modified)
ircd-ratbox/branches/RATBOX_3_0/configure.ac (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/setup.h.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/stdinc.h (File Modified)
androsyn 2015/09/29 17:06:09 UTC (20150929_1-28673)
Log:
Fix autoconf/libtool/libltdl crap. libltdl will only be built if needed, it will try to use the system libltdl by default. Backported from trunk
Modified:
ircd-ratbox/branches/RATBOX_3_0/Makefile.am (File Modified)
ircd-ratbox/branches/RATBOX_3_0/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/aclocal.m4 (File Modified)
ircd-ratbox/branches/RATBOX_3_0/bandb/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/bandb/sqlite3/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/configure (File Modified)
ircd-ratbox/branches/RATBOX_3_0/configure.ac (File Modified)
ircd-ratbox/branches/RATBOX_3_0/contrib/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/help/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/setup.h.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/Makefile.am (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/README (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/aclocal.m4 (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/config-h.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/config.guess (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/config.sub (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/configure (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/configure.ac (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/install-sh (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/ltdl.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/ltdl.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/ltmain.sh (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/missing (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/resolver/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/ssld/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/tools/Makefile.in (File Modified)
androsyn 2015/09/29 15:09:55 UTC (20150929_0-28671)
Log:
remove mostly unused monitor code
Modified:
ircd-ratbox/branches/RATBOX_3_0/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/aclocal.m4 (File Modified)
ircd-ratbox/branches/RATBOX_3_0/bandb/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/bandb/sqlite3/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/contrib/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/doc/example.conf (File Modified)
ircd-ratbox/branches/RATBOX_3_0/help/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/monitor.h (File Deleted)
ircd-ratbox/branches/RATBOX_3_0/include/s_conf.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/send.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/struct.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/Makefile.am (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/core/m_nick.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_info.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_monitor.c (File Deleted)
ircd-ratbox/branches/RATBOX_3_0/modules/m_services.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/static_modules.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/resolver/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/Makefile.am (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/client.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/ircd.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/monitor.c (File Deleted)
ircd-ratbox/branches/RATBOX_3_0/src/newconf.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/s_conf.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/s_user.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/send.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/supported.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/ssld/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/tools/Makefile.in (File Modified)
androsyn 2015/08/10 18:23:42 UTC (20150810_0-28529)
Log:
fix overlapping memcpy with memmove, recent variants of glibc will crash on modrestart
Modified:
ircd-ratbox/branches/RATBOX_3_0/src/modules.c (File Modified)
androsyn 2014/08/04 17:31:18 UTC (20140804_0-27478)
Log:
fix notice
Modified:
ircd-ratbox/branches/RATBOX_3_0/modules/core/m_die.c (File Modified)
androsyn 2013/01/28 23:38:59 UTC (20130128_0-27433)
Log:
Reject cidr masks that are too large to make sense, assume they are nonsense and skip cidr checking for these
Modified:
ircd-ratbox/branches/RATBOX_3_0/src/match.c (File Modified)
androsyn 2012/12/31 21:34:15 UTC (20121231_1-27414)
Log:
update release version
Modified:
ircd-ratbox/branches/RATBOX_3_0/INSTALL (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/patchlevel.h (File Modified)
androsyn 2012/12/31 21:31:20 UTC (20121231_0-27412)
Log:
update relnotes
Modified:
ircd-ratbox/branches/RATBOX_3_0/RELNOTES (File Modified)
jilles 2012/05/27 13:09:42 UTC (20120527_0-27399)
Log:
Backport trunk r27397: Fix typo, reported by Scott MacDonald.
Modified:
ircd-ratbox/branches/RATBOX_3_0/src/ircd.c (File Modified)
androsyn 2012/04/15 21:41:07 UTC (20120415_0-27391)
Log:
Fix another case of sizeof() returning the pointer size instead of the variable size
Modified:
ircd-ratbox/branches/RATBOX_3_0/resolver/resolver.c (File Modified)
dubkat 2012/03/16 23:10:29 UTC (20120316_2-27381)
Log:
more copyright changes
Modified:
ircd-ratbox/branches/RATBOX_3_0/contrib/m_clearchan.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/contrib/m_force.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/contrib/m_ojoin.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/contrib/m_okick.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/contrib/m_olist.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/doc/server-version-info (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/version.c.SH (File Modified)
dubkat 2012/03/16 05:33:15 UTC (20120316_1-27371)
Log:
House cleaning - update our copyright notices
Modified:
ircd-ratbox/branches/RATBOX_3_0/bandb/bandb.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/bandb/bantool.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/bandb/rsdb_sqlite3.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/contrib/ircd-shortcut.pl (File Modified)
ircd-ratbox/branches/RATBOX_3_0/contrib/m_opme.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/contrib/m_webirc.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/doc/challenge.txt (File Modified)
ircd-ratbox/branches/RATBOX_3_0/doc/example.conf (File Modified)
ircd-ratbox/branches/RATBOX_3_0/doc/example.efnet.conf (File Modified)
ircd-ratbox/branches/RATBOX_3_0/doc/genssl.sh (File Modified)
ircd-ratbox/branches/RATBOX_3_0/doc/ircd_crontab.sh (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/channel.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/class.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/client.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/common.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/config.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/config.h.dist (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/defaults.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/dns.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/hash.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/hook.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/hostmask.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/ircd.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/ircd_defs.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/ircd_getopt.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/ircd_signal.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/listener.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/match.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/modules.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/monitor.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/numeric.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/packet.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/parse.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/patchlevel.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/reject.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/restart.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/s_auth.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/s_conf.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/s_gline.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/s_log.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/s_newconf.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/s_serv.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/s_stats.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/s_user.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/scache.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/send.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/sslproc.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/struct.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/include/whowas.h (File Modified)
ircd-ratbox/branches/RATBOX_3_0/main.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/core/m_die.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/core/m_error.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/core/m_join.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/core/m_kick.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/core/m_kill.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/core/m_message.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/core/m_mode.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/core/m_nick.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/core/m_part.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/core/m_quit.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/core/m_server.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/core/m_squit.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_accept.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_admin.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_adminwall.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_away.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_cap.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_capab.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_close.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_cmessage.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_connect.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_dline.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_encap.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_gline.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_gungline.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_help.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_info.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_invite.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_ison.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_kline.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_knock.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_links.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_list.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_locops.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_lusers.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_monitor.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_motd.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_names.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_oper.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_operspy.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_pass.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_ping.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_pong.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_post.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_rehash.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_restart.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_resv.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_services.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_set.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_stats.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_svinfo.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_tb.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_testline.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_time.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_topic.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_trace.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_unreject.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_user.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_userhost.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_version.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_wallops.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_who.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_whois.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_whowas.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/m_xline.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/resolver/res.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/resolver/reslist.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/resolver/resolver.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/bandbi.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/cache.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/channel.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/class.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/client.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/dns.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/getopt.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/hash.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/hook.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/hostmask.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/ircd.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/listener.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/modules.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/monitor.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/newconf.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/numeric.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/operhash.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/packet.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/parse.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/reject.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/restart.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/s_auth.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/s_conf.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/s_log.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/s_newconf.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/s_serv.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/s_user.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/scache.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/send.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/sslproc.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/supported.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/whowas.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/ssld/ssld.c (File Modified)
dubkat 2012/03/16 03:49:19 UTC (20120316_0-27369)
Log:
Add additional documentation instructing the user that issuing a --prefix to configure is highly advised.
Modified:
ircd-ratbox/branches/RATBOX_3_0/INSTALL (File Modified)
androsyn 2012/03/11 00:34:21 UTC (20120311_1-27357)
Log:
Rerun autoconf/libtoolize again...
Modified:
ircd-ratbox/branches/RATBOX_3_0/configure (File Modified)
ircd-ratbox/branches/RATBOX_3_0/configure.ac (File Modified)
ircd-ratbox/branches/RATBOX_3_0/ltmain.sh (File Modified)
androsyn 2012/03/11 00:12:06 UTC (20120311_0-27353)
Log:
Rerun autoreconf...
Modified:
ircd-ratbox/branches/RATBOX_3_0/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/aclocal.m4 (File Modified)
ircd-ratbox/branches/RATBOX_3_0/bandb/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/bandb/sqlite3/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/configure (File Modified)
ircd-ratbox/branches/RATBOX_3_0/contrib/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/help/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/aclocal.m4 (File Modified)
ircd-ratbox/branches/RATBOX_3_0/libltdl/configure (File Modified)
ircd-ratbox/branches/RATBOX_3_0/modules/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/resolver/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/src/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/ssld/Makefile.in (File Modified)
ircd-ratbox/branches/RATBOX_3_0/tools/Makefile.in (File Modified)
androsyn 2012/01/16 22:05:21 UTC (20120116_2-27348)
Log:
test
Modified:
ircd-ratbox/branches/RATBOX_3_0/CREDITS (File Modified)
dubkat 2012/01/16 21:35:50 UTC (20120116_1-27345)
Log:
Update SQLite to 3.7.10. release information can be read at: http://www.sqlite.org/releaselog/3_7_10.html
Modified:
ircd-ratbox/branches/RATBOX_3_0/bandb/sqlite3/shell.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/bandb/sqlite3/sqlite3.c (File Modified)
ircd-ratbox/branches/RATBOX_3_0/bandb/sqlite3/sqlite3.h (File Modified)
dubkat 2012/01/16 05:43:30 UTC (20120116_0-27341)
Log:
fix typo in example.conf and example.efnet.conf
reported by Brad Smith <brad@comstyle.com>
Modified:
ircd-ratbox/branches/RATBOX_3_0/doc/example.conf (File Modified)
ircd-ratbox/branches/RATBOX_3_0/doc/example.efnet.conf (File Modified)

Binary file not shown.

Binary file not shown.

217
ircd-ratbox-3.0.10/INSTALL Normal file
View File

@ -0,0 +1,217 @@
ircd-ratbox INSTALL Document
$Id: INSTALL 27414 2012-12-31 21:34:15Z androsyn $
Copyright (c) 2001 by ircd-hybrid team
Copyright (c) 2002-2012 ircd-ratbox development team
----------------------------------------------------------------------
__ __ __ __
|__|.----.----.--| |___.----.---.-.| |_| |--.-----.--.--.
| || _| __| _ |___| _| _ || _| _ | _ |_ _|
|__||__| |____|_____| |__| |___._||____|_____|_____|__.__|
+--------------------------------------------------------------------+
| IMPORTANT: for those who don't bother reading docs... |
| If you are upgrading from ANY VERSION of ircd-ratbox, see the |
| instructions under UPGRADING, #3. YES, THIS MEANS YOU! |
` ------------------------------------------------------------------ '
Read the ChangeLog file to find out about the exciting
new features in this version. Other good reads are
doc/whats-new.txt, BUGS, doc/example.conf, and README.FIRST.
An example.conf for EFnet is in doc/ with the values "approved"
on 12 December 2001.
> QUICK START
1. Configure (see below under CONFIGURE OPTIONS for more details):
* IMPORTANT:
* At a minimum, you really ought to use the --prefix=/some/place option.
* By default, configure will select /usr/local/ircd -- YOU DO *NOT* WANT THAT!
* You may *NOT* run the ircd as root, and the ircd user needs to be able to write to
* it's own directories. You have been warned.
I. Large networks (with thousands of users):
./configure --prefix=/home/user/ircd
II. Small networks (with only a few hundred users or less):
./configure --prefix=/home/user/ircd --enable-small-net
III. Configure ircd-ratbox for running with minimal resources
on a 64bit VPS (Virtual Private Server). This creates
a 32bit IRCD which takes up less memory:
CFLAGS="-m32" ./configure --prefix=/home/user/ircd \
--enable-small-net
2. Build:
I. On linux systems: make
II. On *BSD systems: gmake
3. Install:
I. make install (or gmake install on *BSD)
II. make install-strip (strips out debugging code for smaller
binaries and modules)
DO NOT SUBMIT BUGS IF YOU HAVE STRIPPED THE IRCD OF DEBUGGING
SYMBOLS. WE WILL NOT BE ABLE TO HELP YOU.
> ADDITIONAL CONFIGURE OPTIONS
Note: There are some special optional parameters to the configure
script that some admins may wish to use.
* --enable-kqueue
Use the superior kqueue(2) system call as opposed to
the default poll(2). This is currently only available
on FreeBSD 4.1 or higher, and should be auto-detected.
* --enable-devpoll
Enable the superior /dev/poll support on Solaris.
Linux /dev/poll is broken and will not work with this
option. Do not use this unless you comprehend the implications.
* --enable-openssl
Enable the openssl dependent crypto functions.
This will allow CHALLENGE to work and encrypted links.
On systems where the configure script can automatically
detect OpenSSL, this option is not necessary.
If configure cannot find OpenSSL, you must specify a
path with this option.
(--enable-openssl=/path/to/openssl)
If you plan on using SSL encrypted client connections,
or encrypted links, you may wish to run
/path/to/ircd/bin/genssl.sh to generate self-signed
certificates.
* --enable-ipv6
Enable IPv6 support. This should be auto-detected.
* --enable-static
Enable a static-linked ircd. You will not be able to unload,
or reload modules. You probably don't want this.
* --enable-assert
Enable some of the debugging code. This should NOT be used
on production servers. Doing so is a performance hit,
and can cause cores from things that shouldn't normally happen.
* --enable-small-net
Tunes the server for smaller networks by reducing the
startup memory footprint. This should really only be used
for *small* networks, as this tends to be a performance hit
on larger networks.
* --with-nicklen
Sets the maximum NICK length. Note that this MUST be
consistant across your entire network.
* --enable-services
If your network runs ratbox-services, this enables extra
code to actually make it useful on your ircd.
Please read doc/services.txt for more information.
> UPGRADING
1. If this is a clean install of ircd-ratbox, you may skip this section.
2. Upgrading from ircd-ratbox-2.x, ircd-hybrid-7.x
If you have an older version of ircd-ratbox or ircd-hybrid, and
you have klines, dlines, resvs, and xline config files, keep
reading.
ircd-ratbox no longer uses flat-file based configs for these
types of entries, instead they are stored in a database. To
prevent accidental clobbering, or leaving behind old, unsupported
modules it would be best to install ratbox into a clean location.
After you have finished installing the ircd, you will likey wish
to import your old ban files. ircd-ratbox-3 includes a tool
to manage the database. Importing, backing up, error checking,
and reclaiming lost space are all supported. For more information,
run /path/to/ircd/bin/bantool with no arguments.
I. import old ban configs (pretend mode):
/path/to/ircd/bin/bantool -i -d -p /path/to/oldircd/etc
If everything looks good, you will want to actually let
bantool do the import.
II. import old ban configs:
/path/to/ircd/bin/bantool -i -d /path/to/oldircd/etc
3. Upgrading from another version ircd-ratbox-3.x
* IMPORTANT: EVERY TIME YOU UPGRADE ircd-ratbox-3 YOU NEED TO
ISSUE THIS COMMAND. FAILURE TO DO SO CAN CAUSE YOUR IRCD TO CORE!
I. /path/to/ircd/bin/bantool -u
> HOW TO GET HELP
Send Check or Money Order to... just kidding!
(However free beer is always appreciated)
* For Bug Reports, visit: http://bugs.ratbox.org
* For General Question, you may ask your question
on #ratbox on EFnet.
If you do fix anything, however, please post a context or unified
diff on http://bugs.ratbox.org so the fixes can be incorporated into
the next release of ircd-ratbox.
If ratbox crashes on you, please submit a bug report, and include the
gdb backtrace or corefile on http://bugs.ratbox.org
DISCUSSION: There is a low-volume mailing list for discussion of
ratbox issues, To subscribe, visit:
http://lists.ratbox.org/cgi-bin/mailman/listinfo/ircd-ratbox
----------------------------------------------------------------------
> NOTES
The best way to get a backtrace of the core is to follow this sequence of
instructions:
1. Change to the directory containing the core file
2. Run gdb on the binary and the core file. With an unmodified
ircd-ratbox installation, an example command line is below
(in the /path/to/ircd directory). This will be useless
if you used 'make install-strip'.
$ gdb bin/ircd ircd.core
3. At the "(gdb)" prompt, enter the command "bt"
4. Save the output of the backtrace command and submit it to
http://bugs.ratbox.org
5. Be sure to save the ircd binary, the modules, and the core file
in a safe place in case the developers need to look deeper
than a backtrace provides.

340
ircd-ratbox-3.0.10/LICENSE Normal file
View File

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser General
Public License instead of this License.

View File

@ -0,0 +1,51 @@
# $Id: Makefile.am 28673 2015-09-29 17:06:09Z androsyn $
#
# okay so i've flattened out the build stuff here.
# this is really for the best since so many things depend
# on each other now..
AUTOMAKE_OPTIONS = foreign subdir-objects
prefix = @prefix@
libcoredir = @libdir@
modulesdir = @moduledir@/autoload
coredir = @moduledir@
servicesdir = @moduledir@/autoload
AM_CFLAGS = $(WARNFLAGS)
ircd_SOURCES = main.c
bin_PROGRAMS = ircd
if MINGW
EXTRA_FLAGS = -no-undefined -Wl,--enable-runtime-pseudo-reloc -export-symbols-regex '*'
endif
if !STATIC_MODULES
SUBDIRS = @LTDL_SUBDIR@ libratbox src modules tools doc help bandb ssld resolver
ircd_LDADD = libratbox/src/libratbox.la src/libcore.la $(LIBLTDL)
ircd_LDFLAGS = $(EXTRA_FLAGS) -dlopen self
else
SUBDIRS = @LTDL_SUBDIR@ libratbox modules src tools doc help bandb ssld resolver
ircd_LDADD = libratbox/src/libratbox.la modules/libmodules.la src/libcore.la modules/static_modules.o $(LIBLTDL) $(DLOPEN)
endif
build_contrib:
cd contrib && $(MAKE)
install_contrib: build_contrib
cd contrib && $(MAKE) install
install_data-local:
-@if test ! -d @logdir@; then mkdir @logdir@;fi
contrib: build_contrib

View File

@ -0,0 +1,966 @@
# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# $Id: Makefile.in 29305 2016-01-13 18:50:25Z androsyn $
#
# okay so i've flattened out the build stuff here.
# this is really for the best since so many things depend
# on each other now..
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = ircd$(EXEEXT)
subdir = .
DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/install-mod.sh.in \
$(top_srcdir)/configure $(top_srcdir)/doc/Makefile.in \
$(top_srcdir)/include/setup.h.in ChangeLog INSTALL compile \
config.guess config.sub depcomp install-sh \
libltdl/config/compile libltdl/config/config.guess \
libltdl/config/config.sub libltdl/config/depcomp \
libltdl/config/install-sh libltdl/config/ltmain.sh \
libltdl/config/missing libltdl/config/ylwrap ltmain.sh missing \
mkinstalldirs ylwrap
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/setup.h
CONFIG_CLEAN_FILES = doc/Makefile install-mod.sh
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
am_ircd_OBJECTS = main.$(OBJEXT)
ircd_OBJECTS = $(am_ircd_OBJECTS)
am__DEPENDENCIES_1 =
@STATIC_MODULES_FALSE@ircd_DEPENDENCIES = libratbox/src/libratbox.la \
@STATIC_MODULES_FALSE@ src/libcore.la $(am__DEPENDENCIES_1)
@STATIC_MODULES_TRUE@ircd_DEPENDENCIES = libratbox/src/libratbox.la \
@STATIC_MODULES_TRUE@ modules/libmodules.la src/libcore.la \
@STATIC_MODULES_TRUE@ modules/static_modules.o \
@STATIC_MODULES_TRUE@ $(am__DEPENDENCIES_1)
ircd_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(ircd_LDFLAGS) \
$(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
depcomp = $(SHELL) $(top_srcdir)/libltdl/config/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(ircd_SOURCES)
DIST_SOURCES = $(ircd_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
distdir dist dist-all distcheck
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = @LTDL_SUBDIR@ libratbox src modules tools doc help \
bandb ssld resolver
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
if test -d "$(distdir)"; then \
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AR = @AR@
ARGZ_H = @ARGZ_H@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CP = @CP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ETC_DIR = @ETC_DIR@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
HELP_DIR = @HELP_DIR@
INCLTDL = @INCLTDL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IRCD_PREFIX = @IRCD_PREFIX@
LD = @LD@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBADD_DL = @LIBADD_DL@
LIBADD_DLD_LINK = @LIBADD_DLD_LINK@
LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBEXEC_DIR = @LIBEXEC_DIR@
LIBLTDL = @LIBLTDL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LOG_DIR = @LOG_DIR@
LTDLDEPS = @LTDLDEPS@
LTDLINCL = @LTDLINCL@
LTDLOPEN = @LTDLOPEN@
LTDL_SUBDIR = @LTDL_SUBDIR@
LTLIBOBJS = @LTLIBOBJS@
LT_CONFIG_H = @LT_CONFIG_H@
LT_DLLOADERS = @LT_DLLOADERS@
LT_DLPREOPEN = @LT_DLPREOPEN@
LT_OBJDIR = @LT_OBJDIR@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MODULE_DIR = @MODULE_DIR@
MV = @MV@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PICFLAGS = @PICFLAGS@
RANLIB = @RANLIB@
RB_RM = @RB_RM@
SED = @SED@
SEDOBJ = @SEDOBJ@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SHLIBEXT = @SHLIBEXT@
SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
SQLITE3_LIBS = @SQLITE3_LIBS@
SQLITE_SUBDIR = @SQLITE_SUBDIR@
SSL_INCLUDES = @SSL_INCLUDES@
SSL_LIBS = @SSL_LIBS@
STRIP = @STRIP@
VERSION = @VERSION@
WARNFLAGS = @WARNFLAGS@
YACC = @YACC@
YFLAGS = @YFLAGS@
ZLIB_LD = @ZLIB_LD@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
confdir = @confdir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
helpdir = @helpdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
logdir = @logdir@
ltdl_LIBOBJS = @ltdl_LIBOBJS@
ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@
mandir = @mandir@
mkdir_p = @mkdir_p@
moduledir = @moduledir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
subdirs = @subdirs@
sys_symbol_underscore = @sys_symbol_underscore@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign subdir-objects
libcoredir = @libdir@
modulesdir = @moduledir@/autoload
coredir = @moduledir@
servicesdir = @moduledir@/autoload
AM_CFLAGS = $(WARNFLAGS)
ircd_SOURCES = main.c
@MINGW_TRUE@EXTRA_FLAGS = -no-undefined -Wl,--enable-runtime-pseudo-reloc -export-symbols-regex '*'
@STATIC_MODULES_FALSE@SUBDIRS = @LTDL_SUBDIR@ libratbox src modules tools doc help bandb ssld resolver
@STATIC_MODULES_TRUE@SUBDIRS = @LTDL_SUBDIR@ libratbox modules src tools doc help bandb ssld resolver
@STATIC_MODULES_FALSE@ircd_LDADD = libratbox/src/libratbox.la src/libcore.la $(LIBLTDL)
@STATIC_MODULES_TRUE@ircd_LDADD = libratbox/src/libratbox.la modules/libmodules.la src/libcore.la modules/static_modules.o $(LIBLTDL) $(DLOPEN)
@STATIC_MODULES_FALSE@ircd_LDFLAGS = $(EXTRA_FLAGS) -dlopen self
all: all-recursive
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
include/setup.h: include/stamp-h1
@if test ! -f $@; then rm -f include/stamp-h1; else :; fi
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) include/stamp-h1; else :; fi
include/stamp-h1: $(top_srcdir)/include/setup.h.in $(top_builddir)/config.status
@rm -f include/stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status include/setup.h
$(top_srcdir)/include/setup.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f include/stamp-h1
touch $@
distclean-hdr:
-rm -f include/setup.h include/stamp-h1
doc/Makefile: $(top_builddir)/config.status $(top_srcdir)/doc/Makefile.in
cd $(top_builddir) && $(SHELL) ./config.status $@
install-mod.sh: $(top_builddir)/config.status $(srcdir)/install-mod.sh.in
cd $(top_builddir) && $(SHELL) ./config.status $@
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS:
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
ircd$(EXEEXT): $(ircd_OBJECTS) $(ircd_DEPENDENCIES) $(EXTRA_ircd_DEPENDENCIES)
@rm -f ircd$(EXEEXT)
$(ircd_LINK) $(ircd_OBJECTS) $(ircd_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool config.lt
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod u+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@test -n '$(distuninstallcheck_dir)' || { \
echo 'ERROR: trying to run $@ with an empty' \
'$$(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
$(am__cd) '$(distuninstallcheck_dir)' || { \
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile $(PROGRAMS)
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-libtool distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am: install-binPROGRAMS
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-binPROGRAMS
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
install-am install-strip tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-binPROGRAMS \
clean-generic clean-libtool ctags ctags-recursive dist \
dist-all dist-bzip2 dist-gzip dist-lzip dist-lzma dist-shar \
dist-tarZ dist-xz dist-zip distcheck distclean \
distclean-compile distclean-generic distclean-hdr \
distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-binPROGRAMS install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am \
uninstall-binPROGRAMS
build_contrib:
cd contrib && $(MAKE)
install_contrib: build_contrib
cd contrib && $(MAKE) install
install_data-local:
-@if test ! -d @logdir@; then mkdir @logdir@;fi
contrib: build_contrib
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,126 @@
If you don't read this first, we won't help you.
:-)
******************************* IMPORTANT *************************************
*********** Note for those who dont bother reading docs *****************
* - Reading INSTALL is now a must, as the old DPATH is now specified *
* when configure is run. *
* You now need to ./configure --prefix="/path/to/install/it" *
* - The old config format WILL NOT WORK. Please see doc/example.conf ! *
* - The old kline format WILL NOT WORK. Please use bantool which *
* will be installed with your ircd! *
*************************************************************************
ALSO, IF YOU ARE UPGRADING YOUR CURRENT SOURCE TREE, AND YOU TRY TO BUILD
IN IT WITHOUT PERFORMING AT LEAST 'make clean', THINGS _WILL_ BREAK. IT IS
RECOMMENDED THAT YOU RUN 'make distclean' AND THEN RERUN './configure'!
******************************* REQUIREMENTS **********************************
New Features - A short introduction:
- ircd-ratbox-3.x now has several major changes over previous version that you
will notice right away.
o Storage of bans in a database, versus the old flat-files.
o SSL Client support.
o SSL Only Channel support.
o Adminwall (think Operwall, but for admins only).
o Force Nick Change (FNC).
o Support for global CIDR limits.
o Connection Throttling.
- Please see doc/whats-new-3.0.txt for more detailed changes.
Necessary Requirements:
- A supported platform (look below)
- A working dynamic load library, unless
compiling as static, without module
support.
- A working lex. Solaris /usr/ccs/bin/lex
appears to be broken, on this system flex
should be used.
Feature Specific Requirements:
- For SSL Clients, SSL Challenge controlled OPER feature, and encrypted server links,
a working OpenSSL library
- For encrypted oper and (optional) server passwords, a working DES, MD5, or SHA library.
*******************************************************************************
- To report bugs in ircd-ratbox, send the bug report to ircd-ratbox@lists.ratbox.org
- Known bugs are listed in the BUGS file
- See the INSTALL document for info on configuring and compiling
ircd-ratbox.
- Please read doc/index.txt to get an overview of the current documentation.
- Old Hybrid 5/6 configuration files are no longer supported. Config files from
previous ircd-ratbox versions will need some changes. The ircd -conftest option
is your friend here. Old kline/xline/dline.conf files will have to be converted to
the new database format. A config import utility is provided and installed
as bin/bantool.
- If you are wondering why config.h is practically empty, its because many
things that were once in config.h are now specified in the 'general'
block of ircd.conf. Look at example.conf for more information about
these options.
- The files, /etc/services, /etc/protocols, and /etc/resolv.conf, MUST be
readable by the user running the server in order for ircd to start.
Errors from adns causing the ircd to refuse to start up are often related
to permission problems on these files.
- There is a mailing list for ircd-ratbox. To subscribe to this list
visit http://lists.ratbox.org/cgi-bin/mailman/listinfo/ircd-ratbox
Note that this list also gets the commit emails from the CVS server.
- FREEBSD USERS: if you are compiling with ipv6 you may experience
problems with ipv4 due to the way the socket code is written. To
fix this you must: "sysctl net.inet6.ip6.v6only=0"
- SOLARIS USERS: this code appears to tickle a bug in older gcc and
egcs ONLY on 64-bit Solaris7. gcc-2.95 and SunPro C on 64bit should
work fine, and any gcc or SunPro compiled on 32bit.
- DARWIN AND MACOS X USERS: You must be using at least the December 2001
Development Tools from Apple to build ircd-ratbox with shared modules.
Before then you MUST disable shared modules, as we do not have the proper
flags for cc(1) prior to that point to produce shared modules.
- SUPPORTED PLATFORMS: this code should compile without any warnings on:
FreeBSD 6.x/7.x/8.x/9.x
Gentoo & Gentoo Hardened (stable archs)
CentOS / Redhat Enterprise 5/6
openSUSE (stable/tumbleweed/evergreen)
Debian Etch,
OpenSolaris 2008.x?
Solaris 10 sparc.
Please let us know if you find otherwise.
It probably does not compile on AIX, IRIX or libc5 Linux.
- TESTED PLATFORMS: The code has been tested on the following platforms, and
is known to run properly.
FreeBSD 6.x/7.x
Linux glibc-2.6, glibc-2.7
Solaris 2.6/7/8
OpenBSD 2.8
NetBSD 1.4
Cygwin 1.3+ (static modules, no servlink)
OpenVMS/Alpha 7.2 (static modules, no servlink)
- Please read doc/whats-new-3.0.txt for information about what is in this release
- Other files recommended for reading: BUGS, INSTALL
--------------------------------------------------------------------------------
$Id: README.FIRST 27449 2013-03-16 08:57:07Z dubkat $

264
ircd-ratbox-3.0.10/RELNOTES Normal file
View File

@ -0,0 +1,264 @@
Please note as of this release, the 3.0 branch is now marked as 'stable'.
The 2.2 branch will no longer be maintained.
This is the current release version of the 'stable' tree of ircd-ratbox.
If you are upgrading from 2.2, you must read doc/whats-new-3.0.txt
If you are upgrading from 2.1, you must read doc/whats-new-2.2.txt
If you are upgrading from 2.0, you must also read doc/whats-new-2.1.txt
If you are upgrading from 1.x, you must also read doc/whats-new-2.0.txt
-- ircd-ratbox-3.0.10
- Fix various minor memory leaks on REHASH
- Update genssl.sh script to use 2048 bit RSA keys by default
- Disable SSLv3
- Enable support for ECDHE TLS ciphers - prime256v1 is the hard coded
curve selection
- Fix rehashing ssl related configuration options
- Make MONITOR actually work again
-- ircd-ratbox-3.0.9
- Fix minor memory leak in MONITOR (fixes CVE 2015-5290)
- Fix MODRESTART crash on newer versions of glibc
- Ignore non-sense CIDR masks
- Fix 64bit time_t on 32 bit operating systems(OpenBSD in particular)
- Disable kevent timer support, this seems to be the cause of a few crashes
-- ircd-ratbox-3.0.8
- fix embarrassing CAPAB crash - All admins should upgrade immediately
- various doc cleanups
-- ircd-ratbox-3.0.7
- remove sigio code. its buggyness makes it more trouble than its worth
- stop logging to files when they are commented out in the ircd.conf
- add help for GUNGLINE
- make cross compiles work again
- fix error handling with GNUTLS
- update included sqlite3 code to something recent
- documentation cleanups/updates
-- ircd-ratbox-3.0.6
- fix a user-triggerable crash in /links handling when flatten_links is
disabled
-- ircd-ratbox-3.0.5
- fix a bug with reading help files
- add debugging in for dealing with a kline removal bug
- fix /rehash tdlines and /rehash bans so they actually do something with
dlines
- compute the number of file descriptors passed correctly on freebsd/amd64
(and probably others)
- check for compiler support for various warning flags and add them
- add -fno-strict-aliasing as this is now needed for gcc 4.4
- GNUTLS code now picks up new keys/certificates on rehash
-- ircd-ratbox-3.0.4
- Actually release from the right branch. Oops.
-- ircd-ratbox-3.0.3
- fix forward dns resolution, only used by connect::host with hostnames
- check return values on rb_socketpair that can cause a crash if
socketpair fails
- add autoconf checks for -fstack-protector
- add warnings for certain functions who's return values should always
be checked
- fix a CHALLENGE related core dump
-- ircd-ratbox-3.0.2
- fix ssl+zip close detection
- fix openssl detection when openssl is a static library
- add gungline support
- fix a problem with ssl connections not being accepted on solaris
and perhaps other platforms as well
- attempt to report the real network errors on ssl connections a bit better
- actually update the internal timekeeping when using sigio
- fix an off by one error in ziplink stats processing
-- ircd-ratbox-3.0.1
- call rb_helper_close on bandb errors to kill off old bandb processes
- report correct files/line numbers for spoof warnings
- sid in the serverinfo struct should be 4 bytes, not 3
- rebuild the included ircd_lexer.c
- fix ports and /dev/poll on solaris
- report libratbox version on -version and /info
- libratbox version info includes ssl info
- fix installing when using install-sh
- reenable ziplinks + ssl
- fix a gnutls related core dump
- add support for a serverinfo::bandb setting for the ban database
- report adding throttles when an oper is set umode +r
- report throttle stats in /stats T
-- ircd-ratbox-3.0.0
- fix a crash with the the global cidr code
- fix a core dump in bantool if bantool cannot open the database
- report failure to open logfiles in a more useful way
- check to see if we have both read and write access to the ban database
- fix a build error on OS X Leopard
-- ircd-ratbox-3.0.0rc3
- fix a leak that would cause the ircd to leak 128 bytes per connection
- a few minor cleanups of cases where malloc/free were used instead of
rb_malloc/rb_free
- keep people from passing absurd non-numeric values to --with-nicklen
- have stats T report cumulative connection times as a 64bit integer
and keep track of those values as a 64bit integer as well so they do
not wrap
-- ircd-ratbox-3.0.0rc2
- log ERROR commands to file regardless of hide_error_messages setting
- restrict JOIN 0 to only allow 0 by itself, no multiple zeros or zeros
before or after commas
- honor -logfile command line option
- fix timerfd_create check
-- ircd-ratbox-3.0.0rc1
- fix a bug in comment parsing in the config file
- have bandb honor -basedir option
- if ssld to work on win32 should you ever desire such a thing and a
few other minor win32 fixes
- fix up a few things so that the source code builds with gcc -pedantic
- do not abort configure if the AC_CHECK_SQLITE3 check fails
- drop configure option for ssl only channels, this is now controlled by
channel {} use_sslonly option
- attempt to override FD_SETSIZE when using select, and if this cannot
be overriden, lower maxconnections
- fix signalfd code on 32bit platforms
- add support for timerfd_create event handling on linux systems with
new enough kernels and glibc
- fix our fake rb_sockaddr_storage so that it actually compiles
- Add some work arounds to avoid OPENSSL_applink on some platforms
-- ircd-ratbox-3.0.0beta12
- add support for ssl only oper and auth blocks
- do not show whowas ip info if the ip is 0
- fix admindline to actually work
- fix a compile error with vhost6_dns when no ipv6 exists
- fix a logic inversion with duplicate dline checking
- fix a minor buffer overrun in the identd checking code
- default bursting of who set topics to on
- tidy up some of the identd checking code
- don't try to release a closed connection
- change a few instances where localtime was being used instead of
UTC
- do not bother logging ERROR commands from non-servers
- fix a crash in bantool
- fix an issue in libratbox with storing event names incorrectly
- put a bit of sanity checking in rb_vsnprintf_append
- some portability cleanups
-- ircd-ratbox-3.0.0beta11
- remove the remains of servlink_path from the config file parser
- userlog now logs the users IP address as well as their hostname
- whowas now supports showing the users IP address as well as
hostname. the same rules apply to showing the whowas IP as
apply to showing whois_actually and uses the same numeric.
- double the size of the whowas array for large networks. this
comes at a hit of about 2MB or so of memory.
- really, really fix the block heap garbage collection code
-- ircd-ratbox-3.0.0beta10
- fix a case a passing a NULL to match()
- properly fix a crash in the block heap garbage collection code
-- ircd-ratbox-3.0.0beta9
- fix a hang with the resolver using epoll
- add dns source port randomization
- add a vhost_dns/vhost6_dns option to control which IP addresses the
resolver binds to
- make /stats A work again
- cleanup some remains of the old ident helper
- work around a core dump in libratbox with accepting sockets that
appear to be open in the fd hash and log this condition
- fix a buffer overrun in the arc4random code when there is no ssl
library
- fix a memory alignment issue on sparc where the ircd would crash
with a SIGBUS accessing long long variables that were allocated
via the block allocator
-- ircd-ratbox-3.0.0beta8
- some cleanups in the checksplit code
- some cleanups in the /trace code
- show reasons for failed outbound SSL handshakes to opers
- log ssl errors for servers and handshakes in serverlog
- make sqlite3 checking more robust
- change the resolver to use the code from charybdis instead of adns
- fix identd checking so it works again
- fix a bug where the ircd could stop reading from the client on the CAP
command
- add some functions for random number generation for the nossl case in
libratbox
-- ircd-ratbox-3.0.0beta7
- my release building script manage to not include libratbox, oops
-- ircd-ratbox-3.0.0beta6
- change -lock klines and friends to now be ADMINKLINE etc
- default to only supporting TS6
- fix remote kline reasons
- have sqlite3 checking use pkg-config when possible
- move identd checking back into the ircd, this seems to have been more
problematic than what it was worth
- add experimental gnutls support - note that CHALLENGE does not work when using just
gnutls
- some helpfile cleanups
- fix compile error when zlib is not found
- remove some restrictions on k/d/x/resv reasons that are no longer needed
-- ircd-ratbox-3.0.0beta5
- fix things so that --enable-assert=soft compiles again
- fix a typo in mkpasswd
- add admin only -lock klines, doing KLINE -lock will allow admins to
add klines that normal opers cannot remove.
- modify bantool to have a -u option that updates the database schema.
if upgrading from previous betas, this needs to be run to support
the -lock kline changes.
- fix cidr klines so they work again
- update included sqlite3 to the latest revision
- allow kline/unkline of a bare host or address, this gets treated as
*@host
- report when an invalid kline is passed, instead of silently ignoring
- fix --enable-assert=soft
- fix libratbox build on OS X and others
-- ircd-ratbox-3.0.0beta4
- some configure/makefile changes that are useful for package maintainers
- various bantool fixes
- fix a bug with the command hash that could cause the ircd to crash
- fix an ident checking bug that would sometimes cause users to get the
wrong ident
- fix an ssld crash due to mangling connection ids incorrectly
- fix matching of cidr masks where the bit length was 0
- implement throttling of ssl connection handshake flooding
- fix build on bsd platforms that lack EVFILT_TIMER
- fix kqueue from sometimes dropping updates
- fix a possible crash with ssl connections closing quickly
- perserve errno so that connect failures report the correct error
-- ircd-ratbox-3.0.0beta3
- fix an issue with CAP END releasing clients before it should
- report bandb errors in a useful fashion
- strip tabs when reading from help/motd etc
- override default_max_clients if it is == 0
- fix ssl issue with wanting reads/writes
- fix some cases where /list can freeze a client
- stop libltdl from installing an empty include directory
- improve SIGCHLD handling in the ircd
-- ircd-ratbox-3.0.0beta2
- honor global_cidr setting
- fix a bug in bantool that improperly parsed X-lines with spaces them
- fix user@host spoofs
- fix default maxclients to work correctly
- fix libratbox build with openssl disabled
- don't spin on openssl accepts when there is no data
-- ircd-ratbox-3.0.0beta1
- No release notes, see doc/whats-new-3.0.txt
$Id: RELNOTES 29305 2016-01-13 18:50:25Z androsyn $

View File

@ -0,0 +1,30 @@
$Id: SVN-Access 27235 2011-10-14 03:58:24Z dubkat $
So, we've gone and switched to subversion.
The ircd-ratbox subversion repository is available for anonymous access.
One can checkout the stable tree(currently 2.2.x) as follows:
svn co http://svn.ratbox.org/svnroot/ircd-ratbox/branches/RATBOX_2_2
Or the testing tree(3.0.x):
svn co http://svn.ratbox.org/svnroot/ircd-ratbox/branches/RATBOX_3_0
Or if you prefer the bleeding edge stuff:
svn co http://svn.ratbox.org/svnroot/ircd-ratbox/trunk
Of course at any given time the SVN tree could be broken. If you are
planning on using the SVN tree you very well may want to be on the mailing
list, you can subscribe at:
http://lists.ratbox.org/cgi-bin/mailman/listinfo/ircd-ratbox
Direct bug reports to: http://bugs.ratbox.org

View File

@ -0,0 +1,216 @@
# $Id: acinclude.m4 26529 2009-05-13 15:37:11Z androsyn $ - aclocal.m4 - Autoconf fun...
AC_DEFUN([AC_DEFINE_DIR], [
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
ac_define_dir=`eval echo [$]$2`
ac_define_dir=`eval echo [$]ac_define_dir`
$1="$ac_define_dir"
AC_SUBST($1)
ifelse($3, ,
AC_DEFINE_UNQUOTED($1, "$ac_define_dir"),
AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3))
])
AC_DEFUN([AC_SUBST_DIR], [
ifelse($2,,,$1="[$]$2")
$1=`(
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
eval echo \""[$]$1"\"
)`
AC_SUBST($1)
])
dnl Check for libsqlite3, based on version found at libdbi-drivers.sf.net (GPLv2-licensed)
AC_DEFUN([AC_FIND_FILE], [
$3=no
for i in $2; do
for j in $1; do
if test -r "$i/$j"; then
$3=$i
break 2
fi
done
done ])
AC_DEFUN([AC_CHECK_SQLITE3], [
have_sqlite3="no"
ac_sqlite3="no"
ac_sqlite3_incdir="no"
ac_sqlite3_libdir="no"
# exported variables
SQLITE3_LIBS=""
SQLITE3_CFLAGS=""
AC_ARG_WITH(sqlite3, AC_HELP_STRING([--with-sqlite3[=dir]], [Compile with libsqlite3 at given dir]),
[ ac_sqlite3="$withval"
if test "x$withval" != "xno" -a "x$withval" != "xyes"; then
ac_sqlite3="yes"
ac_sqlite3_incdir="$withval"/include
ac_sqlite3_libdir="$withval"/lib
fi ],
[ ac_sqlite3="auto" ] )
AC_ARG_WITH(sqlite3-incdir, AC_HELP_STRING([--with-sqlite3-incdir], [Specifies where the SQLite3 include files are.]),
[ ac_sqlite3_incdir="$withval" ] )
AC_ARG_WITH(sqlite3-libdir, AC_HELP_STRING([--with-sqlite3-libdir], [Specifies where the SQLite3 libraries are.]),
[ ac_sqlite3_libdir="$withval" ] )
AC_MSG_CHECKING([for SQLite3])
# Try to automagically find SQLite, either with pkg-config, or without.
if test "x$ac_sqlite3" = "xauto"; then
if test "x$PKG_CONFIG" != "xno"; then
SQLITE3_LIBS=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
SQLITE3_CFLAGS=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
if test "x$SQLITE3_LIBS" = "x" -a "x$SQLITE3_CFLAGS" = "x"; then
AC_CHECK_LIB([sqlite3], [sqlite3_open], [ac_sqlite3="yes"], [ac_sqlite3="no"])
else
ac_sqlite3="yes"
fi
else
AC_CHECK_LIB([sqlite3], [sqlite3_open], [ac_sqlite3="yes"], [ac_sqlite3="no"])
fi
fi
if test "x$ac_sqlite3" = "xyes"; then
if test "$ac_sqlite3_incdir" = "no"; then
sqlite3_incdirs="/usr/include /usr/local/include /usr/include/sqlite /usr/local/include/sqlite /usr/local/sqlite/include /opt/sqlite/include"
AC_FIND_FILE(sqlite3.h, $sqlite3_incdirs, ac_sqlite3_incdir)
if test "$ac_sqlite3_incdir" = "no"; then
AC_MSG_WARN([Invalid SQLite directory - include files not found.])
sqlite3_missing=yes
ac_sqlite3=no
fi
fi
if test "$ac_sqlite3_libdir" = "no"; then
sqlite3_libdirs="/usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /usr/lib/sqlite usr/lib64/sqlite /usr/local/lib/sqlite /usr/local/sqlite/lib /opt/sqlite/lib"
sqlite3_libs="libsqlite3.so libsqlite3.dylib libsqlite3.a"
AC_FIND_FILE($sqlite3_libs, $sqlite3_libdirs, ac_sqlite3_libdir)
if test "$ac_sqlite3_libdir" = "no"; then
AC_MSG_WARN([Invalid SQLite directory - libraries not found.])
sqlite3_missing=yes
ac_sqlite3=no
fi
fi
if test x"$sqlite3_missing" != "xyes"; then
have_sqlite3="yes"
if test x"$ac_sqlite3_libdir" = xno; then
test "x$SQLITE3_LIBS" = "x" && SQLITE3_LIBS="-lsqlite3"
else
test "x$SQLITE3_LIBS" = "x" && SQLITE3_LIBS="-L$ac_sqlite3_libdir -lsqlite3"
fi
test x"$ac_sqlite3_incdir" != xno && test "x$SQLITE3_CFLAGS" = "x" && SQLITE3_CFLAGS=-I$ac_sqlite3_incdir
AC_SUBST(SQLITE3_LIBS)
AC_SUBST(SQLITE3_CFLAGS)
else
ac_sqlite3=no
fi
fi
AC_MSG_RESULT([$ac_sqlite3])
])
dnl
dnl Useful macros for autoconf to check for ssp-patched gcc
dnl 1.0 - September 2003 - Tiago Sousa <mirage@kaotik.org>
dnl 1.1 - August 2006 - Ted Percival <ted@midg3t.net>
dnl * Stricter language checking (C or C++)
dnl * Adds GCC_STACK_PROTECT_LIB to add -lssp to LDFLAGS as necessary
dnl * Caches all results
dnl * Uses macros to ensure correct ouput in quiet/silent mode
dnl 1.2 - April 2007 - Ted Percival <ted@midg3t.net>
dnl * Added GCC_STACK_PROTECTOR macro for simpler (one-line) invocation
dnl * GCC_STACK_PROTECT_LIB now adds -lssp to LIBS rather than LDFLAGS
dnl
dnl About ssp:
dnl GCC extension for protecting applications from stack-smashing attacks
dnl http://www.research.ibm.com/trl/projects/security/ssp/
dnl
dnl Usage:
dnl Most people will simply call GCC_STACK_PROTECTOR.
dnl If you only use one of C or C++, you can save time by only calling the
dnl macro appropriate for that language. In that case you should also call
dnl GCC_STACK_PROTECT_LIB first.
dnl
dnl GCC_STACK_PROTECTOR
dnl Tries to turn on stack protection for C and C++ by calling the following
dnl three macros with the right languages.
dnl
dnl GCC_STACK_PROTECT_CC
dnl checks -fstack-protector with the C compiler, if it exists then updates
dnl CFLAGS and defines ENABLE_SSP_CC
dnl
dnl GCC_STACK_PROTECT_CXX
dnl checks -fstack-protector with the C++ compiler, if it exists then updates
dnl CXXFLAGS and defines ENABLE_SSP_CXX
dnl
dnl GCC_STACK_PROTECT_LIB
dnl adds -lssp to LIBS if it is available
dnl ssp is usually provided as part of libc, but was previously a separate lib
dnl It does not hurt to add -lssp even if libc provides SSP - in that case
dnl libssp will simply be ignored.
dnl
AC_DEFUN([GCC_STACK_PROTECT_LIB],[
AC_CACHE_CHECK([whether libssp exists], ssp_cv_lib,
[ssp_old_libs="$LIBS"
LIBS="$LIBS -lssp"
AC_TRY_LINK(,, ssp_cv_lib=yes, ssp_cv_lib=no)
LIBS="$ssp_old_libs"
])
if test $ssp_cv_lib = yes; then
LIBS="$LIBS -lssp"
fi
])
AC_DEFUN([GCC_STACK_PROTECT_CC],[
AC_LANG_ASSERT(C)
if test "X$CC" != "X"; then
AC_CACHE_CHECK([whether ${CC} accepts -fstack-protector],
ssp_cv_cc,
[ssp_old_cflags="$CFLAGS"
CFLAGS="$CFLAGS -fstack-protector"
AC_TRY_COMPILE(,, ssp_cv_cc=yes, ssp_cv_cc=no)
CFLAGS="$ssp_old_cflags"
])
if test $ssp_cv_cc = yes; then
CFLAGS="$CFLAGS -fstack-protector"
AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.])
fi
fi
])
AC_DEFUN([GCC_STACK_PROTECT_CXX],[
AC_LANG_ASSERT(C++)
if test "X$CXX" != "X"; then
AC_CACHE_CHECK([whether ${CXX} accepts -fstack-protector],
ssp_cv_cxx,
[ssp_old_cxxflags="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -fstack-protector"
AC_TRY_COMPILE(,, ssp_cv_cxx=yes, ssp_cv_cxx=no)
CXXFLAGS="$ssp_old_cxxflags"
])
if test $ssp_cv_cxx = yes; then
CXXFLAGS="$CXXFLAGS -fstack-protector"
AC_DEFINE([ENABLE_SSP_CXX], 1, [Define if SSP C++ support is enabled.])
fi
fi
])
AC_DEFUN([GCC_STACK_PROTECTOR],[
GCC_STACK_PROTECT_LIB
AC_LANG_PUSH([C])
GCC_STACK_PROTECT_CC
AC_LANG_POP([C])
AC_LANG_PUSH([C++])
GCC_STACK_PROTECT_CXX
AC_LANG_POP([C++])
])

10580
ircd-ratbox-3.0.10/aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,23 @@
#
# $Id: Makefile.am 25554 2008-06-19 15:06:52Z androsyn $
#
AUTOMAKE_OPTIONS = foreign subdir-objects
if BUILD_SQLITE
SUBDIRS = sqlite3
endif
libexec_PROGRAMS = bandb
bin_PROGRAMS = bantool
AM_CFLAGS=$(WARNFLAGS)
INCLUDES = -I../include -I../libratbox/include @SQLITE3_CFLAGS@
bandb_SOURCES = bandb.c rsdb_sqlite3.c rsdb_snprintf.c
bandb_LDADD = ../libratbox/src/libratbox.la @SQLITE3_LIBS@
bantool_SOURCES = bantool.c rsdb_sqlite3.c rsdb_snprintf.c
bantool_LDADD = ../libratbox/src/libratbox.la @SQLITE3_LIBS@

View File

@ -0,0 +1,809 @@
# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
libexec_PROGRAMS = bandb$(EXEEXT)
bin_PROGRAMS = bantool$(EXEEXT)
subdir = bandb
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/setup.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)"
PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS)
am_bandb_OBJECTS = bandb.$(OBJEXT) rsdb_sqlite3.$(OBJEXT) \
rsdb_snprintf.$(OBJEXT)
bandb_OBJECTS = $(am_bandb_OBJECTS)
bandb_DEPENDENCIES = ../libratbox/src/libratbox.la
am_bantool_OBJECTS = bantool.$(OBJEXT) rsdb_sqlite3.$(OBJEXT) \
rsdb_snprintf.$(OBJEXT)
bantool_OBJECTS = $(am_bantool_OBJECTS)
bantool_DEPENDENCIES = ../libratbox/src/libratbox.la
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
depcomp = $(SHELL) $(top_srcdir)/libltdl/config/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(bandb_SOURCES) $(bantool_SOURCES)
DIST_SOURCES = $(bandb_SOURCES) $(bantool_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
distdir
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = sqlite3
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AR = @AR@
ARGZ_H = @ARGZ_H@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CP = @CP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ETC_DIR = @ETC_DIR@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
HELP_DIR = @HELP_DIR@
INCLTDL = @INCLTDL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IRCD_PREFIX = @IRCD_PREFIX@
LD = @LD@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBADD_DL = @LIBADD_DL@
LIBADD_DLD_LINK = @LIBADD_DLD_LINK@
LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBEXEC_DIR = @LIBEXEC_DIR@
LIBLTDL = @LIBLTDL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LOG_DIR = @LOG_DIR@
LTDLDEPS = @LTDLDEPS@
LTDLINCL = @LTDLINCL@
LTDLOPEN = @LTDLOPEN@
LTDL_SUBDIR = @LTDL_SUBDIR@
LTLIBOBJS = @LTLIBOBJS@
LT_CONFIG_H = @LT_CONFIG_H@
LT_DLLOADERS = @LT_DLLOADERS@
LT_DLPREOPEN = @LT_DLPREOPEN@
LT_OBJDIR = @LT_OBJDIR@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MODULE_DIR = @MODULE_DIR@
MV = @MV@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PICFLAGS = @PICFLAGS@
RANLIB = @RANLIB@
RB_RM = @RB_RM@
SED = @SED@
SEDOBJ = @SEDOBJ@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SHLIBEXT = @SHLIBEXT@
SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
SQLITE3_LIBS = @SQLITE3_LIBS@
SQLITE_SUBDIR = @SQLITE_SUBDIR@
SSL_INCLUDES = @SSL_INCLUDES@
SSL_LIBS = @SSL_LIBS@
STRIP = @STRIP@
VERSION = @VERSION@
WARNFLAGS = @WARNFLAGS@
YACC = @YACC@
YFLAGS = @YFLAGS@
ZLIB_LD = @ZLIB_LD@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
confdir = @confdir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
helpdir = @helpdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
logdir = @logdir@
ltdl_LIBOBJS = @ltdl_LIBOBJS@
ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@
mandir = @mandir@
mkdir_p = @mkdir_p@
moduledir = @moduledir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
subdirs = @subdirs@
sys_symbol_underscore = @sys_symbol_underscore@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
#
# $Id: Makefile.in 29305 2016-01-13 18:50:25Z androsyn $
#
AUTOMAKE_OPTIONS = foreign subdir-objects
@BUILD_SQLITE_TRUE@SUBDIRS = sqlite3
AM_CFLAGS = $(WARNFLAGS)
INCLUDES = -I../include -I../libratbox/include @SQLITE3_CFLAGS@
bandb_SOURCES = bandb.c rsdb_sqlite3.c rsdb_snprintf.c
bandb_LDADD = ../libratbox/src/libratbox.la @SQLITE3_LIBS@
bantool_SOURCES = bantool.c rsdb_sqlite3.c rsdb_snprintf.c
bantool_LDADD = ../libratbox/src/libratbox.la @SQLITE3_LIBS@
all: all-recursive
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bandb/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign bandb/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS:
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
install-libexecPROGRAMS: $(libexec_PROGRAMS)
@$(NORMAL_INSTALL)
@list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
} \
; done
uninstall-libexecPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
clean-libexecPROGRAMS:
@list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
bandb$(EXEEXT): $(bandb_OBJECTS) $(bandb_DEPENDENCIES) $(EXTRA_bandb_DEPENDENCIES)
@rm -f bandb$(EXEEXT)
$(LINK) $(bandb_OBJECTS) $(bandb_LDADD) $(LIBS)
bantool$(EXEEXT): $(bantool_OBJECTS) $(bantool_DEPENDENCIES) $(EXTRA_bantool_DEPENDENCIES)
@rm -f bantool$(EXEEXT)
$(LINK) $(bantool_OBJECTS) $(bantool_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bandb.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bantool.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rsdb_snprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rsdb_sqlite3.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile $(PROGRAMS)
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am: install-binPROGRAMS install-libexecPROGRAMS
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-libexecPROGRAMS
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
install-am install-strip tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am check check-am clean clean-binPROGRAMS \
clean-generic clean-libexecPROGRAMS clean-libtool ctags \
ctags-recursive distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-binPROGRAMS \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-libexecPROGRAMS \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-libexecPROGRAMS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,304 @@
/* bandb/bandb.c
*
* Copyright (C) 2006 Lee Hardy <lee -at- leeh.co.uk>
* Copyright (C) 2006-2012 ircd-ratbox development team
*
* 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.The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
*
* $Id: bandb.c 29265 2015-12-20 04:35:39Z androsyn $
*/
#include "setup.h"
#include <ratbox_lib.h>
#include "config.h"
#include "rsdb.h"
#include "common.h"
#define MAXPARA 10
typedef enum
{
BANDB_KLINE,
BANDB_DLINE,
BANDB_XLINE,
BANDB_RESV,
LAST_BANDB_TYPE
} bandb_type;
static char bandb_letter[LAST_BANDB_TYPE] = {
'K', 'D', 'X', 'R'
};
static const char *bandb_table[LAST_BANDB_TYPE] = {
"kline", "dline", "xline", "resv"
};
static rb_helper *bandb_helper;
static void check_schema(void);
static void
parse_ban(bandb_type type, char *parv[], int parc)
{
const char *mask1 = NULL;
const char *mask2 = NULL;
const char *oper = NULL;
const char *curtime = NULL;
const char *reason = NULL;
const char *perm = NULL;
int para = 1;
if(type == BANDB_KLINE)
{
if(parc != 7)
return;
}
else if(parc != 6)
return;
mask1 = parv[para++];
if(type == BANDB_KLINE)
mask2 = parv[para++];
oper = parv[para++];
curtime = parv[para++];
perm = parv[para++];
reason = parv[para++];
rsdb_exec(NULL,
"INSERT INTO %s (mask1, mask2, oper, time, perm, reason) VALUES('%Q', '%Q', '%Q', %s, %s, '%Q')",
bandb_table[type], mask1, mask2 ? mask2 : "", oper, curtime, perm, reason);
}
static void
parse_unban(bandb_type type, char *parv[], int parc)
{
const char *mask1 = NULL;
const char *mask2 = NULL;
if(type == BANDB_KLINE)
{
if(parc != 3)
return;
}
else if(parc != 2)
return;
mask1 = parv[1];
if(type == BANDB_KLINE)
mask2 = parv[2];
rsdb_exec(NULL, "DELETE FROM %s WHERE mask1='%Q' AND mask2='%Q'",
bandb_table[type], mask1, mask2 ? mask2 : "");
}
static void
list_bans(void)
{
static char buf[512];
struct rsdb_table table;
int i, j;
/* schedule a clear of anything already pending */
rb_helper_write_queue(bandb_helper, "C");
for(i = 0; i < LAST_BANDB_TYPE; i++)
{
rsdb_exec_fetch(&table, "SELECT mask1,mask2,oper,reason FROM %s WHERE 1",
bandb_table[i]);
for(j = 0; j < table.row_count; j++)
{
if(i == BANDB_KLINE)
rb_snprintf(buf, sizeof(buf), "%c %s %s %s :%s",
bandb_letter[i], table.row[j][0],
table.row[j][1], table.row[j][2], table.row[j][3]);
else
rb_snprintf(buf, sizeof(buf), "%c %s %s :%s",
bandb_letter[i], table.row[j][0],
table.row[j][2], table.row[j][3]);
rb_helper_write_queue(bandb_helper, "%s", buf);
}
rsdb_exec_fetch_end(&table);
}
rb_helper_write(bandb_helper, "F");
}
static void
parse_request(rb_helper *helper)
{
static char *parv[MAXPARA + 1];
static char readbuf[READBUF_SIZE];
int parc;
int len;
while((len = rb_helper_read(helper, readbuf, sizeof(readbuf))) > 0)
{
parc = rb_string_to_array(readbuf, parv, MAXPARA);
if(parc < 1)
continue;
switch (parv[0][0])
{
case 'K':
parse_ban(BANDB_KLINE, parv, parc);
break;
case 'D':
parse_ban(BANDB_DLINE, parv, parc);
break;
case 'X':
parse_ban(BANDB_XLINE, parv, parc);
break;
case 'R':
parse_ban(BANDB_RESV, parv, parc);
break;
case 'k':
parse_unban(BANDB_KLINE, parv, parc);
break;
case 'd':
parse_unban(BANDB_DLINE, parv, parc);
break;
case 'x':
parse_unban(BANDB_XLINE, parv, parc);
break;
case 'r':
parse_unban(BANDB_RESV, parv, parc);
break;
case 'L':
list_bans();
break;
default:
break;
}
}
}
static void
error_cb(rb_helper *helper)
{
exit(1);
}
static void
setup_signals()
{
#ifndef WINDOWS
struct sigaction act;
act.sa_flags = 0;
act.sa_handler = SIG_IGN;
sigemptyset(&act.sa_mask);
sigaddset(&act.sa_mask, SIGPIPE);
sigaction(SIGPIPE, &act, 0);
sigaddset(&act.sa_mask, SIGINT);
sigaction(SIGINT, &act, 0);
sigaddset(&act.sa_mask, SIGALRM);
sigaction(SIGALRM, &act, 0);
#ifdef SIGTRAP
sigaddset(&act.sa_mask, SIGTRAP);
sigaction(SIGTRAP, &act, 0);
#endif
#ifdef SIGWINCH
sigaddset(&act.sa_mask, SIGWINCH);
sigaction(SIGWINCH, &act, 0);
#endif
#endif
}
static void
db_error_cb(const char *errstr)
{
char buf[256];
rb_snprintf(buf, sizeof(buf), "! :%s", errstr);
rb_helper_write(bandb_helper, "%s", buf);
rb_sleep(2 << 29, 0);
exit(1);
}
int
main(int argc, char *argv[])
{
const char *dbpath;
setup_signals();
bandb_helper = rb_helper_child(parse_request, error_cb, NULL, NULL, NULL, 256, 256, 256, 256); /* XXX fix me */
if(bandb_helper == NULL)
{
fprintf(stderr,
"This is ircd-ratbox bandb. You aren't supposed to run me directly. Maybe you want bantool?\n");
fprintf(stderr,
"However I will print my Id tag $Id: bandb.c 29265 2015-12-20 04:35:39Z androsyn $\n");
fprintf(stderr, "Have a nice day\n");
exit(1);
}
dbpath = getenv("BANDB_DPATH");
if(dbpath == NULL)
dbpath = DBPATH;
rsdb_init(dbpath, db_error_cb);
check_schema();
rb_helper_loop(bandb_helper, 0);
return 0;
}
static void
check_schema(void)
{
struct rsdb_table table;
int i;
for(i = 0; i < LAST_BANDB_TYPE; i++)
{
rsdb_exec_fetch(&table,
"SELECT name FROM sqlite_master WHERE type='table' AND name='%s'",
bandb_table[i]);
rsdb_exec_fetch_end(&table);
if(!table.row_count)
rsdb_exec(NULL,
"CREATE TABLE %s (mask1 TEXT, mask2 TEXT, oper TEXT, time INTEGER, perm INTEGER, reason TEXT)",
bandb_table[i]);
}
}

View File

@ -0,0 +1,899 @@
/**
* ircd-ratbox: A slightly useful ircd.
* bantool.c: The ircd-ratbox database managment tool.
*
* Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
* Copyright (C) 1996-2002 Hybrid Development Team
* Copyright (C) 2002-2012 ircd-ratbox development 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 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
*
* The following server admins have either contributed various configs to test against,
* or helped with debugging and feature requests. Many thanks to them.
* stevoo / efnet.port80.se
* AndroSyn / irc2.choopa.net, irc.igs.ca
* Salvation / irc.blessed.net
* JamesOff / efnet.demon.co.uk
*
* $Id: bantool.c 27371 2012-03-16 05:33:15Z dubkat $
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "serno.h"
#include "patchlevel.h"
#include "stdinc.h"
#include "rsdb.h"
#define EmptyString(x) ((x == NULL) || (*(x) == '\0'))
#define CheckEmpty(x) EmptyString(x) ? "" : x
typedef enum
{
BANDB_KLINE,
BANDB_KLINE_PERM,
BANDB_DLINE,
BANDB_DLINE_PERM,
BANDB_XLINE,
BANDB_XLINE_PERM,
BANDB_RESV,
BANDB_RESV_PERM,
LAST_BANDB_TYPE
} bandb_type;
static char bandb_letter[LAST_BANDB_TYPE] = {
'K', 'K', 'D', 'D', 'X', 'X', 'R', 'R'
};
static const char *bandb_table[LAST_BANDB_TYPE] = {
"kline", "kline", "dline", "dline", "xline", "xline", "resv", "resv"
};
static const char *bandb_suffix[LAST_BANDB_TYPE] = {
"", ".perm",
"", ".perm",
"", ".perm",
"", ".perm"
};
static char me[PATH_MAX];
/* *INDENT-OFF* */
/* report counters */
struct counter
{
unsigned int klines;
unsigned int dlines;
unsigned int xlines;
unsigned int resvs;
unsigned int error;
} count = {0, 0, 0, 0, 0};
/* flags set by command line options */
struct flags
{
int none;
int export;
int import;
int verify;
int vacuum;
int pretend;
int verbose;
int wipe;
int dupes_ok;
char *path;
} flag = {YES, NO, NO, NO, NO, NO, NO, NO, NO, NULL};
/* *INDENT-ON* */
static int table_has_rows(const char *table);
static int table_exists(const char *table);
static const char *clean_gecos_field(const char *gecos);
static char *smalldate(const char *string);
static char *getfield(char *newline);
static char *strip_quotes(const char *string);
static char *mangle_reason(const char *string);
static char *escape_quotes(const char *string);
static void db_error_cb(const char *errstr);
static void db_reclaim_slack(void);
static void export_config(const char *conf, int id);
static void import_config(const char *conf, int id);
static void check_schema(void);
static void print_help(int i_exit);
static void wipe_schema(void);
static void drop_dupes(const char *user, const char *host, const char *t);
/**
* swing your pants
*/
int
main(int argc, char *argv[])
{
char etc[PATH_MAX];
char conf[PATH_MAX];
int opt;
int i;
rb_strlcpy(me, argv[0], sizeof(me));
while((opt = getopt(argc, argv, "hieuspvwdf:")) != -1)
{
switch (opt)
{
case 'h':
print_help(EXIT_SUCCESS);
break;
case 'i':
flag.none = NO;
flag.import = YES;
break;
case 'e':
flag.none = NO;
flag.export = YES;
break;
case 'u':
flag.none = NO;
flag.verify = YES;
break;
case 's':
flag.none = NO;
flag.vacuum = YES;
break;
case 'p':
flag.pretend = YES;
break;
case 'v':
flag.verbose = YES;
break;
case 'w':
flag.wipe = YES;
break;
case 'd':
flag.dupes_ok = YES;
break;
case 'f':
flag.path = rb_strdup(optarg);
fprintf(stderr, "flag.path: %s\n", flag.path);
break;
default: /* '?' */
print_help(EXIT_FAILURE);
}
}
/* they should really read the help. */
if(flag.none)
print_help(EXIT_FAILURE);
if(flag.path == NULL)
flag.path = rb_strdup(DBPATH);
if((flag.import && flag.export) || (flag.export && flag.wipe)
|| (flag.verify && flag.pretend) || (flag.export && flag.pretend))
{
fprintf(stderr, "* Error: Conflicting flags.\n");
if(flag.export && flag.pretend)
fprintf(stderr, "* There is nothing to 'pretend' when exporting.\n");
fprintf(stderr, "* For an explination of commands, run: %s -h\n", me);
exit(EXIT_FAILURE);
}
if(argv[optind] != NULL)
rb_strlcpy(etc, argv[optind], sizeof(etc));
else
rb_strlcpy(etc, ETCPATH, sizeof(ETCPATH));
fprintf(stdout,
"* bantool v.%s built for %s ($Id: bantool.c 27371 2012-03-16 05:33:15Z dubkat $)\n",
SERIALNUM, PATCHLEVEL);
if(flag.pretend == NO)
{
if(rsdb_init(flag.path, db_error_cb) == -1)
{
fprintf(stderr, "* Error: Unable to open database\n");
exit(EXIT_FAILURE);
}
check_schema();
if(flag.vacuum)
db_reclaim_slack();
if(flag.import && flag.wipe)
{
flag.dupes_ok = YES; /* dont check for dupes if we are wiping the db clean */
for(i = 0; i < 3; i++)
fprintf(stdout,
"* WARNING: YOU ARE ABOUT TO WIPE YOUR DATABASE!\n");
fprintf(stdout, "* Press ^C to abort! ");
fflush(stdout);
rb_sleep(10, 0);
fprintf(stdout, "Carrying on...\n");
wipe_schema();
}
}
if(flag.verbose && flag.dupes_ok == YES)
fprintf(stdout, "* Allowing duplicate bans...\n");
/* checking for our files to import or export */
for(i = 0; i < LAST_BANDB_TYPE; i++)
{
rb_snprintf(conf, sizeof(conf), "%s/%s.conf%s",
etc, bandb_table[i], bandb_suffix[i]);
if(flag.import && flag.pretend == NO)
rsdb_transaction(RSDB_TRANS_START);
if(flag.import)
import_config(conf, i);
if(flag.export)
export_config(conf, i);
if(flag.import && flag.pretend == NO)
rsdb_transaction(RSDB_TRANS_END);
}
if(flag.import)
{
if(count.error && flag.verbose)
fprintf(stderr, "* I was unable to locate %i config files to import.\n",
count.error);
fprintf(stdout, "* Import Stats: Klines: %i, Dlines: %i, Xlines: %i, Resvs: %i \n",
count.klines, count.dlines, count.xlines, count.resvs);
fprintf(stdout,
"*\n* If your IRC server is currently running, newly imported bans \n* will not take effect until you issue the command: /quote rehash bans\n");
if(flag.pretend)
fprintf(stdout,
"* Pretend mode engaged. Nothing was actually entered into the database.\n");
}
return 0;
}
/**
* export the database to old-style flat files
*/
static void
export_config(const char *conf, int id)
{
struct rsdb_table table;
static char sql[BUFSIZE * 2];
static char buf[512];
FILE *fd = NULL;
int j;
/* for sanity sake */
const int mask1 = 0;
const int mask2 = 1;
const int reason = 2;
const int oper = 3;
const int ts = 4;
/* const int perm = 5; */
if(!table_has_rows(bandb_table[id]))
return;
if(strstr(conf, ".perm") != 0)
rb_snprintf(sql, sizeof(sql),
"SELECT DISTINCT mask1,mask2,reason,oper,time FROM %s WHERE perm = 1 ORDER BY time",
bandb_table[id]);
else
rb_snprintf(sql, sizeof(sql),
"SELECT DISTINCT mask1,mask2,reason,oper,time FROM %s WHERE perm = 0 ORDER BY time",
bandb_table[id]);
rsdb_exec_fetch(&table, sql);
if(table.row_count <= 0)
{
rsdb_exec_fetch_end(&table);
return;
}
if(flag.verbose)
fprintf(stdout, "* checking for %s: ", conf); /* debug */
/* open config for reading, or skip to the next */
if(!(fd = fopen(conf, "w")))
{
if(flag.verbose)
fprintf(stdout, "\tmissing.\n");
count.error++;
return;
}
for(j = 0; j < table.row_count; j++)
{
switch (id)
{
case BANDB_DLINE:
case BANDB_DLINE_PERM:
rb_snprintf(buf, sizeof(buf),
"\"%s\",\"%s\",\"\",\"%s\",\"%s\",%s\n",
table.row[j][mask1],
mangle_reason(table.row[j][reason]),
smalldate(table.row[j][ts]),
table.row[j][oper], table.row[j][ts]);
break;
case BANDB_XLINE:
case BANDB_XLINE_PERM:
rb_snprintf(buf, sizeof(buf),
"\"%s\",\"0\",\"%s\",\"%s\",%s\n",
escape_quotes(table.row[j][mask1]),
mangle_reason(table.row[j][reason]),
table.row[j][oper], table.row[j][ts]);
break;
case BANDB_RESV:
case BANDB_RESV_PERM:
rb_snprintf(buf, sizeof(buf),
"\"%s\",\"%s\",\"%s\",%s\n",
table.row[j][mask1],
mangle_reason(table.row[j][reason]),
table.row[j][oper], table.row[j][ts]);
break;
default: /* Klines */
rb_snprintf(buf, sizeof(buf),
"\"%s\",\"%s\",\"%s\",\"\",\"%s\",\"%s\",%s\n",
table.row[j][mask1], table.row[j][mask2],
mangle_reason(table.row[j][reason]),
smalldate(table.row[j][ts]), table.row[j][oper],
table.row[j][ts]);
break;
}
fprintf(fd, "%s", buf);
}
rsdb_exec_fetch_end(&table);
if(flag.verbose)
fprintf(stdout, "\twritten.\n");
fclose(fd);
}
/**
* attempt to condense the individual conf functions into one
*/
static void
import_config(const char *conf, int id)
{
FILE *fd;
char line[BUFSIZE];
char *p;
int i = 0;
char f_perm = 0;
char *f_mask1 = NULL;
char *f_mask2 = NULL;
char *f_oper = NULL;
char *f_time = NULL;
char *f_reason = NULL;
char *f_oreason = NULL;
char newreason[REASONLEN];
if(flag.verbose)
fprintf(stdout, "* checking for %s: ", conf); /* debug */
/* open config for reading, or skip to the next */
if(!(fd = fopen(conf, "r")))
{
if(flag.verbose)
fprintf(stdout, "%*s", strlen(bandb_suffix[id]) > 0 ? 10 : 15,
"missing.\n");
count.error++;
return;
}
if(strstr(conf, ".perm") != 0)
f_perm = 1;
/* xline
* "SYSTEM","0","banned","stevoo!stevoo@efnet.port80.se{stevoo}",1111080437
* resv
* "OseK","banned nickname","stevoo!stevoo@efnet.port80.se{stevoo}",1111031619
* dline
* "194.158.192.0/19","laptop scammers","","2005/3/17 05.33","stevoo!stevoo@efnet.port80.se{stevoo}",1111033988
*/
while(fgets(line, sizeof(line), fd))
{
if((p = strpbrk(line, "\r\n")) != NULL)
*p = '\0';
if((*line == '\0') || (*line == '#'))
continue;
/* mask1 */
f_mask1 = getfield(line);
if(EmptyString(f_mask1))
continue;
/* mask2 */
switch (id)
{
case BANDB_XLINE:
case BANDB_XLINE_PERM:
f_mask1 = escape_quotes(clean_gecos_field(f_mask1));
getfield(NULL); /* empty field */
break;
case BANDB_RESV:
case BANDB_RESV_PERM:
case BANDB_DLINE:
case BANDB_DLINE_PERM:
break;
default:
f_mask2 = getfield(NULL);
if(EmptyString(f_mask2))
continue;
break;
}
/* reason */
f_reason = getfield(NULL);
if(EmptyString(f_reason))
continue;
/* oper comment */
switch (id)
{
case BANDB_KLINE:
case BANDB_KLINE_PERM:
case BANDB_DLINE:
case BANDB_DLINE_PERM:
f_oreason = getfield(NULL);
getfield(NULL);
break;
default:
break;
}
f_oper = getfield(NULL);
f_time = strip_quotes(f_oper + strlen(f_oper) + 2);
/* meh */
if(id == BANDB_KLINE || id == BANDB_KLINE_PERM)
{
if(strstr(f_mask1, "!") != NULL)
{
fprintf(stderr,
"* SKIPPING INVALID KLINE %s@%s set by %s\n",
f_mask1, f_mask2, f_oper);
fprintf(stderr, " You may wish to re-apply it correctly.\n");
continue;
}
}
/* append operreason_field to reason_field */
if(!EmptyString(f_oreason))
rb_snprintf(newreason, sizeof(newreason), "%s | %s", f_reason, f_oreason);
else
rb_snprintf(newreason, sizeof(newreason), "%s", f_reason);
if(flag.pretend == NO)
{
if(flag.dupes_ok == NO)
drop_dupes(f_mask1, f_mask2, bandb_table[id]);
rsdb_exec(NULL,
"INSERT INTO %s (mask1, mask2, oper, time, perm, reason) VALUES('%Q','%Q','%Q','%Q','%d','%Q')",
bandb_table[id], f_mask1, f_mask2, f_oper, f_time, f_perm,
newreason);
}
if(flag.pretend && flag.verbose)
fprintf(stdout,
"%s: perm(%d) mask1(%s) mask2(%s) oper(%s) reason(%s) time(%s)\n",
bandb_table[id], f_perm, f_mask1, f_mask2, f_oper, newreason,
f_time);
i++;
}
switch (bandb_letter[id])
{
case 'K':
count.klines += i;
break;
case 'D':
count.dlines += i;
break;
case 'X':
count.xlines += i;
break;
case 'R':
count.resvs += i;
break;
default:
break;
}
if(flag.verbose)
fprintf(stdout, "%*s\n", strlen(bandb_suffix[id]) > 0 ? 10 : 15, "imported.");
return;
}
/**
* getfield
*
* inputs - input buffer
* output - next field
* side effects - field breakup for ircd.conf file.
*/
char *
getfield(char *newline)
{
static char *line = NULL;
char *end, *field;
if(newline != NULL)
line = newline;
if(line == NULL)
return (NULL);
field = line;
/* XXX make this skip to first " if present */
if(*field == '"')
field++;
else
return (NULL); /* mal-formed field */
end = strchr(line, ',');
while(1)
{
/* no trailing , - last field */
if(end == NULL)
{
end = line + strlen(line);
line = NULL;
if(*end == '"')
{
*end = '\0';
return field;
}
else
return NULL;
}
else
{
/* look for a ", to mark the end of a field.. */
if(*(end - 1) == '"')
{
line = end + 1;
end--;
*end = '\0';
return field;
}
/* search for the next ',' */
end++;
end = strchr(end, ',');
}
}
return NULL;
}
/**
* strip away "quotes" from around strings
*/
static char *
strip_quotes(const char *string)
{
static char buf[14]; /* int(11) + 2 + \0 */
char *str = buf;
if(string == NULL)
return NULL;
while(*string)
{
if(*string != '"')
{
*str++ = *string;
}
string++;
}
*str = '\0';
return buf;
}
/**
* escape quotes in a string
*/
static char *
escape_quotes(const char *string)
{
static char buf[BUFSIZE * 2];
char *str = buf;
if(string == NULL)
return NULL;
while(*string)
{
if(*string == '"')
{
*str++ = '\\';
*str++ = '"';
}
else
{
*str++ = *string;
}
string++;
}
*str = '\0';
return buf;
}
static char *
mangle_reason(const char *string)
{
static char buf[BUFSIZE * 2];
char *str = buf;
if(string == NULL)
return NULL;
while(*string)
{
switch (*string)
{
case '"':
*str = '\'';
break;
case ':':
*str = ' ';
break;
default:
*str = *string;
}
string++;
str++;
}
*str = '\0';
return buf;
}
/**
* change spaces to \s in gecos field
*/
static const char *
clean_gecos_field(const char *gecos)
{
static char buf[BUFSIZE * 2];
char *str = buf;
if(gecos == NULL)
return NULL;
while(*gecos)
{
if(*gecos == ' ')
{
*str++ = '\\';
*str++ = 's';
}
else
*str++ = *gecos;
gecos++;
}
*str = '\0';
return buf;
}
/**
* verify the database integrity, and if necessary create apropriate tables
*/
static void
check_schema(void)
{
int i, j;
char type[8]; /* longest string is 'INTEGER\0' */
if(flag.verify || flag.verbose)
fprintf(stdout, "* Verifying database.\n");
const char *columns[] = {
"perm",
"mask1",
"mask2",
"oper",
"time",
"reason",
NULL
};
for(i = 0; i < LAST_BANDB_TYPE; i++)
{
if(!table_exists(bandb_table[i]))
{
rsdb_exec(NULL,
"CREATE TABLE %s (mask1 TEXT, mask2 TEXT, oper TEXT, time INTEGER, perm INTEGER, reason TEXT)",
bandb_table[i]);
}
/*
* i can't think of any better way to do this, other then attempt to
* force the creation of column that may, or may not already exist. --dubkat
*/
else
{
for(j = 0; columns[j] != NULL; j++)
{
if(!strcmp(columns[j], "time") && !strcmp(columns[j], "perm"))
rb_strlcpy(type, "INTEGER", sizeof(type));
else
rb_strlcpy(type, "TEXT", sizeof(type));
/* attempt to add a column with extreme prejudice, errors are ignored */
rsdb_exec(NULL, "ALTER TABLE %s ADD COLUMN %s %s", bandb_table[i],
columns[j], type);
}
}
i++; /* skip over .perm */
}
}
static void
db_reclaim_slack(void)
{
fprintf(stdout, "* Reclaiming free space.\n");
rsdb_exec(NULL, "VACUUM");
}
/**
* check that appropriate tables exist.
*/
static int
table_exists(const char *dbtab)
{
struct rsdb_table table;
rsdb_exec_fetch(&table, "SELECT name FROM sqlite_master WHERE type='table' AND name='%s'",
dbtab);
rsdb_exec_fetch_end(&table);
return table.row_count;
}
/**
* check that there are actual entries in a table
*/
static int
table_has_rows(const char *dbtab)
{
struct rsdb_table table;
rsdb_exec_fetch(&table, "SELECT * FROM %s", dbtab);
rsdb_exec_fetch_end(&table);
return table.row_count;
}
/**
* completly wipes out an existing ban.db of all entries.
*/
static void
wipe_schema(void)
{
int i;
rsdb_transaction(RSDB_TRANS_START);
for(i = 0; i < LAST_BANDB_TYPE; i++)
{
rsdb_exec(NULL, "DROP TABLE %s", bandb_table[i]);
i++; /* double increment to skip over .perm */
}
rsdb_transaction(RSDB_TRANS_END);
check_schema();
}
/**
* remove pre-existing duplicate bans from the database.
* we favor the new, imported ban over the one in the database
*/
void
drop_dupes(const char *user, const char *host, const char *t)
{
rsdb_exec(NULL, "DELETE FROM %s WHERE mask1='%Q' AND mask2='%Q'", t, user, host);
}
static void
db_error_cb(const char *errstr)
{
return;
}
/**
* convert unix timestamp to human readable (small) date
*/
static char *
smalldate(const char *string)
{
static char buf[MAX_DATE_STRING];
struct tm *lt;
time_t t;
t = strtol(string, NULL, 10);
lt = gmtime(&t);
if(lt == NULL)
return NULL;
rb_snprintf(buf, sizeof(buf), "%d/%d/%d %02d.%02d",
lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday, lt->tm_hour, lt->tm_min);
return buf;
}
/**
* you are here ->.
*/
void
print_help(int i_exit)
{
/* *INDENT-OFF* */
fprintf(stderr, "bantool v.%s - the %s database tool.\n", SERIALNUM, PATCHLEVEL);
fprintf(stderr, "Copyright (C) 2008-2012 ircd-ratbox development team\n");
fprintf(stderr, "$Id: bantool.c 27371 2012-03-16 05:33:15Z dubkat $\n\n");
fprintf(stderr, "This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details.\n\n");
fprintf(stderr, "Usage: %s [-f databasename] <-i|-e> [-p] [-v] [-h] [-d] [-w] [path]\n", me);
fprintf(stderr, " -h : Display some slightly useful help.\n");
fprintf(stderr, " -f : Path to the ban database, default is %s\n", DBPATH);
fprintf(stderr, " -i : Actually import configs into your database.\n");
fprintf(stderr, " -e : Export your database to old-style flat files.\n");
fprintf(stderr, " This is suitable for redistrubuting your banlists, or creating backups.\n");
fprintf(stderr, " -s : Reclaim empty slack space the database may be taking up.\n");
fprintf(stderr, " -u : Update the database tables to support any new features.\n");
fprintf(stderr, " This is automaticlly done if you are importing or exporting\n");
fprintf(stderr, " but should be run whenever you upgrade the ircd.\n");
fprintf(stderr, " -p : pretend, checks for the configs, and parses them, then tells you some data...\n");
fprintf(stderr, " but does not touch your database.\n");
fprintf(stderr, " -v : Be verbose... and it *is* very verbose! (intended for debugging)\n");
fprintf(stderr, " -d : Enable checking for redunant entries.\n");
fprintf(stderr, " -w : Completly wipe your database clean. May be used with -i \n");
fprintf(stderr, " path : An optional directory containing old ratbox configs for import, or export.\n");
fprintf(stderr, " If not specified, it looks in %s.\n", ETCPATH);
/* *INDENT-ON* */
exit(i_exit);
}

View File

@ -0,0 +1,42 @@
/* $Id: rsdb.h 26308 2008-12-16 15:55:10Z androsyn $ */
#ifndef INCLUDED_rsdb_h
#define INCLUDED_rsdb_h
/* error handler callback */
typedef void rsdb_error_cb(const char *);
typedef int (*rsdb_callback) (int, const char **);
typedef enum rsdb_transtype
{
RSDB_TRANS_START,
RSDB_TRANS_END
}
rsdb_transtype;
struct rsdb_table
{
char ***row;
int row_count;
int col_count;
void *arg;
};
int rsdb_init(const char *path, rsdb_error_cb *);
void rsdb_shutdown(void);
const char *rsdb_quote(const char *src);
void rsdb_exec(rsdb_callback cb, const char *format, ...);
void rsdb_exec_fetch(struct rsdb_table *data, const char *format, ...);
void rsdb_exec_fetch_end(struct rsdb_table *data);
void rsdb_transaction(rsdb_transtype type);
/* rsdb_snprintf.c */
int rs_vsnprintf(char *dest, const size_t bytes, const char *format, va_list args);
int rs_snprintf(char *dest, const size_t bytes, const char *format, ...);
#endif

View File

@ -0,0 +1,628 @@
/*
* libString, Copyright (C) 1999 Patrick Alken
* This library comes with absolutely NO WARRANTY
*
* Should you choose to use and/or modify this source code, please
* do so under the terms of the GNU General Public License under which
* this library is distributed.
*
* $Id: rsdb_snprintf.c 26094 2008-09-19 15:33:46Z androsyn $
*/
#include "stdinc.h"
#include "rsdb.h"
/*
* This table is arranged in chronological order from 0-999,
* however the numbers are written backwards, so the number 100
* is expressed in this table as "001".
* It's purpose is to ensure fast conversions from integers to
* ASCII strings. When an integer variable is encountered, a
* simple hash algorithm is used to determine where to look
* in this array for the corresponding string.
* This outperforms continually dividing by 10 and using the
* digit obtained as a character, because we can now divide by
* 1000 and use the remainder directly, thus cutting down on
* the number of costly divisions needed. For an integer's worst
* case, 2 divisions are needed because it can only go up to
* 32767, so after 2 divisions by 1000, and some algebra, we will
* be left with 327 which we can get from this table. This is much
* better than the 5 divisions by 10 that we would need if we did
* it the conventional way. Of course, if we made this table go
* from 0-9999, only 1 division would be needed.
* Longs and unsigned ints of course, are another matter :-).
*
* Patrick Alken <wnder@underworld.net>
*/
/*
* Set this to the number of indices (numbers) in our table
*/
#define TABLE_MAX 1000
static const char *IntTable[] = {
"000", "100", "200", "300", "400",
"500", "600", "700", "800", "900",
"010", "110", "210", "310", "410",
"510", "610", "710", "810", "910",
"020", "120", "220", "320", "420",
"520", "620", "720", "820", "920",
"030", "130", "230", "330", "430",
"530", "630", "730", "830", "930",
"040", "140", "240", "340", "440",
"540", "640", "740", "840", "940",
"050", "150", "250", "350", "450",
"550", "650", "750", "850", "950",
"060", "160", "260", "360", "460",
"560", "660", "760", "860", "960",
"070", "170", "270", "370", "470",
"570", "670", "770", "870", "970",
"080", "180", "280", "380", "480",
"580", "680", "780", "880", "980",
"090", "190", "290", "390", "490",
"590", "690", "790", "890", "990",
"001", "101", "201", "301", "401",
"501", "601", "701", "801", "901",
"011", "111", "211", "311", "411",
"511", "611", "711", "811", "911",
"021", "121", "221", "321", "421",
"521", "621", "721", "821", "921",
"031", "131", "231", "331", "431",
"531", "631", "731", "831", "931",
"041", "141", "241", "341", "441",
"541", "641", "741", "841", "941",
"051", "151", "251", "351", "451",
"551", "651", "751", "851", "951",
"061", "161", "261", "361", "461",
"561", "661", "761", "861", "961",
"071", "171", "271", "371", "471",
"571", "671", "771", "871", "971",
"081", "181", "281", "381", "481",
"581", "681", "781", "881", "981",
"091", "191", "291", "391", "491",
"591", "691", "791", "891", "991",
"002", "102", "202", "302", "402",
"502", "602", "702", "802", "902",
"012", "112", "212", "312", "412",
"512", "612", "712", "812", "912",
"022", "122", "222", "322", "422",
"522", "622", "722", "822", "922",
"032", "132", "232", "332", "432",
"532", "632", "732", "832", "932",
"042", "142", "242", "342", "442",
"542", "642", "742", "842", "942",
"052", "152", "252", "352", "452",
"552", "652", "752", "852", "952",
"062", "162", "262", "362", "462",
"562", "662", "762", "862", "962",
"072", "172", "272", "372", "472",
"572", "672", "772", "872", "972",
"082", "182", "282", "382", "482",
"582", "682", "782", "882", "982",
"092", "192", "292", "392", "492",
"592", "692", "792", "892", "992",
"003", "103", "203", "303", "403",
"503", "603", "703", "803", "903",
"013", "113", "213", "313", "413",
"513", "613", "713", "813", "913",
"023", "123", "223", "323", "423",
"523", "623", "723", "823", "923",
"033", "133", "233", "333", "433",
"533", "633", "733", "833", "933",
"043", "143", "243", "343", "443",
"543", "643", "743", "843", "943",
"053", "153", "253", "353", "453",
"553", "653", "753", "853", "953",
"063", "163", "263", "363", "463",
"563", "663", "763", "863", "963",
"073", "173", "273", "373", "473",
"573", "673", "773", "873", "973",
"083", "183", "283", "383", "483",
"583", "683", "783", "883", "983",
"093", "193", "293", "393", "493",
"593", "693", "793", "893", "993",
"004", "104", "204", "304", "404",
"504", "604", "704", "804", "904",
"014", "114", "214", "314", "414",
"514", "614", "714", "814", "914",
"024", "124", "224", "324", "424",
"524", "624", "724", "824", "924",
"034", "134", "234", "334", "434",
"534", "634", "734", "834", "934",
"044", "144", "244", "344", "444",
"544", "644", "744", "844", "944",
"054", "154", "254", "354", "454",
"554", "654", "754", "854", "954",
"064", "164", "264", "364", "464",
"564", "664", "764", "864", "964",
"074", "174", "274", "374", "474",
"574", "674", "774", "874", "974",
"084", "184", "284", "384", "484",
"584", "684", "784", "884", "984",
"094", "194", "294", "394", "494",
"594", "694", "794", "894", "994",
"005", "105", "205", "305", "405",
"505", "605", "705", "805", "905",
"015", "115", "215", "315", "415",
"515", "615", "715", "815", "915",
"025", "125", "225", "325", "425",
"525", "625", "725", "825", "925",
"035", "135", "235", "335", "435",
"535", "635", "735", "835", "935",
"045", "145", "245", "345", "445",
"545", "645", "745", "845", "945",
"055", "155", "255", "355", "455",
"555", "655", "755", "855", "955",
"065", "165", "265", "365", "465",
"565", "665", "765", "865", "965",
"075", "175", "275", "375", "475",
"575", "675", "775", "875", "975",
"085", "185", "285", "385", "485",
"585", "685", "785", "885", "985",
"095", "195", "295", "395", "495",
"595", "695", "795", "895", "995",
"006", "106", "206", "306", "406",
"506", "606", "706", "806", "906",
"016", "116", "216", "316", "416",
"516", "616", "716", "816", "916",
"026", "126", "226", "326", "426",
"526", "626", "726", "826", "926",
"036", "136", "236", "336", "436",
"536", "636", "736", "836", "936",
"046", "146", "246", "346", "446",
"546", "646", "746", "846", "946",
"056", "156", "256", "356", "456",
"556", "656", "756", "856", "956",
"066", "166", "266", "366", "466",
"566", "666", "766", "866", "966",
"076", "176", "276", "376", "476",
"576", "676", "776", "876", "976",
"086", "186", "286", "386", "486",
"586", "686", "786", "886", "986",
"096", "196", "296", "396", "496",
"596", "696", "796", "896", "996",
"007", "107", "207", "307", "407",
"507", "607", "707", "807", "907",
"017", "117", "217", "317", "417",
"517", "617", "717", "817", "917",
"027", "127", "227", "327", "427",
"527", "627", "727", "827", "927",
"037", "137", "237", "337", "437",
"537", "637", "737", "837", "937",
"047", "147", "247", "347", "447",
"547", "647", "747", "847", "947",
"057", "157", "257", "357", "457",
"557", "657", "757", "857", "957",
"067", "167", "267", "367", "467",
"567", "667", "767", "867", "967",
"077", "177", "277", "377", "477",
"577", "677", "777", "877", "977",
"087", "187", "287", "387", "487",
"587", "687", "787", "887", "987",
"097", "197", "297", "397", "497",
"597", "697", "797", "897", "997",
"008", "108", "208", "308", "408",
"508", "608", "708", "808", "908",
"018", "118", "218", "318", "418",
"518", "618", "718", "818", "918",
"028", "128", "228", "328", "428",
"528", "628", "728", "828", "928",
"038", "138", "238", "338", "438",
"538", "638", "738", "838", "938",
"048", "148", "248", "348", "448",
"548", "648", "748", "848", "948",
"058", "158", "258", "358", "458",
"558", "658", "758", "858", "958",
"068", "168", "268", "368", "468",
"568", "668", "768", "868", "968",
"078", "178", "278", "378", "478",
"578", "678", "778", "878", "978",
"088", "188", "288", "388", "488",
"588", "688", "788", "888", "988",
"098", "198", "298", "398", "498",
"598", "698", "798", "898", "998",
"009", "109", "209", "309", "409",
"509", "609", "709", "809", "909",
"019", "119", "219", "319", "419",
"519", "619", "719", "819", "919",
"029", "129", "229", "329", "429",
"529", "629", "729", "829", "929",
"039", "139", "239", "339", "439",
"539", "639", "739", "839", "939",
"049", "149", "249", "349", "449",
"549", "649", "749", "849", "949",
"059", "159", "259", "359", "459",
"559", "659", "759", "859", "959",
"069", "169", "269", "369", "469",
"569", "669", "769", "869", "969",
"079", "179", "279", "379", "479",
"579", "679", "779", "879", "979",
"089", "189", "289", "389", "489",
"589", "689", "789", "889", "989",
"099", "199", "299", "399", "499",
"599", "699", "799", "899", "999"
};
/*
* Since we calculate the right-most digits for %d %u etc first,
* we need a temporary buffer to store them in until we get
* to the left-most digits
*/
#define TEMPBUF_MAX 20
static char TempBuffer[TEMPBUF_MAX];
/*
vSnprintf()
Backend to Snprintf() - performs the construction of 'dest'
using the string 'format' and the given arguments. Also makes sure
not more than 'bytes' characters are copied to 'dest'
We always allow room for a terminating \0 character, so at most,
bytes - 1 characters will be written to dest.
Return: Number of characters written, NOT including the terminating
\0 character which is *always* placed at the end of the string
NOTE: This function handles the following flags only:
%s %d %c %u %ld %lu
In addition, this function performs *NO* precision, padding,
or width formatting. If it receives an unknown % character,
it will call vsprintf() to complete the remainder of the
string.
*/
int
rs_vsnprintf(char *dest, const size_t bytes, const char *format, va_list args)
{
char ch;
int written = 0; /* bytes written so far */
int maxbytes = bytes - 1;
while((ch = *format++) && (written < maxbytes))
{
if(ch == '%')
{
/*
* Advance past the %
*/
ch = *format++;
/*
* Put the most common cases first - %s %d etc
*/
if(ch == 's')
{
const char *str = va_arg(args, const char *);
while((*dest = *str))
{
++dest;
++str;
if(++written >= maxbytes)
break;
}
continue;
}
if(ch == 'd')
{
int num = va_arg(args, int);
int quotient;
const char *str;
char *digitptr = TempBuffer;
/*
* We have to special-case "0" unfortunately
*/
if(num == 0)
{
*dest++ = '0';
++written;
continue;
}
if(num < 0)
{
*dest++ = '-';
if(++written >= maxbytes)
continue;
num = -num;
}
do
{
quotient = num / TABLE_MAX;
/*
* We'll start with the right-most digits of 'num'.
* Dividing by TABLE_MAX cuts off all but the X
* right-most digits, where X is such that:
*
* 10^X = TABLE_MAX
*
* For example, if num = 1200, and TABLE_MAX = 1000,
* quotient will be 1. Multiplying this by 1000 and
* subtracting from 1200 gives: 1200 - (1 * 1000) = 200.
* We then go right to slot 200 in our array and behold!
* The string "002" (200 backwards) is conveniently
* waiting for us. Then repeat the process with the
* digits left.
*
* The reason we need to have the integers written
* backwards, is because we don't know how many digits
* there are. If we want to express the number 12130
* for example, our first pass would leave us with 130,
* whose slot in the array yields "031", which we
* plug into our TempBuffer[]. The next pass gives us
* 12, whose slot yields "21" which we append to
* TempBuffer[], leaving us with "03121". This is the
* exact number we want, only backwards, so it is
* a simple matter to reverse the string. If we used
* straightfoward numbers, we would have a TempBuffer
* looking like this: "13012" which would be a nightmare
* to deal with.
*/
str = IntTable[num - (quotient * TABLE_MAX)];
while((*digitptr = *str))
{
++digitptr;
++str;
}
}
while((num = quotient) != 0);
/*
* If the last quotient was a 1 or 2 digit number, there
* will be one or more leading zeroes in TempBuffer[] -
* get rid of them.
*/
while(*(digitptr - 1) == '0')
--digitptr;
while(digitptr != TempBuffer)
{
*dest++ = *--digitptr;
if(++written >= maxbytes)
break;
}
continue;
} /* if (ch == 'd') */
if(ch == 'c')
{
*dest++ = va_arg(args, int);
++written;
continue;
} /* if (ch == 'c') */
if(ch == 'u')
{
unsigned int num = va_arg(args, unsigned int);
unsigned int quotient;
const char *str;
char *digitptr = TempBuffer;
if(num == 0)
{
*dest++ = '0';
++written;
continue;
}
do
{
quotient = num / TABLE_MAX;
/*
* Very similar to case 'd'
*/
str = IntTable[num - (quotient * TABLE_MAX)];
while((*digitptr = *str))
{
++digitptr;
++str;
}
}
while((num = quotient) != 0);
while(*(digitptr - 1) == '0')
--digitptr;
while(digitptr != TempBuffer)
{
*dest++ = *--digitptr;
if(++written >= maxbytes)
break;
}
continue;
} /* if (ch == 'u') */
if(ch == 'Q')
{
const char *arg = va_arg(args, const char *);
if(arg == NULL)
continue;
const char *str = rsdb_quote(arg);
while((*dest = *str))
{
++dest;
++str;
if(++written >= maxbytes)
break;
}
continue;
}
if(ch == 'l')
{
if(*format == 'u')
{
unsigned long num = va_arg(args, unsigned long);
unsigned long quotient;
const char *str;
char *digitptr = TempBuffer;
++format;
if(num == 0)
{
*dest++ = '0';
++written;
continue;
}
do
{
quotient = num / TABLE_MAX;
/*
* Very similar to case 'u'
*/
str = IntTable[num - (quotient * TABLE_MAX)];
while((*digitptr = *str))
{
++digitptr;
++str;
}
}
while((num = quotient) != 0);
while(*(digitptr - 1) == '0')
--digitptr;
while(digitptr != TempBuffer)
{
*dest++ = *--digitptr;
if(++written >= maxbytes)
break;
}
continue;
}
else
/* if (*format == 'u') */ if(*format == 'd')
{
long num = va_arg(args, long);
long quotient;
const char *str;
char *digitptr = TempBuffer;
++format;
if(num == 0)
{
*dest++ = '0';
++written;
continue;
}
if(num < 0)
{
*dest++ = '-';
if(++written >= maxbytes)
continue;
num = -num;
}
do
{
quotient = num / TABLE_MAX;
str = IntTable[num - (quotient * TABLE_MAX)];
while((*digitptr = *str))
{
++digitptr;
++str;
}
}
while((num = quotient) != 0);
while(*(digitptr - 1) == '0')
--digitptr;
while(digitptr != TempBuffer)
{
*dest++ = *--digitptr;
if(++written >= maxbytes)
break;
}
continue;
}
else /* if (*format == 'd') */
{
/* XXX error */
exit(1);
}
} /* if (ch == 'l') */
if(ch != '%')
{
/* XXX error */
exit(1);
} /* if (ch != '%') */
} /* if (ch == '%') */
*dest++ = ch;
++written;
} /* while ((ch = *format++) && (written < maxbytes)) */
/*
* Terminate the destination buffer with a \0
*/
*dest = '\0';
return (written);
} /* vSnprintf() */
/*
rs_snprintf()
Optimized version of snprintf().
Inputs: dest - destination string
bytes - number of bytes to copy
format - formatted string
args - args to 'format'
Return: number of characters copied, NOT including the terminating
NULL which is always placed at the end of the string
*/
int
rs_snprintf(char *dest, const size_t bytes, const char *format, ...)
{
va_list args;
int count;
va_start(args, format);
count = rs_vsnprintf(dest, bytes, format, args);
va_end(args);
return (count);
} /* Snprintf() */

View File

@ -0,0 +1,255 @@
/* src/rsdb_sqlite.h
* Contains the code for the sqlite database backend.
*
* Copyright (C) 2003-2006 Lee Hardy <leeh@leeh.co.uk>
* Copyright (C) 2003-2012 ircd-ratbox development team
*
* 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.The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
*
* $Id: rsdb_sqlite3.c 27371 2012-03-16 05:33:15Z dubkat $
*/
#include "stdinc.h"
#include "rsdb.h"
#include <sqlite3.h>
struct sqlite3 *rb_bandb;
rsdb_error_cb *error_cb;
static void
mlog(const char *errstr, ...)
{
if(error_cb != NULL)
{
char buf[256];
va_list ap;
va_start(ap, errstr);
rb_vsnprintf(buf, sizeof(buf), errstr, ap);
va_end(ap);
error_cb(buf);
}
else
exit(1);
}
int
rsdb_init(const char *dbpath, rsdb_error_cb * ecb)
{
char errbuf[128];
error_cb = ecb;
if(sqlite3_open(dbpath, &rb_bandb) != SQLITE_OK)
{
rb_snprintf(errbuf, sizeof(errbuf), "Unable to open sqlite database: %s",
sqlite3_errmsg(rb_bandb));
mlog(errbuf);
return -1;
}
if(access(dbpath, W_OK))
{
rb_snprintf(errbuf, sizeof(errbuf), "Unable to open sqlite database for write: %s", strerror(errno));
mlog(errbuf);
return -1;
}
return 0;
}
void
rsdb_shutdown(void)
{
if(rb_bandb)
sqlite3_close(rb_bandb);
}
const char *
rsdb_quote(const char *src)
{
static char buf[BUFSIZE * 4];
char *p = buf;
/* cheap and dirty length check.. */
if(strlen(src) >= (sizeof(buf) / 2))
return NULL;
while(*src)
{
if(*src == '\'')
*p++ = '\'';
*p++ = *src++;
}
*p = '\0';
return buf;
}
static int
rsdb_callback_func(void *cbfunc, int argc, char **argv, char **colnames)
{
rsdb_callback cb = (rsdb_callback)((uintptr_t)cbfunc);
(cb) (argc, (const char **)argv);
return 0;
}
void
rsdb_exec(rsdb_callback cb, const char *format, ...)
{
static char buf[BUFSIZE * 4];
va_list args;
char *errmsg;
unsigned int i;
int j;
va_start(args, format);
i = rs_vsnprintf(buf, sizeof(buf), format, args);
va_end(args);
if(i >= sizeof(buf))
{
mlog("fatal error: length problem with compiling sql");
}
if((i = sqlite3_exec(rb_bandb, buf, (cb ? rsdb_callback_func : NULL), (void *)((uintptr_t)cb), &errmsg)))
{
switch (i)
{
case SQLITE_BUSY:
for(j = 0; j < 5; j++)
{
rb_sleep(0, 500000);
if(!sqlite3_exec
(rb_bandb, buf, (cb ? rsdb_callback_func : NULL), (void *)((uintptr_t)cb), &errmsg))
return;
}
/* failed, fall through to default */
mlog("fatal error: problem with db file: %s", errmsg);
break;
default:
mlog("fatal error: problem with db file: %s", errmsg);
break;
}
}
}
void
rsdb_exec_fetch(struct rsdb_table *table, const char *format, ...)
{
static char buf[BUFSIZE * 4];
va_list args;
char *errmsg;
char **data;
int pos;
unsigned int retval;
int i, j;
va_start(args, format);
retval = rs_vsnprintf(buf, sizeof(buf), format, args);
va_end(args);
if(retval >= sizeof(buf))
{
mlog("fatal error: length problem with compiling sql");
}
if((retval =
sqlite3_get_table(rb_bandb, buf, &data, &table->row_count, &table->col_count, &errmsg)))
{
int success = 0;
switch (retval)
{
case SQLITE_BUSY:
for(i = 0; i < 5; i++)
{
rb_sleep(0, 500000);
if(!sqlite3_get_table
(rb_bandb, buf, &data, &table->row_count, &table->col_count,
&errmsg))
{
success++;
break;
}
}
if(success)
break;
mlog("fatal error: problem with db file: %s", errmsg);
break;
default:
mlog("fatal error: problem with db file: %s", errmsg);
break;
}
}
/* we need to be able to free data afterward */
table->arg = data;
if(table->row_count == 0)
{
table->row = NULL;
return;
}
/* sqlite puts the column names as the first row */
pos = table->col_count;
table->row = rb_malloc(sizeof(char **) * table->row_count);
for(i = 0; i < table->row_count; i++)
{
table->row[i] = rb_malloc(sizeof(char *) * table->col_count);
for(j = 0; j < table->col_count; j++)
{
table->row[i][j] = data[pos++];
}
}
}
void
rsdb_exec_fetch_end(struct rsdb_table *table)
{
int i;
for(i = 0; i < table->row_count; i++)
{
rb_free(table->row[i]);
}
rb_free(table->row);
sqlite3_free_table((char **)table->arg);
}
void
rsdb_transaction(rsdb_transtype type)
{
if(type == RSDB_TRANS_START)
rsdb_exec(NULL, "BEGIN TRANSACTION");
else if(type == RSDB_TRANS_END)
rsdb_exec(NULL, "COMMIT TRANSACTION");
}

View File

@ -0,0 +1,20 @@
SOURCES = sqlite3.c
bin_PROGRAMS = ratbox-sqlite3
AM_CFLAGS = -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION=1
ratbox_sqlite3_SOURCES = shell.c
ratbox_sqlite3_LDADD = libsqlite3.a
.c.lo:
$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(AM_CFLAGS) -prefer-pic -I../include -I. -c $< -o $@
S_OBJS= $(SOURCES:.c=.lo)
libsqlite3.a: $(S_OBJS)
$(LIBTOOL) --mode=link $(CC) -all-static -o libsqlite3.a $(S_OBJS)
all: libsqlite3.a

View File

@ -0,0 +1,591 @@
# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = ratbox-sqlite3$(EXEEXT)
subdir = bandb/sqlite3
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/setup.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
am_ratbox_sqlite3_OBJECTS = shell.$(OBJEXT)
ratbox_sqlite3_OBJECTS = $(am_ratbox_sqlite3_OBJECTS)
ratbox_sqlite3_DEPENDENCIES = libsqlite3.a
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
depcomp = $(SHELL) $(top_srcdir)/libltdl/config/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
DIST_SOURCES = $(ratbox_sqlite3_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AR = @AR@
ARGZ_H = @ARGZ_H@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CP = @CP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ETC_DIR = @ETC_DIR@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
HELP_DIR = @HELP_DIR@
INCLTDL = @INCLTDL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IRCD_PREFIX = @IRCD_PREFIX@
LD = @LD@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBADD_DL = @LIBADD_DL@
LIBADD_DLD_LINK = @LIBADD_DLD_LINK@
LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBEXEC_DIR = @LIBEXEC_DIR@
LIBLTDL = @LIBLTDL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LOG_DIR = @LOG_DIR@
LTDLDEPS = @LTDLDEPS@
LTDLINCL = @LTDLINCL@
LTDLOPEN = @LTDLOPEN@
LTDL_SUBDIR = @LTDL_SUBDIR@
LTLIBOBJS = @LTLIBOBJS@
LT_CONFIG_H = @LT_CONFIG_H@
LT_DLLOADERS = @LT_DLLOADERS@
LT_DLPREOPEN = @LT_DLPREOPEN@
LT_OBJDIR = @LT_OBJDIR@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MODULE_DIR = @MODULE_DIR@
MV = @MV@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PICFLAGS = @PICFLAGS@
RANLIB = @RANLIB@
RB_RM = @RB_RM@
SED = @SED@
SEDOBJ = @SEDOBJ@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SHLIBEXT = @SHLIBEXT@
SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
SQLITE3_LIBS = @SQLITE3_LIBS@
SQLITE_SUBDIR = @SQLITE_SUBDIR@
SSL_INCLUDES = @SSL_INCLUDES@
SSL_LIBS = @SSL_LIBS@
STRIP = @STRIP@
VERSION = @VERSION@
WARNFLAGS = @WARNFLAGS@
YACC = @YACC@
YFLAGS = @YFLAGS@
ZLIB_LD = @ZLIB_LD@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
confdir = @confdir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
helpdir = @helpdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
logdir = @logdir@
ltdl_LIBOBJS = @ltdl_LIBOBJS@
ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@
mandir = @mandir@
mkdir_p = @mkdir_p@
moduledir = @moduledir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
subdirs = @subdirs@
sys_symbol_underscore = @sys_symbol_underscore@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SOURCES = sqlite3.c
AM_CFLAGS = -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION=1
ratbox_sqlite3_SOURCES = shell.c
ratbox_sqlite3_LDADD = libsqlite3.a
S_OBJS = $(SOURCES:.c=.lo)
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bandb/sqlite3/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu bandb/sqlite3/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS:
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
ratbox-sqlite3$(EXEEXT): $(ratbox_sqlite3_OBJECTS) $(ratbox_sqlite3_DEPENDENCIES) $(EXTRA_ratbox_sqlite3_DEPENDENCIES)
@rm -f ratbox-sqlite3$(EXEEXT)
$(LINK) $(ratbox_sqlite3_OBJECTS) $(ratbox_sqlite3_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shell.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-binPROGRAMS
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic clean-libtool ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-binPROGRAMS
.c.lo:
$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(AM_CFLAGS) -prefer-pic -I../include -I. -c $< -o $@
libsqlite3.a: $(S_OBJS)
$(LIBTOOL) --mode=link $(CC) -all-static -o libsqlite3.a $(S_OBJS)
all: libsqlite3.a
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,35 @@
This directory contains source code to
SQLite: An Embeddable SQL Database Engine
To compile the project, first create a directory in which to place
the build products. It is recommended, but not required, that the
build directory be separate from the source directory. Cd into the
build directory and then from the build directory run the configure
script found at the root of the source tree. Then run "make".
For example:
tar xzf sqlite.tar.gz ;# Unpack the source tree into "sqlite"
mkdir bld ;# Build will occur in a sibling directory
cd bld ;# Change to the build directory
../sqlite/configure ;# Run the configure script
make ;# Run the makefile.
make install ;# (Optional) Install the build products
The configure script uses autoconf 2.50 and libtool. If the configure
script does not work out for you, there is a generic makefile named
"Makefile.linux-gcc" in the top directory of the source tree that you
can copy and edit to suite your needs. Comments on the generic makefile
show what changes are needed.
The linux binaries on the website are created using the generic makefile,
not the configure script. The configure script is unmaintained. (You
can volunteer to take over maintenance of the configure script, if you want!)
The windows binaries on the website are created using MinGW32 configured
as a cross-compiler running under Linux. For details, see the ./publish.sh
script at the top-level of the source tree.
Contacts:
http://www.sqlite.org/

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

136
ircd-ratbox-3.0.10/compile Normal file
View File

@ -0,0 +1,136 @@
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
# $Id: compile 23020 2006-09-01 18:20:19Z androsyn $
scriptversion=2003-11-09.00
# Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand `-c -o'.
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file `INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit 0
;;
-v | --v*)
echo "compile $scriptversion"
exit 0
;;
esac
prog=$1
shift
ofile=
cfile=
args=
while test $# -gt 0; do
case "$1" in
-o)
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we do something ugly here.
ofile=$2
shift
case "$ofile" in
*.o | *.obj)
;;
*)
args="$args -o $ofile"
ofile=
;;
esac
;;
*.c)
cfile=$1
args="$args $1"
;;
*)
args="$args $1"
;;
esac
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no `-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# `.c' file was seen then we are probably linking. That is also
# ok.
exec "$prog" $args
fi
# Name of file we expect compiler to create.
cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
# Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
while true; do
if mkdir $lockdir > /dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir $lockdir; exit 1" 1 2 15
# Run the compile.
"$prog" $args
status=$?
if test -f "$cofile"; then
mv "$cofile" "$ofile"
fi
rmdir $lockdir
exit $status
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

1533
ircd-ratbox-3.0.10/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

1693
ircd-ratbox-3.0.10/config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

18634
ircd-ratbox-3.0.10/configure vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,649 @@
dnl $Id: configure.ac 28675 2015-09-29 17:09:18Z androsyn $
dnl Process this file with autoconf to produce a configure script.
dnl TODO: clean up all the OpenSSL and shared module checking stuff;
dnl the most major changes have already been made and it looks like
dnl said functions need to be just about as complex as they already are.
AC_PREREQ(2.63)
AUTOMAKE_OPTIONS = 1.10
dnl Sneaky way to get an Id tag into the configure script
AC_COPYRIGHT([$Id: configure.ac 28675 2015-09-29 17:09:18Z androsyn $])
AC_INIT([ircd-ratbox],[stable])
AC_CONFIG_AUX_DIR([libltdl/config])
AC_CONFIG_MACRO_DIR([libltdl/m4])
AM_INIT_AUTOMAKE([subdir-objects])
AM_CONFIG_HEADER(include/setup.h)
AC_PREFIX_DEFAULT(/usr/local/ircd)
AC_GNU_SOURCE
dnl Checks for programs.
AC_PATH_PROG(CP, cp)
AC_PATH_PROG(MV, mv)
AC_PATH_PROG(RB_RM, rm)
AC_PROG_CC_C99
if test x"$ac_cv_prog_cc_c99" = "xno"; then
AC_ERROR([ircd-ratbox requires a C99 capable compiler])
fi
AM_PROG_LEX
AC_PROG_INSTALL
AC_PROG_EGREP
if test "$enable_static" = "yes"; then
AM_DISABLE_SHARED
AM_ENABLE_STATIC
AC_DEFINE([STATIC_MODULES], 1, [Define to 1 if dynamic modules cant be used.])
else
enable_static="no"
fi
F77=no
GCJ=no
AM_PROG_CC_C_O
AM_DISABLE_STATIC
AM_ENABLE_SHARED
AM_MAINTAINER_MODE
AC_ISC_POSIX
AC_C_INLINE
AC_PROG_GCC_TRADITIONAL
AC_PROG_MAKE_SET
AC_PROG_INSTALL
srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
# We pase INSTALL explicitly to sub-makes. Make sure that it is not
# a relative path.
if test "$INSTALL" = "${srcdir}/install-sh -c"; then
INSTALL="${srcpwd}/install-sh -c"
fi
AC_PROG_YACC
AC_LANG(C)
AM_CONDITIONAL([STATIC_MODULES], test "$enable_static" = "yes")
GCC_STACK_PROTECT_CC
cc_accepts_flag()
{
cc_accepts_flag_CFLAGS="$CFLAGS"
CFLAGS="$*"
AC_MSG_CHECKING([whether $CC accepts $@])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main(){return 0;}])] ,
[RC=0; AC_MSG_RESULT([yes])],
[RC=1; AC_MSG_RESULT([no])])
CFLAGS="$cc_accepts_flag_CFLAGS"
return $RC
}
if cc_accepts_flag -fno-strict-aliasing; then
CFLAGS="$CFLAGS -fno-strict-aliasing"
fi
WARNLIST="
all
cast-qual
missing-declarations
missing-prototypes
nested-externs
shadow
write-strings
no-unused
unused-function
unused-variable"
for x in $WARNLIST; do
if cc_accepts_flag -W$x; then
WARNFLAGS="$WARNFLAGS -W$x";
fi
done
LT_INIT([dlopen], [convenience])
LT_CONFIG_LTDL_DIR([libltdl])
LTDL_INIT
if test xyes = x"$with_included_ltdl"; then
AC_SUBST(LTDL_SUBDIR, libltdl)
else
AC_SUBST(LTDL_SUBDIR, '')
fi
LIBTOOL="$LIBTOOL --silent"
AC_CONFIG_SUBDIRS(libratbox)
case "$host_os" in
*cygwin*)
AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system])
AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
;;
*mingw*)
AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
AC_CHECK_HEADER(winsock2.h, , [AC_MSG_ERROR([** MinGW and no winsock2.h. I give up.])])
LIBS="$LIBS -lws2_32 -liphlpapi"
is_mingw="yes"
;;
*)
;;
esac
AM_CONDITIONAL([MINGW], [test "$is_mingw" = "yes"])
if test "$LEX" != flex; then
LEX="$SHELL $missing_dir/missing flex"
AC_SUBST(LEX_OUTPUT_ROOT, lex.yy)
AC_SUBST(LEXLIB, '')
fi
# backwards support for IRC_CFLAGS
CFLAGS="$IRC_CFLAGS $CFLAGS"
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_HEADER_DIRENT
AC_CHECK_HEADERS([sys/types.h sys/resource.h sys/param.h sys/stat.h sys/socket.h netinet/in.h arpa/inet.h errno.h stddef.h ])
AC_HEADER_TIME
AC_CHECK_FUNCS([snprintf lstat stat])
dnl Networking Functions
dnl ====================
AC_SEARCH_LIBS(socket, [socket],,)
dnl this gets passed on to the libratbox configure
AC_ARG_ENABLE(ipv6,AC_HELP_STRING([--disable-ipv6],[Disable IPv6 support (not recommended)]),[ipv6=$enableval],[ipv6=yes])
dnl See whether we can include both string.h and strings.h.
AC_CACHE_CHECK([whether string.h and strings.h may both be included],
gcc_cv_header_string,
[
AC_COMPILE_IFELSE(
[#include <string.h>
#include <strings.h>],
[gcc_cv_header_string=yes],
[gcc_cv_header_string=no])
])
if test "$gcc_cv_header_string" = "yes"; then
AC_DEFINE(STRING_WITH_STRINGS, 1, [Define to 1 if string.h may be included along with strings.h])
fi
AC_C_BIGENDIAN
dnl Check for stdarg.h - if we can't find it, halt configure
AC_CHECK_HEADER(stdarg.h, , [AC_MSG_ERROR([** stdarg.h could not be found - ircd-ratbox will not compile without it **])])
AC_FUNC_ALLOCA
AC_CHECK_SIZEOF(time_t,,[
AC_INCLUDES_DEFAULT
#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
])
AC_CHECK_SIZEOF(long)
dnl Specialized functions checks
dnl ============================
dnl OpenSSL support
AC_MSG_CHECKING(for OpenSSL)
AC_ARG_ENABLE(openssl,
[AC_HELP_STRING([--enable-openssl[=DIR]],[Enable OpenSSL support (DIR optional).])
AC_HELP_STRING([--disable-openssl],[Disable OpenSSL support.])],
[cf_enable_openssl=$enableval],
[cf_enable_openssl="auto"])
if test "$cf_enable_openssl" != "no" ; then
cf_openssl_basedir=""
if test "$cf_enable_openssl" != "auto" &&
test "$cf_enable_openssl" != "yes" ; then
dnl Support for --enable-openssl=/some/place
cf_openssl_basedir="`echo ${cf_enable_openssl} | sed 's/\/$//'`"
else
dnl Do the auto-probe here. Check some common directory paths.
for dirs in /usr/local/ssl /usr/pkg /usr/local \
/usr/local/openssl ; do
if test -f "${dirs}/include/openssl/opensslv.h" ; then
cf_openssl_basedir="${dirs}"
break
fi
done
unset dirs
fi
dnl Now check cf_openssl_found to see if we found anything.
if test ! -z "$cf_openssl_basedir"; then
if test -f "${cf_openssl_basedir}/include/openssl/opensslv.h" ; then
SSL_INCLUDES="-I${cf_openssl_basedir}/include"
SSL_LIBS="-L${cf_openssl_basedir}/lib $lt_cv_dlopen_libs"
else
dnl OpenSSL wasn't found in the directory specified. Naughty
dnl administrator...
cf_openssl_basedir=""
fi
else
dnl Check for stock FreeBSD 4.x and 5.x systems, since their files
dnl are in /usr/include and /usr/lib. In this case, we don't want to
dnl change INCLUDES or LIBS, but still want to enable OpenSSL.
dnl We can't do this check above, because some people want two versions
dnl of OpenSSL installed (stock FreeBSD 4.x/5.x and /usr/local/ssl)
dnl and they want /usr/local/ssl to have preference.
if test -f "/usr/include/openssl/opensslv.h" ; then
cf_openssl_basedir="/usr"
fi
fi
dnl If we have a basedir defined, then everything is okay. Otherwise,
dnl we have a problem.
if test ! -z "$cf_openssl_basedir"; then
AC_MSG_RESULT($cf_openssl_basedir)
cf_enable_openssl="yes"
else
AC_MSG_RESULT([not found. Specify a correct path?])
cf_enable_openssl="no"
fi
unset cf_openssl_basedir
else
dnl If --disable-openssl was specified
AC_MSG_RESULT(disabled)
fi
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $SSL_INCLUDES"
save_LIBS="$LIBS"
LIBS="$LIBS $SSL_LIBS"
CPPFLAGS="$CPPFLAGS $SSL_LIBS"
AC_CHECK_LIB(crypto, RSA_free,
[SSL_LIBS="$SSL_LIBS -lcrypto $lt_cv_dlopen_libs"],
[cf_enable_openssl=no]
)
if test "$cf_enable_openssl" != no; then
AC_DEFINE(USE_CHALLENGE, 1, [Define to enable CHALLENGE support, requires OpenSSL])
fi
CPPFLAGS="$save_CPPFLAGS"
LIBS="$save_LIBS"
dnl End OpenSSL detection
ac_cv_build_sqlite3=no
AC_CHECK_SQLITE3
if test x"$ac_sqlite3" != xyes; then
ac_cv_build_sqlite3=yes
SQLITE_SUBDIR=sqlite3
AC_SUBST(SQLITE_SUBDIR)
SQLITE3_CFLAGS="-Isqlite3"
save_LIBS=$LIBS
AC_SEARCH_LIBS(fdatasync, [rt],,)
FDATASYNCLIB=$ac_cv_search_fdatasync
LIBS=$save_LIBS
if test "$FDATASYNCLIB" = "none required"; then
unset FDATASYNCLIB
fi
if test "$FDATASYNCLIB" = "no"; then
unset FDATASYNCLIB
fi
SQLITE3_LIBS="$FDATASYNCLIB sqlite3/libsqlite3.a"
AC_SUBST(SQLITE3_LIBS, $SQLITE3_LIBS)
fi
dnl AC_SUBST(SQLITE3_LIBS, $SQLITE3_LIBS)
dnl AC_SUBST(SQLITE3_CFLAGS, $SQLITE3_CFLAGS)
AM_CONDITIONAL([BUILD_SQLITE], [test "$ac_cv_build_sqlite3" = yes])
dnl Specialized functions and libraries
dnl ===================================
AC_ARG_WITH(zlib-path,
AC_HELP_STRING([--with-zlib-path=DIR],[Path to libz.so for ziplinks support.]),
[LIBS="$LIBS -L$withval"],)
AC_ARG_ENABLE(zlib,
AC_HELP_STRING([--disable-zlib],[Disable ziplinks support]),
[zlib=$enableval],[zlib=yes])
if test "$zlib" = yes; then
AC_CHECK_HEADER(zlib.h, [
AC_CHECK_LIB(z, zlibVersion,
[
AC_SUBST(ZLIB_LD, -lz)
AC_DEFINE(HAVE_ZLIB, 1, [Define to 1 if zlib (-lz) is available.])
], zlib=no)
], zlib=no)
fi
dnl **********************************************************************
dnl Check for --with-confdir
dnl **********************************************************************
AC_MSG_CHECKING([whether to modify confdir])
AC_ARG_WITH(confdir,
AC_HELP_STRING([--with-confdir=DIR],
[Directory to install config files.]),
[ confdir=`echo $withval | sed 's/\/$//'`
AC_MSG_RESULT(yes)
AC_DEFINE_DIR(ETC_DIR, confdir, [Prefix where config files are installed.])
AC_SUBST_DIR([confdir]) ],
[ confdir='${prefix}/etc'
AC_MSG_RESULT(no)
AC_DEFINE_DIR(ETC_DIR, confdir, [Prefix where config files are installed.])
AC_SUBST_DIR([confdir])]
)
dnl **********************************************************************
dnl Check for --with-logdir
dnl **********************************************************************
AC_MSG_CHECKING([whether to modify logdir])
AC_ARG_WITH(logdir,
AC_HELP_STRING([--with-logdir=DIR],
[Directory where to write logfiles.]),
[ logdir=`echo $withval | sed 's/\/$//'`
AC_MSG_RESULT(yes)
AC_DEFINE_DIR(LOG_DIR, logdir, [Prefix where to write logfiles.])
AC_SUBST_DIR([logdir]) ],
[ logdir='${prefix}/logs'
AC_MSG_RESULT(no)
AC_DEFINE_DIR(LOG_DIR, logdir, [Prefix where to write logfiles.])
AC_SUBST_DIR([logdir])]
)
dnl **********************************************************************
dnl Check for --with-helpdir
dnl **********************************************************************
AC_MSG_CHECKING([whether to modify helpdir])
AC_ARG_WITH(helpdir,
AC_HELP_STRING([--with-helpdir=DIR],
[Directory to install help files.]),
[ helpdir=`echo $withval | sed 's/\/$//'`
AC_MSG_RESULT(yes)
AC_DEFINE_DIR(HELP_DIR, helpdir, [Prefix where help files are installed.])
AC_SUBST_DIR([helpdir]) ],
[ helpdir='${prefix}/help'
AC_MSG_RESULT(no)
AC_DEFINE_DIR(HELP_DIR, helpdir, [Prefix where help file are installed.])
AC_SUBST_DIR([helpdir])]
)
dnl **********************************************************************
dnl Check for --with-moduledir
dnl **********************************************************************
AC_MSG_CHECKING([whether to modify moduledir])
AC_ARG_WITH(moduledir,
AC_HELP_STRING([--with-moduledir=DIR],
[Directory to install modules.]),
[ moduledir=`echo $withval | sed 's/\/$//'`
AC_MSG_RESULT(yes)
AC_DEFINE_DIR(MODULE_DIR, moduledir, [Prefix where modules are installed.])
AC_SUBST_DIR([moduledir]) ],
[ moduledir='${prefix}/modules'
AC_MSG_RESULT(no)
AC_DEFINE_DIR(MODULE_DIR, moduledir, [Prefix where modules are installed.])
AC_SUBST_DIR([moduledir])]
)
dnl Debug-related options
dnl =====================
AC_ARG_ENABLE(assert,
AC_HELP_STRING([--enable-assert],[Enable assert(). Choose between soft(warnings) and hard(aborts the daemon)]),
[assert=$enableval], [assert=no])
if test "$assert" = no; then
AC_DEFINE(NDEBUG, 1, [Define this to disable debugging support.])
elif test "$assert" = soft; then
AC_DEFINE(SOFT_ASSERT, 1, [Define this to enable soft asserts.])
AC_DEFINE(NDEBUG, 1, [Define this to disable debugging support.])
elif test "$assert" = yes; then
assert = "hard";
fi
AC_MSG_CHECKING(if you want IO Debugging hooks)
AC_ARG_ENABLE(iodebug,
AC_HELP_STRING([--enable-iodebug],[Enable IO Debugging hooks]),
[iodebug=$enableval], [iodebug=no])
if test "$iodebug" = yes; then
AC_DEFINE(USE_IODEBUG_HOOKS, 1, [Define this to enable IO Debug hooks.])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(if you want to do a profile build)
AC_ARG_ENABLE(profile,
AC_HELP_STRING([--enable-profile],[Enable profiling]),
[profile=$enableval], [profile=no])
if test "$profile" = yes; then
if test "$ac_cv_c_compiler_gnu" = yes; then
CFLAGS="$CFLAGS -pg -static"
AC_MSG_RESULT([yes, adding -pg -static])
AC_DEFINE(RATBOX_PROFILE, 1, [Defined to mark profiling is enabled])
else
AC_MSG_RESULT([no, profile builds only work with gcc])
fi
else
AC_MSG_RESULT(no)
fi
dnl Server Tweaks
dnl =============
AC_ARG_ENABLE(services,
AC_HELP_STRING([--enable-services],[Enable ratbox-services compatibility code.]),
[ratbox_services=$enableval], [ratbox_services=no])
M_SERVICES=""
if test "x$ratbox_services" = "xyes"; then
AC_DEFINE([ENABLE_SERVICES], 1, [ratbox-services compatibility code])
M_SERVICES="m_services.la"
fi
AM_CONDITIONAL([ENABLE_SERVICES], [test x"$M_SERVICES" != "x"])
AC_ARG_ENABLE(small-net,
AC_HELP_STRING([--enable-small-net],[Enable small network support.]),
[small_net=$enableval], [small_net=no])
if test "$small_net" = yes; then
dnl AC_DEFINE([HASHSIZE], 4096, [Max number of buckets in hash tables.])
AC_DEFINE([NICKNAMEHISTORYLENGTH], 1500, [Size of the WHOWAS array.])
AC_DEFINE([CHANNEL_HEAP_SIZE], 256, [Size of the channel heap.])
AC_DEFINE([BAN_HEAP_SIZE], 128, [Size of the ban heap.])
AC_DEFINE([CLIENT_HEAP_SIZE], 256, [Size of the client heap.])
AC_DEFINE([LCLIENT_HEAP_SIZE], 128, [Size of the local client heap.])
AC_DEFINE([USER_HEAP_SIZE], 128, [Size of the user heap.])
AC_DEFINE([DNODE_HEAP_SIZE], 512, [Size of the dlink_node heap.])
AC_DEFINE([TOPIC_HEAP_SIZE], 256, [Size of the topic heap.])
AC_DEFINE([LINEBUF_HEAP_SIZE], 128, [Size of the linebuf heap.])
AC_DEFINE([MEMBER_HEAP_SIZE], 256, [Sizeof member heap.])
AC_DEFINE([ND_HEAP_SIZE], 128, [Size of the nick delay heap.])
AC_DEFINE([CONFITEM_HEAP_SIZE], 128, [Size of the confitem heap.])
AC_DEFINE([MONITOR_HEAP_SIZE], 128, [Size of the monitor heap.])
AC_DEFINE([AUTH_HEAP_SIZE], 128, [Size of the auth heap.])
AC_DEFINE([FD_HEAP_SIZE], 128, [Size of fd heap.])
AC_DEFINE([AWAY_HEAP_SIZE], 128, [Size of away heap.])
else
dnl These settings are for a large network like efnet..they will use lots of memory
dnl so enable small net unless you really need this much support
AC_DEFINE([NICKNAMEHISTORYLENGTH], 30000, [Size of the WHOWAS array.])
AC_DEFINE([CHANNEL_HEAP_SIZE], 8192, [Size of the channel heap.])
AC_DEFINE([BAN_HEAP_SIZE], 4096, [Size of the ban heap.])
AC_DEFINE([CLIENT_HEAP_SIZE], 8192, [Size of the client heap.])
AC_DEFINE([LCLIENT_HEAP_SIZE], 1024, [Size of the local client heap.])
AC_DEFINE([USER_HEAP_SIZE], 8192, [Size of the user heap.])
AC_DEFINE([DNODE_HEAP_SIZE], 8192, [Size of the dlink_node heap.])
AC_DEFINE([TOPIC_HEAP_SIZE], 4096, [Size of the topic heap.])
AC_DEFINE([LINEBUF_HEAP_SIZE], 2048, [Size of the linebuf heap.])
AC_DEFINE([MEMBER_HEAP_SIZE], 32768, [Sizeof member heap.])
AC_DEFINE([ND_HEAP_SIZE], 512, [Size of the nick delay heap.])
AC_DEFINE([CONFITEM_HEAP_SIZE], 1024, [Size of the confitem heap.])
AC_DEFINE([MONITOR_HEAP_SIZE], 1024, [Size of the monitor heap.])
AC_DEFINE([AUTH_HEAP_SIZE], 256, [Size of the auth heap.])
AC_DEFINE([FD_HEAP_SIZE], 1024, [Size of fd heap.])
AC_DEFINE([AWAY_HEAP_SIZE], 512, [Size of away heap.])
fi
AC_ARG_WITH(nicklen,
AC_HELP_STRING([--with-nicklen=LENGTH],[Set the nick length to LENGTH (default 9, max 50)]),
[
if ! expr "$withval" + 0 >/dev/null 2>&1; then
AC_ERROR([NICKLEN must be a numeric value])
fi
if test $withval -ge 50; then
NICKLEN=50
AC_MSG_WARN([NICKLEN has a hard limit of 50. Setting NICKLEN=50])
else
NICKLEN="$withval"
fi
], [NICKLEN=9])
AC_DEFINE_UNQUOTED(NICKLEN, (${NICKLEN}+1), [Nickname length])
AC_DEFINE_UNQUOTED(RATBOX_CONFIGURE_OPTS, "$ac_configure_args", [configure arguments])
AC_SUBST(SSL_INCLUDES)
AC_SUBST(SSL_LIBS)
AC_SUBST(LDFLAGS)
AC_SUBST(PICFLAGS)
AC_SUBST(CFLAGS)
AC_SUBST(SEDOBJ)
AC_SUBST(WARNFLAGS)
if test "$prefix" = "NONE"; then
AC_DEFINE_UNQUOTED(IRCD_PREFIX, "$ac_default_prefix", [Prefix where the ircd is installed.])
else
dnl Don't get bitten by Cygwin's stupidity if the user specified
dnl a custom prefix with a trailing slash
prefix=`echo $prefix | sed 's/\/$//'`
AC_DEFINE_UNQUOTED(IRCD_PREFIX, "$prefix", [Prefix where the ircd is installed.])
fi
if test "x$libexecdir" = "xNONE"; then
rb_cv_libexecdir=$ac_default_libexecdir
else
rb_cv_libexecdir=$libexecdir
fi
libexecdir=`eval "echo ${rb_cv_libexecdir}/ircd-ratbox"`
AC_DEFINE_DIR(LIBEXEC_DIR, libexecdir, [Prefix where to install non-user executables.])
dnl lets see what libtool thinks our suffix is...
AC_MSG_CHECKING([for shared library suffix])
dnl this whole thing is a big hack...
module=yes
eval SHLIBEXT=\"$shrext_cmds\"
AC_MSG_RESULT($SHLIBEXT)
AC_SUBST(SHLIBEXT,$SHLIBEXT)
AC_SUBST(LT_OBJDIR,$lt_cv_objdir)
AC_DEFINE_UNQUOTED(SHLIBEXT,"$SHLIBEXT", [Extension that shared libs use])
AC_SUBST(IRCD_PREFIX)
disable_backups=n
AC_ARG_ENABLE(backups,,disable_backups=y)
AM_CONDITIONAL([DISABLE_BACKUPS], [test x"$disable_backups" = "xy"])
AC_CONFIG_FILES( \
Makefile \
bandb/Makefile \
bandb/sqlite3/Makefile \
ssld/Makefile \
resolver/Makefile \
contrib/Makefile \
tools/Makefile \
doc/Makefile \
help/Makefile \
modules/Makefile \
src/Makefile \
install-mod.sh
)
AC_OUTPUT
dnl Make it look sexay!
echo
echo "Compiling $PACKAGE_NAME $PACKAGE_VERSION"
echo
echo "Installing into: $prefix"
echo "Ziplinks ....................... $zlib"
echo "OpenSSL ........................ $cf_enable_openssl"
tmpresult=shared
if test "x$enable_static" = "xyes"; then
tmpresult=static
fi
echo "Modules ........................ $tmpresult"
echo "IO Debugging hooks ............. $iodebug"
echo "Assert debugging ............... $assert"
echo "Small network .................. $small_net"
echo "ratbox-services compatibility .. $ratbox_services"
echo
echo "Configured limits:"
echo "NICKLEN ................. $NICKLEN"
echo

View File

@ -0,0 +1 @@
-i8 -bli0 -cs -ut -nsai -nsaw -nsaf -npcs -nprs -l100

View File

@ -0,0 +1,68 @@
prefix = @prefix@
libcoredir = @libdir@
modulesdir = @moduledir@/autoload
coredir = @moduledir@
servicesdir = @moduledir@/autoload
libmodulesdir = @moduledir@
contribdir = @moduledir@/contrib
INCLUDES = -I../include -I../libratbox/include $(INCLTDL)
AM_CFLAGS=$(WARNFLAGS)
SRCS = \
example_module.c \
m_42.c \
m_clearchan.c \
m_flags.c \
m_force.c \
m_mkpasswd.c \
m_ojoin.c \
m_okick.c \
m_olist.c \
m_opme.c \
spy_admin_notice.c \
spy_info_notice.c \
spy_links_notice.c \
spy_motd_notice.c \
spy_stats_notice.c \
spy_stats_p_notice.c \
spy_whois_notice.c \
spy_whois_notice_global.c
ALL_SRCS = $(SRCS)
S_OBJS = $(ALL_SRCS:.c=.la)
S_CORE_OBJS = $(CORE_SRCS:.c=.la)
ST_OBJS = $(ALL_SRCS:.c=.lo) $(CORE_SRCS:.c=.lo)
SUFFIXES = .c .so .lo .la
.c.lo:
$(LIBTOOL) --mode=compile $(CC) -prefer-pic -DHAVE_CONFIG_H $(INCLUDES) $(AM_CPPFLAGS) $(CFLAGS) -c $< -o $@
.lo.la:
$(LIBTOOL) --mode=link $(CC) -rpath $(moduledir) -module -avoid-version $(CFLAGS) -o $@ $< $(LIBS) $(LDFLAGS)
all: $(S_OBJS) $(S_CORE_OBJS)
clean-generic:
$(LIBTOOL) --mode=clean $(RB_RM) -f $(S_OBJS) $(S_CORE_OBJS) $(ST_OBJS)
install_modules: $(S_OBJS)
-@@$(MKDIR_P) $(DESTDIR)$(contribdir); \
for x in $(S_OBJS); do $(SHELL) ../install-mod.sh $$x $(DESTDIR)$(contribdir);done
#install-mkdirs:
# @echo "ircd: setting up modular directory structure"
# -@if test ! -d $(DESTDIR)$(moduledir); then \
# mkdir $(DESTDIR)$(moduledir); \
# fi
# -@if test -d $(DESTDIR)$(moduledir)-old; then \
# rm -rf $(DESTDIR)$(moduledir)-old; \
# fi
# -@if test -d $(DESTDIR)$(moduledir); then \
# echo "ircd: backing up modules"; \
# mv $(DESTDIR)$(moduledir) $(DESTDIR)$(moduledir)-old; \
# fi
#
# @mkdir -p -m 755 $(DESTDIR)$(moduledir)
install: install_modules

View File

@ -0,0 +1,490 @@
# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = contrib
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/setup.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AR = @AR@
ARGZ_H = @ARGZ_H@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CP = @CP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ETC_DIR = @ETC_DIR@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
HELP_DIR = @HELP_DIR@
INCLTDL = @INCLTDL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IRCD_PREFIX = @IRCD_PREFIX@
LD = @LD@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBADD_DL = @LIBADD_DL@
LIBADD_DLD_LINK = @LIBADD_DLD_LINK@
LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBEXEC_DIR = @LIBEXEC_DIR@
LIBLTDL = @LIBLTDL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LOG_DIR = @LOG_DIR@
LTDLDEPS = @LTDLDEPS@
LTDLINCL = @LTDLINCL@
LTDLOPEN = @LTDLOPEN@
LTDL_SUBDIR = @LTDL_SUBDIR@
LTLIBOBJS = @LTLIBOBJS@
LT_CONFIG_H = @LT_CONFIG_H@
LT_DLLOADERS = @LT_DLLOADERS@
LT_DLPREOPEN = @LT_DLPREOPEN@
LT_OBJDIR = @LT_OBJDIR@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MODULE_DIR = @MODULE_DIR@
MV = @MV@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PICFLAGS = @PICFLAGS@
RANLIB = @RANLIB@
RB_RM = @RB_RM@
SED = @SED@
SEDOBJ = @SEDOBJ@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SHLIBEXT = @SHLIBEXT@
SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
SQLITE3_LIBS = @SQLITE3_LIBS@
SQLITE_SUBDIR = @SQLITE_SUBDIR@
SSL_INCLUDES = @SSL_INCLUDES@
SSL_LIBS = @SSL_LIBS@
STRIP = @STRIP@
VERSION = @VERSION@
WARNFLAGS = @WARNFLAGS@
YACC = @YACC@
YFLAGS = @YFLAGS@
ZLIB_LD = @ZLIB_LD@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
confdir = @confdir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
helpdir = @helpdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
logdir = @logdir@
ltdl_LIBOBJS = @ltdl_LIBOBJS@
ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@
mandir = @mandir@
mkdir_p = @mkdir_p@
moduledir = @moduledir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
subdirs = @subdirs@
sys_symbol_underscore = @sys_symbol_underscore@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
libcoredir = @libdir@
modulesdir = @moduledir@/autoload
coredir = @moduledir@
servicesdir = @moduledir@/autoload
libmodulesdir = @moduledir@
contribdir = @moduledir@/contrib
INCLUDES = -I../include -I../libratbox/include $(INCLTDL)
AM_CFLAGS = $(WARNFLAGS)
SRCS = \
example_module.c \
m_42.c \
m_clearchan.c \
m_flags.c \
m_force.c \
m_mkpasswd.c \
m_ojoin.c \
m_okick.c \
m_olist.c \
m_opme.c \
spy_admin_notice.c \
spy_info_notice.c \
spy_links_notice.c \
spy_motd_notice.c \
spy_stats_notice.c \
spy_stats_p_notice.c \
spy_whois_notice.c \
spy_whois_notice_global.c
ALL_SRCS = $(SRCS)
S_OBJS = $(ALL_SRCS:.c=.la)
S_CORE_OBJS = $(CORE_SRCS:.c=.la)
ST_OBJS = $(ALL_SRCS:.c=.lo) $(CORE_SRCS:.c=.lo)
SUFFIXES = .c .so .lo .la
all: all-am
.SUFFIXES:
.SUFFIXES: .c .so .lo .la
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu contrib/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
.c.lo:
$(LIBTOOL) --mode=compile $(CC) -prefer-pic -DHAVE_CONFIG_H $(INCLUDES) $(AM_CPPFLAGS) $(CFLAGS) -c $< -o $@
.lo.la:
$(LIBTOOL) --mode=link $(CC) -rpath $(moduledir) -module -avoid-version $(CFLAGS) -o $@ $< $(LIBS) $(LDFLAGS)
all: $(S_OBJS) $(S_CORE_OBJS)
clean-generic:
$(LIBTOOL) --mode=clean $(RB_RM) -f $(S_OBJS) $(S_CORE_OBJS) $(ST_OBJS)
install_modules: $(S_OBJS)
-@@$(MKDIR_P) $(DESTDIR)$(contribdir); \
for x in $(S_OBJS); do $(SHELL) ../install-mod.sh $$x $(DESTDIR)$(contribdir);done
#install-mkdirs:
# @echo "ircd: setting up modular directory structure"
# -@if test ! -d $(DESTDIR)$(moduledir); then \
# mkdir $(DESTDIR)$(moduledir); \
# fi
# -@if test -d $(DESTDIR)$(moduledir)-old; then \
# rm -rf $(DESTDIR)$(moduledir)-old; \
# fi
# -@if test -d $(DESTDIR)$(moduledir); then \
# echo "ircd: backing up modules"; \
# mv $(DESTDIR)$(moduledir) $(DESTDIR)$(moduledir)-old; \
# fi
#
# @mkdir -p -m 755 $(DESTDIR)$(moduledir)
install: install_modules
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,80 @@
$Id: README 27287 2011-10-31 16:11:37Z androsyn $
This directory contains modules and patches that have been contributed
by other people, or aren't suitable for including into the
ircd-ratbox tree. The coding team do not officially support the contrib/
modules, or guarantee any of them will actually work.
Modules
-------
m_clearchan.c - CLEARCHAN - clears all users out of a channel and joins person
issuing command
Syntax: CLEARCHAN <channel>
m_flags.c - FLAGS - csircd like support of changing usermodes
Syntax: FLAGS :+OWALLOPS -SWALLOPS
m_force.c - FORCE - forces a user to either part or join a channel with
an optional status (@%+)
Syntax: FORCEJOIN <nick> [status]<channel>
FORCEPART <nick> <channel>
m_jupe.c - JUPE - Server juping command
Syntax: JUPE juped.server.name :Reason
m_ltrace.c - LTRACE - Limited trace. Similar to TRACE except only reports
current opers and servers.
Syntax: LTRACE [nick|mask [server]]
m_map.c - MAP - Display the server routing graph in a visually pleasing
format
Syntax: MAP
m_mkpasswd.c - MKPASSWD - generate a DES or MD5 encryption of a password
Syntax: MKPASSWD <plaintext> [MD5|DES]
m_ojoin.c - OJOIN - Join a channel through any modes or limits with
an optional status (@%+)
Syntax: OJOIN [status]<channel>
m_olist.c - OLIST - Lists channels like LIST, but shows hidden
channels. Oper only of course.
m_opme.c - OPME - Allows an admin to op themselves in an opless channel
Syntax: OPME <channel>
m_owho.c - OWHO - Just like WHO but doesn't hide things from opers
m_owhois.c - OWHOIS - Allows an oper to do a whois on any user and see
all channels they are in. The syntax is the same
as WHOIS
m_tburst.c - TBURST - module that will make servers send channel topics
to each other after a netsplit/restart.
m_42.c - 42 - The Answer to Life, the Universe, and Everything.
example_module.c - An example module to be used for creating your own.
Syntax: TEST
Spy Modules
-----------
The following are the 'spy' parts, accessible via the +y usermode
spy_admin_notice.c - Spy on clients doing ADMIN
spy_info_notice.c - Spy on clients doing INFO
spy_links_notice.c - Spy on clients doing LINKS
spy_motd_notice.c - Spy on clients doing MOTD
spy_stats_notice.c - Spy on clients doing all STATS
spy_stats_p_notice.c - Spy on clients doing STATS p only
spy_whois_notice.c - Spy on local clients who WHOIS you.
spy_whois_notice_global.c - Spy on remote clients who WHOIS you.
Note: if you have both spy_stats_notice.c and spy_stats_p_notice.c loaded
you will get two messages.
Kilroy says hello

View File

@ -0,0 +1,289 @@
/************************************************************************
* IRC - Internet Relay Chat, doc/example_module.c
* Copyright (C) 2001 Hybrid Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 1, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: example_module.c 26094 2008-09-19 15:33:46Z androsyn $
*/
/* List of ircd includes from ../include/ */
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "modules.h"
#include "parse.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
/* Declare the void's initially up here, as modules dont have an
* include file, we will normally have client_p, source_p, parc
* and parv[] where:
*
* client_p == client issuing command
* source_p == where the command came from
* parc == the number of parameters
* parv == an array of the parameters
*/
static int munreg_test(struct Client *client_p, struct Client *source_p, int parc,
const char *parv[]);
static int mclient_test(struct Client *client_p, struct Client *source_p, int parc,
const char *parv[]);
static int mserver_test(struct Client *client_p, struct Client *source_p, int parc,
const char *parv[]);
static int mrclient_test(struct Client *client_p, struct Client *source_p, int parc,
const char *parv[]);
static int moper_test(struct Client *client_p, struct Client *source_p, int parc,
const char *parv[]);
/* Show the commands this module can handle in a msgtab
* and give the msgtab a name, here its test_msgtab
*/
struct Message test_msgtab = {
"TEST", /* the /COMMAND you want */
0, /* SET TO ZERO -- number of times command used by clients */
0, /* SET TO ZERO -- number of times command used by clients */
0, /* SET TO ZERO -- number of times command used by clients */
MFLG_SLOW, /* ALWAYS SET TO MFLG_SLOW */
/* the functions to call for each handler. If not using the generic
* handlers, the first param is the function to call, the second is the
* required number of parameters. NOTE: If you specify a min para of 2,
* then parv[1] must *also* be non-empty.
*/
{
{munreg_test, 0}, /* function call for unregistered clients, 0 parms required */
{mclient_test, 0}, /* function call for local clients, 0 parms required */
{mrclient_test, 0}, /* function call for remote clients, 0 parms required */
{mserver_test, 0}, /* function call for servers, 0 parms required */
mg_ignore, /* function call for ENCAP, unused in this test */
{moper_test, 0} /* function call for operators, 0 parms required */
}
};
/*
* There are also some macros for the above function calls and parameter counts.
* Here's a list:
*
* mg_ignore: ignore the command when it comes from certain types
* mg_not_oper: tell the client it requires being an operator
* mg_reg: prevent the client using this if registered
* mg_unreg: prevent the client using this if unregistered
*
* These macros assume a parameter count of zero; you do not set it.
* For further details, see include/msg.h
*/
/* The mapi_clist_av1 indicates which commands (struct Message)
* should be loaded from the module. The list should be terminated
* by a NULL.
*/
mapi_clist_av1 test_clist[] = { &test_msgtab, NULL };
/* The mapi_hlist_av1 indicates which hook functions we need to be able to
* call. We need to declare an integer, then add the name of the hook
* function to call and a pointer to this integer. The list should be
* terminated with NULLs.
*/
int doing_example_hook;
mapi_hlist_av1 test_hlist[] = {
{"doing_example_hook", &doing_example_hook,},
{NULL, NULL}
};
/* The mapi_hfn_list_av1 declares the hook functions which other modules can
* call. The first parameter is the name of the hook, the second is a void
* returning function, with arbitrary parameters casted to (hookfn). This
* list must be terminated with NULLs.
*/
static void show_example_hook(void *unused);
mapi_hfn_list_av1 test_hfnlist[] = {
{"doing_example_hook", (hookfn) show_example_hook},
{NULL, NULL}
};
/* Here we tell it what to do when the module is loaded */
static int
modinit(void)
{
/* Nothing to do for the example module. */
/* The init function should return -1 on failure,
which will cause the module to be unloaded,
otherwise 0 to indicate success. */
return 0;
}
/* here we tell it what to do when the module is unloaded */
static void
moddeinit(void)
{
/* Again, nothing to do. */
}
/* DECLARE_MODULE_AV1() actually declare the MAPI header. */
DECLARE_MODULE_AV1(
/* The first argument is the name */
example,
/* The second argument is the function to call on load */
modinit,
/* And the function to call on unload */
moddeinit,
/* Then the MAPI command list */
test_clist,
/* Next the hook list, if we have one. */
test_hlist,
/* Then the hook function list, if we have one */
test_hfnlist,
/* And finally the version number of this module. */
"$Revision: 26094 $");
/* Any of the above arguments can be NULL to indicate they aren't used. */
/*
* mr_test
* parv[0] = sender prefix
* parv[1] = parameter
*/
/* Here we have the functions themselves that we declared above,
* and the fairly normal C coding
*/
static int
munreg_test(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
if(parc < 2)
{
sendto_one(source_p, ":%s NOTICE %s :You are unregistered and sent no parameters",
me.name, source_p->name);
}
else
{
sendto_one(source_p, ":%s NOTICE %s :You are unregistered and sent parameter: %s",
me.name, source_p->name, parv[1]);
}
/* illustration of how to call a hook function */
call_hook(doing_example_hook, NULL);
return 0;
}
/*
* mclient_test
* parv[0] = sender prefix
* parv[1] = parameter
*/
static int
mclient_test(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
if(parc < 2)
{
sendto_one(source_p, ":%s NOTICE %s :You are a normal user, and sent no parameters",
me.name, source_p->name);
}
else
{
sendto_one(source_p,
":%s NOTICE %s :You are a normal user, and send parameters: %s", me.name,
source_p->name, parv[1]);
}
/* illustration of how to call a hook function */
call_hook(doing_example_hook, NULL);
return 0;
}
/*
* mrclient_test
* parv[0] = sender prefix
* parv[1] = parameter
*/
static int
mrclient_test(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
if(parc < 2)
{
sendto_one(source_p,
":%s NOTICE %s :You are a remote client, and sent no parameters",
me.name, source_p->name);
}
else
{
sendto_one(source_p,
":%s NOTICE %s :You are a remote client, and sent parameters: %s",
me.name, source_p->name, parv[1]);
}
return 0;
}
/*
* mserver_test
* parv[0] = sender prefix
* parv[1] = parameter
*/
static int
mserver_test(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
if(parc < 2)
{
sendto_one(source_p,
":%s NOTICE %s :You are a server, and sent no parameters",
me.name, source_p->name);
}
else
{
sendto_one(source_p,
":%s NOTICE %s :You are a server, and sent parameters: %s",
me.name, source_p->name, parv[1]);
}
return 0;
}
/*
* moper_test
* parv[0] = sender prefix
* parv[1] = parameter
*/
static int
moper_test(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
if(parc < 2)
{
sendto_one(source_p, ":%s NOTICE %s :You are an operator, and sent no parameters",
me.name, source_p->name);
}
else
{
sendto_one(source_p, ":%s NOTICE %s :You are an operator, and sent parameters: %s",
me.name, source_p->name, parv[1]);
}
return 0;
}
static void
show_example_hook(void *unused)
{
sendto_realops_flags(UMODE_ALL, L_ALL, "Called example hook!");
}
/* END OF EXAMPLE MODULE */

View File

@ -0,0 +1,159 @@
#!/usr/bin/perl
#
# ircd-shortcut.pl
# This script generates ircd command shortcuts for use with
# ratbox-services. These are notably safer to use than users simply
# messaging the service nicknames, as they cannot be intercepted
# by other users when services is split.
#
# This file will output to m_rsshortcut.c, which can then be compiled
# as an ircd module and installed. The module generated is for use
# with ircd-ratbox-2.1.x.
#
# Copyright (C) 2005 Lee Hardy <lee -at- leeh.co.uk>
# Copyright (C) 2005-2012 ircd-ratbox development team
#
# $Id: ircd-shortcut.pl 20411 2005-05-18 14:31:19Z leeh $
#####################################
##### -- BEGIN CONFIGURATION -- #####
#####################################
# The servername of your services as it appears on IRC.
#
my $servername = "services.ircd-ratbox.org";
# The list of services you wish to generate shortcuts for.
# This list must be the actual nicknames, as they appear on IRC
# of each service.
#
my @services = ("USERSERV", "CHANSERV", "NICKSERV", "ALIS",
"OPERBOT", "OPERSERV", "JUPESERV", "GLOBAL");
######################################
##### -- END OF CONFIGURATION -- #####
######################################
open(FILE, '>', 'm_rsshortcut.c');
print FILE <<".EOF.";
/* m_rsshortcut.c
* Contains the code for command shortcuts for ratbox-services
*
* Copyright (C) 2005 Lee Hardy <lee -at- leeh.co.uk>
* Copyright (C) 2005-2012 ircd-ratbox development team
*
* 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.The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
*/
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "modules.h"
#include "parse.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
#include "s_serv.h"
#include "hash.h"
.EOF.
# generating function names with capital letters is ugly
foreach my $sname (@services) {
$sname =~ tr/A-Z/a-z/;
}
foreach my $sname (@services) {
print FILE "static int m_$sname(struct Client *, struct Client *, int, const char **);\n";
}
print FILE "\n";
foreach my $sname (@services) {
# the command name needs to be in capitals
my $snamecaps = $sname;
$snamecaps =~ tr/a-z/A-Z/;
print FILE "struct Message " . $sname . "_msgtab = {\n";
print FILE "\t\"$snamecaps\", 0, 0, 0, MFLG_SLOW,\n";
print FILE "\t{mg_ignore, {m_$sname, 2}, mg_ignore, mg_ignore, mg_ignore, {m_$sname, 2}}\n";
print FILE "};\n";
};
print FILE "mapi_clist_av1 rsshortcut_clist[] = {\n";
foreach my $sname (@services) {
print FILE "\t\&" . $sname . "_msgtab,\n";
}
print FILE "\tNULL\n};\n\n";
print FILE "DECLARE_MODULE_AV1(rsshortcut, NULL, NULL, rsshortcut_clist, NULL, NULL, \"1.0\");\n\n";
foreach my $sname (@services) {
print FILE << ".EOF.";
static int
m_$sname(struct Client *client_p, struct Client *source_p,
int parc, const char *parv[])
{
char buf[BUFSIZE];
int i = 1;
if(find_server(NULL, "$servername") == NULL)
{
sendto_one(source_p,
":%s 440 %s $sname :Services are currently unavailable",
me.name, source_p->name);
return 0;
}
buf[0] = '\\0';
while(i < parc)
{
rb_strlcat(buf, parv[i], sizeof(buf));
rb_strlcat(buf, " ", sizeof(buf));
i++;
}
sendto_match_servs(client_p, "$servername", CAP_ENCAP, NOCAPS,
"ENCAP $servername RSMSG $sname %s",
buf);
return 0;
}
.EOF.
}
close(FILE);
print <<".EOF.";
Output generated to m_rsshortcut.c
1. Run make m_rsshortcut.la from the contrib directory
2. Run sh ../install-mod.sh m_rsshortcut.la PREFIX/modules/autoload
3. On irc: /quote modrestart
.EOF.

View File

@ -0,0 +1,62 @@
/*
* Copyright (C) infinity-infinity God <God@Heaven>
*
* Bob was here
* $Id: m_42.c 26094 2008-09-19 15:33:46Z androsyn $
*/
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "parse.h"
#include "modules.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
static int mclient_42(struct Client *client_p, struct Client *source_p, int parc,
const char *parv[]);
static int mclient_kilroy(struct Client *client_p, struct Client *source_p, int parc,
const char *parv[]);
struct Message hgtg_msgtab = {
"42", 0, 0, 0, MFLG_SLOW,
{mg_ignore, {mclient_42, 0}, mg_ignore, mg_ignore, mg_ignore, {mclient_42, 0}
}
};
struct Message kilroy_msgtab = {
"KILROY", 0, 0, 0, MFLG_SLOW,
{mg_ignore, {mclient_kilroy, 0}, mg_ignore, mg_ignore, mg_ignore, {mclient_kilroy, 0}
}
};
mapi_clist_av1 hgtg_clist[] = { &hgtg_msgtab, &kilroy_msgtab, NULL };
DECLARE_MODULE_AV1(42, NULL, NULL, hgtg_clist, NULL, NULL, "Revision 0.42");
static int
mclient_42(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
sendto_one(source_p, ":%s NOTICE %s :The Answer to Life, the Universe, and Everything.",
me.name, source_p->name);
return 0;
}
static int
mclient_kilroy(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
SetCork(source_p);
sendto_one(source_p, ":%s NOTICE %s : ___ ", me.name,
source_p->name);
sendto_one(source_p, ":%s NOTICE %s :___________mm__(O O)__mm_________", me.name,
source_p->name);
sendto_one(source_p, ":%s NOTICE %s : \"\" U \"\" ", me.name,
source_p->name);
ClearCork(source_p);
sendto_one(source_p, ":%s NOTICE %s :Kilroy was here", me.name, source_p->name);
return 0;
}

View File

@ -0,0 +1,157 @@
/*
* IRC - Internet Relay Chat, contrib/m_clearchan.c
* Copyright (C) 2002 Hybrid Development Team
* Copyright (C) 2004-2012 ircd-ratbox Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 1, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: m_clearchan.c 27381 2012-03-16 23:10:29Z dubkat $
*/
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "channel.h"
#include "client.h"
#include "hash.h"
#include "match.h"
#include "ircd.h"
#include "numeric.h"
#include "s_user.h"
#include "s_conf.h"
#include "s_newconf.h"
#include "send.h"
#include "s_log.h"
#include "parse.h"
#include "modules.h"
#include "packet.h"
static int mo_clearchan(struct Client *client_p, struct Client *source_p,
int parc, const char *parv[]);
struct Message clearchan_msgtab = {
"CLEARCHAN", 0, 0, 0, MFLG_SLOW,
{mg_unreg, mg_not_oper, mg_ignore, mg_ignore, mg_ignore, {mo_clearchan, 2}}
};
mapi_clist_av1 clearchan_clist[] = { &clearchan_msgtab, NULL };
DECLARE_MODULE_AV1(clearchan, NULL, NULL, clearchan_clist, NULL, NULL, "$Revision: 27381 $");
/*
** mo_clearchan
** parv[0] = sender prefix
** parv[1] = channel
*/
static int
mo_clearchan(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
struct Channel *chptr;
struct membership *msptr;
struct Client *target_p;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
/* admins only */
if(!IsOperAdmin(source_p))
{
sendto_one(source_p, ":%s NOTICE %s :You have no A flag", me.name, parv[0]);
return 0;
}
if((chptr = find_channel(parv[1])) == NULL)
{
sendto_one_numeric(source_p, ERR_NOSUCHCHANNEL,
form_str(ERR_NOSUCHCHANNEL), parv[1]);
return 0;
}
if(IsMember(source_p, chptr))
{
sendto_one(source_p, ":%s NOTICE %s :*** Please part %s before using CLEARCHAN",
me.name, source_p->name, parv[1]);
return 0;
}
/* quickly make everyone a peon.. */
RB_DLINK_FOREACH(ptr, chptr->members.head)
{
msptr = ptr->data;
msptr->flags &= ~CHFL_CHANOP | CHFL_VOICE;
}
sendto_wallops_flags(UMODE_WALLOP, &me,
"CLEARCHAN called for [%s] by %s!%s@%s",
parv[1], source_p->name, source_p->username, source_p->host);
ilog(L_MAIN, "CLEARCHAN called for [%s] by %s!%s@%s",
parv[1], source_p->name, source_p->username, source_p->host);
if(*chptr->chname != '&')
{
sendto_server(NULL, NULL, NOCAPS, NOCAPS,
":%s WALLOPS :CLEARCHAN called for [%s] by %s!%s@%s",
me.name, parv[1], source_p->name, source_p->username, source_p->host);
/* SJOIN the user to give them ops, and lock the channel */
sendto_server(client_p, chptr, NOCAPS, NOCAPS,
":%s SJOIN %ld %s +ntsi :@%s",
me.name, (long)(chptr->channelts - 1), chptr->chname, source_p->name);
}
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s",
source_p->name, source_p->username, source_p->host, chptr->chname);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +o %s",
me.name, chptr->chname, source_p->name);
add_user_to_channel(chptr, source_p, CHFL_CHANOP);
/* Take the TS down by 1, so we don't see the channel taken over
* again. */
if(chptr->channelts)
chptr->channelts--;
chptr->mode.mode = MODE_SECRET | MODE_TOPICLIMIT | MODE_INVITEONLY | MODE_NOPRIVMSGS;
chptr->mode.key[0] = '\0';
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->members.head)
{
msptr = ptr->data;
target_p = msptr->client_p;
/* skip the person we just added.. */
if(is_chanop(msptr))
continue;
sendto_channel_local(ALL_MEMBERS, chptr,
":%s KICK %s %s :CLEARCHAN",
source_p->name, chptr->chname, target_p->name);
if(*chptr->chname != '&')
sendto_server(NULL, chptr, NOCAPS, NOCAPS,
":%s KICK %s %s :CLEARCHAN",
source_p->name, chptr->chname, target_p->name);
remove_user_from_channel(msptr);
}
/* Join the user themselves to the channel down here, so they dont see a nicklist
* or people being kicked */
sendto_one(source_p, ":%s!%s@%s JOIN %s",
source_p->name, source_p->username, source_p->host, chptr->chname);
channel_member_names(chptr, source_p, 1);
return 0;
}

View File

@ -0,0 +1,458 @@
/*
* m_flags.c: Implements comstud-style mode flags.
*
* Copyright 2002 by W. Campbell and the ircd-hybrid development team
*
* 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.The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
*
* $Id: m_flags.c 28681 2015-10-02 16:49:39Z androsyn $
*/
/* List of ircd includes from ../include/ */
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "client.h"
#include "common.h"
#include "ircd.h"
#include "match.h"
#include "numeric.h"
#include "s_conf.h"
#include "s_log.h"
#include "s_serv.h"
#include "send.h"
#include "parse.h"
#include "modules.h"
#include "s_user.h" /* send_umode_out() */
#include "s_newconf.h"
static int m_flags(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
static int mo_flags(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
static char *set_flags_to_string(struct Client *client_p);
static char *unset_flags_to_string(struct Client *client_p);
struct Message test_msgtab = {
"FLAGS", 0, 0, 0, MFLG_SLOW,
{mg_unreg, {m_flags, 0}, {m_flags, 0}, mg_ignore, mg_ignore, {mo_flags, 0}}
};
mapi_clist_av1 test_clist[] = { &test_msgtab, NULL };
DECLARE_MODULE_AV1(test, NULL, NULL, test_clist, NULL, NULL, "$Revision: 28681 $");
/* FLAGS requires it's own mini parser, since the last parameter in it can
** contain a number of FLAGS. CS handles FLAGS mode1 mode2 OR
** FLAGS :mode1 mode2, but not both mixed.
**
** The best way to match a flag to a mode is with a simple table
*/
struct FlagTable
{
const char *name;
int mode;
int oper;
};
/* *INDENT-OFF* */
static struct FlagTable flag_table[] = {
/* name mode it represents oper only? */
#if 0
/* This one is special...controlled via an oper block option */
{ "OWALLOPS", UMODE_OPERWALL, 1 },
#endif
{ "SWALLOPS", UMODE_WALLOP, 0 },
{ "STATSNOTICES", UMODE_SPY, 1 },
/* We don't have a separate OKILL and SKILL modes */
{ "OKILLS", UMODE_SERVNOTICE, 0 },
{ "SKILLS", UMODE_SKILL, 0 },
{ "SNOTICES", UMODE_SERVNOTICE, 0 },
/* We don't have separate client connect and disconnect modes */
{ "CLICONNECTS", UMODE_CCONN, 1 },
{ "CLIDISCONNECTS", UMODE_CCONN, 1 },
/* I'm taking a wild guess here... */
{ "THROTTLES", UMODE_REJ, 1 },
#if 0
/* This one is special...controlled via an oper block option */
{ "NICKCHANGES", UMODE_NCHANGE, 1 },
/* NICKCHANGES must be checked for separately */
#endif
/* I'm assuming this is correct... */
{ "IPMISMATCHES", UMODE_UNAUTH, 1 },
{ "LWALLOPS", UMODE_LOCOPS, 1 },
/* These aren't separate on Hybrid */
{ "CONNECTS", UMODE_EXTERNAL, 1 },
{ "SQUITS", UMODE_EXTERNAL, 1 },
/* Now we have our Hybrid specific flags */
{ "FULL", UMODE_FULL, 1 },
/* Not in CS, but we might as well put it here */
{ "INVISIBLE", UMODE_INVISIBLE, 0 },
{ "BOTS", UMODE_BOTS, 1 },
{ "CALLERID", UMODE_CALLERID, 0 },
{ "UNAUTH", UMODE_UNAUTH, 1 },
{ "DEBUG", UMODE_DEBUG, 1 },
{ NULL, 0, 0}
};
/* *INDENT-ON* */
/* We won't control CALLERID or INVISIBLE in here */
#define FL_ALL_USER_FLAGS (UMODE_WALLOP | UMODE_SKILL | UMODE_SERVNOTICE )
/* and we don't control NCHANGES here either */
#define FL_ALL_OPER_FLAGS (FL_ALL_USER_FLAGS | UMODE_CCONN | UMODE_REJ |\
UMODE_FULL | UMODE_SPY | UMODE_DEBUG |\
UMODE_BOTS | UMODE_EXTERNAL |\
UMODE_UNAUTH | UMODE_LOCOPS )
/*
** m_flags
** parv[0] = sender prefix
** parv[1] = parameter
*/
static int
m_flags(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
int i, j;
int isadd;
int setflags;
int isgood;
char *p;
char *flag;
if(parc < 2)
{
/* Generate a list of what flags you have and what you are missing,
** and send it to the user
*/
sendto_one(source_p, ":%s NOTICE %s :Current flags:%s",
me.name, parv[0], set_flags_to_string(source_p));
sendto_one(source_p, ":%s NOTICE %s :Current missing flags:%s",
me.name, parv[0], unset_flags_to_string(source_p));
return 1;
}
/* Preserve the current flags */
setflags = source_p->umodes;
/* XXX - change this to support a multiple last parameter like ISON */
for(i = 1; i < parc; i++)
{
char *s = LOCAL_COPY(parv[i]);
for(flag = rb_strtok_r(s, " ", &p); flag; flag = rb_strtok_r(NULL, " ", &p))
{
/* We default to being in ADD mode */
isadd = 1;
/* We default to being in BAD mode */
isgood = 0;
if(!isalpha(flag[0]))
{
if(flag[0] == '-')
isadd = 0;
else if(flag[0] == '+')
isadd = 1;
flag++;
}
/* support ALL here */
if(!irccmp(flag, "ALL"))
{
if(isadd)
source_p->umodes |= FL_ALL_USER_FLAGS;
else
source_p->umodes &= ~FL_ALL_USER_FLAGS;
sendto_one(source_p, ":%s NOTICE %s :Current flags:%s",
me.name, parv[0], set_flags_to_string(source_p));
sendto_one(source_p, ":%s NOTICE %s :Current missing flags:%s",
me.name, parv[0], unset_flags_to_string(source_p));
send_umode_out(client_p, source_p, setflags);
return 1;
}
for(j = 0; flag_table[j].name; j++)
{
if(!flag_table[j].oper && !irccmp(flag, flag_table[j].name))
{
if(isadd)
source_p->umodes |= flag_table[j].mode;
else
source_p->umodes &= ~(flag_table[j].mode);
isgood = 1;
continue;
}
}
/* This for ended without matching a valid FLAG, here is where
** I want to operate differently than ircd-comstud, and just ignore
** the invalid flag, send a warning and go on.
*/
if(!isgood)
sendto_one(source_p, ":%s NOTICE %s :Invalid FLAGS: %s (IGNORING)",
me.name, parv[0], flag);
}
}
/* All done setting the flags, print the notices out to the user
** telling what flags they have and what flags they are missing
*/
sendto_one(source_p, ":%s NOTICE %s :Current flags:%s",
me.name, parv[0], set_flags_to_string(source_p));
sendto_one(source_p, ":%s NOTICE %s :Current missing flags:%s",
me.name, parv[0], unset_flags_to_string(source_p));
send_umode_out(client_p, source_p, setflags);
return 0;
}
/*
** mo_flags
** parv[0] = sender prefix
** parv[1] = parameter
*/
static int
mo_flags(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
int i, j;
int isadd;
int setflags;
int isgood;
char *p;
char *flag;
if(parc < 2)
{
/* Generate a list of what flags you have and what you are missing,
** and send it to the user
*/
sendto_one(source_p, ":%s NOTICE %s :Current flags:%s",
me.name, parv[0], set_flags_to_string(source_p));
sendto_one(source_p, ":%s NOTICE %s :Current missing flags:%s",
me.name, parv[0], unset_flags_to_string(source_p));
return 1;
}
/* Preserve the current flags */
setflags = source_p->umodes;
/* XXX - change this to support a multiple last parameter like ISON */
for(i = 1; i < parc; i++)
{
char *s = LOCAL_COPY(parv[i]);
for(flag = rb_strtok_r(s, " ", &p); flag; flag = rb_strtok_r(NULL, " ", &p))
{
/* We default to being in ADD mode */
isadd = 1;
/* We default to being in BAD mode */
isgood = 0;
if(!isalpha(flag[0]))
{
if(flag[0] == '-')
isadd = 0;
else if(flag[0] == '+')
isadd = 1;
flag++;
}
/* support ALL here */
if(!irccmp(flag, "ALL"))
{
if(isadd)
source_p->umodes |= FL_ALL_OPER_FLAGS;
else
source_p->umodes &= ~FL_ALL_OPER_FLAGS;
sendto_one(source_p, ":%s NOTICE %s :Current flags:%s",
me.name, parv[0], set_flags_to_string(source_p));
sendto_one(source_p, ":%s NOTICE %s :Current missing flags:%s",
me.name, parv[0], unset_flags_to_string(source_p));
send_umode_out(client_p, source_p, setflags);
return 1;
}
if(!irccmp(flag, "NICKCHANGES"))
{
if(!IsOperN(source_p))
{
sendto_one(source_p,
":%s NOTICE %s :*** You need oper and N flag for +n",
me.name, parv[0]);
continue;
}
if(isadd)
source_p->umodes |= UMODE_NCHANGE;
else
source_p->umodes &= ~UMODE_NCHANGE;
isgood = 1;
continue;
}
if(!irccmp(flag, "OWALLOPS"))
{
if(!IsOperOperwall(source_p))
{
sendto_one(source_p,
":%s NOTICE %s :*** You need oper and operwall flag for +z",
me.name, parv[0]);
continue;
}
if(isadd)
source_p->umodes |= UMODE_OPERWALL;
else
source_p->umodes &= ~UMODE_OPERWALL;
isgood = 1;
continue;
}
for(j = 0; flag_table[j].name; j++)
{
if(!irccmp(flag, flag_table[j].name))
{
if(isadd)
source_p->umodes |= flag_table[j].mode;
else
source_p->umodes &= ~(flag_table[j].mode);
isgood = 1;
continue;
}
}
/* This for ended without matching a valid FLAG, here is where
** I want to operate differently than ircd-comstud, and just ignore
** the invalid flag, send a warning and go on.
*/
if(!isgood)
sendto_one(source_p, ":%s NOTICE %s :Invalid FLAGS: %s (IGNORING)",
me.name, parv[0], flag);
}
}
/* All done setting the flags, print the notices out to the user
** telling what flags they have and what flags they are missing
*/
sendto_one(source_p, ":%s NOTICE %s :Current flags:%s",
me.name, parv[0], set_flags_to_string(source_p));
sendto_one(source_p, ":%s NOTICE %s :Current missing flags:%s",
me.name, parv[0], unset_flags_to_string(source_p));
send_umode_out(client_p, source_p, setflags);
return 0;
}
static char *
set_flags_to_string(struct Client *client_p)
{
/* XXX - list all flags that we have set on the client */
static char setflags[BUFSIZE + 1];
int i;
/* Clear it to begin with, we'll be doing a lot of rb_sprintf's */
setflags[0] = '\0';
/* Unlike unset_flags_to_string(), we don't have to care about oper
** flags and not showing them
*/
if(client_p->umodes & UMODE_OPERWALL)
{
rb_sprintf(setflags, "%s %s", setflags, "OWALLOPS");
}
for(i = 0; flag_table[i].name; i++)
{
if(client_p->umodes & flag_table[i].mode)
{
rb_sprintf(setflags, "%s %s", setflags, flag_table[i].name);
}
}
#if 0
if(IsOper(client_p) && IsOperN(client_p))
{
#endif
/* You can only be set +NICKCHANGES if you are an oper and
** IsOperN(client_p) is true
*/
if(client_p->umodes & UMODE_NCHANGE)
{
rb_sprintf(setflags, "%s %s", setflags, "NICKCHANGES");
}
#if 0
}
#endif
return setflags;
}
static char *
unset_flags_to_string(struct Client *client_p)
{
/* Inverse of above */
/* XXX - list all flags that we do NOT have set on the client */
static char setflags[BUFSIZE + 1];
int i, isoper;
/* Clear it to begin with, we'll be doing a lot of rb_sprintf's */
setflags[0] = '\0';
if(IsOper(client_p))
isoper = 1;
else
isoper = 0;
if(IsOper(client_p) && IsOperOperwall(client_p))
{
if(!(client_p->umodes & UMODE_OPERWALL))
{
rb_sprintf(setflags, "%s %s", setflags, "OWALLOPS");
}
}
for(i = 0; flag_table[i].name; i++)
{
if(!(client_p->umodes & flag_table[i].mode))
{
if(!isoper && flag_table[i].oper)
continue;
rb_sprintf(setflags, "%s %s", setflags, flag_table[i].name);
}
}
if(IsOper(client_p) && IsOperN(client_p))
{
if(!(client_p->umodes & UMODE_NCHANGE))
{
rb_sprintf(setflags, "%s %s", setflags, "NICKCHANGES");
}
}
return setflags;
}

View File

@ -0,0 +1,276 @@
/* contrib/m_force.c
* Copyright (C) 1996-2002 Hybrid Development Team
* Copyright (C) 2004-2012 ircd-ratbox Development Team
*
* 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.The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
*
* $Id: m_force.c 27381 2012-03-16 23:10:29Z dubkat $
*/
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "channel.h"
#include "class.h"
#include "client.h"
#include "common.h"
#include "match.h"
#include "ircd.h"
#include "hostmask.h"
#include "numeric.h"
#include "s_conf.h"
#include "s_newconf.h"
#include "s_log.h"
#include "send.h"
#include "hash.h"
#include "s_serv.h"
#include "parse.h"
#include "modules.h"
static int mo_forcejoin(struct Client *client_p, struct Client *source_p,
int parc, const char *parv[]);
static int mo_forcepart(struct Client *client_p, struct Client *source_p,
int parc, const char *parv[]);
struct Message forcejoin_msgtab = {
"FORCEJOIN", 0, 0, 0, MFLG_SLOW,
{mg_unreg, mg_not_oper, mg_ignore, mg_ignore, mg_ignore, {mo_forcejoin, 3}}
};
struct Message forcepart_msgtab = {
"FORCEPART", 0, 0, 0, MFLG_SLOW,
{mg_unreg, mg_not_oper, mg_ignore, mg_ignore, mg_ignore, {mo_forcepart, 3}}
};
mapi_clist_av1 force_clist[] = { &forcejoin_msgtab, &forcepart_msgtab, NULL };
DECLARE_MODULE_AV1(force, NULL, NULL, force_clist, NULL, NULL, "$Revision: 27381 $");
/*
* m_forcejoin
* parv[0] = sender prefix
* parv[1] = user to force
* parv[2] = channel to force them into
*/
static int
mo_forcejoin(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
struct Client *target_p;
struct Channel *chptr;
int type;
char mode;
char sjmode;
char *newch;
if(!IsOperAdmin(source_p))
{
sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "forcejoin");
return 0;
}
if((hunt_server(client_p, source_p, ":%s FORCEJOIN %s %s", 1, parc, parv)) != HUNTED_ISME)
return 0;
/* if target_p is not existant, print message
* to source_p and bail - scuzzy
*/
if((target_p = find_client(parv[1])) == NULL)
{
sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, source_p->name, parv[1]);
return 0;
}
if(!IsClient(target_p))
return 0;
/* select our modes from parv[2] if they exist... (chanop) */
if(*parv[2] == '@')
{
type = CHFL_CHANOP;
mode = 'o';
sjmode = '@';
}
else if(*parv[2] == '+')
{
type = CHFL_VOICE;
mode = 'v';
sjmode = '+';
}
else
{
type = CHFL_PEON;
mode = sjmode = '\0';
}
if(mode != '\0')
parv[2]++;
if((chptr = find_channel(parv[2])) != NULL)
{
if(IsMember(target_p, chptr))
{
/* debugging is fun... */
sendto_one(source_p, ":%s NOTICE %s :*** Notice -- %s is already in %s",
me.name, source_p->name, target_p->name, chptr->chname);
return 0;
}
add_user_to_channel(chptr, target_p, type);
sendto_server(target_p, chptr, NOCAPS, NOCAPS,
":%s SJOIN %ld %s + :%c%s",
me.name, (long)chptr->channelts,
chptr->chname, type ? sjmode : ' ', target_p->name);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s",
target_p->name, target_p->username,
target_p->host, chptr->chname);
if(type)
sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +%c %s",
me.name, chptr->chname, mode, target_p->name);
if(chptr->topic != NULL)
{
sendto_one(target_p, form_str(RPL_TOPIC), me.name,
target_p->name, chptr->chname, chptr->topic->topic);
sendto_one(target_p, form_str(RPL_TOPICWHOTIME),
me.name, source_p->name, chptr->chname,
chptr->topic->topic_info, chptr->topic->topic_time);
}
channel_member_names(chptr, target_p, 1);
}
else
{
newch = LOCAL_COPY(parv[2]);
if(!check_channel_name(newch))
{
sendto_one(source_p, form_str(ERR_BADCHANNAME), me.name,
source_p->name, (unsigned char *)newch);
return 0;
}
/* channel name must begin with & or # */
if(!IsChannelName(newch))
{
sendto_one(source_p, form_str(ERR_BADCHANNAME), me.name,
source_p->name, (unsigned char *)newch);
return 0;
}
/* newch can't be longer than CHANNELLEN */
if(strlen(newch) > CHANNELLEN)
{
sendto_one(source_p, ":%s NOTICE %s :Channel name is too long", me.name,
source_p->name);
return 0;
}
chptr = get_or_create_channel(target_p, newch, NULL);
add_user_to_channel(chptr, target_p, CHFL_CHANOP);
/* send out a join, make target_p join chptr */
sendto_server(target_p, chptr, NOCAPS, NOCAPS,
":%s SJOIN %ld %s +nt :@%s", me.name,
(long)chptr->channelts, chptr->chname, target_p->name);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s",
target_p->name, target_p->username,
target_p->host, chptr->chname);
chptr->mode.mode |= MODE_TOPICLIMIT;
chptr->mode.mode |= MODE_NOPRIVMSGS;
sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +nt", me.name, chptr->chname);
target_p->localClient->last_join_time = rb_current_time();
channel_member_names(chptr, target_p, 1);
/* we do this to let the oper know that a channel was created, this will be
* seen from the server handling the command instead of the server that
* the oper is on.
*/
sendto_one(source_p, ":%s NOTICE %s :*** Notice -- Creating channel %s", me.name,
source_p->name, chptr->chname);
}
return 0;
}
static int
mo_forcepart(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
struct Client *target_p;
struct Channel *chptr;
struct membership *msptr;
if(!IsOperAdmin(source_p))
{
sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "forcepart");
return 0;
}
if((hunt_server(client_p, source_p, ":%s FORCEPART %s %s", 1, parc, parv)) != HUNTED_ISME)
return 0;
/* if target_p == NULL then let the oper know */
if((target_p = find_client(parv[1])) == NULL)
{
sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, source_p->name, parv[1]);
return 0;
}
if(!IsClient(target_p))
return 0;
if((chptr = find_channel(parv[2])) == NULL)
{
sendto_one_numeric(source_p, ERR_NOSUCHCHANNEL,
form_str(ERR_NOSUCHCHANNEL), parv[1]);
return 0;
}
if((msptr = find_channel_membership(chptr, target_p)) == NULL)
{
sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL),
me.name, parv[0], parv[1], parv[2]);
return 0;
}
sendto_server(target_p, chptr, NOCAPS, NOCAPS,
":%s PART %s :%s", target_p->name, chptr->chname, target_p->name);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s PART %s :%s",
target_p->name, target_p->username,
target_p->host, chptr->chname, target_p->name);
remove_user_from_channel(msptr);
return 0;
}

View File

@ -0,0 +1,169 @@
/*
* m_mkpasswd.c: Encrypts a password online, DES or MD5.
*
* Copyright 2002 W. Campbell and the ircd-ratbox development team
* Based on mkpasswd.c, originally by Nelson Minar (minar@reed.edu)
*
* You can use this code in any way as long as these names remain.
*
* $Id: m_mkpasswd.c 28681 2015-10-02 16:49:39Z androsyn $
*/
/* List of ircd includes from ../include/ */
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "client.h"
#include "common.h"
#include "ircd.h"
#include "match.h"
#include "numeric.h"
#include "s_newconf.h"
#include "s_conf.h"
#include "s_log.h"
#include "s_serv.h"
#include "send.h"
#include "parse.h"
#include "modules.h"
#include <string.h>
extern char *crypt();
static int m_mkpasswd(struct Client *client_p, struct Client *source_p,
int parc, const char *parv[]);
static int mo_mkpasswd(struct Client *client_p, struct Client *source_p,
int parc, const char *parv[]);
static char *make_salt(void);
static char *make_md5_salt(void);
static char saltChars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./";
struct Message mkpasswd_msgtab = {
"MKPASSWD", 0, 0, 0, MFLG_SLOW,
{mg_unreg, {m_mkpasswd, 2}, mg_ignore, mg_ignore, mg_ignore, {mo_mkpasswd, 2}}
};
mapi_clist_av1 mkpasswd_clist[] = { &mkpasswd_msgtab, NULL };
DECLARE_MODULE_AV1(mkpasswd, NULL, NULL, mkpasswd_clist, NULL, NULL, "$Revision: 28681 $");
static int
m_mkpasswd(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
static time_t last_used = 0;
int is_md5 = 0;
if((last_used + ConfigFileEntry.pace_wait) > rb_current_time())
{
/* safe enough to give this on a local connect only */
sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, parv[0], "MKPASSWD");
return 0;
}
else
{
last_used = rb_current_time();
}
if(parc == 3)
{
if(!irccmp(parv[2], "MD5"))
{
is_md5 = 1;
}
else if(!irccmp(parv[2], "DES"))
{
/* Not really needed, but we may want to have a default encryption
* setting somewhere down the road
*/
is_md5 = 0;
}
else
{
sendto_one(source_p,
":%s NOTICE %s :MKPASSWD syntax error: MKPASSWD pass [DES|MD5]",
me.name, parv[0]);
return 0;
}
}
if(parc == 1)
sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, parv[0], "MKPASSWD");
else
sendto_one(source_p, ":%s NOTICE %s :Encryption for [%s]: %s",
me.name, parv[0], parv[1], crypt(parv[1],
is_md5 ? make_md5_salt() :
make_salt()));
return 0;
}
/*
** mo_test
** parv[0] = sender prefix
** parv[1] = parameter
*/
static int
mo_mkpasswd(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
int is_md5 = 0;
if(parc == 3)
{
if(!irccmp(parv[2], "MD5"))
{
is_md5 = 1;
}
else if(!irccmp(parv[2], "DES"))
{
/* Not really needed, but we may want to have a default encryption
* setting somewhere down the road
*/
is_md5 = 0;
}
else
{
sendto_one(source_p,
":%s NOTICE %s :MKPASSWD syntax error: MKPASSWD pass [DES|MD5]",
me.name, parv[0]);
return 0;
}
}
if(parc == 1)
sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, parv[0], "MKPASSWD");
else
sendto_one(source_p, ":%s NOTICE %s :Encryption for [%s]: %s",
me.name, parv[0], parv[1], crypt(parv[1],
is_md5 ? make_md5_salt() :
make_salt()));
return 0;
}
static char *
make_salt(void)
{
static char salt[3];
salt[0] = saltChars[rb_random() % 64];
salt[1] = saltChars[rb_random() % 64];
salt[2] = '\0';
return salt;
}
static char *
make_md5_salt(void)
{
static char salt[13];
int i;
salt[0] = '$';
salt[1] = '1';
salt[2] = '$';
for(i = 3; i < 11; i++)
salt[i] = saltChars[rb_random() % 64];
salt[11] = '$';
salt[12] = '\0';
return salt;
}

View File

@ -0,0 +1,146 @@
/* contrib/m_ojoin.c
* Copyright (C) 2002 Hybrid Development Team
* Copyright (C) 2004-2012 ircd-ratbox Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 1, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: m_ojoin.c 27381 2012-03-16 23:10:29Z dubkat $
*/
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "channel.h"
#include "client.h"
#include "ircd.h"
#include "numeric.h"
#include "s_log.h"
#include "s_serv.h"
#include "s_newconf.h"
#include "send.h"
#include "whowas.h"
#include "match.h"
#include "hash.h"
#include "parse.h"
#include "modules.h"
static int mo_ojoin(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
struct Message ojoin_msgtab = {
"OJOIN", 0, 0, 0, MFLG_SLOW,
{mg_unreg, mg_not_oper, mg_ignore, mg_ignore, mg_ignore, {mo_ojoin, 2}}
};
mapi_clist_av1 ojoin_clist[] = { &ojoin_msgtab, NULL };
DECLARE_MODULE_AV1(ojoin, NULL, NULL, ojoin_clist, NULL, NULL, "$Revision: 27381 $");
/*
** mo_ojoin
** parv[0] = sender prefix
** parv[1] = channel
*/
static int
mo_ojoin(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
struct Channel *chptr;
int move_me = 0;
/* admins only */
if(!IsOperAdmin(source_p))
{
sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "ojoin");
return 0;
}
/* XXX - we might not have CBURSTed this channel if we are a lazylink
* yet. */
if(*parv[1] == '@' || *parv[1] == '%' || *parv[1] == '+')
{
parv[1]++;
move_me = 1;
}
if((chptr = find_channel(parv[1])) == NULL)
{
sendto_one_numeric(source_p, ERR_NOSUCHCHANNEL,
form_str(ERR_NOSUCHCHANNEL), parv[1]);
return 0;
}
if(IsMember(source_p, chptr))
{
sendto_one(source_p, ":%s NOTICE %s :Please part %s before using OJOIN",
me.name, source_p->name, parv[1]);
return 0;
}
if(move_me == 1)
parv[1]--;
if(*parv[1] == '@')
{
add_user_to_channel(chptr, source_p, CHFL_CHANOP);
sendto_server(client_p, chptr, NOCAPS, NOCAPS,
":%s SJOIN %ld %s + :@%s",
me.name, (long)chptr->channelts, chptr->chname, source_p->name);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s",
source_p->name,
source_p->username, source_p->host, chptr->chname);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +o %s",
me.name, chptr->chname, source_p->name);
}
else if(*parv[1] == '+')
{
add_user_to_channel(chptr, source_p, CHFL_VOICE);
sendto_server(client_p, chptr, NOCAPS, NOCAPS,
":%s SJOIN %ld %s + :+%s",
me.name, (long)chptr->channelts, chptr->chname, source_p->name);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s",
source_p->name,
source_p->username, source_p->host, chptr->chname);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +v %s",
me.name, chptr->chname, source_p->name);
}
else
{
add_user_to_channel(chptr, source_p, CHFL_PEON);
sendto_server(client_p, chptr, NOCAPS, NOCAPS,
":%s SJOIN %ld %s + :%s",
me.name, (long)chptr->channelts, chptr->chname, source_p->name);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s",
source_p->name,
source_p->username, source_p->host, chptr->chname);
}
/* send the topic... */
if(chptr->topic != NULL)
{
sendto_one(source_p, form_str(RPL_TOPIC), me.name,
source_p->name, chptr->chname, chptr->topic->topic);
sendto_one(source_p, form_str(RPL_TOPICWHOTIME), me.name,
source_p->name, chptr->chname, chptr->topic->topic_info,
chptr->topic->topic_time);
}
source_p->localClient->last_join_time = rb_current_time();
channel_member_names(chptr, source_p, 1);
return 0;
}

View File

@ -0,0 +1,128 @@
/*
* ircd-ratbox: A slightly useful ircd.
* m_okick.c: Kicks a user from a channel with much prejudice.
*
* Copyright (C) 2002 by the past and present ircd coders, and others.
* Copyright (C) 2004-2012 ircd-ratbox Development 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 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
* $Id: m_okick.c 27381 2012-03-16 23:10:29Z dubkat $
*/
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "channel.h"
#include "client.h"
#include "match.h"
#include "ircd.h"
#include "numeric.h"
#include "send.h"
#include "modules.h"
#include "parse.h"
#include "hash.h"
#include "packet.h"
#include "s_serv.h"
static int mo_okick(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
struct Message okick_msgtab = {
"OKICK", 0, 0, 0, MFLG_SLOW,
{mg_unreg, mg_not_oper, mg_ignore, mg_ignore, mg_ignore, {mo_okick, 4}}
};
mapi_clist_av1 okick_clist[] = { &okick_msgtab, NULL };
DECLARE_MODULE_AV1(okick, NULL, NULL, okick_clist, NULL, NULL, "$Revision: 27381 $");
/*
** m_okick
** parv[0] = sender prefix
** parv[1] = channel
** parv[2] = client to kick
** parv[3] = kick comment
*/
static int
mo_okick(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
struct Client *who;
struct Client *target_p;
struct Channel *chptr;
struct membership *msptr;
int chasing = 0;
char *comment;
char *name;
char *p = NULL;
char *user;
static char buf[BUFSIZE];
if(*parv[2] == '\0')
{
sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, parv[0], "KICK");
return 0;
}
if(MyClient(source_p) && !IsFloodDone(source_p))
flood_endgrace(source_p);
comment = (EmptyString(LOCAL_COPY(parv[3]))) ? LOCAL_COPY(parv[2]) : LOCAL_COPY(parv[3]);
if(strlen(comment) > (size_t)REASONLEN)
comment[REASONLEN] = '\0';
*buf = '\0';
if((p = strchr(parv[1], ',')))
*p = '\0';
name = LOCAL_COPY(parv[1]);
chptr = find_channel(name);
if(!chptr)
{
sendto_one_numeric(source_p, ERR_NOSUCHCHANNEL, form_str(ERR_NOSUCHCHANNEL), name);
return 0;
}
if((p = strchr(parv[2], ',')))
*p = '\0';
user = LOCAL_COPY(parv[2]); // strtoken(&p2, parv[2], ",");
if(!(who = find_chasing(source_p, user, &chasing)))
{
return 0;
}
if((target_p = find_client(user)) == NULL)
{
sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, parv[0], user);
return 0;
}
if((msptr = find_channel_membership(chptr, target_p)) == NULL)
{
sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL),
me.name, parv[0], parv[1], parv[2]);
return 0;
}
sendto_channel_local(ALL_MEMBERS, chptr, ":%s KICK %s %s :%s",
me.name, chptr->chname, who->name, comment);
sendto_server(&me, chptr, NOCAPS, NOCAPS,
":%s KICK %s %s :%s", me.name, chptr->chname, who->name, comment);
remove_user_from_channel(msptr);
return 0;
}

View File

@ -0,0 +1,148 @@
/*
* ircd-ratbox: A slightly useful ircd.
* m_olist.c: List channels. olist is an oper only command
* that shows channels regardless of modes. This
* is kinda evil, and might be morally wrong, but
* somebody will likely need it.
*
* Copyright (C) 2002 by the past and present ircd coders, and others.
* Copyright (C) 2004-2012 ircd-ratbox Development 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 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
* $Id: m_olist.c 27381 2012-03-16 23:10:29Z dubkat $
*/
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "channel.h"
#include "client.h"
#include "ircd.h"
#include "numeric.h"
#include "s_log.h"
#include "s_serv.h"
#include "send.h"
#include "whowas.h"
#include "match.h"
#include "hash.h"
#include "parse.h"
#include "modules.h"
#include "s_newconf.h"
static int mo_olist(struct Client *, struct Client *, int parc, const char *parv[]);
#ifndef STATIC_MODULES
struct Message olist_msgtab = {
"OLIST", 0, 0, 0, MFLG_SLOW,
{mg_unreg, mg_not_oper, mg_ignore, mg_ignore, mg_ignore, {mo_olist, 1}}
};
mapi_clist_av1 olist_clist[] = { &olist_msgtab, NULL };
DECLARE_MODULE_AV1(okick, NULL, NULL, olist_clist, NULL, NULL, "$Revision: 27381 $");
#endif
static void list_all_channels(struct Client *source_p);
static void list_named_channel(struct Client *source_p, const char *name);
/*
** mo_olist
** parv[0] = sender prefix
** parv[1] = channel
*/
static int
mo_olist(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
if(IsOperSpy(source_p))
{
/* If no arg, do all channels *whee*, else just one channel */
if(parc < 2 || EmptyString(parv[1]))
{
report_operspy(source_p, "LIST", NULL);
list_all_channels(source_p);
}
else
{
report_operspy(source_p, "LIST", parv[1]);
list_named_channel(source_p, parv[1]);
}
}
sendto_one(source_p, form_str(RPL_LISTEND), me.name, source_p->name);
return 0;
}
/*
* list_all_channels
* inputs - pointer to client requesting list
* output - 0/1
* side effects - list all channels to source_p
*/
static void
list_all_channels(struct Client *source_p)
{
struct Channel *chptr;
rb_dlink_node *ptr;
sendto_one(source_p, form_str(RPL_LISTSTART), me.name, source_p->name);
RB_DLINK_FOREACH(ptr, global_channel_list.head)
{
chptr = ptr->data;
sendto_one(source_p, form_str(RPL_LIST),
me.name, source_p->name, chptr->chname,
rb_dlink_list_length(&chptr->members),
chptr->topic == NULL ? "" : chptr->topic->topic);
}
return;
}
/*
* list_named_channel
* inputs - pointer to client requesting list
* output - 0/1
* side effects - list all channels to source_p
*/
static void
list_named_channel(struct Client *source_p, const char *name)
{
struct Channel *chptr;
char *p;
char *n = LOCAL_COPY(name);
sendto_one(source_p, form_str(RPL_LISTSTART), me.name, source_p->name);
if((p = strchr(n, ',')))
*p = '\0';
if(EmptyString(n))
{
sendto_one_numeric(source_p, ERR_NOSUCHCHANNEL, form_str(ERR_NOSUCHCHANNEL), n);
return;
}
if((chptr = find_channel(n)) == NULL)
sendto_one_numeric(source_p, ERR_NOSUCHCHANNEL, form_str(ERR_NOSUCHCHANNEL), n);
else
sendto_one(source_p, form_str(RPL_LIST), me.name, source_p->name,
chptr->chname, rb_dlink_list_length(&chptr->members),
chptr->topic ? chptr->topic->topic : "");
}

View File

@ -0,0 +1,117 @@
/* contrib/m_opme.c
* Copyright (C) 2002 Hybrid Development Team
* Copyright (C) 2004-2012 ircd-ratbox development team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 1, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: m_opme.c 27371 2012-03-16 05:33:15Z dubkat $
*/
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "channel.h"
#include "client.h"
#include "ircd.h"
#include "numeric.h"
#include "s_log.h"
#include "s_serv.h"
#include "send.h"
#include "whowas.h"
#include "match.h"
#include "hash.h"
#include "parse.h"
#include "modules.h"
#include "s_newconf.h"
static int mo_opme(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
struct Message opme_msgtab = {
"OPME", 0, 0, 0, MFLG_SLOW,
{mg_unreg, mg_not_oper, mg_ignore, mg_ignore, mg_ignore, {mo_opme, 2}}
};
mapi_clist_av1 opme_clist[] = { &opme_msgtab, NULL };
DECLARE_MODULE_AV1(opme, NULL, NULL, opme_clist, NULL, NULL, "$Revision: 27371 $");
/*
** mo_opme
** parv[0] = sender prefix
** parv[1] = channel
*/
static int
mo_opme(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
struct Channel *chptr;
struct membership *msptr;
rb_dlink_node *ptr;
/* admins only */
if(!IsOperAdmin(source_p))
{
sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "opme");
return 0;
}
if((chptr = find_channel(parv[1])) == NULL)
{
sendto_one_numeric(source_p, ERR_NOSUCHCHANNEL,
form_str(ERR_NOSUCHCHANNEL), parv[1]);
return 0;
}
RB_DLINK_FOREACH(ptr, chptr->members.head)
{
msptr = ptr->data;
if(is_chanop(msptr))
{
sendto_one(source_p, ":%s NOTICE %s :%s Channel is not opless",
me.name, parv[0], parv[1]);
return 0;
}
}
msptr = find_channel_membership(chptr, source_p);
if(msptr == NULL)
return 0;
msptr->flags |= CHFL_CHANOP;
sendto_wallops_flags(UMODE_WALLOP, &me,
"OPME called for [%s] by %s!%s@%s",
parv[1], source_p->name, source_p->username, source_p->host);
ilog(L_MAIN, "OPME called for [%s] by %s!%s@%s",
parv[1], source_p->name, source_p->username, source_p->host);
/* dont send stuff for local channels remotely. */
if(*chptr->chname != '&')
{
sendto_server(NULL, NULL, NOCAPS, NOCAPS,
":%s WALLOPS :OPME called for [%s] by %s!%s@%s",
me.name, parv[1], source_p->name, source_p->username, source_p->host);
sendto_server(NULL, chptr, NOCAPS, NOCAPS, ":%s PART %s", source_p->name, parv[1]);
sendto_server(NULL, chptr, NOCAPS, NOCAPS,
":%s SJOIN %ld %s + :@%s",
me.name, (long)chptr->channelts, parv[1], source_p->name);
}
sendto_channel_local(ALL_MEMBERS, chptr,
":%s MODE %s +o %s", me.name, parv[1], source_p->name);
return 0;
}

View File

@ -0,0 +1,142 @@
/*
* ircd-ratbox: A slightly useful ircd.
* m_webirc.c: Makes CGI:IRC users appear as coming from their real host
*
* Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
* Copyright (C) 1996-2002 Hybrid Development Team
* Copyright (C) 2002-2012 ircd-ratbox development 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 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
*
* $Id: m_webirc.c 27371 2012-03-16 05:33:15Z dubkat $
*/
/* Usage:
* auth {
* user = "webirc@<cgiirc ip>"; # if identd used, put ident username instead
* password = "<password>"; # encryption possible
* spoof = "webirc."
* class = "users";
* };
* Possible flags:
* encrypted - password is encrypted (recommended)
* kline_exempt - k/g lines on the cgiirc ip are ignored
* gline_exempt - glines on the cgiirc ip are ignored
* dlines are checked on the cgiirc ip (of course).
* k/d/g/x lines, auth blocks, user limits, etc are checked using the
* real host/ip.
* The password should be specified unencrypted in webirc_password in
* cgiirc.config
*/
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "client.h" /* client struct */
#include "hostmask.h"
#include "reject.h"
#include "send.h" /* sendto_one */
#include "numeric.h" /* ERR_xxx */
#include "ircd.h" /* me */
#include "parse.h"
#include "match.h"
#include "modules.h"
#include "s_serv.h"
#include "hash.h"
#include "s_conf.h"
static int mr_webirc(struct Client *, struct Client *, int, const char **);
struct Message webirc_msgtab = {
"WEBIRC", 0, 0, 0, MFLG_SLOW | MFLG_UNREG,
{{mr_webirc, 5}, mg_reg, mg_ignore, mg_ignore, mg_ignore, mg_reg}
};
mapi_clist_av1 webirc_clist[] = { &webirc_msgtab, NULL };
DECLARE_MODULE_AV1(webirc, NULL, NULL, webirc_clist, NULL, NULL, "$Revision: 27371 $");
/*
* mr_webirc - webirc message handler
* parv[0] = sender prefix
* parv[1] = password
* parv[2] = fake username (we ignore this)
* parv[3] = fake hostname
* parv[4] = fake ip
*/
static int
mr_webirc(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
struct ConfItem *aconf;
const char *encr;
if(!strchr(parv[4], '.') && !strchr(parv[4], ':'))
{
sendto_one(source_p, "NOTICE * :Invalid IP");
return 0;
}
aconf = find_address_conf(client_p->host, client_p->sockhost,
IsGotId(client_p) ? client_p->username : "webirc",
(struct sockaddr *)&client_p->localClient->ip,
client_p->localClient->ip.ss_family);
if(aconf == NULL || !(aconf->status & CONF_CLIENT))
return 0;
if(!IsConfDoSpoofIp(aconf) || irccmp(aconf->info.name, "webirc."))
{
/* XXX */
sendto_one(source_p, "NOTICE * :Not a CGI:IRC auth block");
return 0;
}
if(EmptyString(aconf->passwd))
{
sendto_one(source_p, "NOTICE * :CGI:IRC auth blocks must have a password");
return 0;
}
if(EmptyString(parv[1]))
encr = "";
else if(IsConfEncrypted(aconf))
encr = crypt(parv[1], aconf->passwd);
else
encr = parv[1];
if(strcmp(encr, aconf->passwd))
{
sendto_one(source_p, "NOTICE * :CGI:IRC password incorrect");
return 0;
}
rb_strlcpy(source_p->sockhost, parv[4], sizeof(source_p->sockhost));
if(strlen(parv[3]) <= HOSTLEN)
rb_strlcpy(source_p->host, parv[3], sizeof(source_p->host));
else
rb_strlcpy(source_p->host, source_p->sockhost, sizeof(source_p->host));
rb_inet_pton_sock(parv[4], (struct sockaddr *)&source_p->localClient->ip);
/* Check dlines now, k/glines will be checked on registration */
if((aconf = find_dline((struct sockaddr *)&source_p->localClient->ip)))
{
if(!(aconf->status & CONF_EXEMPTDLINE))
{
exit_client(client_p, source_p, &me, "D-lined");
return 0;
}
}
sendto_one(source_p, "NOTICE * :CGI:IRC host/IP set to %s %s", parv[3], parv[4]);
return 0;
}

View File

@ -0,0 +1,49 @@
/*
* ircd-ratbox: A slightly useful ircd.
* spy_admin_notice.c: Sends a notice when someone uses ADMIN.
*
* Copyright (C) 2002 by the past and present ircd coders, and others.
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
* $Id: spy_admin_notice.c 26094 2008-09-19 15:33:46Z androsyn $
*/
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
void show_admin(hook_data *);
mapi_hfn_list_av1 admin_hfnlist[] = {
{"doing_admin", (hookfn) show_admin},
{NULL, NULL}
};
DECLARE_MODULE_AV1(admin_spy, NULL, NULL, NULL, NULL, admin_hfnlist, "$Revision: 26094 $");
void
show_admin(hook_data * data)
{
sendto_realops_flags(UMODE_SPY, L_ALL,
"admin requested by %s (%s@%s) [%s]",
data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
}

View File

@ -0,0 +1,49 @@
/*
* ircd-ratbox: A slightly useful ircd.
* spy_info_notice.c: Sends a notice when someone uses INFO.
*
* Copyright (C) 2002 by the past and present ircd coders, and others.
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
* $Id: spy_info_notice.c 26094 2008-09-19 15:33:46Z androsyn $
*/
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
void show_info(hook_data *);
mapi_hfn_list_av1 info_hfnlist[] = {
{"doing_info", (hookfn) show_info},
{NULL, NULL}
};
DECLARE_MODULE_AV1(info_spy, NULL, NULL, NULL, NULL, info_hfnlist, "$Revision: 26094 $");
void
show_info(hook_data * data)
{
sendto_realops_flags(UMODE_SPY, L_ALL,
"info requested by %s (%s@%s) [%s]",
data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
}

View File

@ -0,0 +1,51 @@
/*
* ircd-ratbox: A slightly useful ircd.
* spy_links_notice.c: Sends a notice when someone uses LINKS.
*
* Copyright (C) 2002 by the past and present ircd coders, and others.
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
* $Id: spy_links_notice.c 26094 2008-09-19 15:33:46Z androsyn $
*/
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
void show_links(hook_data *);
mapi_hfn_list_av1 links_hfnlist[] = {
{"doing_links", (hookfn) show_links},
{NULL, NULL}
};
DECLARE_MODULE_AV1(links_spy, NULL, NULL, NULL, NULL, links_hfnlist, "$Revision: 26094 $");
void
show_links(hook_data * data)
{
const char *mask = data->arg1;
sendto_realops_flags(UMODE_SPY, L_ALL,
"LINKS '%s' requested by %s (%s@%s) [%s]",
mask, data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
}

View File

@ -0,0 +1,49 @@
/*
* ircd-ratbox: A slightly useful ircd.
* spy_motd_notice.c: Sends a notice when someone uses MOTD.
*
* Copyright (C) 2002 by the past and present ircd coders, and others.
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
* $Id: spy_motd_notice.c 26094 2008-09-19 15:33:46Z androsyn $
*/
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
void show_motd(hook_data *);
mapi_hfn_list_av1 motd_hfnlist[] = {
{"doing_motd", (hookfn) show_motd},
{NULL, NULL}
};
DECLARE_MODULE_AV1(motd_spy, NULL, NULL, NULL, NULL, motd_hfnlist, "$Revision: 26094 $");
void
show_motd(hook_data * data)
{
sendto_realops_flags(UMODE_SPY, L_ALL,
"motd requested by %s (%s@%s) [%s]",
data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
}

View File

@ -0,0 +1,72 @@
/*
* ircd-ratbox: A slightly useful ircd.
* spy_stats_notice.c: Sends a notice when someone uses STATS.
*
* Copyright (C) 2002 by the past and present ircd coders, and others.
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
* $Id: spy_stats_notice.c 26094 2008-09-19 15:33:46Z androsyn $
*/
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "match.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
void show_stats(hook_data_int *);
mapi_hfn_list_av1 stats_hfnlist[] = {
{"doing_stats", (hookfn) show_stats},
{NULL, NULL}
};
DECLARE_MODULE_AV1(stats_spy, NULL, NULL, NULL, NULL, stats_hfnlist, "$Revision: 26094 $");
void
show_stats(hook_data_int * data)
{
char statchar = (char)data->arg2;
if(statchar == 'L' || statchar == 'l')
{
const char *name = data->arg1;
if(!EmptyString(name))
sendto_realops_flags(UMODE_SPY, L_ALL,
"STATS %c requested by %s (%s@%s) [%s] on %s",
statchar, data->client->name,
data->client->username,
data->client->host, data->client->servptr->name, name);
else
sendto_realops_flags(UMODE_SPY, L_ALL,
"STATS %c requested by %s (%s@%s) [%s]",
statchar, data->client->name,
data->client->username,
data->client->host, data->client->servptr->name);
}
else
{
sendto_realops_flags(UMODE_SPY, L_ALL,
"STATS %c requested by %s (%s@%s) [%s]",
statchar, data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
}
}

View File

@ -0,0 +1,49 @@
/*
* ircd-ratbox: A slightly useful ircd.
* spy_stats_p_notice.c: Sends a notice when someone uses STATS p.
*
* Copyright (C) 2002 by the past and present ircd coders, and others.
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
* $Id: spy_stats_p_notice.c 26094 2008-09-19 15:33:46Z androsyn $
*/
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
void show_stats_p(hook_data *);
mapi_hfn_list_av1 stats_p_hfnlist[] = {
{"doing_stats_p", (hookfn) show_stats_p},
{NULL, NULL}
};
DECLARE_MODULE_AV1(stats_p_spy, NULL, NULL, NULL, NULL, stats_p_hfnlist, "$Revision: 26094 $");
void
show_stats_p(hook_data * data)
{
sendto_realops_flags(UMODE_SPY, L_ALL,
"STATS p requested by %s (%s@%s) [%s]",
data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
}

View File

@ -0,0 +1,57 @@
/*
* ircd-ratbox: A slightly useful ircd.
* spy_whois_notice.c: Sends a notice when someone uses WHOIS.
*
* Copyright (C) 2002 by the past and present ircd coders, and others.
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
* $Id: spy_whois_notice.c 26094 2008-09-19 15:33:46Z androsyn $
*/
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
void show_whois(hook_data_client *);
mapi_hfn_list_av1 whois_hfnlist[] = {
{"doing_whois", (hookfn) show_whois},
{NULL, NULL}
};
DECLARE_MODULE_AV1(whois_spy, NULL, NULL, NULL, NULL, whois_hfnlist, "$Revision: 26094 $");
void
show_whois(hook_data_client * data)
{
struct Client *source_p = data->client;
struct Client *target_p = data->target;
/* source being MyConnect() is implicit here from m_whois.c --fl */
if(MyClient(target_p) && IsOper(target_p) && (source_p != target_p) &&
(target_p->umodes & UMODE_SPY))
{
sendto_one(target_p,
":%s NOTICE %s :*** Notice -- %s (%s@%s) is doing a whois on you [%s]",
me.name, target_p->name, source_p->name,
source_p->username, source_p->host, source_p->servptr->name);
}
}

View File

@ -0,0 +1,57 @@
/*
* ircd-ratbox: A slightly useful ircd.
* spy_whois_notice.c: Sends a notice when someone uses WHOIS.
*
* Copyright (C) 2002 by the past and present ircd coders, and others.
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
* $Id: spy_whois_notice_global.c 26094 2008-09-19 15:33:46Z androsyn $
*/
#include "stdinc.h"
#include "ratbox_lib.h"
#include "struct.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
void show_whois_global(hook_data_client *);
mapi_hfn_list_av1 whois_global_hfnlist[] = {
{"doing_whois_global", (hookfn) show_whois_global},
{NULL, NULL}
};
DECLARE_MODULE_AV1(whois_global_spy, NULL, NULL, NULL, NULL, whois_global_hfnlist,
"$Revision: 26094 $");
void
show_whois_global(hook_data_client * data)
{
struct Client *source_p = data->client;
struct Client *target_p = data->target;
if(MyClient(target_p) && IsOper(target_p) && (source_p != target_p) &&
(target_p->umodes & UMODE_SPY))
{
sendto_one(target_p,
":%s NOTICE %s :*** Notice -- %s (%s@%s) is doing a whois on you [%s]",
me.name, target_p->name, source_p->name,
source_p->username, source_p->host, source_p->servptr->name);
}
}

526
ircd-ratbox-3.0.10/depcomp Executable file
View File

@ -0,0 +1,526 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2004-04-25.13
# Copyright (C) 1999, 2000, 2003, 2004 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., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit 0
;;
-v | --v*)
echo "depcomp $scriptversion"
exit 0
;;
esac
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# `libtool' can also be set to `yes' or `no'.
if test -z "$depfile"; then
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
dir=`echo "$object" | sed 's,/.*$,/,'`
if test "$dir" = "$object"; then
dir=
fi
# FIXME: should be _deps on DOS.
depfile="$dir.deps/$base"
fi
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# Dependencies are output in .lo.d with libtool 1.4.
# They are output in .o.d with libtool 1.5.
tmpdepfile1="$dir.libs/$base.lo.d"
tmpdepfile2="$dir.libs/$base.o.d"
tmpdepfile3="$dir.libs/$base.d"
"$@" -Wc,-MD
else
tmpdepfile1="$dir$base.o.d"
tmpdepfile2="$dir$base.d"
tmpdepfile3="$dir$base.d"
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
if test -f "$tmpdepfile1"; then
tmpdepfile="$tmpdepfile1"
elif test -f "$tmpdepfile2"; then
tmpdepfile="$tmpdepfile2"
else
tmpdepfile="$tmpdepfile3"
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@ -0,0 +1,316 @@
$Id: CIDR.txt 23020 2006-09-01 18:20:19Z androsyn $
CIDR Information
----------------
Presently, we all use IPv4. The format of IPv4 is the following:
A.B.C.D
Where letters 'A' through 'D' are 8-bit values. In English, this
means each digit can have a value of 0 to 255. Example:
129.56.4.234
Digits are called octets. Oct meaning 8, hence 8-bit values. An
octet cannot be greater than 255, and cannot be less than 0 (eg. a
negative number).
CIDR stands for "classless inter domain routing", details covered
in RFC's 1518 and 1519. It was introduced mainly due to waste within
A and B classes space. The goal was to make it possible to use
smaller nets than it would seem from (above) IP classes, for instance
by dividing one B class into 256 "C like" classes. The other goal was
to allow aggregation of routing information, so that routers could use
one aggregated route (like 194.145.96.0/20) instead of
advertising 16 C classes.
Class A are all these addresses which first bit is "0",
bitmap: 0nnnnnnn.hhhhhhhh.hhhhhhhh.hhhhhhhh (n=net, h=host)
IP range is 0.0.0.0 - 127.255.255.255
Class B are all these addresses which first two bits are "10",
bitmap: 10nnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh (n=net, h=host)
IP range is 128.0.0.0 - 191.255.255.255
Class C are all these addresses which first three bits are "110",
bitmap: 110nnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh (n=net, h=host)
IP range is 192.0.0.0 - 223.255.255.255
Class D are all these addresses which first four bits are "1110",
this is multicast class and net/host bitmap doesn't apply here
IP range is 224.0.0.0 - 239.255.255.255
I bet they will never IRC, unless someone creates multicast IRC :)
Class E are all these addresses which first five bits are "11110",
this class is reserved for future use
IP range is 240.0.0.0 - 247.255.255.255
So, here is how CIDR notation comes into play.
For those of you who have real basic exposure to how networks are
set up, you should be aware of the term "netmask." Basically, this
is a IPv4 value which specifies the "size" of a network. You can
assume the word "size" means "range" if you want.
A chart describing the different classes in CIDR format and their
wildcard equivalents would probably help at this point:
CIDR version dot notation (netmask) Wildcard equivalent
-----------------------------------------------------------------
A.0.0.0/8 A.0.0.0/255.0.0.0 A.*.*.* or A.*
A.B.0.0/16 A.B.0.0/255.255.0.0 A.B.*.* or A.B.*
A.B.C.0/24 A.B.C.0/255.255.255.0 A.B.C.* or A.B.C.*
A.B.C.D/32 A.B.C.D/255.255.255.255 A.B.C.D
The question on any newbies mind at this point is "So what do all
of those values & numbers actually mean?"
Everything relating to computers is based on binary values (1s and
zeros). Binary plays a *tremendous* role in CIDR notation. Let's
break it down to the following table:
A B C D
-------- -------- -------- --------
/8 == 11111111 . 00000000 . 00000000 . 00000000 == 255.0.0.0
/16 == 11111111 . 11111111 . 00000000 . 00000000 == 255.255.0.0
/24 == 11111111 . 11111111 . 11111111 . 00000000 == 255.255.255.0
/32 == 11111111 . 11111111 . 11111111 . 11111111 == 255.255.255.255
The above is basically a binary table for the most common netblock
sizes. The "1"s you see above are the 8-bit values for each octet.
If you split an 8-bit value into each of it's bits, you find the
following:
00000000
^^^^^^^^_ 1sts place (1)
|||||||__ 2nds place (2)
||||||___ 3rds place (4)
|||||____ 4ths place (8)
||||_____ 5ths place (16)
|||______ 6ths place (32)
||_______ 7ths place (64)
|________ 8ths place (128)
Now, since computers consider zero a number, you pretty much have
to subtract one (so-to-speak; this is not really how its done, but
just assume it's -1 :-) ) from all the values possible. Some
examples of decimal values in binary:
15 == 00001111 (from left to right: 8+4+2+1)
16 == 00010000 (from left to right: 16)
53 == 00110101 (from left to right: 32+16+4+1)
79 == 01001111 (from left to right: 64+8+4+1)
254 == 11111110 (from left to right: 128+64+32+16+8+4+2)
So, with 8 bits, the range (as I said before) is zero to 255.
If none of this is making sense to you at this point, you should
back up and re-read all of the above. I realize it's a lot, but
it'll do you some good to re-read it until you understand :-).
So, let's modify the original table a bit by providing CIDR info
for /1 through /8:
A B C D
-------- -------- -------- --------
/1 == 10000000 . 00000000 . 00000000 . 00000000 == 128.0.0.0
/2 == 11000000 . 00000000 . 00000000 . 00000000 == 192.0.0.0
/3 == 11100000 . 00000000 . 00000000 . 00000000 == 224.0.0.0
/4 == 11110000 . 00000000 . 00000000 . 00000000 == 240.0.0.0
/5 == 11111000 . 00000000 . 00000000 . 00000000 == 248.0.0.0
/6 == 11111100 . 00000000 . 00000000 . 00000000 == 252.0.0.0
/7 == 11111110 . 00000000 . 00000000 . 00000000 == 254.0.0.0
/8 == 11111111 . 00000000 . 00000000 . 00000000 == 255.0.0.0
At this point, all of this should making a lot of sense, and you
should be able to see the precision that you can get by using CIDR
at this point. If not, well, I guess the best way to put it would
be that wildcards always assume /8, /16, or /24 (yes hello Piotr,
we can argue this later: I am referring to IPs *ONLY*, not domains
or FQDNs :-) ).
This table will provide a reference to all of the IPv4 CIDR values
cidr|netmask (dot notation)
----+---------------------
/1 | 128.0.0.0
/2 | 192.0.0.0
/3 | 224.0.0.0
/4 | 240.0.0.0
/5 | 248.0.0.0
/6 | 252.0.0.0
/7 | 254.0.0.0
/8 | 255.0.0.0
/9 | 255.128.0.0
/10 | 255.192.0.0
/11 | 255.224.0.0
/12 | 255.240.0.0
/13 | 255.248.0.0
/14 | 255.252.0.0
/15 | 255.254.0.0
/16 | 255.255.0.0
/17 | 255.255.128.0
/18 | 255.255.192.0
/19 | 255.255.224.0
/20 | 255.255.240.0
/21 | 255.255.248.0
/22 | 255.255.252.0
/23 | 255.255.254.0
/24 | 255.255.255.0
/25 | 255.255.255.128
/26 | 255.255.255.192
/27 | 255.255.255.224
/28 | 255.255.255.240
/29 | 255.255.255.248
/30 | 255.255.255.252
/31 | 255.255.255.254
/32 | 255.255.255.255
So, let's take all of the information above, and apply it to a
present-day situation on IRC.
Let's say you have a set of flooding clients who all show up from
the following hosts. For lack-of a better example, I'll use a
subnet here at Best:
nick1 (xyz@shell9.ba.best.com) [206.184.139.140]
nick2 (abc@shell8.ba.best.com) [206.184.139.139]
nick3 (foo@shell12.ba.best.com) [206.184.139.143]
Most people will assume the they were all in the same class C
(206.184.139.0/24 or 206.184.139.*).
This, as a matter of fact, is not true. Now, the reason *I* know
this is solely because I work on the network here; those IPs are
not delegated to a class C, but two portions of a class C (128 IPs
each). That means the class C is actually split into these two
portions:
Netblock IP range
-------- --------
206.184.139.0/25 206.184.139.0 to 206.184.139.127
206.184.139.128/25 206.184.139.128 to 206.184.139.255
For the record, 206.184.139.0 and 206.184.139.128 are both known as
"network addresses" (not to be confused with "netblocks" or "Ethernet
hardware addresses" or "MAC addresses"). Network addresses are
*ALWAYS EVEN*.
206.184.139.127 and 206.184.139.255 are what are known as broadcast
addresses. Broadcast addresses are *ALWAYS ODD*.
Now, the aforementioned list of clients are in the 2nd subnet shown
above, not the first. The reason for this should be obvious.
The remaining question is, "Well that's nice, you know what the netblock
is for Best. What about us? We don't know that!"
Believe it or not, you can find out the network block size by using
whois -h WHOIS.ARIN.NET on the IP in question. ARIN keeps a list of
all network blocks and who owns them -- quite useful, trust me. I
think I use ARIN 5 or 6 times a day, especially when dealing with
D-lines. Example:
$ whois -h whois.arin.net 206.184.139.140
Best Internet Communications, Inc. (NETBLK-NBN-206-184-BEST)
345 East Middlefield Road
Mountain View, CA 94043
Netname: NBN-206-184-BEST
Netblock: 206.184.0.0 - 206.184.255.255
Maintainer: BEST
Does this mean you should D-line 206.184.0.0/16? Probably not.
That's an entire class B-sized block, while you're only trying
to deny access to a subnetted class C.
So then how do you get the *real* info? Well, truth is, you don't.
You have to pretty much take a guess at what it is, if ARIN reports
something that's overly vague. Best, for example, was assigned the
above class B-sized block. We can subnet it however we want without
reporting back to ARIN how we have it subnetted. We own the block,
and that's all that matters (to ARIN).
Not all subnets are like this, however. Smaller subnets you may
find partitioned and listed on ARIN; I've seen /29 blocks for DSL
customers show up in ARIN before.
So, use ARIN any chance you get. The more precision the better!
Now, there is a small issue I want to address regarding use of CIDR
notation. Let's say you D-line the following in CIDR format (hi
sion ;-) ):
205.100.132.18/24
Entries like this really makes my blood boil, solely because it adds
excessive confusion and is just basically pointless. If you
examine the above, you'll see the /24 is specifying an entire
class C -- so then what's the purpose of using .18 versus .0?
There IS no purpose. The netmask itself will mask out the .18 and
continue to successfully use 205.100.132.0/24.
Doing things this way just adds confusion, especially on non-octet-
aligned subnets (such as /8, /16, /24, or /32). Seeing that on a
/27 or a /19 might make people go "wtf?"
I know for a fact this doc lacks a lot of necessary information,
like how the actual netmask/CIDR value play a role in "masking out"
the correct size, and what to do is WHOIS.ARIN.NET returns no
netblock information but instead a few different company names with
NIC handles. I'm sure you can figure this stuff out on your own,
or just ask an administrator friend of yours who DOES know. A lot
of us admins are BOFH types, but if you ask us the right questions,
you'll benefit from the answer quite thoroughly.
Oh, I almost forgot. Most Linux systems use a different version of
"whois" than FreeBSD does. The syntax for whois on Linux is
"whois <INFO>@whois.arin.net", while under FreeBSD it is
"whois -h whois.arin.net <INFO>" Debian uses yet another version
of whois that is incompatible with the above syntax options.
Note that the FreeBSD whois client has shortcuts for the most commonly
used whois servers. "whois -a <INFO>" is the shortcut for ARIN.
Also note that ARIN is not authoritative for all IP blocks on the
Internet. Take for example 212.158.123.66. A whois query to ARIN
will return the following information:
$ whois -h whois.arin.net 212.158.123.66
European Regional Internet Registry/RIPE NCC (NET-RIPE-NCC-)
These addresses have been further assigned to European users.
Contact information can be found in the RIPE database, via the
WHOIS and TELNET servers at whois.ripe.net, and at
http://www.ripe.net/db/whois.html
Netname: RIPE-NCC-212
Netblock: 212.0.0.0 - 212.255.255.255
Maintainer: RIPE
This query tells us that it is a European IP block, and is further
handled by RIPE's whois server. We must then query whois.ripe.net
to get more information.
$ whois -h whois.ripe.net 212.158.123.66
% Rights restricted by copyright. See
http://www.ripe.net/ripencc/pub-services/db/copyright.html
inetnum: 212.158.120.0 - 212.158.123.255
netname: INSNET-P2P
descr: Point to Point Links for for London Nodes
country: GB
--snip--
This tells us the actual IP block that the query was a part of.
Other whois servers that you may see blocks referred to are:
whois.ripn.net for Russia, whois.apnic.net for Asia, Australia, and
the Pacific, and whois.6bone.net for IPv6 blocks.
Contributed by Jeremy Chadwick <jdc@best.net>
Piotr Kucharski <chopin@sgh.waw.pl>
W. Campbell <wcampbel@botbay.net> and
Ariel Biener <ariel@fireball.tau.ac.il>

View File

@ -0,0 +1,58 @@
$Id: Hybrid-team 23287 2006-11-26 00:54:54Z jilles $
The hybrid team is a group of ircd coders who were frustrated
with the instability and all-out "dirtiness" of the EFnet ircd's
available. "hybrid" is the name for the collective efforts of a group
of people, all of us.
Anyone is welcome to contribute to this effort. You are encouraged
to participate in the Hybrid mailing list. To subscribe to the
Hybrid List, send email to listmanager@the-project.org with the
subject "subscribe hybrid".
The core team as, of this major release:
A1kmm, Andrew Miller <a1kmm@mware.virtualave.net>
adrian, Adrian Chadd <adrian@creative.net.au>
AndroSyn, Aaron Sethman <androsyn@ratbox.org>
billy-jon, Bill Jonus <bill@mu.org>
cosine, Patrick Alken <wnder@uwns.underworld.net>
David-T, David Taylor <davidt@yadt.co.uk>
Dianora, Diane Bruce <db@db.net>
einride, Erik S. Johansen, <einride@einride.org>
fl, Lee Hardy <lee@leeh.co.uk>
Hwy101, W. Campbell <wcampbel@botbay.net>
larne, Edward Brocklesby <ejb@sdf.lonestar.org>
isomer, Perry Lorier <perry@coders.net>
jmallett, Juli Mallett <jmallett@FreeBSD.org>
k9, Jeremy Chadwick <yoshi@parodius.com>
Rodder, Jon Lusky <lusky@blown.net>
toot, Toby Verrall <to7@antipope.fsnet.co.uk>
Wohali, Joan Touzet <joant@ieee.org>
xyst, Greg Prosser <gnp@arrogant.org>
The following people have contributed blood, sweat, and/or code to
this release of hybrid, in nick alphabetical order:
adx, Piotr Nizynski <adx@crashnet.pl>
bysin, Ben Kittridge <bkittridge@cfl.rr.com>
desrt, Ryan Lortie <desertangel@mindless.com>
Habeeb, David Supuran <habeeb@cfl.rr.com>
jv, Jakub Vlasek <jv@pilsedu.cz>
kre, Dinko Korunic <kreator@fly.srk.fer.hr>
madmax, Paul Lomax <madmax@efnet.org>
Neph|l|m, Adel Mezibra <adel@cybercable.fr>
Riedel, Dennis Vink, <vink@vuurwerk.nl>
Robert Alan Byer <byer@mail.ourservers.net>
scuzzy, David Todd <scuzzy@aniverse.net>
spookey, David Colburn <spookey@spookey.org>
vulture, Sean Stanek <vulture@cs.iastate.edu>
vx0, Mark Miller <mark@oc768.net>
zb^3, Alfred Perlstein <alfred@freebsd.org>
Others are welcome. Always. And if we left anyone off the above list,
be sure to let us know that too. Many others have contributed to
previous versions of this ircd and it's ancestors, too many to list
here.
Send bug fixes/complaints/rotten tomatoes to ircd-hybrid@the-project.org.

View File

@ -0,0 +1,58 @@
# $Id: Makefile.in 26636 2009-07-28 15:01:11Z androsyn $
CC = @CC@
INSTALL = @INSTALL@
INSTALL_BIN = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SUID = @INSTALL_PROGRAM@ -o root -m 4755
MV = @MV@
RM = @RB_RM@
CP = @CP@
TOUCH = @TOUCH@
prefix = @prefix@
exec_prefix = @exec_prefix@
exec_suffix = @exec_suffix@
bindir = @bindir@
libexecdir = @libexecdir@
confdir = @confdir@
localstatedir = @localstatedir@
CONFS = example.conf example.efnet.conf
install-mkdirs:
-@if test ! -d $(DESTDIR)$(confdir); then \
echo "mkdir -p $(confdir)"; \
mkdir $(DESTDIR)$(confdir); \
fi
install: install-mkdirs build
@echo "ircd: installing example config files ($(CONFS))"
@for i in $(CONFS); do \
if test -f $(DESTDIR)$(confdir)/$$i; then \
$(MV) $(DESTDIR)$(confdir)/$$i $(DESTDIR)$(confdir)/$$i.old; \
fi; \
$(INSTALL_DATA) $$i $(DESTDIR)$(confdir); \
done
-@if test ! -f $(DESTDIR)$(confdir)/ircd.motd; then \
echo "ircd: installing motd file (ircd.motd)"; \
$(INSTALL_DATA) ircd.motd $(DESTDIR)$(confdir); \
fi
$(INSTALL_BIN) genssl.sh $(DESTDIR)$(confdir)
-@if test -f $(DESTDIR)$(confdir)/links.txt; then \
$(RM) $(DESTDIR)$(confdir)/links.txt; \
fi
all:
build:
clean:
depend:
lint:
distclean:
$(RM) -f Makefile

View File

@ -0,0 +1,17 @@
$Id: README.cidr_bans 23020 2006-09-01 18:20:19Z androsyn $
Basically what this patch does is allow for users to use cidr masks when
setting bans, exceptions, and invite invex(modes beI respectively). This
works for both IPv4 and IPv6 addresses.
I won't go into details of how cidr works here, but to use them, you could
do something like:
/mode #foo +b *!*@10.0.0.0/8
/mode #foo +e *!*@10.0.10.0/24
Aaron Sethman <androsyn@ratbox.org>
August 06, 2002

View File

@ -0,0 +1,272 @@
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"

View File

@ -0,0 +1,86 @@
------------------------------------------------------
- Oper Challenge/Response System Documentation -
- Copyright (C) 2006 Lee Hardy <lee -at- leeh.co.uk> -
- Copyright (C) 2006-2012 ircd-ratbox development team -
------------------------------------------------------
The challenge/response system allows the ability to oper though public key
authentication, without the insecurity of oper passwords.
The challenge system documented here was redesigned in ircd-ratbox-2.2 and
is not compatible with earlier versions.
This document does not describe the technical details of the challenge
system. If you are reading this as part of the ircd distribution, the
programs referred to are contained in ratbox-respond, see
http://respond.ircd-ratbox.org for more information and downloads.
- Challenge basics -
--------------------
When a user requests a challenge to oper up, the ircd takes some random
data, encodes it using the opers public key, encodes this output in base64
and sends it to the user as a challenge. The server then stores a hash of
the original random data.
The user must then decrypt the data using their private key and generate a
hash of the decrypted data. Then the hash is base64 encoded and sent back
to the server.
If the stored hash the server has matches the reply from the client, they
are opered up.
- Generating a public/private keypair -
---------------------------------------
The first step is to use the makekeypair script to generate a public and
private key. The public key is set in the ircd config (operator {};
rsa_public_key_file) instead of a password, and the private key should
be kept secret. It is highly recommended that the key is generated with
a secure password. Generating keys without a password is fundamentally
insecure.
The commands used in makekeypair to generate keys are as follows:
openssl genrsa -out private.key -aes256 2048
openssl rsa -in private.key -out public.key -pubout
If aes256 is not available, the following is used instead:
openssl genrsa -out private.key -des3 2048
- Building ratbox-respond -
---------------------------
If you are using the unix based ratbox-respond this must be built. For the
windows version, ratbox-winrespond, please see http://respond.ircd-ratbox.org
ratbox-respond takes the challenge from the server, and together with your
private key file generates a response to be sent back. ratbox-respond
requires the openssl headers (ie, development files) and openssl libraries
are installed for compilation.
Change into the ratbox-respond directory, and run:
./configure
make
This will generate a 'ratbox-respond' binary, which you may place wherever
you like. If configure does not detect your openssl installation, you may
pass it the directory where it is installed to via --enable-openssl, this
should be the base directory which has lib/ and include/openssl/ within it:
./configure --enable-openssl=/path/to/opensslbase
- Opering up -
--------------
Once you have your public key set in ircd and built ratbox-respond, you oper
up by issuing "/challenge <opername>". You should then run:
/path/to/ratbox-respond /path/to/private.key
and input the challenge. This will give you a response to paste back to the
server. The ratbox-respond binary also accepts piped input, see
ratbox-respond/README for more information.
A number of scripts for clients have already been written to automate this
process, see client-scripts/README for more information.
--
$Id: challenge.txt 27371 2012-03-16 05:33:15Z dubkat $

View File

@ -0,0 +1,49 @@
Nick collision FNC
Jilles Tjoelker <jilles -at- stack.nl>
--------------------------------------
Nick collision FNC performs a forced nick change to the user's UID instead
of a kill. The criteria for which user may keep the nick are the same as
before. Server notices will say the clients are being "saved" instead of
"killed". The client will get a 043 numeric, like this:
:<server> 043 <nick> <uid> :Nick collision, forcing nick change to your unique ID
The following conditions must be fulfilled:
- All servers on the network must allow remote nicks starting with a digit.
This is not checked; if this is not fulfilled, users will be killed right
after being FNCed.
- All servers on the path between the two clients must support TS6 and
nick collision FNC (SAVE capab). If this is not fulfilled, the collision is
resolved with kills as before. (This uses the ENCAP GCAP data for remotes.)
- The general::collision_fnc option must be enabled on the server(s) that
detect the collision.
Technical details:
The following message is used to propagate the nick change coming from the
server that detected the collision:
:<sid> SAVE <uid> <ts>
The TS is compared to the current nick TS for the user; if it is not equal,
the message is dropped. This prevents nick desyncs if the user changed their
nick after being collided. A SAVE message also generates a server notice to
+k.
The SAVE message is used for propagation to the target's server, and also
in several other cases if the destination supports SAVE. In other cases, a
normal nick change or introduction with the UID as nick is sent.
If the SAVETS_100 capab is also present, the TS of the UID nick is 100. This is
necessary to ensure nick TS is always the same on all servers for each
nick-user pair, also if a user with a UID nick changes their nick but is
collided again (the server detecting the collision will not propagate the nick
change further). If the SAVETS_100 capab is not present, this document leaves
the TS of the UID nick undefined; warnings will be given about this.
--
$Id: collision_fnc.txt 24738 2007-12-18 19:48:01Z jilles $

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,46 @@
#!/bin/sh
# Simple and straight forward openssl cert generator for ircd-ratbox
# Copyright (C) 2008-2012 ircd-ratbox development team
# $Id: genssl.sh 29251 2015-12-18 17:15:54Z androsyn $
if [ $# -eq 0 ]; then
echo
echo "usage: $0 <IRC_SERVER_NAME> [<LENGTH_IN_DAYS_KEYS_ARE_VALID>]"
echo " default lenth of time keys are valid is 365 days."
echo
exit 1;
fi
SERVER="$1"
DAYS_VALID="$2"
SSL_DAYS_VALID="365"
if [ "$DAYS_VALID" -gt "365" ]; then
SSL_DAYS_VALID="$DAYS_VALID"
fi
echo
echo "Generating 2048-bit self-signed RSA key for ${SERVER}... "
openssl req -new -newkey rsa:2048 -sha256 -days ${SSL_DAYS_VALID} -nodes -x509 -keyout ${SERVER}.pem -out ${SERVER}.pem
echo "Done creating self-signed cert"
echo -n "Generating DH parameters file... "
openssl dhparam -out dh.pem 2048
echo "Done."
echo
echo "Your SSL keys for ${SERVER} are valid for ${SSL_DAYS_VALID} days."
echo "If you wish to increase the number of days, run:"
echo " $0 ${SERVER} <NUMBER_OF_DAYS>"
echo
echo "Move ${SERVER}.pem and dh.pem to your ircd config directory if necessary."
echo "Adjust ircd.conf to reflect any changes."
echo "Your serverinfo {} block should contain the following (adjust paths accordingly)"
echo
echo "ssl_private_key = \"`pwd`/${SERVER}.pem\";"
echo "ssl_cert = \"`pwd`/${SERVER}.pem\";"
echo "ssl_dh_params = \"`pwd`/dh.pem\";"
echo
exit 0

View File

@ -0,0 +1,92 @@
Hook documentation - <lee -at- leeh.co.uk>
------------------------------------------
Documentation on how to actually develop code to use hooks is contained in
contrib/example_module.c, this document simply describes which hooks are
available.
There are various hook structures available that may be passed to hooks:
hook_data - struct Client *client; const void *arg1;
const void *arg2;
hook_data_int - struct Client *client; const void *arg1; int arg2;
hook_data_client - struct Client *client; struct Client *target;
hook_data_channel - struct Client *client; struct Channel *chptr;
Spy Hooks
---------
The following spy hooks are called only when the request is handled by the
local server. They will not be called if the command is being sent remotely
for another server to handle:
"doing_admin" - Passes hook_data:
hdata->client = client requesting ADMIN
"doing_info" - Passes hook_data:
hdata->client = client requesting INFO
"doing_links" - Passes hook_data:
hdata->client = client doing LINKS
(const char *) hdata->arg1 = optional mask
"doing_motd" - Passes hook_data:
hdata->client = client doing MOTD
"doing_stats" - Passes hook_data_int:
hdata->client = client doing STATS
(const char *) hdata->arg1 = optional stats l target
(char) hdata->arg2 = statchar being requested
"doing_stats_p" - Passes hook_data:
hdata->client = client doing STATS p
"doing_trace" - Passes hook_data_client:
hdata->client = client doing TRACE
hdata->target = optional target of TRACE
"doing_whois" - Passes hook_data_client:
hdata->client = local client doing WHOIS
hdata->target = target of WHOIS
"doing_whois_global" - Passes hook_data_client:
hdata->client = remote client doing WHOIS
hdata->target = target of WHOIS
Netburst Hooks
--------------
The following burst hooks are called when we are sending a netburst to a
server.
"burst_client" - Sent after we have just burst a user.
Passes hook_data_client:
hdata->client = server we are bursting to
hdata->target = user we have just burst
"burst_channel" - Sent after we have just burst a channel.
Passes hook_data_channel:
hdata->client = server we are bursting to
hdata->chptr = channel we have just burst
"burst_finished" - Sent after we have just finished bursting users/chans
Passes hook_data_client:
hdata->client = server we are bursting to
Server Hooks
------------
The following hooks are called during server connects/exits.
"server_introduced" - Sent after a server is introduced to the network,
local or remote.
Passes hook_data_client:
hdata->client = uplink server (&me if local)
hdata->target = server being introduced
The following are for debugging and take struct hook_io_data for arguments.
These can be used for a variety of purposes, but are aimed at the developer
community.
"iosend"
"iorecv"
"iorecvctrl"
$Id: hooks.txt 23020 2006-09-01 18:20:19Z androsyn $

View File

@ -0,0 +1,29 @@
# $Id: index.txt 23020 2006-09-01 18:20:19Z androsyn $
Here is the overview of the documents in the doc/ directory.
CIDR.txt - Description of CIDR in IPv4
Tao-of-IRC.940110 - No comment...
challenge.txt - Overview of the challenge/response system for
obtaining operator status
example.conf - An example ircd.conf file describing most of the
user settable options
guidelines.txt - Documentation guidelines
hooks.txt - Overview of the hooks available
index.txt - This file
ircd.8 - The new revised manpage, read with the following
commands in the prefix directory:
man -M . ircd
ircd.motd - A default ircd.motd used by make install
logfiles.txt - Description of formatting of some logfiles
modeg.txt - An in depth description of the server side silence
user mode (+g)
modes.txt - A list of all user and channel modes
operguide.txt - EFnet operator's guide
opermyth.txt - Oper myth's, describes what opers can and cannot do
server-version-info - Overview of the flags shown in /version
whats-new.txt - What new features are available
Also in the contrib/ directory you will find:
example_module.c - An example module, detailing what the code in a module
does. Useful for building your own modules.

View File

@ -0,0 +1,2 @@
This is ircd-ratbox MOTD you might replace it, but if not your friends will
laugh at you.

View File

@ -0,0 +1,38 @@
#!/bin/sh
#
# IRCD-RATBOX Crontab Script
# Copyright (C) 2009-2012 ircd-ratbox development team
# $Id: ircd_crontab.sh 27371 2012-03-16 05:33:15Z dubkat $
# You will want to change this to the root directory your IRCD runs from
IRCD_PATH="/home/user/ircd"
# The location of your pid file, relative to IRCD_PATH (you can probably leave this alone)
PID_FILE="etc/ircd.pid"
# run: crontab -e
#
# To have the script run every minute, type this:
#
# * * * * * /path/to/ircd_crontab.sh
#
# To have the script run every 5 minutes, type this:
# */5 * * * * ~/path/to/ircd_crontab.sh
#
# Leave the rest alone.
test -x "${IRCD_PATH}/bin/ircd" || exit 1
if [ -f "${IRCD_PATH}/${PID_FILE}" ] ; then
PID=`cat "${IRCD_PATH}/${PID_FILE}"`
if kill -0 $PID >/dev/null 2>&1 ; then
exit 0;
fi
rm -f "${IRCD_PATH}/${PID_FILE}"
fi
${IRCD_PATH}/bin/ircd -conftest &>/dev/null && ${IRCD_PATH}/bin/ircd
exit $?;

View File

@ -0,0 +1,36 @@
ircd-ratbox logfiles - Lee H <lee -at- leeh.co.uk>
$Id: logfiles.txt 23020 2006-09-01 18:20:19Z androsyn $
---------------------------
fname_killlog
-------------
<date> <time> <token> <source> <target> <targets server> <reason>
Where token is one of:
L = local oper, local target
G = local oper, remote target
R = remote oper, remote target
O = remote oper, local target
S = server
fname_glinelog
--------------
<date> <time> <token> <src nick> <src username> <src host> <src server> <user> <host> <reason>
Where token is one of:
R = gline request
T = gline trigger, always by previous three requests
fname_klinelog
--------------
<date> <time> [U]<token> <source> <time> <info> <reason>[|<oper_reason>]
Time is always in minutes, 0 for permanent
If 'U' is specified before token, it is a removal rather than an addition.
Token is one of:
K = kline
D = dline
X = xline
R = resv

View File

@ -0,0 +1,140 @@
User Mode +g Documentation
Hybrid 7 includes a new and power feature that all users can take advantage
of to help prevent flooding and unwanted messages. This new feature is
invoked by setting user mode +g. When a client is set +g, that user will
be in "Caller ID" mode. Any user that messages a +g client will receive
a notice saying that they are in +g (server side ignore) mode. The target
client (who is set +g) will also receive a notice saying that so and so
messaged them, and that they are in +g mode.
The target of the message will only receive one notification per minute, from
any client, in order to help prevent flooding. The sender will NOT have the
rate limit, and will receive a notice saying the target is in +g mode every
time they send a message. Note that this behavior is similar to the way AWAY
messages are done.
There are numerous benefits for both opers and regular users, including the
ability to stop spambot messages from ever reaching your client, stopping
private message and CTCP floods, and being able to sit on IRC in privacy.
One question that arises is how to message specific users, while blocking
out everyone else. The command ACCEPT is your answer. To add a user to
your accept list, issue the raw command ACCEPT <nick>,<nick>,<nick>,...
You will not receive a reply from the ACCEPT command if it is succesful,
only if an error has occured. There are three possible errors, shown by
numerics:
ERR_ACCEPTFULL (456): :irc.server 456 client :Accept list is full
- This is sent when an accept list is full.
ERR_ACCEPTEXIST (457): :irc.server 457 client target :already exists
- This is sent when a client tries to add a user to the accept list
that already exists there
ERR_ACCEPTNOT (458): :irc.server 458 client target :doesnt exist
- This is sent when a client tries to remove a user from their accept
list who is not on the accept list.
That user will now be able to send messages to your client until the
association is broken.
Associations break in one of the following situations: when an accepted user
QUIT's (or is on the other side of a split), you QUIT, or the accepted user
changes their nick. The reason why a remote user's nick change will remove
them from your accept list is so that you cannot track a user after they
changed their nick.
Viewing the accept list is also very easy. Issue the raw command ACCEPT *.
Removing a user from your accept list is also simple. Issue the command
ACCEPT -<nick>.
Sample Session
The easiest way to see how this works is by experiencing it. Seeing a sample
session can help understand what goes on though.
Client Hwy-LL is set +g initially.
Client Hwy101 wants to message Hwy-LL
Note that some clients may have to use /quote ACCEPT instead of /accept.
--
Client Hwy101: /msg Hwy-LL hi
Hwy101 will see: -Hwy-LL- *** I'm in +g mode (server side ignore).
-Hwy-LL- *** I've been informed you messaged me.
Hwy-LL will see: Client Hwy101 [wcampbel@admin.irc.monkie.org] is messaging
you and you are +g
The sender will receive the NOTICE from the target of the message, while
the recipient will receive the NOTICE from the server.
--
If Hwy101 sends another message to Hwy-LL (before the minute expires), he will
see: -Hwy-LL- *** I'm in +g mode (server side ignore).
and will not receive the second notice
Hwy-LL will NOT see any notice.
--
Hwy-LL now wishes to see messages from Hwy101 and SpamBot
Client Hwy-LL: /accept Hwy101,SpamBot
Neither side will be told of the change in the accept list, Hwy-LL should
presume that the accept was succesful if no error occurs.
Now Hwy-LL can see messages from Hwy101 and SpamBot without any blockage.
If Hwy101 was also set +g, then he would have to issue /accept Hwy-LL
before he would be able to see messages from Hwy-LL.
--
Hwy-LL now wants to see who is on his accept list.
Client Hwy-LL: /accept *
Hwy-LL will see:
irc.server 281 Hwy-LL Hwy101 SpamBot
irc.server 282 Hwy-LL :End of /ACCEPT list
The replies are in numeric form to help parsing by scripts.
--
Hwy-LL realises he added a spambot to his list, and wants to remove it, and
allow messages from services
Client Hwy-LL: /accept -SpamBot,services
Hwy-LL will now only accept messages from Hwy101 and services.
--
The nicks to be added can be in ANY order, however you cannot add or remove
AND list.
/ACCEPT x,y,-z,f,-a would be acceptable.
/ACCEPT x,y,-z,* would ignore the * and generate an invalid nick
response.
Like Dalnet and Undernet's SILENCE system, the accept list only exists while
you are connected to IRC. In order for you to have the same accept list
every time you come onto IRC, you must put the accept commands into your
client's auto-perform, or manually issue the commands each time.
This system may seem similar to the SILENCE system, but it is actually a
reverse SILENCE. SILENCE ignores certain users and allows the rest. Mode
+g ignores all users except certain ones (on your accept list.) Both systems
have their place, but the mode +g in Hybrid 7 is what the developers thought
would be most useful for clients.
The goals of this user mode is to provide protection from flooding and
spamming, and to provide users with a means to keep their privacy.
We hope that these goals are obtained.
--
W. Campbell
$Id: modeg.txt 23020 2006-09-01 18:20:19Z androsyn $

View File

@ -0,0 +1,57 @@
irc.corefailure.com hybrid-7beta5 oiwszcerkfydnxbaugl biklmnopstveIha bkloveIh
User Modes:
+a - admin - Admin status. Shown as an admin in WHOIS, able to
load and unload modules, and see IP's in STATS c
+b - bots - See bot and drone flooding notices
+c - cconn - Client connection/quit notices
+d - debug - See debugging notices
+f - full - See I: line full notices
+g - callerid - Server Side Ignore
+i - invisible - Not shown in NAMES or WHO unless you share a
a channel
+k - skill - See server generated KILL messages
+l - locops - See LOCOPS messages
+n - nchange - See client nick changes
+o - oper - Operator status
+r - rej - See rejected client notices
+s - servnotice - See general server notices
+u - unauth - See unauthorised client notices
+w - wallop - See server generated WALLOPS
+x - external - See remote server connection and split notices
+y - spy - See LINKS, STATS (if configured), TRACE notices
+z - operwall - See oper generated WALLOPS
+D - deaf - Ignore all PRIVMSG's sent to channels
+Z - operspy - See operspy notices
Channel Modes:
+b - ban - Channel ban on nick!user@host
+e - exempt - Exemption from bans
+I - invex - Invite exceptions, nick!user@host does not need to be
explicitly INVITE'd into the channel before being able
JOIN
+i - invite - Invite only
+k - key - Key/password for the channel.
+l - limit - Limit the number of users in a channel
+m - moderated - Users without +v/h/o cannot send text to the channel
+n - noexternal - Users must be in the channel to send text to it
+o - chanop - Full operator status
+p - private - Private is obsolete, this now restricts KNOCK, and can be
set at the same time as +s.
+r - registered - Users must be registered with services to JOIN (enabled only
if compiled with --enable-services)
+s - secret - The channel does not show up on NAMES or LIST or in the
WHOIS channel list unless you are a member of the channel
+t - topic - Only chanops can change the topic
+v - voice - Can speak in a moderated channel, and is exempt from flood
restrictions
+S - ssl only - Requires SSL/TLS connections to join
The third part of the 004 numeric lists channel modes that require arguments.
Currently these are bkloveIh.
Note that most of the channel modes can be disabled in the conf file for
networks that do not wish to support them.
# $Id: modes.txt 25103 2008-03-10 16:52:47Z androsyn $

View File

@ -0,0 +1,117 @@
MONITOR - Protocol for notification of when clients become online/offline
Lee Hardy <lee -at- leeh.co.uk>
$Id: monitor.txt 23973 2007-06-30 22:28:55Z jilles $
-------------------------------------------------------------------------
Currently, ISON requests by clients use a large amount of bandwidth. It is
expected that it is more efficient for this to be done by the server at the
expense of cpu cycles. The WATCH implementation that was designed to counter
this is (in my opinion) severely flawed. This protocol was designed to
provide a cleaner implementation.
The command used throughout this specification is "MONITOR".
Each use of the MONITOR command takes a special modifier, indicating
the operation being performed. The client MUST NOT attempt to specify
more than one modifier. Only one special modifier may be used per MONITOR
command.
Thus it is impossible to combine additions to the list with removals from
the list -- these MUST be done with two seperate commands.
A client MUST NOT issue the MONITOR command more than once per second.
Any attempts to do so will generate an error.
In commands and numerics where multiple nicknames may occur, the length of
the nickname list is limited only by the buffer size of 512 chars, as
defined in RFC1459.
Support of this specification is indicated by the MONITOR token in
RPL_ISUPPORT (005). This token takes an optional parameter, of the maximum
amount of nicknames a client may have in their monitor list. If no
parameter is specified, there is no limit. A typical token would be:
MONITOR=100
MONITOR + nick[,nick2]*
-----------------------
Adds the given list of nicknames to the list of nicknames being monitored.
If any of the nicknames being added are online, the server will generate
RPL_MONONLINE numerics listing those nicknames that are online.
If any of the nicknames being added are offline, the server will generate
RPL_MONOFFLINE numerics listing those nicknames that are offline.
MONITOR - nick[,nick2]*
-----------------------
Removes the given list of nicknames from the list of nicknames being
monitored. No output will be returned for use of this command.
MONITOR C
---------
Clears the list of nicknames being monitored. No output will be returned
for use of this command.
MONITOR L
---------
Outputs the current list of nicknames being monitored. All output will use
RPL_MONLIST, and the output will be terminated with RPL_ENDOFMONLIST
MONITOR S
---------
Outputs for each nickname in the list being monitored, whether the client is
online or offline. All nicks that are online will be sent using
RPL_MONONLINE, all nicks that are offline will be sent using RPL_MONOFFLINE.
The list will be terminated with RPL_ENDOFMONLIST.
Numeric replies
---------------
730 - RPL_MONONLINE
-------------------
:<server> 730 <nick> :nick!user@host[,nick!user@host]*
This numeric is used to indicate to a client that either a nickname has just
become online, or that a nickname they have added to their monitor list is
online.
The server may send "*" instead of the target nick (<nick>). (This makes it
possible to send the exact same message to all clients monitoring a certain
nick.)
731 - RPL_MONOFFLINE
--------------------
:<server> 731 <nick> :nick[,nick1]*
This numeric is used to indicate to a client that either a nickname has just
left the irc network, or that a nickname they have added to their monitor
list is offline.
The argument is a chained list of nicknames that are offline.
As with 730 the server may send "*" instead of the target nick.
732 - RPL_MONLIST
-----------------
:<server> 732 <nick> :nick[,nick1]*
This numeric is used to indicate to a client the list of nicknames they have
in their monitor list.
733 - RPL_ENDOFMONLIST
------------------------
:<server> 733 <nick> :End of MONITOR list
This numeric is used to indicate to a client the end of a monitor list.
734 - ERR_MONLISTFULL
---------------------
:<server> 734 <nick> <limit> <nicks> :Monitor list is full.
This numeric is used to indicate to a client that their monitor list is
full, so the command failed. The <limit> parameter is the maximum number of
nicknames a client may have in their list, the <nicks> parameter is the list
of nicknames, as the client sent them, that cannot be added.

View File

@ -0,0 +1,137 @@
/************************************************************************
* 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.
jarlek@ifi.uio.no added mail functions to irc.
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. :)
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>

View File

@ -0,0 +1,368 @@
EFnet Oper Guide
Last update: 02-21-2002
Written and maintained by Riedel
E-Mail: dennisv@vuurwerk.nl
1. Commands you should know about
2. The client of your choice
3. Your primary responsibilities
4. Re-routing
4.1 Re-routing other servers and remote connects
5. Kills and klines
6. Kill and K-Line requests
7. Happy birthday!
8. Security
9. Know who your friends are
10. The TCM bot
11. Services
12. G-Lines
1. Commands you should know about
This is no longer covered here. IRCD-hybrid is changing too rapidly, so
this section would be outdated in no time ;) For an up-to-date version,
please download the latest hybrid at www.ircd-hybrid.org.
2. The client of your choice
There are many IRC clients around for a wide variety of operating systems.
Being an IRC Operator doesn't *require* you to use a UNIX client, however
I personally prefer UNIX-based clients. If you're familiar with UNIX and
use UNIX for opering, I suggest ircII / epic. There are a lot of scripts
available for those two clients, and it's not that hard to write scripts
yourself to suite your needs. It is important that you know how to operate
your client, and familiarize yourself with the options and features. For
whatever client you chose this goes for any of them: You should be in
control of your client, instead of the client being in control of you.
Resources :
www.mirc.co.uk - mIRC (MS-Windows)
www.irchelp.org - a variety of clients and scripts
ftp.blackened.com - several UNIX based clients available
3. Your primary responsibilities
As an IRC Operator, you're responsible for maintaining the server on a
real-time basis. You represent your server, and you represent the network.
Irresponsible / rude / offensive / stupid behavior may discredit your server
and the network. You should focus on the task you were chosen for...
maintainance. Sounds simple, no? It means getting rid of users that abuse
the service, enforcing the server's policy and keeping the server linked.
Users will ask you questions, and expect you to know all the answers.. after
all, you're the oper!
Be prepared for users trying to fool you, sweet talk you into things you
don't want, lie and deceive. Most users are handling in good faith...
however, the abusers have learned how to manipulate opers. They have studied
the alien creature 'oper' for ages like biologists study animals. Be
paranoid, be curious and be suspicious. I can't stress the importancy of that
often enough.
Second priority has the network. You were not chosen to maintain the network
but you were chosen to maintain the server. However, you may want to be able
to reroute servers. If you see something broken, don't be afraid to fix it.
If you do, be sure you fix things and don't make it worse. Before you
step into routing, be sure you've familiarized yourself with the network's
topology, and be confident enough to perform such actions. (re)routing is
covered in the next chapter.
Opers on the network depend on a trusting relationship. You can usually take
the word from an oper. Other opers are considered -trusted-, however, there
are exceptions. Sometimes even opers lie to opers to get things done. Don't
be afraid to ask for proof of a certain statement, such as logs.
This doesn't mean you distrust the oper in question, but -you- and you alone
are responsible for your actions. You call the shots on your server, unless
your admin says otherwise.
4. Re-routing
Re-routing is not hard, and it's not scary but it is important that you do it
right. The commands you'll use are SQUIT and CONNECT. First, a very simple
example. Let's say your server, irc.yourserver.com is lagged to it's uplink,
irc.uplink.com and you want to reroute your server. You have to think about
where you want your server to be linked, and you have to time your reroute.
An example topology :
irc.yourserver.com ---- irc.uplink.com
| | \
B C D
/ \
E F
/ \
G H --- O
/ | \ | \
I J K L M
\
N
In this case, you're uplinked by irc.uplink.com
irc.uplink.com also hubs B, C and D. Server B functions as hub for E and F;
F hubs G and H; H hubs L, M and O. G hubs I, J and K. M hubs N.
Your server is allowed to connect to server B, F and G. So you consider the
servers you're able to connect to. Is the lag caused by a server that uplinks
irc.uplink.com ? Use /stats ? irc.uplink.com to determine lag to the other
servers. If irc.uplink.com does not respond, the lag is to your uplink. If
so, you cannot be sure about the state of the other uplinks, so you'd have to
get on a remote server and determine lag by using /stats ? and /trace. For
example, you could connect to server N, and /trace yournick. Yournick, being
the nick on your server. You'll see which route it takes, and what the
problem server is. Example /trace output :
S:[SERVER-N ] V:[2.8/hybrid] U:[SERVER-M ]
S:[SERVER-M ] V:[2.8/hybrid] U:[SERVER-H ]
S:[SERVER-H ] V:[2.8/hybrid] U:[SERVER-F ]
S:[SERVER-F ] V:[2.8/hybrid] U:[SERVER-B ]
S:[SERVER-B ] V:[2.8/hybrid] U:[irc.uplink.com ]
S:[irc.uplink.com ] V:[2.8/hybrid] U:[irc.yourserver.com ]
The trace doesn't complete... server-b announces irc.uplink.com, and
irc.uplink.com announces your server. Your server should return something
like :
S:[irc.yourserver.] OPER [yournick!user@yourhost]
If it doesn't, we know the lag is only between yourserver and uplink.
Usually if there is lag between your server and your uplink, the send-queue
rises. This is not always the case. Sometimes your server can write perfectly
to your uplink, but not reverse. That is called one sided lag.
We pick server B to link to. It means we have to SQUIT and CONNECT.
To unlink from irc.uplink.com and connect to SERVER_B we'd type:
/quote SQUIT irc.uplink.com :reroute
/connect SERVER_B
we *DON'T* SQUIT irc.yourserver.com... and I'll try to explain why:
If we wanted to remove hub M from the network, and with it N, we'd issue
a SQUIT M. An SQUIT follows a path, relays the SQUIT request to each server
in that path. Finally it reaches server H, which is the hub for M. Server H
sees the SQUIT and drops the link to M.
Now a different situation, we want to separate yourserver, uplink, C and D
from the rest of the network, in order to reroute. We'd have to SQUIT server
B, since we want the -uplink- of server B (being irc.uplink.com) to drop the
link to server B.
If you'd SQUIT irc.yourserver.com, you ask yourserver.com to drop the link to
itself, which is impossible. If you SQUIT irc.uplink.com, you ask yourserver
to drop the link to uplink, which is what we want to do.
After the SQUIT and CONNECT, the new situation looks like this :
irc.uplink.com
| | \
irc.yourserver.com -- B C D
/ \
E F
/ \
G H --- O
/ | \ | \
I J K L M
\
N
If yourserver is a Hub, it makes the situation more complex, since your
actions have more impact.
4.1 - Re-routing other servers and remote connects
Example topology :
irc.uplink.com
| | \
irc.yourserver.com -- B C D
/ \
E F
/ \
G H --- O
/ | \ | \
I J K L M
\
N
Let's say, hub H is way lagged to F, but G to F is fine... we want to reroute
H, and stick H to G.
We'd do :
/quote SQUIT serverh :re-routing you babe
/connect serverh 6667 serverg
A global wallops will be sent :
!serverg! Remote CONNECT serverh 6667 from ItsMe
When re-routing, always give the server some time to prevent nick collides.
When there is lag, people will connect to another server. When you SQUIT and
CONNECT to fast, a lot of those clients will be collided. Also, stick to your
territory. How enthusiastic you may be, you cannot route the world. If you're
an oper on the US side, stick to the US side when re-routing. Needless to
say, if you're EU, keep it to EU ;)
5. Kills and klines
As an oper, you're given the incredible power *cough* of KILL and KLINE.
/kill nick reason disconnects a client from IRC with the specified reason.
A /quote kline *evil@*.dude.org :reason here bans the user from your server.
Abusive kills and klines may draw attacks to your server, so always consider
if a kline or kill is deserved. If the server gets attacked after a valid
kill or kline, well.. tough luck. You should never be 'afraid' to kline
anyone on your server. If it's a good reason, make it so. Even if you know
it may cause the server to be attacked. Maybe good to think about is this:
- if /ignore solves the problem rather than a kick, /ignore
- kick if a ban is unneeded
- ban if a /kill is unwarranted for
- kill rather than kline if that solves the problem
- kline when a server ban is really needed.
You kline a user when you absolutely don't want this user to use the service
your server is providing.
Crosskills (killing users on another server) are another issue. Some admins
don't care if users get /kill'ed off their server, for any reason or no
reason at all... and other admins are very anal about it. A good way to go
(IMO) is to issue a KILL if there is an absolute need for the target user to
be disconnected. If there are active opers on that server, let them handle
it. They'll be upset if you /kill a user off their server, without
contacting them. /stats p irc.server.here shows the active opers on a
particular server. Some opers have multiple o-lines and are not watching all
sessions. If you can't find an active oper on a server, you can
/quote operwall a request for opers from that server.
Ghost KILLs are another story, an often misunderstood one.
When you see a /KILL from an oper with the reason 'ghosted' they usually
KILL a client that's about to ping timeout. That is not what a ghost is!
To quote Dianora: "a ghost happens because a client misses being killed when
it should be. Its a race condition due to nick chasing". In other words,
Server X thinks client A has been KILLed, while server Y missed the KILL
for that client.
6. Kill and K-Line requests
As previously mentioned, if an oper from another server contacts you and
requests a kill or a kline for a local client with a good reason, you can
usually trust this request. Opers depend on a trusting relationship. However,
since you're responsible for the kill or kline, it is not rude to ask for
proof. It depends on the oper making the request how thats interpreted, but
the way they respond to asking for proof tells more about them than about
you.
The more and longer you oper, how better you get to know the other opers.
You know who is honest, you'll know who are lying and deceiving. Before
you acquire this knowledge, you can merely rely on common sense and
instincts. You'll probably make mistakes occasionally, and thats nothing to
be ashamed of. Opers are - despite contrary believes - human.
Users occasionally will ask you to kill or kline a user/bot too. Some
requests are straight-forward and clear, others require you to be cautious. I
recommend to always investigate such requests, and when you're confident the
request is valid, issue the kill or kline.
7. Happy birthday!
It is a custom on EFnet to birthday /kill opers of whom it is his/her
birthday. Not all opers like this, but typically those opers don't let
others know about their birthday. You'll notice that the KILLS say a lot
about who likes who and who is friends with who. Whether you want to
participate, is entirely up to you.
8. Security
As with any privilege, you have to handle it cautiously and responsibly.
Be sure that your o/O line doesn't get compromised! Oper only from secure
hosts. You and only you should know your password. Don't share your oper
account, and make your oper password a UNIQUE one. If your o/O line gets
compromised, nasty things may/will happen. Imagine an oper with crosskill
capabilities who's operline gets 'hacked'... the results are often
disastrous and you will lose respect and trust from others. It can cause
your oper privileges to be revoked, or even the server to be (temporarily)
delinked.
9. Know who your friends are
As an oper you will get a lot of users that want to be 'friends' with you.
Users offer you free* access to their *nix servers, ops in channels,
unlimited leech access to the biggest and fastest warez sites *gasp* and
more. They want favors in return. They say they don't but they truly want
something in return. They -expect- something in return. You could either
don't respond to such offers, or use them. The last option creates an even
more distorted image of opers and doesn't do any good for the user <-> oper
relationship. Your *real* friends are usually the persons who were your
friends _before_ you acquired the extra privileges.
10. The TCM Bot
A TCM bot can be a valuable tool for opers. It keeps record of all connected
clients, flags clients with multiple connections and has all sorts of other
useful commands. There are three different kind of TCM's in use on EFnet,
being OOMon, TCM-Dianora and TCM-Hybrid. Every one of them requires you to
log in to be able to access the privileged commands. On OOMon you DCC chat
the TCM bot and do '.auth yournick yourpass' where yournick is your oper
name in your o/O line. In TCM-Dianora and TCM-Hybrid you register with:
'.register yourpass', where yourpass is your password ;)
All TCM commands start with a period. If you forget the period, the text goes
into the 'partyline', where it is echoed to all connected opers.
Resources : http://toast.blackened.com/oomon/help
http://www.db.net/~db/tcm.html
11. Services
A recent addition to EFNet is Channel Fixer, aka ChanFix. This is an
automated service that re-ops clients on opless channels. There are a few
restrictions. First, the channel has to be of significant size for ChanFix
to store it in its database. Second, it only logs static addresses.
How does it work? Periodically it stores information about the channel state
in its database, for every channel in there. On every 'run', a channel
operator gets one point. These scores make a top-5 of 'most frequent opped
clients'. When a channel becomes opless, ChanFix will join and op the top-5
opped clients CURRENTLY IN THE CHANNEL.
Chanfix can be invoked manually by server administrators. /msg ChanFix
chanfix #channel is the command to do it. ChanFix will join, and treat the
channel as if it were opless. It lowers TS by one (resulting in a deop of
the entire channel) and re-ops the top-5 clients currently in the channel.
The Channel Fixer won't log or actively fix channels when there's a split of
significant size. Needless to say, the chanfix command must be used with
caution.
12. G-Lines
Oh yes! A G-Line section. Currently, a part of EFNet (EU-EFnet) has G-Lines
enabled. This was decided by the EU admin community and is now mandatory
within EU-EFnet. In order for a G-Line to be activated, three opers from
three different servers need to issue the _exact_ same G-Line. The reason
is not counted.
G-Lines work best when the EU side of EFNet is not fragmented. G-Lines
will, however, propogate through a Hybrid 6 hub (but not a CSr hub) even
if the hub server has G-Lines disabled. This propogation allows two halves
of EU-EFnet to have concurrent G-Lines set even when split by US hub servers.
Questions / Comments / Suggestions are welcome.
You can e-mail me: dennisv@vuurwerk.nl
Best regards,
--
Dennis "Riedel" Vink ___~___ Email - dennisv@vuurwerk.nl
Unix System Administrator \ | / Phone - +31 23 5111111
Vuurwerk Internet '|.|' PGP - 0xD68A7AAB
And on the seventh day, He exited from append mode.
# $Id: operguide.txt 23020 2006-09-01 18:20:19Z androsyn $

View File

@ -0,0 +1,47 @@
Server VERSION Info
$Id: server-version-info 27381 2012-03-16 23:10:29Z dubkat $
Copyright (c) 2001 by ircd-hybrid team
Copyright (c) 2002-2012 ircd-ratbox development team
----------------------------------------------------------------------
When you type /version, you will often see something like this:
ircd-ratbox-1.0rc7(20021120_0). embers.lan egGHIKMpZ6 TS5ow
Ever wondered what those funny chars mean after the version number? Well
here they are:
+----------------------------+
| 'e' | USE_EXCEPT |
|------+---------------------|
| 'g' | NO_FAKE_GLINES |
|------+---------------------|
| 'G' | GLINES |
|------+---------------------|
| 'H' | HUB |
|------+---------------------|
| 'I' | USE_INVEX |
|------+---------------------|
| 'K' | USE_KNOCK |
|------+---------------------|
| 'M' | IDLE_FROM_MSG |
|------+---------------------|
| 'p' | CRYPT_OPER_PASSWORD |
|------+---------------------|
| 'Z' | ZIPLINKS |
|------+---------------------|
| '6' | IPv6 |
|------+---------------------|
| | |
|------+---------------------|
| 'TS' | Supports TS |
|------+---------------------|
| '5' | TS Version 5 |
|------+---------------------|
| 'o' | TS Only |
|------+---------------------|
| 'w' | TS Warnings |
+----------------------------+

View File

@ -0,0 +1,55 @@
- ratbox-services compatibility documentation - Lee H <lee -at- leeh.co.uk> -
-----------------------------------------------------------------------------
Compatibility with ratbox-services can be enabled by passing the
'--enable-services' flag to configure. It will add the following features
to ircd:
- Channel mode +r -
A simple mode taking no parameters, will require users are logged in
with user services before they may join the channel.
Gives numeric 477 to users who arent logged in:
:<server> 477 <nick> <channel> :Cannot join channel (+r)
- service block to ircd.conf -
Ability to specify the names of services servers in ircd.conf:
service {
name = "services.ircd-ratbox.org";
name = "backup-services.ircd-ratbox.org";
};
These must be specified for certain features to work. You may specify as
many name entries as you wish, however you must define only one service
block.
Entries will be listed in stats U with the flag 's'.
- Services protection -
Services will be protected from being deopped or kicked from a channel.
- Username tracking through netsplits -
When users are logged in, the username they are logged in with will be
preserved on a netsplit, so users will not have to relogin when the
network merges together.
- Username given on WHOIS -
When users are logged in, WHOIS will also give numeric 330:
:<server> 330 <yournick> <targetnick> <loginname> :is logged in as
Note this needs to be a remote whois to work when the target is
on a different server.
- Forced nick change -
When using nickname services and a client requests they regain a
nickname, services can perform a forced nick change on the client.
This forcibly changes the clients nickname to the one they requested
they regain, ensuring they can always regain their nickname.
# $Id: services.txt 23020 2006-09-01 18:20:19Z androsyn $

View File

@ -0,0 +1,330 @@
Protocol changes for +TSora
---------------------------
Note:
The protocols described here implement TimeStamps on IRC channels and
nicks. The idea of IRC TimeStamps was started on Undernet, and first
implemented by Run <carlo@runaway.xs4all.nl>. The protocols used here
are not exactly the same as the ones used on Undernet; the nick-kill
handling is very similar and must be credited to Run, while the
"TimeStamped channel description" protocol is quite different.
TSora servers keep track of which version of the TS protocol (if any)
their neighboring servers are using, and take it into account when
sending messages to them. This allows for seamless integration of TS
servers into a non-TS net, and for upgrades of the protocol.
Each server knows which is the lowest and the highest version of the
TS protocol it can interact with; currently both of these are set to 1:
#define TS_CURRENT 1 /* the highest TS ver we can do */
#define TS_MIN 1 /* the lowest TS ver we can do */
Timings and TS versions:
========================
. Keep a 'delta' value to be added to the result of all calls to time(),
initially 0.
. Send a second argument to the PASS command, ending in the 'TS' string.
. Send a
SVINFO <TS_CURRENT> <TS_MIN> <STANDALONE> :<UTC-TIME>
just after "SERVER", where <STANDALONE> is 1 if we're connected to
more TSora servers, and 0 if not, and <UTC-TIME> is our idea of the
current UTC time, fixed with the delta.
. When we receive a "SVINFO <x> <y> <z> :<t>" line from a connecting
server, we ignore it if TS_CURRENT<y or x<TS_MIN, otherwise we
set a flag remembering that that server is TS-aware, remember the TS
version to use with it (min(TS_CURRENT, x)). Additionally, if this is
our first connected TS server, we set our delta to t-<OUR_UTC> if
z==0, and to (t-<OUR_UTC>)/2 if z!=0. The SVINFO data is kept around
until the server has effectively registered with SERVER, and used
*after* sending our own SVINFO to that server.
Explanations:
Servers will always know which of their directly-linked servers can do
TS, and will use the TS protocol only with servers that do understand
it. This makes it possible to switch to full TS in just one
code-replacement step, without incompatibilities.
As long as not all servers are TS-aware, the net will be divided into
"zones" of linked TS-aware servers. Channel modes will be kept
synchronized at least within the zone in which the channel was
created, and nick collisions between servers in the same zone will
result in only one client being killed.
Time synchronization ensures that servers have the same idea of the
current time, and achieves this purpose as long as TS servers are
introduced one by one within the same 'zone'. The merging of two zones
cannot synchronize them completely, but it is to be expected that
within each zone the effective time will be very close to the real
time.
By sending TSINFO after SERVER rather than before, we avoid the extra
lag created by the identd check on the server. To be able to send
immediately a connect burst of either type (TS or not), we need to
know before that if the server does TS or not, so we send that
information with PASS as an extra argument. And to avoid being
incompatible with 2.9 servers, which check that this second argument
begins with "2.9", we check that it *ends* with "TS".
The current time is only used when setting a TS on a new channel or
nick, and once such a TS is set, it is never modified because of
synchronization, as it is much more important that the TS for a
channel or nick stays the same across all servers than that it is
accurate to the second.
Note that Undernet's 2.8.x servers have no time synchronization at
all, and have had no problems because of it - all of this is more to
catch the occasional server with a way-off clock than anything.
NICK handling patches (anti-nick-collide + shorter connect burst):
==================================================================
. For each nick, store a TS value = the TS value received if any, or our
UTC+delta at the time we first heard of the nick. TS's are propagated
to TS-aware servers whenever sending a NICK command.
. Nick changes reset the TS to the current time.
. When sending a connect burst to another TS server, replace the
NICK/USER pair with only one NICK command containing the nick, the
hopcount, the TS, the umode, and all the USER information.
The format for a full NICK line is:
NICK <nick> <hops> <TS> <umode> <user> <host> <server> :<ircname>
The umode is a + followed by any applying usermodes.
The format for a nick-change NICK line is:
:<oldnick> NICK <newnick> :<TS>
. When a NICK is received from a TS server, that conflicts with an
existing nick:
+ if the userhosts differ or one is not known:
* if the timestamps are equal, kill ours and the old one if it
was a nick change
* if the incoming timestamp is older than ours, kill ours and
propagate the new one
* if the incoming timestamp is younger, ignore the line, but kill
the old nick if it was a nick change
+ if the userhosts are the same:
* if the timestamps are equal, kill ours and the old one if it
was a nick change
* if the incoming timestamp is younger, kill ours and propagate
the new one
* if the incoming timestamp is older, ignore the line but kill
the old nick if it was a nick change
. When a NICK is received from a non-TS server that conflicts with
an existing nick, kill both.
. Do not send "Fake Prefix" kills in response to lines coming from TS
servers; the sanitization works anyway, and this allows the "newer
nick overruled" case to work.
Explanations:
The modified nick-introduction syntax allows for a slightly shorter
connect-burst, and most importantly lets the server compare
user@host's when determining which nick to kill: if the user@host
is the same, then the older nick must be killed rather than the
newer.
When talking to a non-TS server, we need to behave exactly like one
because it expects us to. When talkign to a TS server, we don't kill
the nicks it's introducing, as we know it'll be smart enough to do it
itself when seeing our own introduced nick.
When we see a nick arriving from a non-TS server, it won't have a TS,
but it's safe enough to give it the current time rather than keeping
it 0; such TS's won't be the same all across the network (as long as
there is more than one TS zone), and when there's a collision, the TS
used will be the one in the zone the collision occurs in.
Also, it is important to note that by the time a server sees (and
chooses to ignore) a nick introduction, the introducing server has
also had the time to put umode changes for that nick on its queue, so
we must ignore them too... so we need to ignore fake-prefix lines
rather than sending kills for them. This is safe enough, as the rest
of the protocol ensures that they'll get killed anyway (and the
Undernet does it too, so it's been more than enough tested). Just for
an extra bit of compatibility, we still kill fake prefixes coming from
non-TS servers.
This part of the TS protocol is almost exactly the same as the
Undernet's .anc (anti-nick-collide) patches, except that Undernet
servers don't add usermodes to the NICK line.
TimeStamped channel descriptions (avoiding hacked ops and desynchs):
====================================================================
. For each channel, keep a timestamp, set to the current time when the
channel is created by a client on the local server, or to the received
value if the channel has been propagated from a TS server, or to 0
otherwise. This value will have the semantics of "the time of creation
of the current ops on the channel", and 0 will mean that the channel
is in non-TS mode.
A new server protocol command is introduced, SJOIN, which introduces
a full channel description: a timestamp, all the modes (except bans),
and the list of channel members with their ops and voices. This
command will be used instead of JOIN and of (most) MODEs both in
connect bursts and when propagating channel creations among TS
servers. SJOIN will never be accepted from or sent to users.
The syntax for the command is:
SJOIN <TS> #<channel> <modes> :[@][+]<nick_1> ... [@][+]<nick_n>
The fields have the following meanings:
* <TS> is the timestamp for the channel
* <modes> is the list of global channel modes, starting with a +
and a letter for each of the active modes (spmntkil), followed
by an argument for +l if there is a limit, and an argument for
+k if there's a key (in the same order they were mentioned in
the string of letters).
A channel with no modes will have a "+" in that field.
A special value of "0" means that the server does not specify the
modes, and will be used when more than one SJOIN line is needed
to completely describe a channel, or when propagating a SJOIN
the modes of which were rejected.
* Each nick is preceded by a "@" if the user has ops, and a "+" if
the user has a voice. For mode +ov, both flags are used.
SJOINs will be propagated (when appropriate) to neighboring TS
servers, and converted to JOINs and MODEs for neighboring non-TS
servers.
To propagate channels for which not all users fit in one
SJOIN line, several SJOINs will be sent consecutively, only the first
one including actual information in the <mode> field.
An extra ad-hoc restriction is imposed on SJOIN messages, to simplify
processing: if a channel has ops, then the first <nick> of the first
SJOIN sent to propagate that channel must be one of the ops.
Servers will never attempt to reconstruct a SJOIN from JOIN/MODE
information being received at the moment from other servers.
. For each user on a channel, keep an extra flag (like ops and voice)
that is set when the user has received channel ops from another
server (in a SJOIN channel description), which we rejected (ignored).
Mode changes (but NOT kicks) coming from a TS server and from someone
with this flag set will be ignored. The flag will be reset when the
user gets ops from another user or server.
. On deops done by non-local users, coming from TS servers, on channels
with a non-zero TS, do not check that the user has ops but check that
their 'deopped' flag is not set. For kicks coming from a TS server, do
not check either. This will avoid desynchs, and 'bad' modechanges are
avoided anyway. Other mode changes will still only be taken into
account and propagated when done by users that are seen as having ops.
. When a MODE change that ops someone is received from a server for a
channel, that channel's TS is set to 0, and the mode change is
propagated.
. When a SJOIN is received for a channel, deal with it in this way:
* received-TS = 0:
+ if we have ops or the SJOIN doesn't op anyone, SJOIN propagated
with our own TS.
+ otherwise, TS set to 0 and SJOIN propagated with 0.
* received-TS > 0, own-TS = 0:
+ if the SJOIN ops someone or we don't have ops, set our TS to the
received TS and propagate.
+ otherwise, propagate with TS = 0.
* received-TS = own-TS: propagate.
* received-TS < own-TS:
+ if the SJOIN ops someone, remove *all* modes (except bans) from
the channel and propagate these mode changes to all neighboring
non-TS servers, and copy the received TS and propagate the SJOIN.
+ if the SJOIN does not op anyone and we have ops, propagate
with our own TS.
+ otherwise, copy the received TS and propagate the SJOIN.
* received-TS > own-TS:
+ if the SJOIN does not introduce any ops, process and propagate
with our own TS.
+ if we have ops: for each person the mode change would op, set the
'deopped' flag; process all the JOINs ignoring the '@' and '+'
flags; propagate without the flags and with our TS.
+ if we don't have ops: set our TS to the received one, propagate
with the flags.
Explanations:
This part of the protocol is the one that is most different (and
incompatible) with the Undernet's: we never timestamp MODE changes,
but instead we introduce the concept of time-stamped channel
descriptions. This way each server can determine, based on its state
and the received description, what the correct modes for a channel
are, and deop its own users if necessary. With this protocol, there is
*never* the need to reverse and bounce back a mode change. This is
both faster and more bandwith-effective.
The end goal is to have a protocol will eventually protect channels
against hacked ops, while minimizing the impact on a mixed-server net.
In order to do this, whenever there is a conflict between a TS server
and a non-TS one, the non-TS one's idea of the whole situation
prevails. This means that channels will only have a TS when they have
been created on a TS-aware server, and will lose it whenever a server
op comes from a non-TS server. Also, at most one 'zone' will have a TS
for any given channel at any given time, ensuring that there won't be
any deops when zones are merged. However, when TS zones are merged, if
the side that has a TS also has ops, then the TS is kept across the
whole new zone. Effective protection will only be ensured once all
servers run TS patches and channels have been re-created, as there is
no way servers can assign a TS to a channel they are not creating
(like they do with nicks) without having unwanted deops later.
The visible effects of this timestamped channel-description protocol
are that when a split rejoins, and one side has hacked ops, the other
side doesn't see any server mode changes (just like with Undernet's
TS), but the side that has hacked ops sees:
* first the first server on the other side deopping and devoicing
everyone, and fixing the +spmntkli modes
* then other users joining, and getting server ops and voices
The less obvious part of this protocol is its behavior in the case
that the younger side of a rejoin has servers that are lagged with
each other. In such a situation, a SJOIN that clears all modes and
sets the legitimate ones is being propagated from one server, and
lagged illegitimate mode changes and kicks are being propagated in the
opposite direction. In this case, a kick done by someone who is being
deopped by the SJOIN must be taken into account to keep the name list
in sync (and since it can only be kicking someone who also was on the
younger side), while a deop does not matter (and will be ignored by
the first server on the other side), and an opping *needs* to be
discareded to avoid hacked ops.
The main property of timestamped channel descriptions that makes them
a very stable protocol even with lag and splits, is that they leave a
server in the same final state, independently of the order in which
channel descriptions coming from different servers are received. Even
when SJOINs and MODEs for the same channel are being propagated in
different direction because of several splits rejoining, the final
state will be the same, independently of the exact order in which each
server received the SJOINs, and will be the same across all the
servers in the same zone.

View File

@ -0,0 +1,26 @@
$Id: cluster.txt 23020 2006-09-01 18:20:19Z androsyn $
Short description of how remote kline and friends are propagated under
the old hyb7 style (CAP_KLN etc) and under the new style over ENCAP.
CAP_KLN:
:<source> KLINE <target> <time> <user> <host> :<reason>
:<source> ENCAP <target> KLINE <time> <user> <host> :<reason>
CAP_UNKLN:
:<source> UNKLINE <target> <user> <host>
:<source> ENCAP <target> UNKLINE <user> <host>
CAP_CLUSTER:
:<source> XLINE <target> <gecos> <type> :<reason>
:<source> ENCAP <target> XLINE <time> <gecos> <type> :<reason>
:<source> UNXLINE <target> <gecos>
:<source> ENCAP <target> UNXLINE <gecos>
:<source> RESV <target> <name> :<reason>
:<source> ENCAP <target> RESV <time> <name> 0 :<reason>
:<source> UNRESV <target> <name>
:<source> ENCAP <target> UNRESV <name>

View File

@ -0,0 +1,84 @@
Overview of the event subsystem
Adrian Chadd <adrian@creative.net.au>
$Id: event.txt 23020 2006-09-01 18:20:19Z androsyn $
One of the things that immediately struck me whilst first looking at the
code was that the ircd periodically scheduled things in io_loop() but
it did them manually. This is very wasteful and very tedious.
Therefore, an event system was added to hybrid. src/event.c contains an
event system ported from the squid web cache. It is pretty self contained,
and only a few things (debugging, time resolution) needed changing.
An event is scheduled through eventAdd() or eventAddIsh() :
eventAdd(const char *name, EVH * func, void *arg, time_t when, int weight)
eventAddIsh(const char *name, EVH * func, void *arg, time_t delta_ish,
int weight)
after 'when' (or delta_ish) seconds has elapsed from the time the above
functions are called, the 'func' is called with the given data 'arg'. The
event is then deleted.
To delete an event, use eventDelete() :
eventDelete(EVH * func, void *arg)
An event is identified by its callback function and data pair.
Events are run through eventRun(). This is designed to be called *BEFORE*
your IO handlers, to let events scheduled immediately (ie a time of 0)
to initiate IO before the IO handlers are called.
(Believe me, its useful.)
Example:
Say you have something which must be called every 15 seconds.
* You would first define the callback in your module:
static EVH foo_periodic_event;
static int initialised = 0;
* You would then add the event in your initialization function:
void foo_init(void)
{
if (!initialised) {
eventAdd("foo_periodic_event", foo_periodic_event, NULL, 0, 0);
initialised = 1;
}
}
This will force the event to be called the next time eventRun() is called,
rather than waiting 15 seconds.
* You then define your event callback:
static void
foo_periodic_event(void *data)
{
/* We'd do our work here */
/* Then we'd finish */
eventAdd("foo_periodic_event", foo_periodic_event, NULL, 15, 0);
}
Notes:
* I really should change the timeout value to be in milliseconds. Squid used
a double, but Dianora had something against floating point code in the main
loop (which is understandable). If someone wants a fun task .. :-)
* Note that the 'name' parameter to eventAdd() / eventAddIsh() is a const
char *, and is *not copied* but *referenced*. Therefore, it is in your
best interest to use string constants.
* /stats E for an oper shows pending events. Thanks Diane!

View File

@ -0,0 +1,81 @@
Overview of the filedescriptor subsystem
Adrian Chadd <adrian@creative.net.au>
$Id: fd-management.txt 23020 2006-09-01 18:20:19Z androsyn $
Filedescriptor lists
--------------------
The filedescriptor list is managed through the routines in fdlist.c .
These include:
fd_open() - tag an FD as "open" and active
fd_close() - tag an FD as "closed" and close() the filedescriptor
fd_note() - update the filedescriptor tag
You can get the current list of open filedescriptors through /stats F as
an oper.
FD lists
--------
The FD list support is very alpha. There are a few lists defined:
typedef enum fdlist_t {
FDLIST_NONE,
FDLIST_SERVICE,
FDLIST_SERVER,
FDLIST_IDLECLIENT,
FDLIST_BUSYCLIENT,
FDLIST_MAX
} fdlist_t;
FDLIST_NONE Not on any list (ie close()d)
FDLIST_SERVICE A service - listen() sockets, resolver, etc
FDLIST_SERVER Server connections
FDLIST_IDLECLIENT An idle client
FDLIST_BUSYCLIENT A busy client
FDLIST_MAX Used for bounds checking
The idea is that the SERVICE sockets need polling frequently, the SERVER
sockets also need polling frequently, BUSYCLIENT is for busy clients
which need frequent polling (eg we're trying to write to them), and
IDLECLIENT is for clients which we don't need to poll frequently.
THIS hasn't been decided upon yet.
File operations
---------------
The file operations are also wrapped through file_open() and file_close()
which handle calling fd_open() / fd_close() and tracking the filedescriptors
correctly. fbopen() / fbclose() use file_open() / file_close() too.
fileio.c defines the functions:
int
file_open(const char *filename, int mode, int fmode)
A wrapper around open(filename, flags, mode). Read the open manpage for
information. file_open() enforces filedescriptor limits and tags the FD
through fd_open().
void
file_close(int fd)
A wrapper around close() for files. close() handles fd_close()ing the fd.
FBFILE *
fbopen(const char *filename, const char *mode)
void
fbclose(FBFILE *fb)
These are the 'buffered disk IO' routines. You can read the code yourself.
Note that these routines use file_open() and file_close().

View File

@ -0,0 +1,37 @@
Overview of the file management subsystem
Adrian Chadd <adrian@creative.net.au>
$Id: file-management.txt 23020 2006-09-01 18:20:19Z androsyn $
File operations
---------------
The file operations are also wrapped through file_open() and file_close()
which handle calling fd_open() / fd_close() and tracking the filedescriptors
correctly. fbopen() / fbclose() use file_open() / file_close() too.
fileio.c defines the functions:
int
file_open(const char *filename, int mode, int fmode)
A wrapper around open(filename, flags, mode). Read the open manpage for
information. file_open() enforces filedescriptor limits and tags the FD
through fd_open().
void
file_close(int fd)
A wrapper around close() for files. close() handles fd_close()ing the fd.
FBFILE *
fbopen(const char *filename, const char *mode)
void
fbclose(FBFILE *fb)
These are the 'buffered disk IO' routines. You can read the code yourself.
Note that these routines use file_open() and file_close().

View File

@ -0,0 +1,115 @@
The hostmask/netmask system.
Copyright(C) 2001 by Andrew Miller(A1kmm)<a1kmm@mware.virtualave.net>
$Id: hostmask.txt 23020 2006-09-01 18:20:19Z androsyn $
Contents
========
* Section 1: Motivation
* Section 2: Underlying mechanism
- 2.1: General overview.
- 2.2: IPv4 netmasks.
- 2.3: IPv6 netmasks.
- 2.4: Hostmasks.
* Section 3: Exposed abstraction layer
- 3.1: Parsing masks.
- 3.2: Adding configuration items.
- 3.3: Initialising or rehashing.
- 3.4: Finding IP/host confs.
- 3.5: Deleting entries.
- 3.6: Reporting entries.
Section 1: Motivation
=====================
Looking up config hostnames and IP addresses(such as for I-lines and
K-lines) needs to be implemented efficiently. It turns out a hash
based algorithm like that employed here performs well on the average
case, which is what we should be the most concerned about. A profiling
comparison with the mtrie code using data from a real network confirmed
that this algorithm performs much better.
Section 2: Underlying mechanism
===============================
2.1: General overview
---------------------
In short, a hash-table with linked lists for buckets is used to locate
the correct hostname/netmask entries. In order to support CIDR IPs and
wildcard masks, the entire key cannot be hashed, and there is a need to
rehash. The means for deciding how much to hash differs between hostmasks
and IPv4/6 netmasks.
2.2: IPv4 netmasks
------------------
In order to hash IPv4 netmasks for addition to the hash, the mask is first
processed to a 32 bit address and a number of bits used. All unused bits
are set to 0. The mask could be in the forms:
1.2.3.4 => 1.2.3.4 32
1.2.3.* => 1.2.3.0 24
1.2 => 1.2.0.0 16
1.2.3.64/26 => 1.2.3.64 26
The number of whole bytes is then calculated, and only those bytes are
hashed. (e.g. 1.2.3.64/26 and 1.2.3.0/24 hash the same).
When a complete IPv4 address is given so that an IPv4 match can be found,
the entire IP address is first hashed, and looked up in the table. Then
the most significant three bytes are hashed, followed by the most
significant two, the most significant one, and finally the 'identity hash'
bucket is searched(to match masks like 192/7).
2.3: IPv6 netmasks
------------------
As per IPv4 netmasks, except that instead of rehashing with a one byte
granularity, a 16 bit(two byte) granularity is used, as 16 rehashes is
considered too great a fixed offset to be justified for a (possible)
slight reduction in hash collisions.
2.4: Hostmasks
--------------
On adding a hostmask to the hash, all of the hostmask right of the next
dot after the last wildcard character in the string is hashed, or in the
case that there are no wildcards in the hostmask, the entire string is
hashed.
On searching for a hostmask match, the entire hostname is hashed, followed
by the entire hostmask after the first dot, followed by the entire
hostmask after the second dot, and so on. Finally, the 'identity' hash
bucket is checked, to catch hostnames like *test*.
Section 3: Exposed abstraction layer
====================================
Section 3.1: Parsing masks
--------------------------
Call "parse_netmask()" with the netmask and a pointer to an irc_inaddr
structure to be filled in, as well as a pointer to an integer where the
number of bits will be placed.
Always check the return value. If it returns HM_HOST, it means that the
mask is probably a hostname mask. If it returns HM_IPV4, it means it was
an IPv4 address. If it returns HM_IPV6, it means it was an IPv6 address.
If parse_netmask returns HM_HOST, no change is made to the irc_inaddr
structure or the number of bits.
Section 3.2: Adding configuration items
---------------------------------------
Call "add_conf_by_address" with the hostname or IP mask, the username,
and the ConfItem* to associate with this mask.
Section 3.3: Initialising and rehashing
----------------------------------------
To initialise, call init_host_hash(). This only needs to be done once on
startup.
On rehash, to wipe out the old unwanted conf, and free them if there are
no references to them, call clear_out_address_conf().
Section 3.4: Finding IP/host confs
----------------------------------
Call find_address_conf() with the hostname, the username, the address,
and the address family.
To find a d-line, call find_dline() with the address and address family.
Section 3.5: Deletiing entries
------------------------------
Call delete_one_address_conf() with the hostname and the ConfItem*.
Section 3.6: Reporting entries
------------------------------
Call report_dlines, report_exemptlines, report_Klines() or report_Ilines()
with the client pointer to report to. Note these walk the hash, which is
inefficient, but these are not called often enough to justify the memory
and maintenance clockcycles to for more efficient data structure.

View File

@ -0,0 +1,19 @@
Technical Documentation for ircd-hybrid-7
Persistent_Clients.txt - A global UID and Persistent client (with cookies)
proposal
README.TSora - Description of the TS3 protocol
README.openssl - Information for users who have problems with
Hybrid, OpenSSL, and their operating system
cryptlink.txt - Outline of CRYPTLINK protocol
event.txt - Outline of the event system
fd-management.txt - Outline of the file descriptor management system
file-management.txt - Outline of the disk file management system
hostmask.txt - Outline of hostmask handling
linebuf.txt - Outline of the linebuf system (dbuf replacement)
network.txt - Outline of the network traffic subsystem
rfc1459.txt - The IRC RFC
send.txt - Document on all of the send_to functions
whats-new-code.txt - Whats changed in the code
# $Id: index.txt 23020 2006-09-01 18:20:19Z androsyn $

View File

@ -0,0 +1,139 @@
linebuf - a dbuf replacement for the New World Order(tm)
By Adrian Chadd <adrian@creative.net.au>
$Id: linebuf.txt 23020 2006-09-01 18:20:19Z androsyn $
History
-------
I could probably learn the dbuf history, but basically its evil. The
general idea is that a dbuf holds incoming and outgoing data streams.
The trouble is that well.. it was evil. You can check it out by getting
the old src/dbuf.c and include/dbuf.h files if you really want.
Replacement
-----------
The linebuf system is a replacement for the dbuf code. The general idea here
is that the data should be buffered in "lines" rather than just linearly
like in the dbuf code. This lends to easier manipulation at a later date
(think flushing data lines to a socket, and even "sharing" linebufs to
reduce the copying required for one to many delivery.)
The linebuf system is broken into two structures, the buf_head and buf_line .
buf_head contains the buffer information (queue head/tail, length, allocated
length and the write offset for flushing), and buf_line contains the
line buffer information (buffer and various flags.)
linebuf->terminated is *only* set when a CR/LF combination is received.
linebuf->overflow is set if we get more data than we should, and we simply
truncate the incoming data.
linebuf->flushing is set when we are currently writing the buffer. We should
_NEVER_ be appending to a buffer which we're flushing!
When you get a buffer through linebuf_get() or write one through
linebuf_flush(), it will *always* be terminated with a CR/LF (and a NUL if
its a linebuf_get()).
Linebuf manipulation
--------------------
To use a linebuf, you simply stick a buf_head_t in your structure somewhere.
You then use the following routines:
int
linebuf_parse(buf_head_t *bufhead, char *buf, int len)
Parse the given buf. This routine does some complex manipulation:
- if there is an incomplete buffer at the tail, buf is parsed to try and
fill that incomplete buffer
- a buffer is completed by a CR/LF/CRLF/LFCR. It accepts everything purely
because I wanted to be "liberal in what you accept" ..
- If a buffer is terminated, the linebuf is flagged terminated
- If more data is trying to be squeezed into the buffer than space LEFT
in the buffer, we skip to the next "CRLF", and tag the buffer terminated
_and_ overflowed.
- We treat multiple runs of CR/LF/CRLF/LFCR as a single CRLF. This is just
a little extra goody to stop people sending hundreds of "CRLF"s and creating
unnecessary buffers.
- The number of lines parsed is returned (so you can implement per-line flood
protection ..)
void
linebuf_put(buf_head_t *bufhead, char *buf, int len)
Parse the given buf, ASSUMING it is a single buffer line. This is useful
for server-generated messages where you know you have a single line, and
you don't want to go through the overhead of parsing the data just for
this.
int
linebuf_get(buf_head_t *bufhead, char *buf, int maxlen)
Get a single line from the buffer. This removes data from the head of the
buffer. If the first buffer is empty or is not terminated, 0 is returned
which indicates that there is no data to parse. Terminated buffers are
returned (CR/LF/NUL), and the length INCLUDING the CR/LF/NUL is returned.
The buffer is copied and the linebuf is then deallocated.
int
linebuf_flush(int fd, buf_head_t *bufhead)
Attempt to flush some data to the given socket. bufhead->writeofs tracks
where in the head buffer we currently are. If the buffer is not terminated,
-1 is returned with errno == EWOULDBLOCK to simulate a "retry me" condition.
(See TODO..)
linebuf_flush() returns whatever write() returns, and sets (ie doesn't touch
after write()) errno accordingly.
int
linebuf_len(buf_head_t *bufhead)
Return the length of the buffer, in bytes. This should be used when calculating
how big a buffer is for statistics.
int
linebuf_alloclen(buf_head_t *bufhead)
Return how big the *allocated* space is. This is much more suitable for
anti-flood checking, as someone might be sending a whole bunch of 1-byte
linebufs which might not trigger a recvq / sendq limit but might chew up
way too much memory.
Notes
-----
* Remember that the trailing NUL isn't covered in the string length.
Limitations
-----------
* all the buffers are a fixed size - here they are current 513 bytes
(510 bytes + CR/LF/NUL)
TODO
----
* linebuf_flush() should be changed a little so if the buffer isn't
terminated, we *dont* retry flushing a buffer until we get more data.
* Implement a reference-friendly linebuf to reduce copies ..

View File

@ -0,0 +1,105 @@
Overview of the network subsystem
Adrian Chadd <adrian@creative.net.au>
$Id: network.txt 23020 2006-09-01 18:20:19Z androsyn $
This document is an overview of the new and hopefully improved network
subsystem.
The code is based loosely upon the network core found in the Squid web cache
server, with some optimizations for ircd-specific IO patterns.
Filedescriptor IO
-----------------
Filedescriptor IO is initiated using comm_setselect(). comm_setselect()
registers interest in reading from or writing to a file descriptor.
When a filedescriptor is ready for the required IO a callback is called
from the IO loop.
The comm_setselect() usage is:
void
comm_setselect(int fd, fdlist_t list, int type, PF *callback, void *cbdata,
int timeout)
where:
fd filedescriptor
list Which list the FD should be put on
type IO type. Can currently include:
COMM_SELECT_READ - register for read
COMM_SELECT_WRITE - register for write
callback Function to call when the FD is ready
cbdata Data to be passed to above function
timeout Update the timeout value. 0 is "don't update".
A typical use is:
..
/* Register interest in the FD for a read event */
comm_setselect(fd, FDLIST_SERVICE, COMM_SELECT_READ, read_callback, read_data,
0);
..
(FD becomes ready for read in the IO loop)
void
read_callback(int fd, void *data)
{
/* called when the FD becomes ready for read */
retval = read(fd, buf, len);
..
/* Ok, we need to read some more when its ready */
comm_setselect(fd, FDLIST_SERVICE, COMM_SELECT_READ, read_callback, data,
0);
}
Socket timeouts
---------------
A "socket timeout" is a callback registered to be called when a certain
amount of time has elapsed. Think of it as an event, but against a FD.
A good example of socket timeouts is in the comm_connect_tcp() code.
When the connect() begins, comm_settimeout() is called to call
comm_connect_timeout() if the timeout occurs. Once the connect() completes,
comm_settimeout() is called with a timeout of 0 and callback of NULL
to deregister the timeout. If the timeout occurs, comm_connect_timeout()
is called and the connection attempt is aborted.
Functions
---------
comm_open() - a socket() wrapper, enforcing fd limitations and tagging the
file descriptor with a note
comm_accept() - an accept() wrapper, enforcing fd limitations and tagging
the file descriptor with a note
comm_connect_tcp() - attempt an async connect(). Handles DNS lookups if
required, and will call the given callback at completion or error
comm_settimeout() - set a callback to be called after a given time period.
This is good to implement things like PING checks and connect() timeouts.
Notes:
* All socket creation should go through comm_open() / comm_accept().
* All socket closing should go through fd_close(). comm_close() isn't
implemented yet.
* comm_connect_tcp() is your best friend. :-)
* *ALL* network sockets should be non-blocking. If your OS doesn't support
non-blocking sockets, you shouldn't be here.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,293 @@
send.c re-work
PREFIXES
========
Server prefixes are the ":%s" strings at the beginning of messages.
They are used by servers to route the message properly and by servers to
local clients to update their idea of who is whom.
":nick!user@host" is a prefix ":name" where name is either a nick
or name of a server is another valid prefix.
Typical prefix for a local client to a channel:
":Dianora!db@irc.db.net"
for a prefix to a remote server:
":Dianora"
e.g. as seen locally on a channel:
":Dianora!db@irc.db.net PRIVMSG #us-opers :ON TOP OF ...\r\n"
e.g. as seen sent to a remote server:
":Dianora PRIVMSG #us-opers :ON TOP OF ...\r\n"
It has been argued that full prefixes sent locally are a waste of bandwidth
(Isomer from Undernet has argued this). i.e. instead of sending:
":nick!user@host" for a local prefix, one could just send ":nick"..
Unfortunately, this breaks many clients badly. Personally I feel that
until clients are updated to understand that a full prefix isn't always
going to be sent, that this should be held off on.
As much as possible, prefix generation is now moved "upstairs" as
much as possible. i.e. if its known its a local client only, then the
onus of the prefix generation, is the users, not hidden in send.c
This allows somewhat faster code to be written, as the prefix doesn't
have to be regenerated over and over again.
Prefixes aren't sent in all cases, such as a new user using NICK
A prefix is needed when it must be routed.
i.e.
NICK newnick
There is obviously no prefix needed from a locally connected client.
FUNCTIONS
=========
sendto_one() - Should be used for _local_ clients only
it expects the prefix to be pre-built by user.
usage - sendto_one(struct Client *to, char *pattern, ...);
typical use:
sendto_one(acptr,":%s NOTICE %s :I'm tired", me.name);
Note: This was from a server "me" hence only one
name in prefix.
This would be an example of a client sptr, noticing
acptr IF acptr is known to be a local client:
sendto_one(acptr,":%s!%s@%s NOTICE %s :You there?",
sptr->name,
sptr->username,
sptr->host,
acptr->name);
sendto_channel_butone()
- This function sends a var args message to a channel globally,
except to the client specified as "one", the prefix
is built by this function on the fly as it has to
be sent both to local clients on this server and to
remote servers.
usage - sendto_channel_butone(struct Client *one,
struct Client *from,
struct Channel *chptr,
const char *pattern, ... );
sendto_channel_butone(cptr, sptr, chptr
"PRIVMSG %s :HI!",
chptr->chname);
e.g. if channel message is coming from "cptr"
it must not be sent back to cptr.
sendto_ll_serv_butone(struct Client *one, struct Client *sptr, int add,
const char *pattern, ...)
- This function is almost identical to sendto_channel_butone
however, it will also not send on a nick as given by sptr,
if target server does not "know" about it.
As the name implies, it is used for "lazylinks"
sendto_serv_butone()
- This function sends specified var args message
to all connected servers except the client "one"
usage - sendto_serv_butone(struct Client *one,
const char *pattern, ... );
sendto_cap_serv_butone()
- This function sends specified var args message
to all connected servers except the client "one"
with capability specified.
NOTE: sendto_serv_butone() could be replaced with
a generalized version of this function. i.e.
CAP_ALL
usage - sendto_cap_serv_butone(int cap,
struct Client *one,
const char *pattern, ... );
sendto_common_channels_local()
- This function is used only by m_nick and exit_one_client
its used to propagate nick changes to all channels user
is in, and QUIT messages to all channels user is in.
As it only sends to local clients, prefix generation
is left to the user. It also sends the message to the
user if the user isn't on any channels.
usage - sendto_common_channels_local(struct Client *user,
const char *pattern,
...);
sendto_channel_local()
- This function is used only to send locally, never
to remote servers. This is useful when removing
local chanops, or adding a local chanop. MODE/SJOIN
sent to remote server allows that server to propagate
mode changes to its clients locally.
usage - sendto_channel_local(type,
struct Channel *chptr,
const char *pattern, ... );
prefix must be pre-built. type is a flag
denoting ONE of
ALL_MEMBERS - all members locally are sent to
NON_CHANOPS - only non-chanops see this
ONLY_CHANOPS_VOICED - both chanops and voiced see this
ONLY_CHANOPS - only chanops see this
sendto_match_butone()
match_it() - both only used for the old style oper masking
i.e. /msg #hostmask which in hyb7 is /msg $#hostmask
or /msg $servermask in hyb7 /msg $$servermask
usage - match_it(struct Client *one,
const char *mask,
int what);
one is the client to match on either hostmask or servermask
mask is the actual mask
what is either MATCH_HOST or MATCH_SERVER
usage - sendto_match_butone(struct Client *one,
struct Client *from,
char *mark,
int what,
const char *pattern, ... );
sendto_channel_remote()
- Is only used to send a message to a remote server
sendto_match_cap_servs()
- Is used only to send MODE lists to remote server
who are capable of it. i.e. MODE #channel +e nick!user@host
sendto_match_noncap_servs()
- Is used only to send MODE lists to remote servers that
are not capable of it. i.e. MODE #channel +o nick
- This allows you to send a MODE #channel +h nick via
sendto_match_cap_servs and MODE #channel +o nick to
servers which dont support it.
sendto_anywhere()
- Allows the sending of a message to any client on the net
without knowing whether its local or remote. The penalty
is the calculation of a run-time prefix.
It is less efficient then sendto_one()
usage - sendto_anywhere(struct Client *to,
struct Client *from,
const char *pattern, ...);
e.g.
sendto_anywhere(acptr, sptr,
"PRIVMSG Larz :Hi, Where ever you are");
sendto_realops_flags()
- combines old sendto_realops and sendto_realops_flags
sends specified message to opers locally only
depending on flags. FLAGS_ALL is a special case
to send to any oper.
usage - sendto_realops_flags(int flags,
const char *pattern, ... );
e.g.
sendto_realops_flags(FLAGS_ALL,
"Don't eat the yellow snow");
sendto_wallops_flags()
- sends specified message to opers locally,
depending on flags. used for messages that need
to be in wallops form
usage - sendto_wall_flags(int flags,
struct Client *, const char *patterm ...);
e.g.
sendto_wallops_flags(FLAGS_LOCOPS,
sptr, "Message");
ts_warn() - Only used to send warning messages to all opers
without flooding them with warnings.
It limits the number of warnings to no more than 5
every 5 seconds. It probably can go away now.
usage - ts_warn(const char *pattern, ... );
*** LOCAL HELPER FUNCTIONS (static) ***
sendto_format() - Used to format a varargs buffer into given buffer
returns length of buffer built, enforces RFC1459 length
limits and appends \r\n as per rfc.
usage - sendto_format(char *sendbuf,
const char *pattern, ... );
send_trim() - This local function simply trims a char string
to fit inside 512 bytes as per rfc1459, adding
a cr/lf pair as needed. It does not check to make
sure original string has a cr/lf.
usage - int send_trim(char buffer, int len);
returns length as modified or not,
modifies buffer in-place.
sendto_list_local()
- This local function sends given message to given dlink_list
with data == a local client. This is used by
sendto_common_channels_local() and by
sendto_channel_local()
It could easily be extended to sendto "groups" of
otherwise unrelated users, not just channel groups.
usage - sendto_list_local(dlink_list *list,
const char *sendbuf,
int len);
sendto_list_anywhere()
- This local function sends a message to all members
as given in a dlink_list, whether they are remote or local
clients. It is used by sendto_channel_butone()
It could easily be extended to sendto "groups" of
otherwise unrelated users, not just channel groups.
usage: sendto_list_anywhere(struct Client *one,
struct Client *from,
dlink_list *list,
const char *local_sendbuf,
int local_len,
const char *remote_sendbuf,
int remote_len);
send_message()
- This local function does the actual send of message
usage: send_message(struct Client *to, char *msg, int len);
The message has to be pre-formatted and the length
must be pre-calculated.
-- Diane Bruce
$Id: send.txt 23020 2006-09-01 18:20:19Z androsyn $

View File

@ -0,0 +1,151 @@
Overview of the TS5 system
Lee H <lee@leeh.co.uk>
$Id: ts5.txt 23020 2006-09-01 18:20:19Z androsyn $
For the purposes of this document, ircd versions:
hybrid6.0
ircd-comstud-1.12
CSr31pl4
and prior, are TS3.
ircd-hybrid-6.2 and later support TS5.
Whats TS5?
----------
The difference between TS5 and TS3 is what happened on opless channels. TS
works by establishing which server has the oldest version of the channel,
the version that is oldest, keeps its modes and ops, the version that is
youngest, removes their modes and ops, and accepts the older version.
There was an exception to this rule with opless channels, if a channel was
opless, TS3 would allow anybody to keep their ops and modes on the channel.
TS5 aims to stop this, by removing this exception.
Example1:
An irc network, with server A (every server is ts3)
UserA is on ServerA, in channel #broken. This channel is opless, and has a
TS of 800000000. ServerA splits, and whilst it is split, UserA cycles
channel #broken, recreates the channel and is given ops. On ServerA #broken
now has a TS of 900000000 and has ops. ServerA rejoins with the network,
via HubB. HubB realises #broken is opless, so allows UserA to retain ops.
The TS is moved forward to 900000000.
The network now sees #broken as having a TS of 900000000, with UserA being
opped.
Example2:
An irc network, with server C (every server is ts5)
Same scenario as above. ServerC splits and UserC cycles channel #broken,
recreating it with a TS of 900000000. ServerC rejoins with the network via
HubD. HubD realises #broken has a TS of 800000000 locally, and ServerC is
showing a TS of 900000000, it ignores ServerC's modes and ops. The channel
remains opless. ServerC receives HubD's modes, and it notices HubD has a
lower TS of channel #broken. It removes UserC's ops, removes the channel
modes on #broken, and accepts HubD's status.
The network version of #broken hasnt changed. It is still opless, with a TS
of 800000000.
As you can see, TS5 makes splitting a server to regain ops useless, as it
cannot be abused to give ops after a netsplit.
The problem with TS5 however, is what happens on a mixed TS5/TS3 network.
Channels where the older TS has ops will behave the same way on TS5 and TS3,
however an opless channel will behave differently, as you can see above.
The result of TS5/TS3 mixed can be a desync:
Example1:
As per Example1 above, except the rest of the network is TS5, ServerA is
TS3. ServerA would keep its modes and ops, whilst the rest of the network
would remove them. This means only ServerA would see UserA as opped. The
desync can be abused, as UserA can send modes. Hybrid6.0 servers will
accept these modes from the unopped client, so if UserA ops UserB, who then
ops UserA, the channel will be the same across all Hybrid6.0 and Hybrid6.1
servers.
Example2:
As per Example2 above, except the rest of the network is TS3. ServerC is
TS5. ServerC would remove its modes and ops, therefore UserC would not be
opped on ServerC, therefore it could not send any mode changes to the
channel. Although it is opped elsewhere, it isnt opped locally, so the
desync cannot be abused.
As you can see, the desync's that can occur can either be resynced, or are
useless to the user, so a mixed TS5/TS3 network is not a huge problem,
although a desync is NOT a good thing to have.
Why TS5?
--------
We have jumped to TS5 from TS3, because there was a version of ircd that was
TS4, so it was thought better to avoid a clash with an existing version.
Advantages
----------
Its a realistic event that a server will be attacked so it splits off a
network, then used to regain ops in a channel. TS5 makes this pointless,
the server will never give ops on a netsplit. TS5 is network wide, so it
leaves individual servers free to choose options like NO_JOIN_ON_SPLIT,
whilst keeping splits useless to users.
Disadvantages
-------------
Its virtually impossible for a user to actively regain ops themselves (some
regard this as an advantage..) because on a large sized channel, its
impossible to get people to leave so it can be recreated, therefore if a
network did not have some form of services, it could possibly end up
requiring oper intervention, as you cant get everybody to leave, and you
cant use splits to regain ops, therefore if the channel is open (an
invite-only channel would gradually destroy itself as noone new can join) it
could be impossible for a user to regain ops.
On a network that has some form of services, The effect of TS5 would be
minimal, however the services must be of sufficient quality to fix opless
channels, as TS5 renders netsplits for ops worthless.
Recommendations
---------------
If your network has good stable services, we recommend TS5 is enabled, as
people have no reason to abuse netsplits anyway.
If your network has no services at all, then TS5 may cause problems with
users being left with a permanently opless channel.
If your network occupies the middle ground, then its a choice between users
needing to be able to use splits to regain ops, or making netsplits that are
caused to regain ops worthless.
If TS5 is chosen, the FULL network must upgrade and this should be done in a
relatively short space of time to minimise the possible desync effects.
Alternatives
------------
There is also NO_JOIN_ON_SPLIT and NO_OP_ON_SPLIT, however these use the
configuration of minimum servers and users, and sometimes a split that is
above these limits is enough to be abused to regain ops, whereas if the
limits are too high, clients will never be able to join anything or be opped
when they create a channel.
EOF

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,299 @@
$Id: ts6.txt 23628 2007-02-14 19:03:07Z leeh $
TS6 Proposal (v8)
Written by Lee H <lee@leeh.co.uk>
Ideas borrowed heavily from ircnet (Beeth, jv, Q)
- Changes between v7 and v8 -
-----------------------------
In the v7 specification, the JOIN command included the channel modes of a
channel, and acted on them following TS rules. In the v8 specification,
JOIN will never send modes.
Desyncs can occur both when they are sent and when they are not. If they
are sent, then you can have a situation where a user on one side of the
network issues "MODE #channel -l", and a user on another side of the network
issues "JOIN #channel" whilst the +l still exists. As the JOIN string sent
server<->server includes the full modes at the time of the user joining,
this will propagate the +l, but there is a -l crossing in the other
direction. Desync will occur beyond where they intersect.
If the modes are not sent, then a lower TS JOIN command, or a JOIN command
that creates a channel will cause a desync.
It is judged that the desync with sending the modes is worse than the desync
by not sending them, as such the v8 specification dictates modes are not
sent with a JOIN command server<->server.
The v8 specification also clarifies that servers may issue TMODE.
- Introduction -
----------------
This document aims to fix some of the flaws that are still present in the
current TS system.
Whilst only one person may use a nickname at any one time, they are not
a reliable method of directing commands between servers. Clients can change
their nicknames, which can create desyncs. A reliable method of directing
messages between servers is required so that a message will always reach the
intended destination, even if the client changes nicks in between.
UID solves this problem by ensuring that a client has a unique ID for the
duration of his connection.
This document also aims to solve the lack of TS rules to channel 'bans' on
a netburst. Bans from both sides of a TS war (losing/winning) are kept.
Bursting the bans with a TS solves this problem.
There is also a race condition in the current TS system, where a user can
issue a mode during a netburst and the mode will be set on the server
we are bursting to.
- Definitions -
---------------
Throughout this document, the following terms are used:
SID - A servers unique ID. This is three characters long and must be in
the form [0-9][A-Z0-9][A-Z0-9]
ID - A clients unique ID. This is six characters long and must be in
the form [A-Z][A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9]. The
numbers [0-9] at the beginning of an ID are legal characters, but
reserved for future use.
UID - An ID concateneted to a SID. This forms the clients UID.
TS6 - The TS version 6.
- Support -
-----------
Support for this document is given by the TS version 6.
Wherever a destination parameter or source parameter is used, it must use
the SID or UID if the server/client has one. A TS6 capable server must
translate any SIDs/UIDs back into the server/clients name when communicating
with a server that does not support TS6.
A TS6 server must also support the QS (quitstorm) system, and the encap
specification found here:
http://www.leeh.co.uk/ircd/encap.txt
The TS6 protocol does not supports masked entities.
- Nick TS rules -
-----------------
A server receiving a command that requires nick TS rules must check for a
collision between an existing user, and the nick in the received message.
(the "new user"). The collisions must obey the rules specified in Nick TS
collisions.
If the TS received is lower than the TS of the existing user the server will
collide the existing user if the clients user@host are different, if the
clients user@hosts are identical it will collide the new user.
If the TS received is equal to the TS of the existing user both clients are
collided.
If the TS received is higher than the TS of the existing user, the server
will collide the existing user if the user@hosts are identical, if the
clients user@host are different it will collide the new user and drop the
message.
- Nick TS collisions -
----------------------
If both users are to be collided, we must issue a KILL for the existing
user to all servers. If the new user has a UID then we must also issue a
KILL for that UID back to the server sending us data causing the collision.
If only the existing user is being collided, we must issue a KILL for the
existing user to all servers except the server sending us data. If the
existing user has a UID and the server sending us data supports TS6 then
we must also issue a KILL for the existing users UID to the server sending
us data.
If only the new user is being collided, we must issue a KILL for the new user
back to the server sending us data if the new user has a UID.
- Channel TS rules -
--------------------
A server receiving a command that requires normal channel TS rules must
apply the following rules to the command.
If the TS received is lower than our TS of the channel a TS6 server must
remove status modes (+ov etc) and channel modes (+nt etc). If the
originating server is TS6 capable (ie, it has a SID), the server must
also remove any ban modes (+b etc). The new modes and statuses are then
accepted.
If any bans are removed, the server must send to non-TS6, directly connected
servers mode changes removing the bans after the command is propagated.
This prevents desync with banlists, and has to be sent after as clients are
still able to send mode changes before the triggering command arrives.
If the TS received is equal to our TS of the channel the server should keep
its current modes and accept the received modes and statuses.
If the TS received is higher than our TS of the channel the server should keep
its current modes and ignore the received modes and statuses. Any statuses
given in the received message will be removed. A server must mark clients
losing their op (+o) status who do not have a UID as 'deopped'. A server must
ignore any "MODE" commands from a user marked as 'deopped'.
- Simple channel TS rules -
---------------------------
A server receiving a command that requires simple channel TS rules must
apply the following rules to the command.
If the TS received is lower, or equal to our TS of the channel the modes are
accepted. If the TS received is higher than our TS of the channel the modes
are ignored and dropped.
Simple channel TS rules do not affect current modes in the channel except
for the modes we are accepting.
- The following commands are defined here as the TS6 protocol -
---------------------------------------------------------------
- PASS -
PASS <PASSWORD> TS <TS_CURRENT> :<SID>
This command is used for password verification with the server we are
connecting to.
Due to the burst being sent on verification of the "SERVER" command, and
"SVINFO" being sent after "SERVER", we need to be aware of the TS version
earlier to decide whether to send a TS6 burst or not.
The <PASSWORD> field is the password we have stored for this server,
<TS_CURRENT> is our current TS version. If this field is not present then
the server does not support TS6. <SID> is the SID of the server.
- UID -
:<SID> UID <NICK> <HOPS> <TS> +<UMODE> <USERNAME> <HOSTNAME> <IP> <UID> :<GECOS>
This command is used for introducing clients to the network.
The <SID> field is the SID of the server the client is connected to.
The <NICK> field is the nick of the client being introduced. The <HOPS>
field is the amount of server hops between the server being burst to and
the server the client is on. The <TS> field is the TS of the client, either
the time they connected or the time they last changed nick. The <UMODE>
field contains the clients usermodes that need to be transmitted between
servers. The <USERNAME> field contains the clients username/ident. The
<HOSTNAME> field contains the clients host.
The <IP> field contains the clients IP. If the IP is not to be sent
(due to a spoof etc), the field must be sent as "0". The <UID> field is the
clients UID. The <GECOS> field is the clients gecos.
A server receiving a UID command must apply nick TS rules to the nick.
- SID -
:<SID> SID <SERVERNAME> <HOPS> <SID> :<GECOS>
This command is used for introducing servers to the network.
The first <SID> field is the SID of the new servers uplink. The
<SERVERNAME> field is the new servers name. The <HOPS> field is the hops
between the server being introduced nd the server being burst to.
The second <SID> field is the SID of the new server. The <GECOS> field i
is the new servers gecos.
Upon receiving the SID command servers must check for a SID collision.
Two servers must not be allowed to link to the network with the same SID.
If a server detects a SID collision it must drop the link to the directly
connected server through which the command was received.
Client and servers which do not have a UID/SID must be introduced by old
methods.
- SJOIN -
:<SID> SJOIN <TS> <CHANNAME> +<CHANMODES> :<UIDS>
This command is used for introducing users to channels.
The <SID> field is the SID of the server introducing users to the channel.
The <TS> field is the channels current TS, <CHANNAME> is the channels
current name, <CHANMODES> are the channels current modes. <UIDS> is a
space delimited list of clients UIDs to join to the channel. Each clients
UID is prefixed with their status on the channel, ie "@UID" for an opped
user. Multiple prefixes are allowed, "peons" (clients without a status) are
not prefixed.
A server receiving an SJOIN must apply normal channel TS rules to the SJOIN.
A TS6 server must not use the SJOIN command outside of a netburst
to introduce a single user to an existing channel. It must instead
use the "JOIN" command defined in this specification. A TS6 server must
still use SJOIN for creating channels.
- JOIN -
:<UID> JOIN <TS> <CHANNAME> +
This command is used for introducing one user unopped to an existing channel.
The <UID> field is the UID of the client joining the channel. The
<TS> field is the channels current TS, <CHANNAME> is the channels
current name.
A server receiving a JOIN must apply normal channel TS rules to the JOIN.
No channel modes are sent with the JOIN command. In previous versions of
this specification, the "+" parameter contained the channels current modes.
A server following this version of the specification must not interpret this
argument and must not propagate any value other than "+" for this parameter.
It should be noted that whilst JOIN would not normally create a
channel or lower the timestamp, during specific conditions it can. This
can create a desync that this specification does not rectify.
- BMASK -
:<SID> BMASK <TS> <CHANNAME> <TYPE> :<MASKS>
This command is used for bursting channel bans to a network.
The <SID> field is the SID of the server bursting the bans. The
<TS> field is the channels current TS, <CHANNAME> is the channels
name. <TYPE> is a single character identifying the mode type (ie,
for a ban 'b'). <MASKS> is a space delimited list of masks of the
given mode,limited only in length to the size of the buffer as defined
by RFC1459.
A server receiving a BMASK must apply simple channel TS rules to the BMASK.
A TS6 server must translate BMASKs into raw modes for non-TS6
capable servers. This command must be used only after SJOIN has
been sent for the given channel.
It should be noted however, that a BMASK with a lower TS should
not be possible without a desync, due to it being sent after
SJOIN.
- TMODE -
:<SID|UID> TMODE <TS> <CHANNAME> <MODESTRING>
This command is used for clients issuing modes on a channel.
<SID|UID> is either the UID of the client setting the mode, or the SID of
the server setting the mode. <TS> is the current TS of the channel,
<CHANNAME> is the channels name. <MODESTRING> is the raw mode the client is
setting.
A server receiving a TMODE must apply simple channel TS rules to the TMODE.
A TS6 server must translate MODEs issued by a local client, or received from
a server into TMODE to send to other TS6 capable servers.

View File

@ -0,0 +1,38 @@
- Target Change for Messages -
- Lee H <lee -at- leeh.co.uk> -
-------------------------------
If the server you are using uses the target change mechanism, then
restrictions are placed on how many different users you can message in a set
timeframe.
Target change does not apply to channels, ctcp replies or messages to
yourself.
You will have a set number of 'slots', each different client you message
will take up one slot. A client doing a nick change will not use a new slot,
however a client leaving the network and reconnecting will. You will
receive 1 new slot roughly every minute.
When all slots are filled, messages to new clients will not be accepted.
Messages to clients already filling a slot will be accepted. If all slots
are full, you will receive the ERR_TARGCHANGE numeric, number 707 in the
form:
:<server> 707 <yournick> <targetnick> :Targets changing too fast, message dropped
The slots are operated as a FIFO (first in, first out), so the first person
you message will be the first person removed from a slot, even if you are
still talking to this person.
The number of slots in use will be kept through a reconnection, though the
information in those slots will be dropped. However, you will always
receive one free slot on a reconnection. Other servers using this mechanism
will also be made aware of details about slots.
Target change can be avoided via the CNOTICE and CPRIVMSG commands, when you
are opped or voiced in a channel, and you are messaging a client within that
channel. See /quote help cnotice and /quote help cprivmsg for more
information.
--
$Id: tgchange.txt 23020 2006-09-01 18:20:19Z androsyn $

View File

@ -0,0 +1,113 @@
$Id: whats-new-2.0.txt 23020 2006-09-01 18:20:19Z androsyn $
The following is a list of major changes between ircd-ratbox-1.x and
ircd-ratbox-2.0
Config File
-----------
- name="foo"; is no longer supported in connect {}; operator {}; and
class {};. You must now use connect "irc.foo.com" { ... }; etc.
- operator {}; no longer contains a class
- kline_with_connection_closed is gone, replaced with
kline_reason = "Connection closed";
- logging {}; is gone, replaced with more advanced log system - see
example.conf log {}; for more info. Note, by default only very basic
information will be logged.
- support for a specific opers initial umodes on /oper, by umodes = ...;
in operator {};
- added stats_e_disabled = yes|no; to general {};, controlling whether stats
e (which can contain server ips) is never shown to anyone
- support for compressed|encrypted|topicburst|autoconn = yes|no; is gone,
replaced with flags = compressed, encrypted, topicburst, autoconn;
- support for individual auth flags "kline_exempt = yes"; etc removed, now
must use flags = ...; method
- support for individual oper flags "kline = yes;" etc removed, now must use
flags = ...; method.
- extended flags = ...; method to allow negation, so you may prefix a flag
with '~' to negate it. Default oper flags are operwall, remoteban and
encrypted (indicates password is encrypted with mkpasswd)
- new flags in shared {};, tkline, txline and tresv, allowing temp only of
kline, xline and resv respectively.
- new flags in cluster {}; tkline, txline and tresv which will cluster
only the temp of each type. kline, xline and resv will now only
cluster the permanent ones of each type.
- cluster {}; no longer allows a server to place klines etc locally, it
simply dictates who we send to.
- shared {}; is now ordered top-down and the first one that matches the
user@host and server will be used, and the flags taken from this. This
means if a remote oper matches a shared block without kline privs, even
though there is a shared {}; block they match under it with kline privs
they will not be able to place klines.
- added invite_ops_only to channel {}; which will restrict the use of INVITE
to chanops on that channel always, rather than just to +i chans.
Client
------
- /help is now available for all users, as its now cached in memory.
removes config option use_help from general {};
- default CHANNELLEN for local clients is now 50
- AWAYLEN added to 005, default is 90
- kick/part/quit now use REASONLEN (120) rather than TOPICLEN
- umode +g now exempts users messaging themselves
Oper
----
- kline/dline <nick> is no longer supported
- oper reasons are now more fully supported
- opers can now be hidden from stats p, by flag "invisible"
- XLINEs no longer contain a type field, theyll now all just silently reject
- xlines are now 'tracked' - stats X shows how many times each xline has
rejected a client
- temp xlines and resvs
- klines set against spoofed users will now take effect when the user
connects as well, if the user is not kline_exempt
- trace spy now contains target param if its against a single user
- the old "you need xline=yes;" notices have been replaced by ERR_NOPRIVS
(numeric 723)
- umode +C, machine parsable client connect/exit notices which includes the
two unused fields sent in the USER command
Channels
--------
- persistent channels have been removed
- quiet_on_ban now uses a cache, which should speed it up
Server <-> Server Protocol
--------------------------
- support for bursting away messages on connect, controlled by
burst_away = yes|no; in general {};
- TS6, the new server <-> server protocol. As part of this you *must*
specify a "sid" in serverinfo {}; that is three alphanumeric characters,
and must start with a digit. use_ts6 = yes|no; in general controls
whether it is actually used or not. For more information, see:
http://www.ircd-ratbox.org/TS6.txt
- fakename in connect {}; is gone, you can no longer mask servers.
- support for encrypted links are gone
- global capabilities. The server will now inform the rest of the network
over ENCAP about the capabilities of other servers.
Misc
----
- support for message translation has been removed. If you want these,
modify messages.tab and distribute that.
- most of server hiding is gone, only thing that is left is flattened links
- flattened links cache is now stored in memory instead of a file
- nick delay. any client which splits will have their nick 'locked', until
a remote client uses this nick, or until it expires after the time nick_delay
in general {}. This prevents the masses of kills from clients 'regaining'
nicknames on a short split.
- support for disabling bold chars etc in channel names for local users, to
prevent faking channels. disable_fake_channels = <yes|no>; in general {};
Code cleanups
-------------
- remove mapped ipv4 in ipv6 sockets, the correct native socket will now be
used for each.
- module API has been rewritten, 1.x modules will no longer work.
- hook API has been rewritten
- proper handlers for ENCAP commands
- support for vms ast i/o
- connect {}; and operator {}; are now in their own structs, saving memory
in ConfItem
- shared/cluster now use the same struct and flags
- various other code cleanups thatd take all year to list ;)

View File

@ -0,0 +1,69 @@
# $Id: whats-new-2.1.txt 23020 2006-09-01 18:20:19Z androsyn $
The following is a list of the major changes between ircd-ratbox-2.0 and
ircd-ratbox-2.1.
Config file
-----------
- IP entries within exempt {}; can now be stacked, eg:
exempt { ip = "127.0.0.1"; ip = "192.168.0.0/24"; };
- shared {}; has been completely reworked so that it allows stacking.
shared {}; blocks for 2.0 and earlier will no longer work.
See example.conf for the new format.
- cluster {}; has been reworked to allow stacking.
cluster {}; blocks for 2.0 and earlier will no longer work.
See example.conf for the new format.
- New auth flag, jupe_exempt. When set on a client, that client will not
generate jupe warning notices when they try to join juped channels.
- You may no longer specify klines, dlines, xlines and resvs in ircd.conf.
Instead, there is no support for banconfigs with a ".perm" extension,
eg kline.conf.perm. Anything within a .perm file will be read, but
cannot be removed via the ircd. The format of these files is the same
format as their normal non-permanent counterpart. So kline.conf.perm
takes the same format as kline.conf, and so on.
- rehash and kill -HUP no longer reread the ban configs kline.conf etc.
You must now use /rehash bans, or kill -USR2
- New config option to general {};, dline_with_reason = yes|no;. Default no.
Traditionally, when a client connects and is dlined, the reason is never
shown. Enabling this will output the reason to clients.
Client
------
- Support for "deaf", umode +D. When a client is 'deaf', they will not
receive any messages sent towards channels. They will still receive joins
etc, but normal channel chat will not be sent. Any private messages
will still be sent.
- Target change anti-spam system. Restrictions are now placed upon how many
different clients (not channels) can be messaged within a specific time
period.
- Server-side notify lists. These allow a client to request a server
notifies them when a nickname comes online or goesoffline. See
doc/monitor.txt for more information.
- Client capabilities. These allow clients to negotiate capabilities with
the server. Currently supports:
- multi-prefix: A +ov client will have "@+" shown in names/who replies.
Oper
----
- RESVs are now tracked. Stats q/Q have been modified so that the first
field of the output is now a number indicating how many times the RESV
has been hit.
ratbox-services support (non-efnet)
-----------------------------------
- For those of you using ratbox-services, there is now compatibility code
within ircd, enabled by passing '--enable-services' to configure.
See doc/services.txt for more information.
Code cleanups
-------------
- Removed the custom file implementation, use the system one instead.
- The hook system has been redesigned, theres now a more thorough set of
hooks that may be used. See docs/hooks.txt
- Removed support for VMS. It hasnt worked for a long time.
- Cleanups to the expiry of temp klines/dlines.
- Various other things ;-).
- Better splitcode, it now works on how many servers have notified
us of burst finishing, rather than how many servers are linked to the
network.

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