[svn] - the new plan:
+ branches/release-2.1 -> 2.2 base + 3.0 -> branches/cxxconversion + backport some immediate 3.0 functionality for 2.2 + other stuff
This commit is contained in:
commit
212380e3f4
430 changed files with 122424 additions and 0 deletions
8
.cvsignore
Normal file
8
.cvsignore
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
config.log
|
||||||
|
config.cache
|
||||||
|
config.status
|
||||||
|
autom4te.cache
|
||||||
|
Makefile
|
||||||
|
lint.out
|
||||||
|
rsa_respond.tar.gz
|
||||||
|
.depend
|
49
.indent.pro
vendored
Normal file
49
.indent.pro
vendored
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
/* $Id: .indent.pro 238 2005-09-21 05:26:03Z nenolod $ */
|
||||||
|
|
||||||
|
/* copy this file to the source dir then run indent file.c */
|
||||||
|
|
||||||
|
--gnu-style
|
||||||
|
|
||||||
|
/* This is the indent before the brace not inside the block. */
|
||||||
|
--brace-indent0
|
||||||
|
|
||||||
|
/* Indent case: by 2 and braces inside case by 0(then by 0)... */
|
||||||
|
--case-brace-indentation0
|
||||||
|
--case-indentation2
|
||||||
|
|
||||||
|
--indent-level8
|
||||||
|
|
||||||
|
/* Put while() on the brace from do... */
|
||||||
|
--cuddle-do-while
|
||||||
|
|
||||||
|
/* Disable an annoying format... */
|
||||||
|
--no-space-after-function-call-names
|
||||||
|
|
||||||
|
/* Disable an annoying format... */
|
||||||
|
--dont-break-procedure-type
|
||||||
|
|
||||||
|
/* Disable an annoying format... */
|
||||||
|
--no-space-after-casts
|
||||||
|
|
||||||
|
--line-length200
|
||||||
|
|
||||||
|
/* typedefs */
|
||||||
|
-T boolean_t
|
||||||
|
-T node_t
|
||||||
|
-T list_t
|
||||||
|
-T tld_t
|
||||||
|
-T kline_t
|
||||||
|
-T EVH
|
||||||
|
-T sra_t
|
||||||
|
-T server_t
|
||||||
|
-T user_t
|
||||||
|
-T channel_t
|
||||||
|
-T chanuser_t
|
||||||
|
-T myuser_t
|
||||||
|
-T mychan_t
|
||||||
|
-T chanacs_t
|
||||||
|
-T CONFIGENTRY
|
||||||
|
-T CONFIGFILE
|
||||||
|
-T Block
|
||||||
|
-T MemBlock
|
||||||
|
-T BlockHeap
|
27
BUGS
Normal file
27
BUGS
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
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).
|
||||||
|
|
||||||
|
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. install or make install is also safe.
|
||||||
|
/MODUNLOAD will then work successfully.
|
||||||
|
|
||||||
|
We will likely have a workaround implemented in the next version.
|
||||||
|
|
||||||
|
BUG REPORTS: If you run this code and encounter problems, you must report
|
||||||
|
the bug via IRC, irc.atheme.net #athemenet-dev.
|
||||||
|
|
||||||
|
Please include a gdb backtrace and keep your binaries, modules and core file
|
||||||
|
in case the developers need more information.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
$Id: BUGS 1634 2006-06-04 13:26:04Z jilles $
|
24
CREDITS
Normal file
24
CREDITS
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
$Id: CREDITS 3133 2007-01-21 15:38:16Z jilles $
|
||||||
|
|
||||||
|
Charybdis started as an evolution from ircd-ratbox-2.1.5+datadrain. Its
|
||||||
|
development is led by a team of dedicated developers who have put a lot
|
||||||
|
of time into the project.
|
||||||
|
|
||||||
|
The charybdis core team is listed in nick-alphabetical order:
|
||||||
|
|
||||||
|
gxti, Michael Tharp <gxti -at- partiallystapled.com>
|
||||||
|
jilles, Jilles Tjoelker <jilles -at- stack.nl>
|
||||||
|
nenolod, William Pitcock <nenolod -at- nenolod.net>
|
||||||
|
twincest, River Tarnell <river -at- attenuate.org>
|
||||||
|
|
||||||
|
The following people have made contributions to the Charybdis release,
|
||||||
|
in nick-alphabetical order:
|
||||||
|
|
||||||
|
AndroSyn, Aaron Sethman <androsyn -at- ratbox.org>
|
||||||
|
anfl, Lee Hardy <lee -at- leeh.co.uk>
|
||||||
|
beu, Elfyn McBratney <elfyn.mcbratney -at- gmail.com>
|
||||||
|
Entrope, Michael Poole <mdpoole -at- trolius.org>
|
||||||
|
ThaPrince, Jon Christopherson <jon -at- vile.com>
|
||||||
|
w00t, Robin Burchell <surreal.w00t -at- gmail.com>
|
||||||
|
|
||||||
|
Visit the Charybdis website at: http://www.ircd-charybdis.org
|
266
INSTALL
Normal file
266
INSTALL
Normal file
|
@ -0,0 +1,266 @@
|
||||||
|
Hybrid INSTALL Document
|
||||||
|
|
||||||
|
$Id: INSTALL 1837 2006-08-22 14:05:58Z nenolod $
|
||||||
|
|
||||||
|
Copyright (c) 2001 by ircd-hybrid team
|
||||||
|
Copyright (c) 2002-2004 ircd-ratbox development team
|
||||||
|
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
|
+------------------------------------------------------------------------+
|
||||||
|
| 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" |
|
||||||
|
| |
|
||||||
|
| Important: The old config format WILL NOT WORK. Please see point 6! |
|
||||||
|
| |
|
||||||
|
| The old kline format WILL NOT WORK. Please see point 7! |
|
||||||
|
+------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
|
HOW TO BUILD
|
||||||
|
|
||||||
|
As of hybrid-4, the distribution uses GNU autoconf instead of the old
|
||||||
|
Config script. The Makefile has also been updated to include CFLAGS
|
||||||
|
defines for popular modern OSes.
|
||||||
|
|
||||||
|
1.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
2.
|
||||||
|
|
||||||
|
Run the configure script. It will create include/setup.h and the
|
||||||
|
Makefiles to match your system. In ircd-ratbox, the paths are now handled
|
||||||
|
with the --prefix option to configure, not in config.h.
|
||||||
|
/usr/local/ircd is the default if no prefix is specified.
|
||||||
|
|
||||||
|
./configure --prefix="/usr/local/ircd"
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
*
|
||||||
|
|
||||||
|
--enable-devpoll - Enable the superior /dev/poll support on
|
||||||
|
Solaris. Linux /dev/poll is broken and will not work with this
|
||||||
|
option.
|
||||||
|
|
||||||
|
*
|
||||||
|
|
||||||
|
--enable-epoll - Enable the superior Linux Edge-Triggered Polling
|
||||||
|
system. This is currently only available on 2.5 Linux kernel
|
||||||
|
versions or later.
|
||||||
|
|
||||||
|
*
|
||||||
|
|
||||||
|
--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)
|
||||||
|
|
||||||
|
*
|
||||||
|
|
||||||
|
--enable-ipv6 - Enable IPv6 support.
|
||||||
|
|
||||||
|
*
|
||||||
|
|
||||||
|
--disable-shared-modules - Disable module support. This option is
|
||||||
|
more secure, but reduces a lot of the flexibility in Hybrid 7.
|
||||||
|
This may need to be used on some systems without a working dl
|
||||||
|
library.
|
||||||
|
|
||||||
|
*
|
||||||
|
|
||||||
|
--disable-assert - Disable some of the debugging code. This
|
||||||
|
should be used on all production servers for maximum speed and to
|
||||||
|
prevent 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.
|
||||||
|
|
||||||
|
*
|
||||||
|
|
||||||
|
--with-maxclients - Sets the maximum number of clients support by
|
||||||
|
the server. Note that this also twiddles the HARD_FDLIMIT_ define
|
||||||
|
so it is no longer necessary to modify include/config.h for this.
|
||||||
|
If HARD_FDLIMIT_ ends up being larger that FD_SETSIZE when using
|
||||||
|
select() for your I/O loop, s_bsd_select.c will refuse to compile
|
||||||
|
(and tell you to use poll instead). Take this error's advice and
|
||||||
|
use --enable-poll or something a bit more efficient. You'll be
|
||||||
|
happier at the end of the day for it.
|
||||||
|
|
||||||
|
3.
|
||||||
|
|
||||||
|
Look over the "include/config.h" file. This allows you to change the
|
||||||
|
few remaining hard coded options of how the ircd will operate. Most
|
||||||
|
admins will only have to change a few settings. USE_SYSLOG is the only
|
||||||
|
one that most admins will need to edit.
|
||||||
|
|
||||||
|
Note: Note that you must have permission by the sysadmin to send
|
||||||
|
messages to the system log files.
|
||||||
|
|
||||||
|
All other settings in config.h are not necessary to edit.
|
||||||
|
|
||||||
|
4.
|
||||||
|
|
||||||
|
make should build ircd.
|
||||||
|
|
||||||
|
5.
|
||||||
|
|
||||||
|
make install will install the server, modules(1), and tools in the
|
||||||
|
path defined in config.h and the prefix specified when configure was
|
||||||
|
run.
|
||||||
|
|
||||||
|
(1) Unless the server was compiled without module support.
|
||||||
|
|
||||||
|
6.
|
||||||
|
|
||||||
|
If you wish to enable the user log, oper log, and failed oper log,
|
||||||
|
issue these commands at the shell prompt (in the prefix directory)
|
||||||
|
|
||||||
|
$ touch logs/userlog
|
||||||
|
$ touch logs/operlog
|
||||||
|
$ touch logs/foperlog
|
||||||
|
|
||||||
|
Note: If you use different names in ircd.conf, you must 'touch' the
|
||||||
|
specific names.
|
||||||
|
|
||||||
|
7.
|
||||||
|
|
||||||
|
If you are upgrading from Hybrid 5 or Hybrid 6, the config file has
|
||||||
|
changed drastically...
|
||||||
|
|
||||||
|
There is a utility to convert your old config file to the new format.
|
||||||
|
In prefix/bin there is something called "convertconf". Its usage is:
|
||||||
|
./convertconf (old config file to convert) (converted file name)
|
||||||
|
|
||||||
|
Convertconf will NOT convert I: lines. You must use "convertilines"
|
||||||
|
for this which contains a much superior method of conversion and
|
||||||
|
will group I: together under one auth {};.
|
||||||
|
|
||||||
|
Once this is done, move your new config to prefix/etc/ircd.conf and
|
||||||
|
EDIT IT! There are still things that need changing in the config,
|
||||||
|
including the fact that classes MUST be above auth/connect blocks!
|
||||||
|
|
||||||
|
8.
|
||||||
|
|
||||||
|
If you are upgrading from Hybrid 5 or Hybrid 6, the kline file has
|
||||||
|
also changed...
|
||||||
|
|
||||||
|
There is a utility to convert the old kline configuration file to the
|
||||||
|
new format. In prefix/bin there is a program called "convertklines".
|
||||||
|
Its usage is: ./convertklines (old kline.conf filename) (new
|
||||||
|
kline.conf filename) (dline.conf filename).
|
||||||
|
|
||||||
|
Once this is done, move the new files into the prefix/etc/ directory
|
||||||
|
under their proper names. By default, the kline file is named
|
||||||
|
kline.conf and the dline file is named dline.conf.
|
||||||
|
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
|
HOW TO GET HELP
|
||||||
|
|
||||||
|
Send Check or Money Order to... just kidding! You're on your own for
|
||||||
|
support. Try asking other ircd-ratbox admins on EFnet if you can't fix it
|
||||||
|
yourself. If you do fix anything, however, please send context or unified
|
||||||
|
diffs to ircd-ratbox@lists.ratbox.org so the fixes can be incorporated into
|
||||||
|
the next release of ircd-hybrid. If ratbox crashes on you, PLEASE contact
|
||||||
|
ircd-ratbox@lists.ratbox.org ASAP with a backtrace of the core.
|
||||||
|
|
||||||
|
DISCUSSION: There is a 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 /usr/local/ircd
|
||||||
|
directory)
|
||||||
|
|
||||||
|
$ gdb bin/ircd ircd.core
|
||||||
|
|
||||||
|
3.
|
||||||
|
|
||||||
|
At the "(gdb)" prompt, enter the command "bt"
|
||||||
|
|
||||||
|
4.
|
||||||
|
|
||||||
|
Save the output of the backtrace command and send it to
|
||||||
|
ircd-ratbox@lists.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.
|
||||||
|
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
|
OPENSSL NOTES
|
||||||
|
|
||||||
|
Older FreeBSD machines sometimes have the obsolete ports version of
|
||||||
|
OpenSSL libcrypto in /usr/local/lib. When configure is used with
|
||||||
|
--enable-openssl, and libintl is detected in /usr/local/lib, the
|
||||||
|
/usr/local/lib directory will be searched BEFORE the system /usr/lib for
|
||||||
|
libraries by the linker. The linker may try to link to the old
|
||||||
|
/usr/local/lib libcrypto instead of the system /usr/lib libcrypto. Some
|
||||||
|
older versions may cause error messages similar to the following:
|
||||||
|
|
||||||
|
gcc -g -O2 -DIRCD_PREFIX=\"/home/wcampbel/ircd\" -Wl,-export-dynamic
|
||||||
|
-L/usr/local/lib -o ircd blalloc.o channel.o vchannel.o class.o client.o
|
||||||
|
dline_conf.o event.o fdlist.o fileio.o hash.o irc_string.o ircd.o ircdauth.o
|
||||||
|
ircd_signal.o linebuf.o list.o listener.o m_error.o match.o memdebug.o
|
||||||
|
modules.o motd.o mtrie_conf.o oldparse.o numeric.o packet.o parse.o res.o rsa.o
|
||||||
|
restart.o s_auth.o s_bsd.o s_bsd_kqueue.o s_conf.o s_debug.o s_gline.o s_log.o
|
||||||
|
s_misc.o s_serv.o s_stats.o s_user.o scache.o send.o sprintf_irc.o tools.o
|
||||||
|
whowas.o lex.yy.o y.tab.o version.o -lintl -ldescrypt -lcrypto -lfl
|
||||||
|
rsa.o: In function `get_randomness':
|
||||||
|
/home/wcampbel/dev/ircd-ratbox/src/rsa.c(.text+0x60): undefined reference to
|
||||||
|
`RAND_pseudo_bytes'
|
||||||
|
/usr/local/lib/libcrypto.so: undefined reference to `ERR_load_RSAREF_strings'
|
||||||
|
/usr/local/lib/libcrypto.so: undefined reference to `RSA_PKCS1_RSAref'
|
||||||
|
*** Error code 1
|
||||||
|
|
||||||
|
If this is the case, you may need to rerun configure without the
|
||||||
|
--enable-openssl option, manually edit src/Makefile and modules/Makefile
|
||||||
|
to put -L/usr/lib before the -L/usr/local/lib in LDFLAGS, or remove the
|
||||||
|
old OpenSSL from /usr/local, and recompile all applications that use
|
||||||
|
libcrypto to use the system one.
|
341
LICENSE
Normal file
341
LICENSE
Normal file
|
@ -0,0 +1,341 @@
|
||||||
|
# $Id: LICENSE 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Library General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) 19yy <name of author>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Library General
|
||||||
|
Public License instead of this License.
|
147
Makefile.in
Normal file
147
Makefile.in
Normal file
|
@ -0,0 +1,147 @@
|
||||||
|
#************************************************************************
|
||||||
|
#* IRC - Internet Relay Chat, Makefile
|
||||||
|
#* Copyright (C) 1990, Jarkko Oikarinen
|
||||||
|
#*
|
||||||
|
#* This program is free software; you can redistribute it and/or modify
|
||||||
|
#* it under the terms of the GNU General Public License as published by
|
||||||
|
#* the Free Software Foundation; either version 1, or (at your option)
|
||||||
|
#* any later version.
|
||||||
|
#*
|
||||||
|
#* This program is distributed in the hope that it will be useful,
|
||||||
|
#* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
#* GNU General Public License for more details.
|
||||||
|
#*
|
||||||
|
#* You should have received a copy of the GNU General Public License
|
||||||
|
#* along with this program; if not, write to the Free Software
|
||||||
|
#* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
#*
|
||||||
|
#* $Id: Makefile.in 1347 2006-05-17 14:49:13Z nenolod $
|
||||||
|
#*/
|
||||||
|
|
||||||
|
RM=@RM@
|
||||||
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
bindir = @bindir@
|
||||||
|
mandir = @mandir@
|
||||||
|
moduledir = @moduledir@
|
||||||
|
helpdir = @helpdir@
|
||||||
|
confdir = @confdir@
|
||||||
|
logdir = @logdir@
|
||||||
|
|
||||||
|
# Default CFLAGS
|
||||||
|
# CFLAGS = -g -O2 -DNDEBUG
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
# Developers CFLAGS
|
||||||
|
#CFLAGS= -g -O2 -Wunused -Wall -ggdb -pedantic -Wshadow -Wmissing-declarations
|
||||||
|
|
||||||
|
# Default make flags - you may want to uncomment this on a multicpu machine
|
||||||
|
#MFLAGS = -j 4
|
||||||
|
|
||||||
|
#
|
||||||
|
# For developers
|
||||||
|
#CFLAGS= -g -O2 -Wall
|
||||||
|
|
||||||
|
# You may need to define the FD_SETSIZE in order to overrule
|
||||||
|
# the system one.
|
||||||
|
#CFLAGS= -DNDEBUG -g -O2 -D"FD_SETSIZE=1024"
|
||||||
|
SHELL=/bin/sh
|
||||||
|
SUBDIRS=modules extensions libcharybdis src tools servlink doc help
|
||||||
|
CLEANDIRS = ${SUBDIRS}
|
||||||
|
RSA_FILES=rsa_respond/README rsa_respond/respond.c rsa_respond/Makefile
|
||||||
|
|
||||||
|
MAKE = make ${MFLAGS}
|
||||||
|
|
||||||
|
all: build
|
||||||
|
|
||||||
|
|
||||||
|
autoconf: configure.ac
|
||||||
|
autoconf
|
||||||
|
autoheader
|
||||||
|
${RM} -f config.cache
|
||||||
|
|
||||||
|
build:
|
||||||
|
-@if [ ! -f include/setup.h ] ; then \
|
||||||
|
echo "Hmm...doesn't look like you've run configure..."; \
|
||||||
|
echo "Doing so now."; \
|
||||||
|
sh configure; \
|
||||||
|
fi
|
||||||
|
@for i in $(SUBDIRS); do \
|
||||||
|
echo "build ==> $$i";\
|
||||||
|
cd $$i;\
|
||||||
|
${MAKE} build || exit; cd ..;\
|
||||||
|
done
|
||||||
|
|
||||||
|
clean:
|
||||||
|
${RM} -f *~ core rsa_respond.tar rsa_respond.tar.gz
|
||||||
|
@for i in $(CLEANDIRS); do \
|
||||||
|
echo "clean ==> $$i";\
|
||||||
|
cd $$i;\
|
||||||
|
${MAKE} clean; cd ..;\
|
||||||
|
done
|
||||||
|
-@if [ -f include/setup.h ] ; then \
|
||||||
|
echo "To really restart installation, make distclean" ; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
distclean:
|
||||||
|
${RM} -f Makefile *~ *.rej *.orig core ircd.core
|
||||||
|
${RM} -f config.status config.cache config.log
|
||||||
|
cd include; ${RM} -f setup.h *~ *.rej *.orig ; cd ..
|
||||||
|
@for i in $(CLEANDIRS); do \
|
||||||
|
echo "distclean ==> $$i";\
|
||||||
|
cd $$i;\
|
||||||
|
${MAKE} distclean; cd ..;\
|
||||||
|
done
|
||||||
|
|
||||||
|
depend:
|
||||||
|
@for i in $(SUBDIRS); do \
|
||||||
|
echo "depend ==> $$i";\
|
||||||
|
cd $$i;\
|
||||||
|
${MAKE} depend; cd ..;\
|
||||||
|
done
|
||||||
|
|
||||||
|
lint:
|
||||||
|
@for i in $(SUBDIRS); do \
|
||||||
|
echo "lint ==> $$i";\
|
||||||
|
cd $$i;\
|
||||||
|
${MAKE} lint; cd ..;\
|
||||||
|
done
|
||||||
|
|
||||||
|
install-mkdirs:
|
||||||
|
@echo "ircd: setting up ircd directory structure"
|
||||||
|
-@if test ! -d $(DESTDIR)$(prefix); then \
|
||||||
|
mkdir $(DESTDIR)$(prefix); \
|
||||||
|
fi
|
||||||
|
-@if test ! -d $(DESTDIR)$(bindir); then \
|
||||||
|
mkdir $(DESTDIR)$(bindir); \
|
||||||
|
fi
|
||||||
|
-@if test ! -d $(DESTDIR)$(confdir); then \
|
||||||
|
mkdir $(DESTDIR)$(confdir); \
|
||||||
|
fi
|
||||||
|
-@if test ! -d $(DESTDIR)$(mandir); then \
|
||||||
|
mkdir $(DESTDIR)$(mandir); \
|
||||||
|
fi
|
||||||
|
-@if test ! -d $(DESTDIR)$(moduledir); then \
|
||||||
|
mkdir $(DESTDIR)$(moduledir); \
|
||||||
|
fi
|
||||||
|
-@if test ! -d $(DESTDIR)$(helpdir); then \
|
||||||
|
mkdir $(DESTDIR)$(helpdir); \
|
||||||
|
fi
|
||||||
|
-@if test ! -d $(DESTDIR)$(logdir); then \
|
||||||
|
mkdir $(DESTDIR)$(logdir); \
|
||||||
|
fi
|
||||||
|
|
||||||
|
install: install-mkdirs all
|
||||||
|
@for i in $(SUBDIRS); do \
|
||||||
|
echo "install ==> $$i";\
|
||||||
|
cd $$i;\
|
||||||
|
${MAKE} install; \
|
||||||
|
cd ..; \
|
||||||
|
done
|
||||||
|
|
||||||
|
rsa_respond:
|
||||||
|
@cd tools;\
|
||||||
|
echo "Creating rsa_respond.tar.gz";\
|
||||||
|
tar cf ../rsa_respond.tar $(RSA_FILES);\
|
||||||
|
cd ..;\
|
||||||
|
gzip rsa_respond.tar
|
336
NEWS
Normal file
336
NEWS
Normal file
|
@ -0,0 +1,336 @@
|
||||||
|
This is charybdis 2.1.2, Copyright (c) 2005-2006 Charybdis team.
|
||||||
|
See LICENSE for licensing details (GPL v2).
|
||||||
|
|
||||||
|
-- charybdis-2.1.2
|
||||||
|
|
||||||
|
- Fix bug that could cause all hostmangled users to be exempted when a
|
||||||
|
single ban exception existed on a channel.
|
||||||
|
- Tweak \s code a little.
|
||||||
|
- Add a minor clarification to the SGML docs.
|
||||||
|
- Avoid truncation in ip_cloaking (by removing components on the other side).
|
||||||
|
Note that this may cause channel +bqeI modes set on such very long hosts
|
||||||
|
to no longer match.
|
||||||
|
|
||||||
|
-- charybdis-2.1.1
|
||||||
|
|
||||||
|
- Search the shortest list (user's/channel's) when looking up channel
|
||||||
|
memberships.
|
||||||
|
- Make the SID-collision notice look right under all conditions.
|
||||||
|
- Move kills from services from +s to +k snomask.
|
||||||
|
- When no_tilde is present on an auth{} block, check the non-tilde version
|
||||||
|
of the user@host against k:lines as well.
|
||||||
|
- Put full reason in the SQUIT reason when a server is rejected for
|
||||||
|
insufficient parameters being passed to a command.
|
||||||
|
- Don't redirect users to an existing domain, irc.fi.
|
||||||
|
- Improve communication of servlink-related error messages.
|
||||||
|
|
||||||
|
-- charybdis-2.1.0
|
||||||
|
|
||||||
|
- Our official website is now http;//www.ircd-charybdis.org/.
|
||||||
|
- Make RPL_ISUPPORT (005 numeric) modularizable.
|
||||||
|
- Also do forwarding if the channel limit (+l) is exceeded.
|
||||||
|
- Don't count opers on service{} servers in /lusers.
|
||||||
|
- Allow servers to send to @#chan and +#chan.
|
||||||
|
- Allow +S clients (services) to send to channels and @/+ channels always.
|
||||||
|
- Allow normal match() on IP address also in /masktrace.
|
||||||
|
- Add new testmask from ratbox 2.2. Allows matches on nick, ip and gecos
|
||||||
|
in addition to user and host, and is fully analogous to masktrace.
|
||||||
|
The numeric has changed from 724 to 727 and fields in it have changed.
|
||||||
|
- Show IP addresses to opers in /whowas.
|
||||||
|
- Add extb_extgecos extban option ($x:nick!user@host#gecos), from sorcery
|
||||||
|
modules.
|
||||||
|
- Add extb_canjoin extban option ($j:#channel), matches if the user is banned
|
||||||
|
from the other channel.
|
||||||
|
- Allow opers to /who based on realhost.
|
||||||
|
- Allow opers to /masktrace, /testmask based on realhost.
|
||||||
|
- Add general::operspy_dont_care_user_info, limits operspy accountability to
|
||||||
|
channel-related information.
|
||||||
|
- Make host mangling more reliable.
|
||||||
|
- Prevent ban evasion by enabling/disabling host mangling.
|
||||||
|
- Add EUID, sends real host and services account in the same command as other
|
||||||
|
user information.
|
||||||
|
- Make it possible to send CHGHOST without ENCAP (fixes problems with old
|
||||||
|
services).
|
||||||
|
- Allow service{} servers to manipulate the nick delay table (for "nickserv
|
||||||
|
enforcement", aka SVSHOLD).
|
||||||
|
- Send server notices about connections initiated by remote opers network wide.
|
||||||
|
- Fix too early truncation of JOIN channel list.
|
||||||
|
- Make the newconf system available to modules.
|
||||||
|
- Add /stats s to the hurt module to list active hurts.
|
||||||
|
- Add general::servicestring, shown in /whois for opered services (+oS).
|
||||||
|
- Show real host/IP behind dynamic spoof in /whois to the user themselves
|
||||||
|
and opers.
|
||||||
|
- Document option to disable nick delay.
|
||||||
|
- Improve logging of server connections.
|
||||||
|
- Clean up handling of hostnames in connect blocks.
|
||||||
|
- Remove support for resolving ip6.int, people should be using ip6.arpa.
|
||||||
|
- Unbreak --disable-balloc (useful for debugging with tools like valgrind).
|
||||||
|
- Make Solaris 10 I/O ports code compile.
|
||||||
|
- Add WEBIRC module to allow showing the real host/IP of CGI:IRC users.
|
||||||
|
- Comment out blacklist{} block in example confs, as AHBL requires
|
||||||
|
notification before use.
|
||||||
|
- Fix some bugs relating to the resolver.
|
||||||
|
|
||||||
|
-- charybdis-2.0.0
|
||||||
|
|
||||||
|
- Replace ADNS with a new smaller resolver from ircu and hybrid.
|
||||||
|
- Make services shortcuts (/chanserv etc) configurable in ircd.conf.
|
||||||
|
- Add extban: extensible +bqeI matching via modules. Syntax is
|
||||||
|
$<type>[:<data>]. By default no modules are loaded.
|
||||||
|
- Add DNS blacklist checking.
|
||||||
|
- Change operator{} block user@host from host to orighost. This means that
|
||||||
|
services/+h spoofs do not work in operator{} blocks; auth{} spoofs still
|
||||||
|
work. Check your operator{} blocks!
|
||||||
|
- Split contrib/ into extensions/ and unsupported/.
|
||||||
|
- Change CHGHOST do show the change to all other clients on common channels
|
||||||
|
with quit/join/mode.
|
||||||
|
- Add /rehash nickdelay to clear out the nickdelay tables.
|
||||||
|
- Glines are now disabled in the example confs.
|
||||||
|
- Show more error messages on stderr.
|
||||||
|
- Add OMODE command to extensions/ for easier oper mode hacking.
|
||||||
|
- Add HURT system to extensions/; this shuns clients matching certain host/ip
|
||||||
|
unless and until they identify to services. Mainly intended for SorceryNet.
|
||||||
|
- Show SASL success and failure counts in /stats t.
|
||||||
|
- Allow more frequent autoconnects to servers.
|
||||||
|
- Messaging services by nickname no longer uses target change slots.
|
||||||
|
- Only accept SASL from servers in a service{} block.
|
||||||
|
- New auth{} flag need_sasl to reject users who haven't done SASL
|
||||||
|
authentication.
|
||||||
|
- Expand blah.blah and blah:blah to *!*@... instead of ...!*@* for bans
|
||||||
|
- Don't allow opers to fake locops/operwall to +w.
|
||||||
|
- Documentation updates.
|
||||||
|
- Many bugfixes.
|
||||||
|
|
||||||
|
-- charybdis-1.1.0
|
||||||
|
|
||||||
|
- Implement SAFELIST.
|
||||||
|
- Incorporate ircu's match() algorithm.
|
||||||
|
- Improve usermode modularization.
|
||||||
|
- Seperate server notices into a seperate snomask, freeing up many
|
||||||
|
usermodes to be used.
|
||||||
|
- Add support for SIGNON originating from Hyperion2.
|
||||||
|
- Modularize many server notices into seperate modules.
|
||||||
|
- Add hooks for can_join and can_create_channel.
|
||||||
|
- Add support for SASL authentication.
|
||||||
|
- Add introduce_user hook for adding new messages when a user is bursted.
|
||||||
|
- Move a large part of the ircd into libcharybdis.
|
||||||
|
- Don't complain "unknown user mode" if a user tries to unset
|
||||||
|
a mode they do not have access to.
|
||||||
|
- Update our challenge specification to the challenge implementation in
|
||||||
|
ratbox 2.2 for interoperability.
|
||||||
|
- Make +f notices network-wide (local host, global host,
|
||||||
|
global user@host, local class), other notices tied to +f remain local.
|
||||||
|
- Allow ENCAP REALHOST outside of netburst.
|
||||||
|
- Add general::global_snotices option to make server notices be
|
||||||
|
network-wide or not.
|
||||||
|
- Add sno_farconnect.c to contrib, provides farconnect support.
|
||||||
|
Could be useful for BOPM.
|
||||||
|
- Add sno_routing.c which displays information about netsplits, netjoins
|
||||||
|
and the clients affected by them.
|
||||||
|
- Add CHANTRACE and TRACEMASK commands from ratbox 3.0
|
||||||
|
- Use IsOperAdmin() instead of IsAdmin() when sending admin-only messages,
|
||||||
|
that way hidden admins get them too.
|
||||||
|
- Add m_error to core_module_table, somehow it was missing.
|
||||||
|
- Correct a format string bug that occurs when a read error is
|
||||||
|
received.
|
||||||
|
- Add some logging in places where we drop servers and only notify
|
||||||
|
server operators.
|
||||||
|
- Track hostmask limits based on a client's original host, if
|
||||||
|
available.
|
||||||
|
- Move HIDE_SPOOF_IPS into the general {} block in ircd.conf
|
||||||
|
|
||||||
|
-- charybdis-1.0.3
|
||||||
|
|
||||||
|
- Fix /invite UID leak. (Found by logiclrd@EFnet.)
|
||||||
|
- Incorporate ratbox bugfixes for the MONITOR system.
|
||||||
|
- Made show_ip() less braindead.
|
||||||
|
- Show real errno if we fail to connect to a server.
|
||||||
|
- Don't disclose server IP's when a connection fails.
|
||||||
|
- Do not show the channels a service is sitting in.
|
||||||
|
- Reverted the aline code from hybrid-7.2
|
||||||
|
- Make sure TS6 services are recognized properly if connected remotely.
|
||||||
|
- Tweak something in services support for cyrix boxes.
|
||||||
|
|
||||||
|
-- charybdis-1.0.2
|
||||||
|
|
||||||
|
- Fix propagation of an empty SJOIN (permanant channels).
|
||||||
|
- Fix an exploit involving a malformed /trace request.
|
||||||
|
- Don't display a blank RPL_WHOISCHANNELS in a remote whois request.
|
||||||
|
- Allow modules to provide new usermodes.
|
||||||
|
- On a nickname collision, change the collided nick to their unique ID,
|
||||||
|
if general::collision_fnc is enabled in the config.
|
||||||
|
- Don't allow UID lookups in /monitor + and /monitor s
|
||||||
|
- Fix a garbage issue with channel mode +j.
|
||||||
|
- Apply proper capability flags to the proper server in me_gcap().
|
||||||
|
- Use find_named_person() instead of find_person() in a nick collision.
|
||||||
|
- Prevent UID disclosure in cmode setting.
|
||||||
|
- Prevent UID disclosure to remote clients in /kick.
|
||||||
|
- Do not allow users to query via /whois <server> <UID>.
|
||||||
|
- Don't allow local users to use UID's in local usermode changes.
|
||||||
|
- Propagate +q lists on netjunction.
|
||||||
|
- Clear +q lists on a lowerTS SJOIN.
|
||||||
|
- Ported a generic k/d/x-line parser from hybrid-7.2 which resulted in
|
||||||
|
duplicate code reduction.
|
||||||
|
- Fix linebuf raw code to not truncate lines longer than 512 bytes;
|
||||||
|
improves ziplink reliability on net junction.
|
||||||
|
- Use find_named_person() vs find_person() in services alias code.
|
||||||
|
- Fix issue where channel forwarding token can be lost on net junction.
|
||||||
|
- Fix empty channel desync issues involving +P.
|
||||||
|
- Remove unused non-ENCAP CHGHOST support.
|
||||||
|
- Use TS6 form for SQUIT wallops.
|
||||||
|
- Propagate nickname changes for remote clients in TS6 form if possible,
|
||||||
|
even if sent in TS5 format.
|
||||||
|
- Only clear oper_only_umodes for local clients on deoper.
|
||||||
|
|
||||||
|
-- charybdis-1.0.1
|
||||||
|
|
||||||
|
- Display logged in status on non-local clients too.
|
||||||
|
- Documentation updates
|
||||||
|
- Fix a bug with forward target authorization.
|
||||||
|
- Fix a bug with mode propagation (+Q/+F).
|
||||||
|
- Change ERR_NOSUCHNICK to ERR_SERVICESOFFLINE in services aliases.
|
||||||
|
- Add remote rehashing.
|
||||||
|
- Document service { } blocks (u:lines on ircu).
|
||||||
|
- Document identify_service and identify_command in reference.conf.
|
||||||
|
|
||||||
|
-- charybdis-1.0
|
||||||
|
- Implement channel mode +L for channel list limit exemptions.
|
||||||
|
- Implement channel mode +P primarily as a status mode, permanant
|
||||||
|
channel -- this is usually enforced via services registrations.
|
||||||
|
- Change behaviour of /stats p: now displays all staff members instead
|
||||||
|
of local ones only.
|
||||||
|
- Make oper_list global, add local_oper_list for local traffic.
|
||||||
|
- Strip control codes from parts and quits.
|
||||||
|
- Add channel mode +c which strips control codes from messages sent to
|
||||||
|
the channel.
|
||||||
|
- Add channel mode +g which enables free use of the /invite command.
|
||||||
|
- Add channel mode +z which sends rejected messages to channel ops.
|
||||||
|
Could be useful for Q&A sessions or other similar events.
|
||||||
|
- Add channel quietmasks. These are recommended over the use of channel
|
||||||
|
bans used to remove a user's ability to participate in the channel.
|
||||||
|
- Add channel join throttling mode, +j. Used to throttle channel join
|
||||||
|
traffic, i.e. join/part flood attacks. Syntax: +j <joins>:<timeslice>
|
||||||
|
- Improvements to channel_modes(), from shadowircd -- allows for
|
||||||
|
better construction of the mode string.
|
||||||
|
- Use the undernet throttle notice instead of bancache message when
|
||||||
|
dealing with rejected clients. (stolen from ircu2.10.12)
|
||||||
|
- Add channel forwarding, via channel mode +f, behaves similarly to
|
||||||
|
dancer-ircd version.
|
||||||
|
- Update example.conf to reflect AthemeNET changes. Original ratbox
|
||||||
|
config is now reference.conf.
|
||||||
|
- Services account names are now tracked globally.
|
||||||
|
- Add channel mode +Q which disables the effects of channel forwarding
|
||||||
|
on a temporary basis.
|
||||||
|
- Add channel mode +F which allows anybody to disable forwarding target
|
||||||
|
authorisation, voluntarily on their channels.
|
||||||
|
- Make wallops behave like normal wallops.
|
||||||
|
- Add services aliases: /ns, /cs, /os, /nickserv, /chanserv, /operserv.
|
||||||
|
- Add simple hack that enables use of server password for automatic
|
||||||
|
identify.
|
||||||
|
|
||||||
|
-- ircd-ratbox-2.1.5+datadrain
|
||||||
|
- fix a buffer overflow and an unterminated buffer when TS6 forces us
|
||||||
|
to remove bans
|
||||||
|
- fix potential junk SJOIN generation when splitting it into multiple
|
||||||
|
lines
|
||||||
|
- make servlink check for an uncompressed ERROR
|
||||||
|
- change NICKLEN to 15.
|
||||||
|
- change TOPICLEN to 390.
|
||||||
|
- force services extensions to be enabled always
|
||||||
|
- change patchlevel.h to get it's information from 'configure'
|
||||||
|
- add m_chghost.c, ghetto rigged hostcloaking module, using elite ENCAP
|
||||||
|
technique
|
||||||
|
|
||||||
|
-- ircd-ratbox-2.1.4
|
||||||
|
- fix minor time bug which occurs on december 31st
|
||||||
|
- dont drop a servers link when we get a malformed WHOIS
|
||||||
|
- disallow commas in channel keys
|
||||||
|
- fix compile problem with abort_list
|
||||||
|
- fix build on darwin
|
||||||
|
- fix compilation with gcc4
|
||||||
|
- userhost was only allowing 4 targets instead of 5
|
||||||
|
- invalidate channel ban cache on nickchange
|
||||||
|
- add TARGMAX to 005, detailing maximum targets for messages
|
||||||
|
- fix counting of clients on accept list when adding users
|
||||||
|
- use ID instead of name when bursting SJOIN to TS6 servers
|
||||||
|
- lower id in struct User, which was one byte bigger than it needs to be
|
||||||
|
|
||||||
|
-- ircd-ratbox-2.1.3
|
||||||
|
- removed sendq_eob as it just doesnt work on efnet
|
||||||
|
- dont allow MONITOR from an unregistered client
|
||||||
|
- add some uniqueness into the auth process for bopm
|
||||||
|
- fix resvs to check whether target server is us properly
|
||||||
|
- fix a core in cidr channel ban matching
|
||||||
|
- raise max temptime to a year
|
||||||
|
- fix cores when we receive extra params to NICK/UID
|
||||||
|
- remove no_oper_resvs, add resv_exempt auth flag
|
||||||
|
- fix flattened links
|
||||||
|
- clean up the accept code, and dont clear a users own list of accepted
|
||||||
|
clients on nickchange
|
||||||
|
- non-efnet:
|
||||||
|
- make services {}; blocks be displayed on stats U
|
||||||
|
- make services {}; blocks apply on rehash, you must now have only ONE
|
||||||
|
service {}; block, but you may have multiple name=""; entries within.
|
||||||
|
- only show services logged in info for local clients
|
||||||
|
|
||||||
|
-- ircd-ratbox-2.1.2
|
||||||
|
- fix missing end comment tag in example confs
|
||||||
|
- fix display problem with unauthorised conn notice
|
||||||
|
- remove some unused defines from INFO
|
||||||
|
- fix tabs for spaces in some helpfiles
|
||||||
|
- add in missing links_delay conf option
|
||||||
|
- fix cores under amd64
|
||||||
|
- disallow bans beginning with ':' over BMASK
|
||||||
|
- disallow bans with a space in chm_ban()
|
||||||
|
- stop counting hidden opers in stats p count output
|
||||||
|
- match() params of remote unresv were inverted, causing it to never match
|
||||||
|
- fix possibility of clients setting blank keys
|
||||||
|
- fix UID problems with trace
|
||||||
|
- raise default topiclen to 160
|
||||||
|
- add in forced nick change for ratbox-services, when compiled with
|
||||||
|
--enable-services
|
||||||
|
|
||||||
|
-- ircd-ratbox-2.1.1
|
||||||
|
- remove an 005 token to hack around the parser bug
|
||||||
|
- exempt users messaging themselves from target change
|
||||||
|
- disallow messaging towards UIDs
|
||||||
|
- add in doc/tgchange.txt
|
||||||
|
- move stats L back to RPL_STATSLINKINFO
|
||||||
|
- fix some minor auth problems
|
||||||
|
- properly store ipv6 ips when we're compiled for v4 only
|
||||||
|
- fix propagation of xline/resv
|
||||||
|
- sync remote kline reasons with form used for local klines
|
||||||
|
|
||||||
|
-- ircd-ratbox-2.1.0
|
||||||
|
- no changes
|
||||||
|
|
||||||
|
-- ircd-ratbox-2.1.0beta2
|
||||||
|
- fix a few compile warnings
|
||||||
|
- added multi-prefix clicap, for showing "@+" in NAMES/WHO replies
|
||||||
|
- remove split_delay, make split servers now work on how many servers have
|
||||||
|
issued EOB, rather than how many exist.
|
||||||
|
- server-side notify lists. See doc/monitor.txt
|
||||||
|
- fix undline core
|
||||||
|
- remove an unwanted space from beginning of second 005
|
||||||
|
- fix a potential core with the patricia when removing classes
|
||||||
|
- when we're handling global NAMES, dont output channels whose users are all
|
||||||
|
invisible
|
||||||
|
|
||||||
|
-- ircd-ratbox-2.1.0beta1
|
||||||
|
- No release notes, see doc/whats-new-2.1.txt
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
BUGS: Major bugs in this release are listed in BUGS
|
||||||
|
|
||||||
|
BUG REPORTS: If you run this code and encounter problems, you must report
|
||||||
|
via IRC to irc.atheme.net, #athemenet-dev.
|
||||||
|
|
||||||
|
Please include a gdb backtrace and keep the core file, binaries and
|
||||||
|
modules in case the developers need them.
|
||||||
|
|
||||||
|
Other files recommended for reading: BUGS, README.FIRST, INSTALL
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
$Id: NEWS 2813 2006-12-05 13:24:19Z jilles $
|
||||||
|
|
102
README.FIRST
Normal file
102
README.FIRST
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
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 convertklines 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 **********************************
|
||||||
|
|
||||||
|
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 the SSL Challenge controlled OPER feature and encrypted server links,
|
||||||
|
a working OpenSSL library
|
||||||
|
|
||||||
|
- For encrypted oper and (optional) server passwords, a working DES and/or
|
||||||
|
MD5 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. All conf
|
||||||
|
files will have to be converted to the new format. A convertconf
|
||||||
|
utility is provided and installed into bin/.
|
||||||
|
|
||||||
|
- 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 3.x/4.x, RedHat 6.2, Debian Potato and Solaris 7/8 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 3.x/4.x
|
||||||
|
Linux glibc
|
||||||
|
Solaris 2.6/7/8
|
||||||
|
OpenBSD 2.8
|
||||||
|
NetBSD 1.4
|
||||||
|
|
||||||
|
- Please read doc/whats-new.txt for information about what is in this release
|
||||||
|
|
||||||
|
- Other files recommended for reading: BUGS, INSTALL
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
$Id: README.FIRST 1837 2006-08-22 14:05:58Z nenolod $
|
5
SVN-Access
Normal file
5
SVN-Access
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
The charybdis repository is available for anonymous access:
|
||||||
|
svn co http://svn.atheme.org/charybdis/trunk charybdis-devel
|
||||||
|
|
||||||
|
For the latest stable:
|
||||||
|
svn co http://svn.atheme.org/charybdis/branches/stable charybdis-stable
|
50
aclocal.m4
vendored
Normal file
50
aclocal.m4
vendored
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
# $Id: aclocal.m4 918 2006-02-23 18:17:21Z nenolod $ - 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 CHARYBDIS_C_GCC_TRY_FLAGS(<warnings>,<cachevar>)
|
||||||
|
AC_DEFUN([CHARYBDIS_C_GCC_TRY_FLAGS],[
|
||||||
|
AC_MSG_CHECKING([GCC flag(s) $1])
|
||||||
|
if test "${GCC-no}" = yes
|
||||||
|
then
|
||||||
|
AC_CACHE_VAL($2,[
|
||||||
|
oldcflags="${CFLAGS-}"
|
||||||
|
CFLAGS="${CFLAGS-} ${CWARNS} $1 -Werror"
|
||||||
|
AC_TRY_COMPILE([
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
int main(void);
|
||||||
|
],[
|
||||||
|
strcmp("a","b"); fprintf(stdout,"test ok\n");
|
||||||
|
], [$2=yes], [$2=no])
|
||||||
|
CFLAGS="${oldcflags}"])
|
||||||
|
if test "x$$2" = xyes; then
|
||||||
|
CWARNS="${CWARNS}$1 "
|
||||||
|
AC_MSG_RESULT(ok)
|
||||||
|
else
|
||||||
|
$2=''
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no, not using GCC)
|
||||||
|
fi
|
||||||
|
])
|
1312
configure.ac
Normal file
1312
configure.ac
Normal file
File diff suppressed because it is too large
Load diff
1
doc/.cvsignore
Normal file
1
doc/.cvsignore
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Makefile
|
316
doc/CIDR.txt
Normal file
316
doc/CIDR.txt
Normal file
|
@ -0,0 +1,316 @@
|
||||||
|
$Id: CIDR.txt 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
|
||||||
|
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>
|
61
doc/Hybrid-team
Normal file
61
doc/Hybrid-team
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
$Id: Hybrid-team 54 2005-09-10 05:12:55Z nenolod $
|
||||||
|
|
||||||
|
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, use this link:
|
||||||
|
https://lists.ircd-hybrid.org/mailman/listinfo/hybrid
|
||||||
|
|
||||||
|
The core team as, of this major release:
|
||||||
|
|
||||||
|
adx, Piotr Nizynski <adx@irc7.pl>
|
||||||
|
billy-jon, William Bierman III <bill@mu.org>
|
||||||
|
cryogen, Stuart Walsh <stu@ipng.org.uk>
|
||||||
|
Dianora, Diane Bruce <db@db.net>
|
||||||
|
joshk, Joshua Kwan <joshk@triplehelix.org>
|
||||||
|
kire, Erik Small <smalle@hawaii.edu>
|
||||||
|
knight, Alan LeVee <alan.levee@prometheus-designs.net>
|
||||||
|
metalrock, Jack Low <jclow@csupomona.edu>
|
||||||
|
Michael, Michael Wobst <michael.wobst@gmail.com>
|
||||||
|
Rodder, Jon Lusky <lusky@blown.net>
|
||||||
|
Wohali, Joan Touzet <joant@ieee.org>
|
||||||
|
|
||||||
|
The following people have contributed blood, sweat, and/or code to
|
||||||
|
recent releases of Hybrid, in nick alphabetical order:
|
||||||
|
|
||||||
|
A1kmm, Andrew Miller <a1kmm@mware.virtualave.net>
|
||||||
|
AndroSyn, Aaron Sethman <androsyn@ratbox.org>
|
||||||
|
bane, Dragan Dosen <bane@idolnet.org>
|
||||||
|
bysin, Ben Kittridge <bkittridge@cfl.rr.com>
|
||||||
|
cosine, Patrick Alken <wnder@uwns.underworld.net>
|
||||||
|
David-T, David Taylor <davidt@yadt.co.uk>
|
||||||
|
fl, Lee Hardy <lee@leeh.co.uk>
|
||||||
|
Garion, Joost Vunderink <garion@efnet.nl>
|
||||||
|
Habeeb, David Supuran <habeeb@cfl.rr.com>
|
||||||
|
Hwy101, W. Campbell <wcampbel@botbay.net>
|
||||||
|
jmallett, Juli Mallett <jmallett@FreeBSD.org>
|
||||||
|
jv, Jakub Vlasek <jv@pilsedu.cz>
|
||||||
|
k9, Jeremy Chadwick <ircd@jdc.parodius.com>
|
||||||
|
kre, Dinko Korunic <kreator@fly.srk.fer.hr>
|
||||||
|
madmax, Paul Lomax <madmax@efnet.org>
|
||||||
|
nenolod, William Pitcock <nenolod@nenolod.net>
|
||||||
|
Riedel, Dennis Vink, <riedel@chaotic.nl>
|
||||||
|
scuzzy, David Todd <scuzzy@aniverse.net>
|
||||||
|
spookey, David Colburn <spookey@spookey.org>
|
||||||
|
TimeMr14C, Yusuf Iskenderoglu <uhc0@stud.uni-karlsruhe.de>
|
||||||
|
toot, Toby Verrall <to7@antipope.fsnet.co.uk>
|
||||||
|
vx0, Mark Miller <mark@oc768.net>
|
||||||
|
wiz, Jason Dambrosio <jason@wiz.cx>
|
||||||
|
Xride, Søren Straarup <xride@x12.dk>
|
||||||
|
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 its ancestors, too many to list
|
||||||
|
here.
|
||||||
|
|
||||||
|
Send bug fixes/complaints/rotten tomatoes to bugs@ircd-hybrid.org.
|
96
doc/Makefile.in
Normal file
96
doc/Makefile.in
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
# $Id: Makefile.in 138 2005-09-12 00:48:18Z nenolod $
|
||||||
|
CC = @CC@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_BIN = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_SUID = @INSTALL_PROGRAM@ -o root -m 4755
|
||||||
|
RM = @RM@
|
||||||
|
LEX = @LEX@
|
||||||
|
LEXLIB = @LEXLIB@
|
||||||
|
CFLAGS = @IRC_CFLAGS@ -DIRCD_PREFIX=\"@prefix@\"
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
MKDEP = ${CC} -MM
|
||||||
|
MV = @MV@
|
||||||
|
RM = @RM@
|
||||||
|
CP = @CP@
|
||||||
|
TOUCH = @TOUCH@
|
||||||
|
|
||||||
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
exec_suffix = @exec_suffix@
|
||||||
|
bindir = @bindir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
confdir = @confdir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
# Change this later! -- adrian
|
||||||
|
moduledir = @moduledir@
|
||||||
|
automoduledir = @moduledir@/autoload
|
||||||
|
|
||||||
|
# Local to the etc Makefile
|
||||||
|
mandir = @mandir@/man8
|
||||||
|
MANPAGES = ircd.8
|
||||||
|
|
||||||
|
CONFS = example.conf reference.conf
|
||||||
|
DEFAULTCONFS = kline.conf dline.conf xline.conf resv.conf
|
||||||
|
|
||||||
|
SSL_LIBS = @SSL_LIBS@
|
||||||
|
SSL_INCLUDES = @SSL_INCLUDES@
|
||||||
|
|
||||||
|
IRCDLIBS = @LIBS@ $(SSL_LIBS)
|
||||||
|
|
||||||
|
INCLUDES = -I../include $(SSL_INCLUDES)
|
||||||
|
CPPFLAGS = ${INCLUDES} @CPPFLAGS@
|
||||||
|
|
||||||
|
install-mkdirs:
|
||||||
|
-@if test ! -d $(DESTDIR)$(confdir); then \
|
||||||
|
echo "mkdir $(confdir)"; \
|
||||||
|
mkdir $(DESTDIR)$(confdir); \
|
||||||
|
fi
|
||||||
|
|
||||||
|
-@if test ! -d $(DESTDIR)$(mandir); then \
|
||||||
|
echo "mkdir $(mandir)"; \
|
||||||
|
mkdir $(DESTDIR)$(mandir); \
|
||||||
|
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
|
||||||
|
|
||||||
|
@for i in $(DEFAULTCONFS); do \
|
||||||
|
if test ! -f $(DESTDIR)$(confdir)/$$i; then \
|
||||||
|
echo "ircd: creating config file ($$i)"; \
|
||||||
|
${TOUCH} $(DESTDIR)$(confdir)/$$i; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
|
||||||
|
-@if test ! -f $(DESTDIR)$(confdir)/ircd.motd; then \
|
||||||
|
echo "ircd: installing motd file (ircd.motd)"; \
|
||||||
|
$(INSTALL_DATA) ircd.motd $(DESTDIR)$(confdir); \
|
||||||
|
fi
|
||||||
|
|
||||||
|
-@if test -f $(DESTDIR)$(confdir)/links.txt; then \
|
||||||
|
$(RM) $(DESTDIR)$(confdir)/links.txt; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
@echo "ircd: installing manpage"
|
||||||
|
@for i in $(MANPAGES); do \
|
||||||
|
if test ! -f $(DESTDIR)$(mandir)/$$i; then \
|
||||||
|
$(INSTALL_DATA) $$i $(DESTDIR)$(mandir); \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
|
||||||
|
build:
|
||||||
|
|
||||||
|
clean:
|
||||||
|
|
||||||
|
depend:
|
||||||
|
|
||||||
|
lint:
|
||||||
|
|
||||||
|
distclean:
|
||||||
|
${RM} -f Makefile
|
17
doc/README.cidr_bans
Normal file
17
doc/README.cidr_bans
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
$Id: README.cidr_bans 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
18
doc/Ratbox-team
Normal file
18
doc/Ratbox-team
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
$Id: Ratbox-team 1640 2006-06-05 00:02:19Z jilles $
|
||||||
|
|
||||||
|
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>
|
||||||
|
|
||||||
|
Special thanks for support, code and ideas to:
|
||||||
|
|
||||||
|
Hwy, W. Campbell <wcampbel -at- botbay.net>
|
||||||
|
jilles, Jilles Tjoelker <jilles -at- stack.nl>
|
||||||
|
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.
|
||||||
|
|
272
doc/Tao-of-IRC.940110
Normal file
272
doc/Tao-of-IRC.940110
Normal 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"
|
||||||
|
|
86
doc/challenge.txt
Normal file
86
doc/challenge.txt
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
------------------------------------------------------
|
||||||
|
- Oper Challenge/Response System Documentation -
|
||||||
|
- Copyright (C) 2006 Lee Hardy <lee -at- leeh.co.uk> -
|
||||||
|
- Copyright (C) 2006 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/charybdis-1.1 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 678 2006-02-03 20:25:01Z jilles $
|
41
doc/collision_fnc.txt
Normal file
41
doc/collision_fnc.txt
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
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 <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.
|
||||||
|
|
||||||
|
--
|
||||||
|
$Id: collision_fnc.txt 276 2005-10-02 20:23:15Z jilles $
|
422
doc/example.conf
Executable file
422
doc/example.conf
Executable file
|
@ -0,0 +1,422 @@
|
||||||
|
/* doc/example.conf - brief example configuration file
|
||||||
|
*
|
||||||
|
* Copyright (C) 2000-2002 Hybrid Development Team
|
||||||
|
* Copyright (C) 2002-2005 ircd-ratbox development team
|
||||||
|
* Copyright (C) 2005-2006 charybdis development team
|
||||||
|
*
|
||||||
|
* $Id: example.conf 3131 2007-01-21 15:36:31Z jilles $
|
||||||
|
*
|
||||||
|
* See reference.conf for more information.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Extensions */
|
||||||
|
#loadmodule "extensions/createauthonly.so";
|
||||||
|
#loadmodule "extensions/extb_account.so";
|
||||||
|
#loadmodule "extensions/extb_canjoin.so";
|
||||||
|
#loadmodule "extensions/extb_channel.so";
|
||||||
|
#loadmodule "extensions/extb_extgecos.so";
|
||||||
|
#loadmodule "extensions/extb_oper.so";
|
||||||
|
#loadmodule "extensions/extb_realname.so";
|
||||||
|
#loadmodule "extensions/extb_server.so";
|
||||||
|
#loadmodule "extensions/hurt.so";
|
||||||
|
#loadmodule "extensions/ip_cloaking.so";
|
||||||
|
#loadmodule "extensions/m_findforwards.so";
|
||||||
|
#loadmodule "extensions/m_identify.so";
|
||||||
|
#loadmodule "extensions/no_oper_invis.so";
|
||||||
|
#loadmodule "extensions/sno_farconnect.so";
|
||||||
|
#loadmodule "extensions/sno_globalkline.so";
|
||||||
|
#loadmodule "extensions/sno_globaloper.so";
|
||||||
|
|
||||||
|
serverinfo {
|
||||||
|
name = "hades.arpa";
|
||||||
|
use_ts6 = yes;
|
||||||
|
sid = "42X";
|
||||||
|
description = "charybdis test server";
|
||||||
|
network_name = "AthemeNET";
|
||||||
|
network_desc = "Your IRC network.";
|
||||||
|
hub = yes;
|
||||||
|
|
||||||
|
/* On multi-homed hosts you may need the following. These define
|
||||||
|
* the addresses we connect from to other servers. */
|
||||||
|
/* for IPv4 */
|
||||||
|
#vhost = "192.169.0.1";
|
||||||
|
/* for IPv6 */
|
||||||
|
#vhost6 = "3ffe:80e8:546::2";
|
||||||
|
};
|
||||||
|
|
||||||
|
admin {
|
||||||
|
name = "Lazy admin (lazya)";
|
||||||
|
description = "AthemeNET client server";
|
||||||
|
email = "nobody@127.0.0.1";
|
||||||
|
};
|
||||||
|
|
||||||
|
log {
|
||||||
|
fname_userlog = "logs/userlog";
|
||||||
|
#fname_fuserlog = "logs/fuserlog";
|
||||||
|
fname_operlog = "logs/operlog";
|
||||||
|
#fname_foperlog = "logs/foperlog";
|
||||||
|
fname_serverlog = "logs/serverlog";
|
||||||
|
fname_glinelog = "logs/glinelog";
|
||||||
|
#fname_klinelog = "logs/klinelog";
|
||||||
|
fname_killlog = "logs/killlog";
|
||||||
|
fname_operspylog = "logs/operspylog";
|
||||||
|
#fname_ioerrorlog = "logs/ioerror";
|
||||||
|
};
|
||||||
|
|
||||||
|
/* class {} blocks MUST be specified before anything that uses them. That
|
||||||
|
* means they must be defined before auth {} and before connect {}.
|
||||||
|
*/
|
||||||
|
class "users" {
|
||||||
|
ping_time = 2 minutes;
|
||||||
|
number_per_ident = 10;
|
||||||
|
number_per_ip = 10;
|
||||||
|
number_per_ip_global = 50;
|
||||||
|
cidr_bitlen = 64;
|
||||||
|
number_per_cidr = 8;
|
||||||
|
max_number = 3000;
|
||||||
|
sendq = 400 kbytes;
|
||||||
|
};
|
||||||
|
|
||||||
|
class "opers" {
|
||||||
|
ping_time = 5 minutes;
|
||||||
|
number_per_ip = 10;
|
||||||
|
max_number = 1000;
|
||||||
|
sendq = 1 megabyte;
|
||||||
|
};
|
||||||
|
|
||||||
|
class "server" {
|
||||||
|
ping_time = 5 minutes;
|
||||||
|
connectfreq = 5 minutes;
|
||||||
|
max_number = 1;
|
||||||
|
sendq = 4 megabytes;
|
||||||
|
};
|
||||||
|
|
||||||
|
listen {
|
||||||
|
/* If you want to listen on a specific IP only, specify host.
|
||||||
|
* host definitions apply only to the following port line.
|
||||||
|
*/
|
||||||
|
#host = "192.169.0.1";
|
||||||
|
port = 5000, 6665 .. 6669;
|
||||||
|
|
||||||
|
/* Listen on IPv6 (if you used host= above). */
|
||||||
|
#host = "3ffe:1234:a:b:c::d";
|
||||||
|
#port = 5000, 6665 .. 6669;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* auth {}: allow users to connect to the ircd (OLD I:)
|
||||||
|
* auth {} blocks MUST be specified in order of precedence. The first one
|
||||||
|
* that matches a user will be used. So place spoofs first, then specials,
|
||||||
|
* then general access, then restricted.
|
||||||
|
*/
|
||||||
|
auth {
|
||||||
|
/* user: the user@host allowed to connect. multiple IPv4/IPv6 user
|
||||||
|
* lines are permitted per auth block.
|
||||||
|
*/
|
||||||
|
user = "*@172.16.0.0/12";
|
||||||
|
user = "*test@123D:B567:*";
|
||||||
|
|
||||||
|
/* password: an optional password that is required to use this block.
|
||||||
|
* By default this is not encrypted, specify the flag "encrypted" in
|
||||||
|
* flags = ...; below if it is.
|
||||||
|
*/
|
||||||
|
password = "letmein";
|
||||||
|
|
||||||
|
/* spoof: fake the users user@host to be be this. You may either
|
||||||
|
* specify a host or a user@host to spoof to. This is free-form,
|
||||||
|
* just do everyone a favour and dont abuse it. (OLD I: = flag)
|
||||||
|
*/
|
||||||
|
spoof = "I.still.hate.packets";
|
||||||
|
|
||||||
|
/* Possible flags in auth:
|
||||||
|
*
|
||||||
|
* encrypted | password is encrypted with mkpasswd
|
||||||
|
* spoof_notice | give a notice when spoofing hosts
|
||||||
|
* exceed_limit (old > flag) | allow user to exceed class user limits
|
||||||
|
* kline_exempt (old ^ flag) | exempt this user from k/g/xlines&dnsbls
|
||||||
|
* dnsbl_exempt | exempt this user from dnsbls
|
||||||
|
* gline_exempt (old _ flag) | exempt this user from glines
|
||||||
|
* spambot_exempt | exempt this user from spambot checks
|
||||||
|
* shide_exempt | exempt this user from serverhiding
|
||||||
|
* jupe_exempt | exempt this user from generating
|
||||||
|
* warnings joining juped channels
|
||||||
|
* resv_exempt | exempt this user from resvs
|
||||||
|
* flood_exempt | exempt this user from flood limits
|
||||||
|
* USE WITH CAUTION.
|
||||||
|
* no_tilde (old - flag) | don't prefix ~ to username if no ident
|
||||||
|
* need_ident (old + flag) | require ident for user in this class
|
||||||
|
* need_sasl | require SASL id for user in this class
|
||||||
|
*/
|
||||||
|
flags = kline_exempt, exceed_limit;
|
||||||
|
|
||||||
|
/* class: the class the user is placed in */
|
||||||
|
class = "opers";
|
||||||
|
};
|
||||||
|
|
||||||
|
auth {
|
||||||
|
user = "*@*";
|
||||||
|
class = "users";
|
||||||
|
};
|
||||||
|
|
||||||
|
operator "god" {
|
||||||
|
/* name: the name of the oper must go above */
|
||||||
|
|
||||||
|
/* user: the user@host required for this operator. CIDR *is*
|
||||||
|
* supported now. auth{} spoofs work here, other spoofs do not.
|
||||||
|
* multiple user="" lines are supported.
|
||||||
|
*/
|
||||||
|
user = "*god@127.0.0.1";
|
||||||
|
|
||||||
|
/* password: the password required to oper. Unless ~encrypted is
|
||||||
|
* contained in flags = ...; this will need to be encrypted using
|
||||||
|
* mkpasswd, MD5 is supported
|
||||||
|
*/
|
||||||
|
password = "etcnjl8juSU1E";
|
||||||
|
|
||||||
|
/* rsa key: the public key for this oper when using Challenge.
|
||||||
|
* A password should not be defined when this is used, see
|
||||||
|
* doc/challenge.txt for more information.
|
||||||
|
*/
|
||||||
|
#rsa_public_key_file = "/usr/local/ircd/etc/oper.pub";
|
||||||
|
|
||||||
|
/* umodes: the specific umodes this oper gets when they oper.
|
||||||
|
* If this is specified an oper will not be given oper_umodes
|
||||||
|
* These are described above oper_only_umodes in general {};
|
||||||
|
*/
|
||||||
|
#umodes = locops, servnotice, operwall, wallop;
|
||||||
|
|
||||||
|
/* snomask: specific server notice mask on oper up.
|
||||||
|
* If this is specified an oper will not be given oper_snomask.
|
||||||
|
*/
|
||||||
|
snomask = "+Zbfkrsuy";
|
||||||
|
|
||||||
|
/* privileges: controls the activities and commands an oper is
|
||||||
|
* allowed to do on the server. You may prefix an option with ~ to
|
||||||
|
* disable it, ie ~operwall
|
||||||
|
*
|
||||||
|
* Default flags are operwall, remoteban and encrypted.
|
||||||
|
*
|
||||||
|
* Available options:
|
||||||
|
*
|
||||||
|
* encrypted: the password above is encrypted [DEFAULT]
|
||||||
|
* local_kill: allows local users to be /KILL'd
|
||||||
|
* global_kill: allows local and remote users to be
|
||||||
|
* /KILL'd (OLD 'O' flag)
|
||||||
|
* remote: allows remote SQUIT and CONNECT (OLD 'R' flag)
|
||||||
|
* kline: allows KILL, KLINE and DLINE (OLD 'K' flag)
|
||||||
|
* unkline: allows UNKLINE and UNDLINE (OLD 'U' flag)
|
||||||
|
* gline: allows GLINE (OLD 'G' flag)
|
||||||
|
* nick_changes: allows oper to see nickchanges (OLD 'N' flag)
|
||||||
|
* via usermode +n
|
||||||
|
* rehash: allows oper to REHASH config (OLD 'H' flag)
|
||||||
|
* die: allows DIE and RESTART (OLD 'D' flag)
|
||||||
|
* admin: gives admin privileges. admins
|
||||||
|
* may (un)load modules and see the
|
||||||
|
* real IPs of servers.
|
||||||
|
* hidden_admin: gives admin privileges except
|
||||||
|
* will not have the admin lines in
|
||||||
|
* stats p and whois.
|
||||||
|
* xline: allows use of /quote xline/unxline
|
||||||
|
* operwall: allows the oper to send operwalls [DEFAULT]
|
||||||
|
* oper_spy: allows 'operspy' features to see through +s
|
||||||
|
* channels etc. see /quote help operspy
|
||||||
|
* hidden_oper: hides the oper from /stats p (OLD UMODE +p)
|
||||||
|
* remoteban: allows remote kline etc [DEFAULT]
|
||||||
|
*/
|
||||||
|
flags = global_kill, remote, kline, unkline, gline,
|
||||||
|
die, rehash, admin, xline, operwall;
|
||||||
|
};
|
||||||
|
|
||||||
|
connect "irc.uplink.com" {
|
||||||
|
host = "192.168.0.1";
|
||||||
|
send_password = "password";
|
||||||
|
accept_password = "anotherpassword";
|
||||||
|
port = 6666;
|
||||||
|
hub_mask = "*";
|
||||||
|
class = "server";
|
||||||
|
flags = compressed, topicburst;
|
||||||
|
|
||||||
|
/* If the connection is IPv6, uncomment below */
|
||||||
|
#aftype = ipv6;
|
||||||
|
};
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "services.int";
|
||||||
|
};
|
||||||
|
|
||||||
|
cluster {
|
||||||
|
name = "*";
|
||||||
|
flags = kline, tkline, unkline, xline, txline, unxline, resv, tresv, unresv;
|
||||||
|
};
|
||||||
|
|
||||||
|
shared {
|
||||||
|
oper = "*@*", "*";
|
||||||
|
flags = all, rehash;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* exempt {}: IPs that are exempt from Dlines. (OLD d:) */
|
||||||
|
exempt {
|
||||||
|
ip = "127.0.0.1";
|
||||||
|
};
|
||||||
|
|
||||||
|
channel {
|
||||||
|
use_invex = yes;
|
||||||
|
use_except = yes;
|
||||||
|
use_knock = yes;
|
||||||
|
use_forward = yes;
|
||||||
|
invite_ops_only = yes;
|
||||||
|
knock_delay = 5 minutes;
|
||||||
|
knock_delay_channel = 1 minute;
|
||||||
|
max_chans_per_user = 15;
|
||||||
|
max_bans = 100;
|
||||||
|
max_bans_large = 500;
|
||||||
|
default_split_user_count = 0;
|
||||||
|
default_split_server_count = 0;
|
||||||
|
no_create_on_split = no;
|
||||||
|
no_join_on_split = no;
|
||||||
|
burst_topicwho = yes;
|
||||||
|
kick_on_split_riding = no;
|
||||||
|
};
|
||||||
|
|
||||||
|
serverhide {
|
||||||
|
flatten_links = yes;
|
||||||
|
links_delay = 5 minutes;
|
||||||
|
hidden = no;
|
||||||
|
disable_hidden = no;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* These are the blacklist settings.
|
||||||
|
* You can have multiple combinations of host and rejection reasons.
|
||||||
|
* They are used in pairs of one host/rejection reason.
|
||||||
|
*
|
||||||
|
* These settings should be adequate for most networks, and are (presently)
|
||||||
|
* required for use on AthemeNet.
|
||||||
|
*
|
||||||
|
* Word to the wise: Do not use blacklists like SPEWS for blocking IRC
|
||||||
|
* connections.
|
||||||
|
*
|
||||||
|
* Note: AHBL (the providers of the below BLs) request that they be
|
||||||
|
* contacted, via email, at admins@2mbit.com before using these BLs.
|
||||||
|
* See <http://www.ahbl.org/services.php> for more information.
|
||||||
|
*/
|
||||||
|
#blacklist {
|
||||||
|
# host = "ircbl.ahbl.org";
|
||||||
|
# reject_reason = "You have a host listed in the ircbl.ahbl.org blacklist.";
|
||||||
|
#
|
||||||
|
# host = "tor.ahbl.org";
|
||||||
|
# reject_reason = "You are connecting from a TOR exit node.";
|
||||||
|
#};
|
||||||
|
|
||||||
|
alias "NickServ" {
|
||||||
|
target = "NickServ";
|
||||||
|
};
|
||||||
|
|
||||||
|
alias "ChanServ" {
|
||||||
|
target = "ChanServ";
|
||||||
|
};
|
||||||
|
|
||||||
|
alias "OperServ" {
|
||||||
|
target = "OperServ";
|
||||||
|
};
|
||||||
|
|
||||||
|
alias "MemoServ" {
|
||||||
|
target = "MemoServ";
|
||||||
|
};
|
||||||
|
|
||||||
|
alias "NS" {
|
||||||
|
target = "NickServ";
|
||||||
|
};
|
||||||
|
|
||||||
|
alias "CS" {
|
||||||
|
target = "ChanServ";
|
||||||
|
};
|
||||||
|
|
||||||
|
alias "OS" {
|
||||||
|
target = "OperServ";
|
||||||
|
};
|
||||||
|
|
||||||
|
alias "MS" {
|
||||||
|
target = "MemoServ";
|
||||||
|
};
|
||||||
|
|
||||||
|
general {
|
||||||
|
hide_error_messages = opers;
|
||||||
|
hide_spoof_ips = yes;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* default_umodes: umodes to enable on connect.
|
||||||
|
* If you have enabled the ip_cloaking module, and you want
|
||||||
|
* to make use of it, add +h to this option, i.e.:
|
||||||
|
* default_umodes = "+ih";
|
||||||
|
*/
|
||||||
|
default_umodes = "+i";
|
||||||
|
|
||||||
|
default_operstring = "is an IRC Operator";
|
||||||
|
default_adminstring = "is a Server Administrator";
|
||||||
|
servicestring = "is a Network Service";
|
||||||
|
disable_fake_channels = no;
|
||||||
|
tkline_expire_notices = no;
|
||||||
|
default_floodcount = 10;
|
||||||
|
failed_oper_notice = yes;
|
||||||
|
dots_in_ident=2;
|
||||||
|
dot_in_ip6_addr = no;
|
||||||
|
min_nonwildcard = 4;
|
||||||
|
min_nonwildcard_simple = 3;
|
||||||
|
max_accept = 100;
|
||||||
|
max_monitor = 100;
|
||||||
|
anti_nick_flood = yes;
|
||||||
|
max_nick_time = 20 seconds;
|
||||||
|
max_nick_changes = 5;
|
||||||
|
anti_spam_exit_message_time = 5 minutes;
|
||||||
|
ts_warn_delta = 30 seconds;
|
||||||
|
ts_max_delta = 5 minutes;
|
||||||
|
client_exit = yes;
|
||||||
|
collision_fnc = yes;
|
||||||
|
global_snotices = yes;
|
||||||
|
dline_with_reason = yes;
|
||||||
|
kline_delay = 0 seconds;
|
||||||
|
kline_with_reason = yes;
|
||||||
|
kline_reason = "K-Lined";
|
||||||
|
identify_service = "NickServ@services.int";
|
||||||
|
identify_command = "IDENTIFY";
|
||||||
|
non_redundant_klines = yes;
|
||||||
|
warn_no_nline = yes;
|
||||||
|
stats_e_disabled = no;
|
||||||
|
stats_c_oper_only=no;
|
||||||
|
stats_h_oper_only=no;
|
||||||
|
stats_y_oper_only=no;
|
||||||
|
stats_o_oper_only=yes;
|
||||||
|
stats_P_oper_only=no;
|
||||||
|
stats_i_oper_only=masked;
|
||||||
|
stats_k_oper_only=masked;
|
||||||
|
map_oper_only = no;
|
||||||
|
operspy_admin_only = no;
|
||||||
|
operspy_dont_care_user_info = no;
|
||||||
|
caller_id_wait = 1 minute;
|
||||||
|
pace_wait_simple = 1 second;
|
||||||
|
pace_wait = 10 seconds;
|
||||||
|
short_motd = no;
|
||||||
|
ping_cookie = no;
|
||||||
|
connect_timeout = 30 seconds;
|
||||||
|
disable_auth = no;
|
||||||
|
no_oper_flood = yes;
|
||||||
|
glines = no;
|
||||||
|
gline_time = 1 day;
|
||||||
|
gline_min_cidr = 16;
|
||||||
|
idletime = 0;
|
||||||
|
max_targets = 4;
|
||||||
|
client_flood = 20;
|
||||||
|
use_whois_actually = no;
|
||||||
|
oper_only_umodes = operwall, locops, servnotice;
|
||||||
|
oper_umodes = locops, servnotice, operwall, wallop;
|
||||||
|
oper_snomask = "+s";
|
||||||
|
burst_away = yes;
|
||||||
|
nick_delay = 0 seconds; # 15 minutes if you want to enable this
|
||||||
|
reject_ban_time = 1 minute;
|
||||||
|
reject_after_count = 3;
|
||||||
|
reject_duration = 5 minutes;
|
||||||
|
};
|
||||||
|
|
||||||
|
modules {
|
||||||
|
path = "modules";
|
||||||
|
path = "modules/autoload";
|
||||||
|
};
|
92
doc/extban.txt
Normal file
92
doc/extban.txt
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
Extended bans
|
||||||
|
Jilles Tjoelker <jilles -at- stack.nl>
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
|
Extended bans (ban conditionals) allow different checks than the usual
|
||||||
|
nick!user@host or nick!user@ip match to determine whether someone should
|
||||||
|
be banned, quieted, exempted or invited.
|
||||||
|
|
||||||
|
Extended bans are of the form $[~]<type>[:<data>]. The <type> is one
|
||||||
|
character (case insensitive) and determines the type of match. Most types
|
||||||
|
allow or require an extra field <data>. If the tilde (~) is present, the
|
||||||
|
result of the comparison will be negated, unless the ban is invalid in which
|
||||||
|
case it will never match. Invalid bans are ones where <data> is missing but
|
||||||
|
required or where <data> is otherwise invalid as noted below.
|
||||||
|
|
||||||
|
Unless noted below, all types can be used with +b, +q, +e and +I.
|
||||||
|
|
||||||
|
If any extended ban types are loaded, they are listed in 005 (RPL_ISUPPORT)
|
||||||
|
as EXTBAN=$:<types>.
|
||||||
|
|
||||||
|
Local users cannot add extended bans of an unknown type or invalid bans. If a
|
||||||
|
remote user adds an extended ban of an unknown type, the mode change is
|
||||||
|
processed normally. Furthermore, extended bans of an unknown type can always be
|
||||||
|
listed or removed.
|
||||||
|
|
||||||
|
The ability to send to a channel is cached; this cache may not be updated
|
||||||
|
if a condition for an extended ban changes. To work around this, part and
|
||||||
|
rejoin the channel, or add or remove a +b, +q or +e entry.
|
||||||
|
|
||||||
|
The extban types that come with charybdis are:
|
||||||
|
|
||||||
|
extb_account.so
|
||||||
|
$a
|
||||||
|
matches all logged in users
|
||||||
|
$a:<mask>
|
||||||
|
matches users logged in with a username matching the mask (* and ? wildcards)
|
||||||
|
|
||||||
|
extb_channel.so
|
||||||
|
$c:<channel>
|
||||||
|
matches users who are on the given channel; this is only valid if the channel
|
||||||
|
exists and is not +s or +p. (The ops of the channel the ban is on cannot
|
||||||
|
necessarily see whether the user is in the target channel, so it should not
|
||||||
|
influence whether they can join either.)
|
||||||
|
|
||||||
|
extb_oper.so
|
||||||
|
$o
|
||||||
|
matches opers (most useful with +I)
|
||||||
|
|
||||||
|
extb_realname.so
|
||||||
|
$r:<mask>
|
||||||
|
matches users with a realname (gecos) matching the mask (* and ? wildcards);
|
||||||
|
this can only be used with +b and +q
|
||||||
|
|
||||||
|
extb_server.so
|
||||||
|
$s:<mask>
|
||||||
|
matches users connected to a server matching the mask (* and ? wildcards);
|
||||||
|
this can only be used with +b and +q
|
||||||
|
|
||||||
|
Comparisons:
|
||||||
|
|
||||||
|
+b $~a is similar to +r but also prevents not logged in users talking or
|
||||||
|
changing their nick while on channel.
|
||||||
|
|
||||||
|
+iI $o is the same as +O in dreamforge-derived ircds.
|
||||||
|
|
||||||
|
Creating extban types:
|
||||||
|
|
||||||
|
extban_table, indexed by the extban character, contains function pointers
|
||||||
|
of the following type:
|
||||||
|
typedef int (*ExtbanFunc)(const char *data, struct Client *client_p,
|
||||||
|
struct Channel *chptr, long mode_type);
|
||||||
|
|
||||||
|
The arguments are as follows:
|
||||||
|
data: the text after the colon, NULL if there was no colon
|
||||||
|
client_p: the client to check; this is always a local client, which may be
|
||||||
|
on or off channel
|
||||||
|
chptr: the channel
|
||||||
|
mode_type: CHFL_BAN, CHFL_QUIET, CHFL_EXCEPTION or CHFL_INVEX
|
||||||
|
|
||||||
|
The return value:
|
||||||
|
EXTBAN_INVALID: the mask is invalid, it never matches even if negated and
|
||||||
|
cannot be added; if this is returned for one client_p it must be returned
|
||||||
|
for all
|
||||||
|
EXTBAN_NOMATCH: the client_p does not match the mask
|
||||||
|
EXTBAN_MATCH: the client_p matches the mask
|
||||||
|
|
||||||
|
The function is called whenever a (local) client needs to be checked against
|
||||||
|
a +bqeI entry of the given extban type, and whenever a local client tries to
|
||||||
|
add such an entry. (Clients are allowed to add bans matching themselves.)
|
||||||
|
|
||||||
|
--
|
||||||
|
$Id: extban.txt 1639 2006-06-04 23:26:47Z jilles $
|
122
doc/hooks.txt
Normal file
122
doc/hooks.txt
Normal file
|
@ -0,0 +1,122 @@
|
||||||
|
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_eob" - Sent after a server finishes bursting to us.
|
||||||
|
Passes struct Client, the server that has
|
||||||
|
finished bursting.
|
||||||
|
|
||||||
|
"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
|
||||||
|
|
||||||
|
|
||||||
|
Client Hooks
|
||||||
|
------------
|
||||||
|
The following hooks are called during various events related to clients.
|
||||||
|
|
||||||
|
"introduce_client" - Sent after introducing a client to the (rest of the)
|
||||||
|
network.
|
||||||
|
Passes hook_data_client:
|
||||||
|
hdata->client = server that introduced this client
|
||||||
|
hdata->target = client being introduced
|
||||||
|
|
||||||
|
"new_local_user" - Sent just before introducing a new local user
|
||||||
|
to the network.
|
||||||
|
Passes struct Client, the client being introduced.
|
||||||
|
|
||||||
|
"new_remote_user" - Sent just before introducing a new remote user
|
||||||
|
to the rest of the network.
|
||||||
|
Passes struct Client, the client being introduced.
|
||||||
|
|
||||||
|
"umode_changed" - Sent each time a user's mode or snomask changes.
|
||||||
|
Passes hook_data_umode_changed:
|
||||||
|
client = client whose modes are changing
|
||||||
|
oldumodes = new user mode field
|
||||||
|
oldsnomask = new snomask field
|
||||||
|
|
||||||
|
|
||||||
|
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 710 2006-02-06 03:10:01Z gxti $
|
29
doc/index.txt
Normal file
29
doc/index.txt
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
|
||||||
|
# $Id: index.txt 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
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.
|
122
doc/ircd.8
Normal file
122
doc/ircd.8
Normal file
|
@ -0,0 +1,122 @@
|
||||||
|
.\" @(#)ircd.8 2.0 22 April 2004
|
||||||
|
.\" $Id: ircd.8 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
.TH IRCD 8 "ircd-ratbox 22 April 2004
|
||||||
|
.SH NAME
|
||||||
|
ircd \- The Internet Relay Chat Program Server
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.hy 0
|
||||||
|
.IP \fBircd\fP
|
||||||
|
[-dlinefile filename] [-configfile filename] [-klinefile filename]
|
||||||
|
[-logfile filename] [-pidfile filename] [-resvfile filename]
|
||||||
|
[-xlinefile filename] [-conftest] [-foreground] [-version]
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.LP
|
||||||
|
\fIircd\fP is the server (daemon) program for the Internet Relay Chat
|
||||||
|
Program. The \fIircd\fP is a server in that its function is to "serve"
|
||||||
|
the client program \fIirc(1)\fP with messages and commands. All commands
|
||||||
|
and user messages are passed directly to the \fIircd\fP for processing
|
||||||
|
and relaying to other ircd sites.
|
||||||
|
.SH OPTIONS
|
||||||
|
.TP
|
||||||
|
.B \-dlinefile filename
|
||||||
|
Specifies the D-line file to be used. This file is used for both reading
|
||||||
|
D-lines at startup, and writing to while \fIircd\fP is running.
|
||||||
|
.TP
|
||||||
|
.B \-configfile filename
|
||||||
|
Specifies the ircd.conf file to be used for this ircdaemon. The option
|
||||||
|
is used to override the default ircd.conf given at compile time.
|
||||||
|
.TP
|
||||||
|
.B \-klinefile filename
|
||||||
|
Specifies the K-line file to be used. This file is used for both reading
|
||||||
|
K-lines at startup, and writing to while \fIircd\fP is running.
|
||||||
|
.TP
|
||||||
|
.B \-logfile filename
|
||||||
|
Specifies an alternative logfile to be used than that specified in config.h
|
||||||
|
.TP
|
||||||
|
.B \-pidfile filename
|
||||||
|
Specifies the ircd.pid used. The option is used to override the default
|
||||||
|
ircd.pid given at compile time.
|
||||||
|
.TP
|
||||||
|
.B \-resvfile filename
|
||||||
|
Specifies the resv.conf file to be used for this ircdaemon. The option
|
||||||
|
is used to override the default resv.conf given at compile time.
|
||||||
|
.TP
|
||||||
|
.B \-xlinefile filename
|
||||||
|
Specifies the xline.conf file to be used for this ircdaemon. The option
|
||||||
|
is used to override the default xline.conf given at compile time.
|
||||||
|
.TP
|
||||||
|
.B \-conftest
|
||||||
|
Makes \fIircd\fP check the ircd.conf for errors
|
||||||
|
.TP
|
||||||
|
.B \-foreground
|
||||||
|
Makes \fIircd\fP run in the foreground
|
||||||
|
.TP
|
||||||
|
.B \-version
|
||||||
|
Makes \fIircd\fP print its version, and exit.
|
||||||
|
.SH USAGE
|
||||||
|
If you plan to connect your \fIircd\fP server to an existing Irc-Network,
|
||||||
|
you will need to alter your local IRC configuration file (typically named
|
||||||
|
"ircd.conf") so that it will accept and make connections to other \fIircd\fP
|
||||||
|
servers. This file contains the hostnames, Network Addresses, and sometimes
|
||||||
|
passwords for connections to other ircds around the world. Because
|
||||||
|
description of the actual file format of the "ircd.conf" file is beyond the
|
||||||
|
scope of this document, please refer to the file INSTALL in the IRC source
|
||||||
|
files documentation directory.
|
||||||
|
.LP
|
||||||
|
.SH BOOTING THE SERVER
|
||||||
|
The \fIircd\fP server can be started as part of the
|
||||||
|
Unix boot procedure or just by placing the server into Unix Background.
|
||||||
|
Keep in mind that if it is \fBnot\fP part of your Unix's boot-up procedure
|
||||||
|
then you will have to manually start the \fIircd\fP server each time your
|
||||||
|
Unix is rebooted. This means if your Unix is prone to crashing
|
||||||
|
or going for for repairs a lot it would make sense to start the \fIircd\fP
|
||||||
|
server as part of your UNIX bootup procedure.
|
||||||
|
.SH EXAMPLE
|
||||||
|
.RS
|
||||||
|
.nf
|
||||||
|
tolsun% \fBbin/ircd\fP
|
||||||
|
.fi
|
||||||
|
.RE
|
||||||
|
.LP
|
||||||
|
Places \fIircd\fP into Unix background and starts up the server for use.
|
||||||
|
Note: You do not have to add the "&" to this command, the program will
|
||||||
|
automatically detach itself from tty.
|
||||||
|
.RS
|
||||||
|
.nf
|
||||||
|
leguin% \fBbin/ircd -foreground\fP
|
||||||
|
.fi
|
||||||
|
.RE
|
||||||
|
.LP
|
||||||
|
Runs ircd in the foreground.
|
||||||
|
.RS
|
||||||
|
.nf
|
||||||
|
.SH COPYRIGHT
|
||||||
|
(c) 1988,1989 University of Oulu, Computing Center, Finland,
|
||||||
|
.LP
|
||||||
|
(c) 1988,1989 Department of Information Processing Science,
|
||||||
|
University of Oulu, Finland
|
||||||
|
.LP
|
||||||
|
(c) 1988,1989,1990,1991 Jarkko Oikarinen
|
||||||
|
.LP
|
||||||
|
(c) 1997,1998,1999,2000,2001 The IRCD-Hybrid project.
|
||||||
|
.LP
|
||||||
|
For full COPYRIGHT see LICENSE file with IRC package.
|
||||||
|
.LP
|
||||||
|
.RE
|
||||||
|
.SH FILES
|
||||||
|
"ircd.conf"
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
ircd.conf(5)
|
||||||
|
.SH BUGS
|
||||||
|
None... ;-) if somebody finds one, please inform author
|
||||||
|
.SH AUTHOR
|
||||||
|
irc2.8 and earlier: Jarkko Oikarinen, currently jto@tolsun.oulu.fi.
|
||||||
|
.LP
|
||||||
|
ircd-hybrid-7: IRCD-Hybrid Project, ircd-hybrid@the-project.org.
|
||||||
|
.LP
|
||||||
|
manual page written by Jeff Trim, jtrim@orion.cair.du.edu,
|
||||||
|
later modified by jto@tolsun.oulu.fi.
|
||||||
|
.LP
|
||||||
|
modified for ircd-hybrid-7 by Edward Brocklesby, ejb@klamath.uucp.leguin.org.uk.
|
||||||
|
.LP
|
||||||
|
updated by W. Campbell, wcampbel@botbay.net
|
2
doc/ircd.motd
Normal file
2
doc/ircd.motd
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
This is charybdis MOTD you might replace it, but if not your friends will
|
||||||
|
laugh at you.
|
36
doc/logfiles.txt
Normal file
36
doc/logfiles.txt
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
ircd-ratbox logfiles - Lee H <lee -at- leeh.co.uk>
|
||||||
|
$Id: logfiles.txt 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
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
|
140
doc/modeg.txt
Normal file
140
doc/modeg.txt
Normal 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 6 2005-09-10 01:02:21Z nenolod $
|
10
doc/modes.txt
Normal file
10
doc/modes.txt
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
Standard user modes are listed in help/opers/umode
|
||||||
|
Standard server notice masks are listed in help/opers/snomask
|
||||||
|
Standard channel modes are listed in help/opers/cmode
|
||||||
|
|
||||||
|
The sgml docs have more detailed descriptions.
|
||||||
|
|
||||||
|
User mode +h (hide hostname) is provided by contrib/ip_cloaking.so
|
||||||
|
Server notice mask +F (far connects) is provided by contrib/sno_farconnect.so
|
||||||
|
|
||||||
|
# $Id: modes.txt 996 2006-03-09 01:14:34Z jilles $
|
111
doc/monitor.txt
Normal file
111
doc/monitor.txt
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
MONITOR - Protocol for notification of when clients become online/offline
|
||||||
|
Lee Hardy <lee -at- leeh.co.uk>
|
||||||
|
$Id: monitor.txt 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
137
doc/old/Authors
Normal file
137
doc/old/Authors
Normal 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>
|
368
doc/operguide.txt
Normal file
368
doc/operguide.txt
Normal 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 6 2005-09-10 01:02:21Z nenolod $
|
137
doc/opermyth.txt
Normal file
137
doc/opermyth.txt
Normal file
|
@ -0,0 +1,137 @@
|
||||||
|
|
||||||
|
Date: Thu, 30 Jul 1998 16:21:40-0700 (MST)
|
||||||
|
To: operlist@the-project.org
|
||||||
|
From: rayp@primenet.com (Ray Powers)
|
||||||
|
Subject: The myths of opers....
|
||||||
|
|
||||||
|
I've always wanted to write something like this.. Its half rant, half
|
||||||
|
fact, so bear with it. Hopefully it will be worth reading.
|
||||||
|
|
||||||
|
There's a lot of hate for opers for a lot of reasons. Some are directly
|
||||||
|
oper related (i.e. 99% of us are colossal assholes), some are directly
|
||||||
|
user related (i.e. 99% of you are raving lunatics), and some is just plain
|
||||||
|
misconceptions. I'd like to take a minute to talk about part three in
|
||||||
|
hopes of clearing a few things up. This will kind of be in a FAQ form,
|
||||||
|
maybe you'll like it, maybe not, but its worth a shot.
|
||||||
|
|
||||||
|
Q: What can an oper on EFnet do.
|
||||||
|
A: This is an EXACT list of what we can do:
|
||||||
|
1) /squit a server, separating it from the rest of the net
|
||||||
|
2) /die our server
|
||||||
|
3) /kill a user, this disconnects them from the server they are on
|
||||||
|
4) /kline a hostmask, this bans them from our server
|
||||||
|
5) /dline an ip, this bans them from our server, regardless of
|
||||||
|
hostmask
|
||||||
|
6) See all invisible users on our server
|
||||||
|
7) Mass Msg/CTCP/notice a hostmask
|
||||||
|
8) Mass Msg/CTCP/notice a server
|
||||||
|
9) See and send Operwall/wallops notices
|
||||||
|
|
||||||
|
That's it. We can see more server messages than you, but that's not the
|
||||||
|
point.. The point to be shown here is very simple, *none* of these things
|
||||||
|
have anything to do with channels. Which leads us to our next question.
|
||||||
|
|
||||||
|
Q: What can opers *NOT* do, but keep being asked to anyways?
|
||||||
|
A: We can *NOT*:
|
||||||
|
1) Enter a channel that is +i or +k without being invited or
|
||||||
|
having the key
|
||||||
|
2) See who is inside a +s channel
|
||||||
|
3) Op ourselves or op you on a channel (unless of course we are a
|
||||||
|
channel op for that channel)
|
||||||
|
4) Tell you what XXXX's new nick is since they changed it to hide
|
||||||
|
from you.
|
||||||
|
5) Deop someone for you on a channel (unless of course we are a
|
||||||
|
channel op for that channel)
|
||||||
|
|
||||||
|
Notice a trend, with the exception of 4, all of these are 100% channel
|
||||||
|
related. EFnet is made so that opers have *NO* power of channels, for
|
||||||
|
better or worse. If we don't help you with these requests, its not because
|
||||||
|
we won't, its because we are completely incapable doing so. On the other
|
||||||
|
hand....
|
||||||
|
|
||||||
|
Q: What can opers do, but won't?
|
||||||
|
A: This will be a bit differently done, because I figure I should explain
|
||||||
|
why opers don't do these things, when they may normally make sense.
|
||||||
|
1) Why won't they kill somebody who has stolen your nick.
|
||||||
|
EFnet has gone on the basis of nicks not being owned, which is
|
||||||
|
why there is no nickserv on EFnet. Of course we see opers kill
|
||||||
|
all the time for nicks, though, so it seems rather hypocrital,
|
||||||
|
doesn't it?
|
||||||
|
An oper who kills for his nick will tell you its because the
|
||||||
|
other person was a bot, was juping his nick, or was imitating an
|
||||||
|
oper. It may be true, but it really comes down to the same
|
||||||
|
feeling you get when your nick is taken "Hey! that's my name! I
|
||||||
|
don't want that person using my name!"
|
||||||
|
I personally, do not kill for nicks. If someone takes my nick,
|
||||||
|
they can have it. Let them get my several hundred messages a day.
|
||||||
|
:P But the problem with the oper is this: How does an oper know
|
||||||
|
that you are really the person that uses that nick, or are you
|
||||||
|
the guy that wants to nick jupe that nick out from the real guy?
|
||||||
|
Unless the oper knows you well, they don't.. And saying that
|
||||||
|
people generally tell the truth means you haven't been on EFnet
|
||||||
|
very long.
|
||||||
|
I would prefer to think I am one of the more well respected
|
||||||
|
people on the net and people still lie to me on a regular basis.
|
||||||
|
So, the oper is stuck refusing to help because he can't tell who
|
||||||
|
is who. Remember this line of reasoning, its going to be coming
|
||||||
|
up a lot. :P
|
||||||
|
2) Why won't they kill that guy nuking/smurfing/ping -f'ing me?
|
||||||
|
This one is simple. There is no way to prove that somebody is
|
||||||
|
doing any of these things to you from an opers point of view. All
|
||||||
|
logs are fakeable, and the oper has no way to firsthand prove its
|
||||||
|
happening. Your best bet in this situation is to log what you can
|
||||||
|
and complain loud and long to their ISPs.
|
||||||
|
3) Why won't they help me take my channel back?
|
||||||
|
There's a bunch of answers to this. First, it is popular
|
||||||
|
opinion at EFnet that channels are not owned, and therefore, if
|
||||||
|
you lose a channel, you should go make another one. Notice I
|
||||||
|
say popular instead of official, because EFnet has never had an
|
||||||
|
"official" policy on much of anything.
|
||||||
|
But more and more you see opers killing for takeovers, so why
|
||||||
|
are they helping their channels and not yours.
|
||||||
|
Well, first, let's say your channel was taken over, and is now
|
||||||
|
+smtinlk. How exactly is the oper supposed to find out who is
|
||||||
|
oped in the channel right now to mass kill them? Even if they do get
|
||||||
|
all the nicks, they have to somehow manage to kill them all in
|
||||||
|
one hit, or they'll all just op each other again and it will be
|
||||||
|
fruitless. Or worse, they could have it all set up, and some
|
||||||
|
other oper could kill them halfway through because they don't
|
||||||
|
like mass-kills and it would be all ruined.
|
||||||
|
Or, let's say the mass-kill goes off, then the channel is
|
||||||
|
opless and generally speaking, chaos begins. People start
|
||||||
|
mass-nuking or flooding the channel to clear it out, or just to
|
||||||
|
be annoying. And there's still a 50/50 chance that takeover
|
||||||
|
people will get the channel back on a split and we'll have to try
|
||||||
|
to do it all over again.
|
||||||
|
If you're about to ask why they don't split their server,
|
||||||
|
the answer is very simple: We are not about to screw up roughly
|
||||||
|
30,000 peoples chatting for your channel. Its rude. This of
|
||||||
|
course is all based on the fact that we can prove its taken over,
|
||||||
|
as per the conversation about nicks, we often can't.
|
||||||
|
4) But.. its obvious they took it from me! The topic says
|
||||||
|
"Ha ha, we took your channel Rick!" for Pete's sake! And
|
||||||
|
there's only One op, so you can kill him and get the channel
|
||||||
|
back immediately!
|
||||||
|
This one is a bit more complex, but its really a personal
|
||||||
|
call. That one op could be a rampant smurfpup with a penis so
|
||||||
|
tiny he has no choice but to rampantly smurf and synflood anyone
|
||||||
|
that gets in his way. This is popularly known on irc as SPS, or
|
||||||
|
Small Penis Syndrome. In this case, if the oper does help you
|
||||||
|
out, they could end up with their server being downed for a day
|
||||||
|
or two, and it really isn't worth it for your channel, no
|
||||||
|
offense.
|
||||||
|
|
||||||
|
Keep in mind that this is all spoken from the perspective of someone who
|
||||||
|
*DOES* help with channels when possible, but understands greatly the
|
||||||
|
reasons not to, and judges each situation very carefully.
|
||||||
|
|
||||||
|
That's the gist of the information I was trying to get across. If you
|
||||||
|
were cluefull enough to get on operlist, a lot of this may be common
|
||||||
|
knowledge to you, but sometimes its good to step back and see why opers do
|
||||||
|
what they do a lot of the time.
|
||||||
|
|
||||||
|
Hoping this is of value to SOMEONE....
|
||||||
|
|
||||||
|
Ray Powers
|
||||||
|
Monkster/MimePunk/PrimeMonk/PacMonk/MtgMonk/Ihavefartoomanynickstonickjupe
|
||||||
|
|
1122
doc/reference.conf
Executable file
1122
doc/reference.conf
Executable file
File diff suppressed because it is too large
Load diff
51
doc/server-version-info
Normal file
51
doc/server-version-info
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
Server VERSION Info
|
||||||
|
|
||||||
|
$Id: server-version-info 1851 2006-08-24 17:16:53Z jilles $
|
||||||
|
|
||||||
|
Copyright (c) 2001 by ircd-hybrid team
|
||||||
|
Copyright (c) 2002 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 |
|
||||||
|
|------+---------------------|
|
||||||
|
| 'S' | OPERS_SEE_ALL_USERS |
|
||||||
|
|------+---------------------|
|
||||||
|
| 'T' | IGNORE_BOGUS_TS |
|
||||||
|
|------+---------------------|
|
||||||
|
| 'Z' | ZIPLINKS |
|
||||||
|
|------+---------------------|
|
||||||
|
| '6' | IPv6 |
|
||||||
|
|------+---------------------|
|
||||||
|
| | |
|
||||||
|
|------+---------------------|
|
||||||
|
| 'TS' | Supports TS |
|
||||||
|
|------+---------------------|
|
||||||
|
| '5' | TS Version 5 |
|
||||||
|
|------+---------------------|
|
||||||
|
| 'o' | TS Only |
|
||||||
|
|------+---------------------|
|
||||||
|
| 'w' | TS Warnings |
|
||||||
|
+----------------------------+
|
55
doc/services.txt
Normal file
55
doc/services.txt
Normal 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:
|
||||||
|
|
||||||
|
1. 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)
|
||||||
|
|
||||||
|
2. 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'.
|
||||||
|
|
||||||
|
3. Services protection
|
||||||
|
|
||||||
|
Services will be protected from being deopped or kicked from a channel.
|
||||||
|
|
||||||
|
4. 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.
|
||||||
|
|
||||||
|
5. 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.
|
||||||
|
|
||||||
|
6. 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 6 2005-09-10 01:02:21Z nenolod $
|
57
doc/sgml/oper-guide/charybdis-oper-guide.sgml
Normal file
57
doc/sgml/oper-guide/charybdis-oper-guide.sgml
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook V4.2//EN" [
|
||||||
|
<!ENTITY intro SYSTEM "intro.sgml">
|
||||||
|
<!ENTITY oprivs SYSTEM "oprivs.sgml">
|
||||||
|
<!ENTITY umodes SYSTEM "umodes.sgml">
|
||||||
|
<!ENTITY cmodes SYSTEM "cmodes.sgml">
|
||||||
|
<!ENTITY ucommands SYSTEM "ucommands.sgml">
|
||||||
|
<!ENTITY commands SYSTEM "commands.sgml">
|
||||||
|
<!ENTITY config SYSTEM "config.sgml">
|
||||||
|
]>
|
||||||
|
<book id="charybdis-oper-guide">
|
||||||
|
<bookinfo>
|
||||||
|
<date>24 November 2005</date>
|
||||||
|
<title>Operators guide for the charybdis IRC server</title>
|
||||||
|
<author>
|
||||||
|
<firstname>William</firstname>
|
||||||
|
<surname>Pitcock</surname>
|
||||||
|
</author>
|
||||||
|
<address><email>nenolod@nenolod.net</email></address>
|
||||||
|
<copyright>
|
||||||
|
<year>2005-2007</year>
|
||||||
|
<holder>William Pitcock and Jilles Tjoelker</holder>
|
||||||
|
</copyright>
|
||||||
|
<legalnotice>
|
||||||
|
<para>
|
||||||
|
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU
|
||||||
|
General Public License, Version 2 or any later version published by the Free Software Foundation
|
||||||
|
</para>
|
||||||
|
</legalnotice>
|
||||||
|
</bookinfo>
|
||||||
|
<toc>
|
||||||
|
</toc>
|
||||||
|
&intro;
|
||||||
|
&umodes;
|
||||||
|
&cmodes;
|
||||||
|
&ucommands;
|
||||||
|
&commands;
|
||||||
|
&oprivs;
|
||||||
|
&config;
|
||||||
|
</book>
|
||||||
|
<!-- Keep this comment at the end of the file
|
||||||
|
Local variables:
|
||||||
|
mode: sgml
|
||||||
|
sgml-omittag:t
|
||||||
|
sgml-shorttag:t
|
||||||
|
sgml-namecase-general:t
|
||||||
|
sgml-general-insert-case:lower
|
||||||
|
sgml-minimize-attributes:nil
|
||||||
|
sgml-always-quote-attributes:t
|
||||||
|
sgml-indent-step:2
|
||||||
|
sgml-indent-data:t
|
||||||
|
sgml-parent-document:nil
|
||||||
|
sgml-exposed-tags:nil
|
||||||
|
sgml-local-catalogs:("/usr/lib/sgml/catalog")
|
||||||
|
sgml-local-ecat-files:nil
|
||||||
|
fill-column: 105
|
||||||
|
End:
|
||||||
|
-->
|
314
doc/sgml/oper-guide/cmodes.sgml
Normal file
314
doc/sgml/oper-guide/cmodes.sgml
Normal file
|
@ -0,0 +1,314 @@
|
||||||
|
<chapter id="cmodes">
|
||||||
|
<title>Cmodes</title>
|
||||||
|
<sect1>
|
||||||
|
<title>Meanings of channel modes</title>
|
||||||
|
<sect2>
|
||||||
|
<title>+b, channel ban</title>
|
||||||
|
<para>
|
||||||
|
Bans take one parameter which can take several forms.
|
||||||
|
The most common form is +b nick!user@host.
|
||||||
|
The wildcards * and ? are allowed, matching zero-or-more, and
|
||||||
|
exactly-one characters respectively. The masks will be trimmed to fit the maximum allowable
|
||||||
|
length for the relevant element.
|
||||||
|
Bans are also checked against the IP address, even if it resolved or
|
||||||
|
is spoofed.
|
||||||
|
CIDR is supported, like *!*@10.0.0.0/8. This is most useful with
|
||||||
|
IPv6.
|
||||||
|
Bans are not checked against the real hostname behind any kind
|
||||||
|
of spoof, except if host mangling is in use (e.g.
|
||||||
|
<filename>extensions/ip_cloaking.so</filename>):
|
||||||
|
if the user's host is mangled, their real hostname is checked
|
||||||
|
additionally, and if a user has no spoof but could enable mangling,
|
||||||
|
the mangled form of their hostname is checked additionally.
|
||||||
|
Hence, it is not possible to evade bans by toggling
|
||||||
|
host mangling.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The second form (extban) is +b $type or +b $type:data.
|
||||||
|
type is a single character (case insensitive) indicating the
|
||||||
|
type of match, optionally preceded by a tilde (~) to negate the
|
||||||
|
comparison. data depends on type. Each type is loaded as a module.
|
||||||
|
The available types (if any)
|
||||||
|
are listed in the EXTBAN token of the 005 (RPL_ISUPPORT) numeric.
|
||||||
|
See <filename>doc/extban.txt</filename> in the source distribution
|
||||||
|
for more information.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
If no parameter is given, the list of bans is returned. All users
|
||||||
|
can use this form. The plus sign should also be omitted.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Matching users will not be allowed to join the channel or knock
|
||||||
|
on it. If they are already on the channel, they may not send to
|
||||||
|
it or change their nick.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+c, colour filter</title>
|
||||||
|
<para>
|
||||||
|
This cmode activates the colour filter for the channel. This filters out bold, underline,
|
||||||
|
reverse video, beeps, mIRC colour codes, and ANSI escapes. Note that escape sequences will
|
||||||
|
usually leave cruft sent to the channel, just without the escape characters themselves.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+e, ban exemption</title>
|
||||||
|
<para>
|
||||||
|
This mode takes one parameter of the same form as bans, which
|
||||||
|
overrides +b and +q bans for all clients it matches.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Only channel operators can see +e changes or request the list.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+f, channel forwarding</title>
|
||||||
|
<para>
|
||||||
|
This mode takes one parameter, the name of a channel (+f #channel). If the channel also has the
|
||||||
|
+i cmode set, and somebody attempts to join without either being expliticly invited, or having
|
||||||
|
an invex (+I), then they will instead join the channel named in the mode parameter. The client
|
||||||
|
will also be sent a 470 numeric giving the original and target channels.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Users are similarly forwarded if the +j cmode is set and their attempt to join is throttled,
|
||||||
|
if +l is set and there are already too many users in the channel
|
||||||
|
or if +r is set and they are not identified.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Forwards may only be set to +F channels, or to channels the setter
|
||||||
|
has ops in.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Without parameter (/mode #channel f or /mode #channel +f) the
|
||||||
|
forward channel is returned. This form also works off channel.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+F, allow anybody to forward to this</title>
|
||||||
|
<para>
|
||||||
|
When this mode is set, anybody may set a forward from a channel
|
||||||
|
they have ops in to this channel. Otherwise they have to have ops
|
||||||
|
in this channel.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+g, allow anybody to invite</title>
|
||||||
|
<para>
|
||||||
|
When this mode is set, anybody may use the INVITE command on the channel in question. When it
|
||||||
|
is unset, only channel operators may use the INVITE command
|
||||||
|
(unless the invite_ops_only option is disabled and +i is
|
||||||
|
not set).
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
When this mode is set together with +i, all channel members can influence who can join.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+i, invite only</title>
|
||||||
|
<para>
|
||||||
|
When this cmode is set, no client can join the channel unless they have an invex (+I) or are
|
||||||
|
invited with the INVITE command.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+I, invite exception (invex)</title>
|
||||||
|
<para>
|
||||||
|
This mode takes one parameter of the same form as bans. Matching
|
||||||
|
clients do not need to be invited to join the channel when it is invite-only (+i).
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Only channel operators can see +I changes or request the list.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+j, join throttling</title>
|
||||||
|
<para>
|
||||||
|
This mode takes one parameter of the form <replaceable>n</replaceable>:<replaceable>t</replaceable>, where <replaceable>n</replaceable> and <replaceable>t</replaceable> are positive integers. Only <replaceable>n</replaceable> users may join in each period of <replaceable>t</replaceable> seconds.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Due to propagation delays between servers, more users may be
|
||||||
|
able to join (by racing for the last slot on each server).
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+k, key (channel password)</title>
|
||||||
|
<para>
|
||||||
|
Taking one parameter, when set, this mode requires a user to supply the key in order to join
|
||||||
|
the channel: /JOIN #channel key.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+l, channel member limit</title>
|
||||||
|
<para>
|
||||||
|
Takes one numeric parameter, the number of users which are allowed to be in the channel before
|
||||||
|
further joins are blocked.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Due to propagation delays between servers, more users may be
|
||||||
|
able to join (by racing for the last slot on each server).
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+L, large ban list</title>
|
||||||
|
<para>
|
||||||
|
Channels with this mode will be allowed larger banlists (by default,
|
||||||
|
500 instead of 50 entries for +b, +q, +e and +I together).
|
||||||
|
Only network operators may set this mode.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+m, moderated</title>
|
||||||
|
<para>
|
||||||
|
When a channel is set +m, only users with +o or +v on the channel can send to it.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Users can still knock on the channel or change their nick.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+n, no external messages</title>
|
||||||
|
<para>
|
||||||
|
When set, this mode prevents users from sending to the channel without being in it themselves.
|
||||||
|
This is recommended.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+o, channel operator</title>
|
||||||
|
<para>
|
||||||
|
This mode takes one parameter, a nick, and grants or removes channel
|
||||||
|
operator privilege to that user. Channel operators have full control
|
||||||
|
over the channel, having the ability to set all channel modes except
|
||||||
|
+L and +P, and kick users.
|
||||||
|
Like voiced users, channel operators can always
|
||||||
|
send to the channel, overriding +b, +m and +q modes and the
|
||||||
|
per-channel flood limit.
|
||||||
|
In most clients channel operators are marked with an '@' sign.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The privilege is lost if the user leaves the channel or server
|
||||||
|
in any way.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Most networks will run channel registration services (e.g. ChanServ)
|
||||||
|
which ensure the founder (and users designated by the founder) can
|
||||||
|
always gain channel operator privileges and provide some features
|
||||||
|
to manage the channel.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+p, paranoid channel</title>
|
||||||
|
<para>
|
||||||
|
When set, the KNOCK command cannot be used on the channel
|
||||||
|
to request an invite, and users will not be shown the
|
||||||
|
channel in WHOIS replies unless they are on it.
|
||||||
|
Unlike in traditional IRC, +p and +s can be set together.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+P, permanent channel</title>
|
||||||
|
<para>
|
||||||
|
Channels with this mode (which is accessible only to network operators) set will not be destroyed
|
||||||
|
when the last user leaves.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This makes it less likely modes, bans and the topic will be lost and
|
||||||
|
makes it harder to abuse network splits, but also causes more
|
||||||
|
unwanted restoring of old modes, bans and topics after long splits.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+q, quiet</title>
|
||||||
|
<para>
|
||||||
|
This mode behaves exactly like +b (ban), except that the user may still join
|
||||||
|
the channel. The net effect is that they cannot knock on the channel,
|
||||||
|
send to the channel or change their nick while on channel.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+Q, block forwarded users</title>
|
||||||
|
<para>
|
||||||
|
Channels with this mode set are not valid targets for forwarding. Any attempt to forward to
|
||||||
|
this channel will be ignored, and the user will be handled as if the attempt was never made (by
|
||||||
|
sending them the relevant error message).
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This does not affect the ability to set +f.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+r, block unidentified</title>
|
||||||
|
<para>
|
||||||
|
When set, this mode prevents unidentified users from joining.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<!-- not planned (jilles)
|
||||||
|
<sect2>
|
||||||
|
<title>+R, quiet unidentified</title>
|
||||||
|
<para>
|
||||||
|
When set, this mode prevents unidentified users from sending to the channel, although they can
|
||||||
|
still join.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Please note that this mode is not implemented in Charybdis 1.0.x, and is documented in
|
||||||
|
expectation for upcoming Charybdis 1.1.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
-->
|
||||||
|
<sect2>
|
||||||
|
<title>+s, secret channel</title>
|
||||||
|
<para>
|
||||||
|
When set, this mode prevents the channel from appearing in the
|
||||||
|
output of the LIST, WHO and WHOIS command by users who are not on
|
||||||
|
it. Also, the server will refuse to answer WHO, NAMES, TOPIC and
|
||||||
|
LIST queries from users not on the channel.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+t, topic limit</title>
|
||||||
|
<para>
|
||||||
|
When set, this mode prevents users who are not channel operators
|
||||||
|
from changing the topic.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+v, voice</title>
|
||||||
|
<para>
|
||||||
|
This mode takes one parameter, a nick, and grants or removes voice
|
||||||
|
privilege to that user. Voiced users can always send to the channel,
|
||||||
|
overriding +b, +m and +q modes and the per-channel flood limit.
|
||||||
|
In most clients voiced users are marked with a plus sign.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The privilege is lost if the user leaves the channel or server
|
||||||
|
in any way.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+z, reduced moderation</title>
|
||||||
|
<para>
|
||||||
|
When +z is set, the effects of +m are relaxed. For each message, if that message
|
||||||
|
would normally be blocked by moderation, it is instead sent to all channel operators. This is intended for use in moderated debates.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Note that +n and channel bans/quiets are unaffected by this. To silence a given user completely,
|
||||||
|
remove them from the channel.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
</sect1>
|
||||||
|
</chapter>
|
||||||
|
<!-- Keep this comment at the end of the file
|
||||||
|
Local variables:
|
||||||
|
mode: sgml
|
||||||
|
sgml-omittag:t
|
||||||
|
sgml-shorttag:t
|
||||||
|
sgml-namecase-general:t
|
||||||
|
sgml-general-insert-case:lower
|
||||||
|
sgml-minimize-attributes:nil
|
||||||
|
sgml-always-quote-attributes:t
|
||||||
|
sgml-indent-step:2
|
||||||
|
sgml-indent-data:t
|
||||||
|
sgml-parent-document:("charybdis-oper-guide.sgml" "book")
|
||||||
|
sgml-exposed-tags:nil
|
||||||
|
fill-column:105
|
||||||
|
End:
|
||||||
|
-->
|
1095
doc/sgml/oper-guide/commands.sgml
Normal file
1095
doc/sgml/oper-guide/commands.sgml
Normal file
File diff suppressed because it is too large
Load diff
1101
doc/sgml/oper-guide/config.sgml
Normal file
1101
doc/sgml/oper-guide/config.sgml
Normal file
File diff suppressed because it is too large
Load diff
41
doc/sgml/oper-guide/intro.sgml
Normal file
41
doc/sgml/oper-guide/intro.sgml
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
<chapter id="intro">
|
||||||
|
<title>Introduction</title>
|
||||||
|
<sect1>
|
||||||
|
<title>Scope of this document</title>
|
||||||
|
<para>
|
||||||
|
This document describes the commands and functions available to operators in
|
||||||
|
the charybdis ircd, as used on <ulink url="http://www.atheme.net">AthemeNet</ulink>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This document, and various ideas for features of charybdis, have
|
||||||
|
been taken from dancer-ircd/hyperion, the ircd used on freenode,
|
||||||
|
mainly written by Andrew Suffield and Jilles Tjoelker.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
While this document may be of some interest to the users of charybdis servers,
|
||||||
|
it is intended as a reference for network staff.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Charybdis is based on ircd-ratbox 2.1.4, although much has changed.
|
||||||
|
<ulink url="http://www.ircd-ratbox.org">ircd-ratbox</ulink> is commonly used
|
||||||
|
on efnet, and some other networks.
|
||||||
|
</para>
|
||||||
|
</sect1>
|
||||||
|
</chapter>
|
||||||
|
<!-- Keep this comment at the end of the file
|
||||||
|
Local variables:
|
||||||
|
mode: sgml
|
||||||
|
sgml-omittag:t
|
||||||
|
sgml-shorttag:t
|
||||||
|
sgml-namecase-general:t
|
||||||
|
sgml-general-insert-case:lower
|
||||||
|
sgml-minimize-attributes:nil
|
||||||
|
sgml-always-quote-attributes:t
|
||||||
|
sgml-indent-step:2
|
||||||
|
sgml-indent-data:t
|
||||||
|
sgml-parent-document: ("charybdis-oper-guide.sgml" "book")
|
||||||
|
sgml-exposed-tags:nil
|
||||||
|
fill-column:105
|
||||||
|
sgml-validate-command: "nsgmls -e -g -s -u charybdis-oper-guide.sgml"
|
||||||
|
End:
|
||||||
|
-->
|
169
doc/sgml/oper-guide/oprivs.sgml
Normal file
169
doc/sgml/oper-guide/oprivs.sgml
Normal file
|
@ -0,0 +1,169 @@
|
||||||
|
<chapter id="oprivs">
|
||||||
|
<title>Oper privileges</title>
|
||||||
|
<sect1 id="oprivlist">
|
||||||
|
<title>Meanings of oper privileges</title>
|
||||||
|
<para>
|
||||||
|
These are flags in operator{}.
|
||||||
|
The letter appears after opering up and in /stats o; an uppercase
|
||||||
|
letter means the privilege is possessed, lowercase means it is not.
|
||||||
|
</para>
|
||||||
|
<sect2>
|
||||||
|
<title>admin (A), server administrator</title>
|
||||||
|
<para>
|
||||||
|
Various privileges intended for server administrators.
|
||||||
|
Among other things, this automatically sets umode +a and allows
|
||||||
|
loading modules.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>remoteban (B), set remote bans</title>
|
||||||
|
<para>
|
||||||
|
This grants the ability to use the ON argument on KLINE/XLINE/RESV
|
||||||
|
and UNKLINE/UNXLINE/UNRESV to set and unset bans on other servers,
|
||||||
|
and the server argument on REHASH.
|
||||||
|
This is only allowed if the oper may perform the action locally,
|
||||||
|
and if the remote server has a shared{} block.
|
||||||
|
</para>
|
||||||
|
<note><para>
|
||||||
|
If a cluster{} block is present, bans are sent remotely even
|
||||||
|
if the oper does not have remoteban privilege.
|
||||||
|
</para></note>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>local_kill (C), kill local users</title>
|
||||||
|
<para>
|
||||||
|
This grants permission to use KILL on users on the same server,
|
||||||
|
disconnecting them from the network.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>die (D), die and restart</title>
|
||||||
|
<para>
|
||||||
|
This grants permission to use DIE and RESTART, shutting down
|
||||||
|
or restarting the server.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>gline (G), gline</title>
|
||||||
|
<para>
|
||||||
|
This allows using GLINE (network wide temp bans if 3 opers agree).
|
||||||
|
If unkline privilege is also possessed, allow UNGLINE (remove gline
|
||||||
|
locally).
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>rehash (H), rehash</title>
|
||||||
|
<para>
|
||||||
|
Allows using the REHASH command, to rehash various configuration
|
||||||
|
files or clear certain lists.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>kline (K), kline and dline</title>
|
||||||
|
<para>
|
||||||
|
Allows using KLINE and DLINE, to ban users by user@host mask
|
||||||
|
or IP address.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>operwall (L), send/receive operwall</title>
|
||||||
|
<para>
|
||||||
|
Allows using the OPERWALL command and umode +z to send and
|
||||||
|
receive operwalls.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>nick_changes (N), see nick changes</title>
|
||||||
|
<para>
|
||||||
|
Allows using snomask +n to see local client nick changes.
|
||||||
|
This is designed for monitor bots.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>global_kill (O), global kill</title>
|
||||||
|
<para>
|
||||||
|
Allows using KILL on users on any server.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>hidden_oper (P), hide from /stats p</title>
|
||||||
|
<para>
|
||||||
|
This privilege currently does nothing, but was designed
|
||||||
|
to hide bots from /stats p so users will not message them
|
||||||
|
for help.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>remote (R), remote routing</title>
|
||||||
|
<para>
|
||||||
|
This allows using the third argument of the CONNECT command, to
|
||||||
|
instruct another server to connect somewhere, and using SQUIT
|
||||||
|
with an argument that is not locally connected.
|
||||||
|
(In both cases all opers with +w set will be notified.)
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>oper_spy (S), use operspy</title>
|
||||||
|
<para>
|
||||||
|
This allows using /mode !#channel, /whois !nick, /who !#channel,
|
||||||
|
/chantrace !#channel, /who !mask, /masktrace !user@host :gecos
|
||||||
|
and /scan umodes +modes-modes global list to see through secret
|
||||||
|
channels, invisible users, etc.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
All operspy usage is broadcasted to opers with snomask +Z set
|
||||||
|
(on the entire network) and optionally logged.
|
||||||
|
If you grant this to anyone, it is a good idea to establish
|
||||||
|
concrete policies describing what it is to be used for, and
|
||||||
|
what not.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
If operspy_dont_care_user_info is enabled, /who mask is operspy
|
||||||
|
also, and /who !mask, /who mask, /masktrace !user@host :gecos
|
||||||
|
and /scan umodes +modes-modes global list do not generate +Z notices
|
||||||
|
or logs.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>unkline (U), unkline</title>
|
||||||
|
<para>
|
||||||
|
Allows using UNKLINE and UNDLINE, and if gline privilege is also
|
||||||
|
possessed, UNGLINE.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>xline (X), xline and unxline</title>
|
||||||
|
<para>
|
||||||
|
Allows using XLINE and UNXLINE, to ban/unban users by realname.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>hidden_admin, hidden administrator</title>
|
||||||
|
<para>
|
||||||
|
This grants everything granted to the admin privilege,
|
||||||
|
except the ability to set umode +a. If both admin and hidden_admin
|
||||||
|
are possessed, umode +a can still not be used.
|
||||||
|
</para>
|
||||||
|
<note><para>
|
||||||
|
This privilege does not appear in /stats o or oper up notices.
|
||||||
|
</para></note>
|
||||||
|
</sect2>
|
||||||
|
</sect1>
|
||||||
|
</chapter>
|
||||||
|
<!-- Keep this comment at the end of the file
|
||||||
|
Local variables:
|
||||||
|
mode: sgml
|
||||||
|
sgml-omittag:t
|
||||||
|
sgml-shorttag:t
|
||||||
|
sgml-namecase-general:t
|
||||||
|
sgml-general-insert-case:lower
|
||||||
|
sgml-minimize-attributes:nil
|
||||||
|
sgml-always-quote-attributes:t
|
||||||
|
sgml-indent-step:2
|
||||||
|
sgml-indent-data:t
|
||||||
|
sgml-parent-document: ("charybdis-oper-guide.sgml" "book")
|
||||||
|
sgml-exposed-tags:nil
|
||||||
|
fill-column: 105
|
||||||
|
sgml-validate-command: "nsgmls -e -g -s -u charybdis-oper-guide.sgml"
|
||||||
|
End:
|
||||||
|
-->
|
33
doc/sgml/oper-guide/stylesheet.dsl
Normal file
33
doc/sgml/oper-guide/stylesheet.dsl
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
|
||||||
|
<!ENTITY docbook-html.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL>
|
||||||
|
<!ENTITY docbook-print.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA DSSSL>
|
||||||
|
]>
|
||||||
|
|
||||||
|
<style-sheet>
|
||||||
|
<style-specification id="print" use="print-stylesheet">
|
||||||
|
<style-specification-body>
|
||||||
|
|
||||||
|
(define %generate-book-titlepage% #t)
|
||||||
|
(define %generate-book-titlepage-on-separate-page% #t)
|
||||||
|
(define %generate-book-toc% #t)
|
||||||
|
(define %generate-book-toc-on-titlepage% #f)
|
||||||
|
|
||||||
|
</style-specification-body>
|
||||||
|
</style-specification>
|
||||||
|
|
||||||
|
<style-specification id="html" use="html-stylesheet">
|
||||||
|
<style-specification-body>
|
||||||
|
|
||||||
|
(define %header-navigation% #t)
|
||||||
|
(define %section-autolabel% #t)
|
||||||
|
(define %root-filename% "index")
|
||||||
|
(define %use-id-as-filename% #t)
|
||||||
|
(define %css-decoration% #t)
|
||||||
|
(define %example-rules% #t)
|
||||||
|
|
||||||
|
</style-specification-body>
|
||||||
|
</style-specification>
|
||||||
|
|
||||||
|
<external-specification id="print-stylesheet" document="docbook-print.dsl">
|
||||||
|
<external-specification id="html-stylesheet" document="docbook-html.dsl">
|
||||||
|
</style-sheet>
|
188
doc/sgml/oper-guide/ucommands.sgml
Normal file
188
doc/sgml/oper-guide/ucommands.sgml
Normal file
|
@ -0,0 +1,188 @@
|
||||||
|
<chapter id="ucommands">
|
||||||
|
<title>User Commands</title>
|
||||||
|
<sect1>
|
||||||
|
<title>User commands</title>
|
||||||
|
<para>
|
||||||
|
Standard IRC commands are not listed here.
|
||||||
|
Several of the commands in the operator commands chapter
|
||||||
|
can also be used by normal users.
|
||||||
|
</para>
|
||||||
|
<sect2>
|
||||||
|
<title>ACCEPT</title>
|
||||||
|
<cmdsynopsis><command>ACCEPT</command>
|
||||||
|
<arg choice=plain><replaceable>nick</replaceable>,</arg>
|
||||||
|
<arg choice=plain>-<replaceable>nick</replaceable>,</arg>
|
||||||
|
<arg choice=plain><replaceable>...</replaceable></arg>
|
||||||
|
</cmdsynopsis>
|
||||||
|
<para>
|
||||||
|
Adds or removes users from your accept list for umode +g and +R.
|
||||||
|
Users are automatically removed when they quit, split or change
|
||||||
|
nick.
|
||||||
|
</para>
|
||||||
|
<cmdsynopsis><command>ACCEPT</command>
|
||||||
|
<arg choice=plain>*</arg>
|
||||||
|
</cmdsynopsis>
|
||||||
|
<para>
|
||||||
|
Lists all users on your accept list.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Support of this command is indicated by the CALLERID token in
|
||||||
|
RPL_ISUPPORT (005); the optional parameter indicates the letter
|
||||||
|
of the <quote>only allow accept users to send private messages</quote>
|
||||||
|
umode, otherwise +g. In charybdis this is always +g.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>CNOTICE</title>
|
||||||
|
<cmdsynopsis><command>CNOTICE</command>
|
||||||
|
<arg choice=plain><replaceable>nick</replaceable></arg>
|
||||||
|
<arg choice=plain><replaceable>channel</replaceable></arg>
|
||||||
|
<arg choice=plain>:<replaceable>text</replaceable></arg>
|
||||||
|
</cmdsynopsis>
|
||||||
|
<para>
|
||||||
|
Providing you are opped (+o) or voiced (+v) in
|
||||||
|
<replaceable>channel</replaceable>, and <replaceable>nick</replaceable>
|
||||||
|
is a member of <replaceable>channel</replaceable>, CNOTICE generates a NOTICE towards
|
||||||
|
<replaceable>nick</replaceable>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
CNOTICE bypasses any anti-spam measures in place.
|
||||||
|
If you get <quote>Targets changing too fast, message dropped</quote>,
|
||||||
|
you should probably use this command, for example sending a
|
||||||
|
notice to every user joining a certain channel.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Support of this command is indicated by the CNOTICE token in
|
||||||
|
RPL_ISUPPORT (005).
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>CPRIVMSG</title>
|
||||||
|
<cmdsynopsis><command>CPRIVMSG</command>
|
||||||
|
<arg choice=plain><replaceable>nick</replaceable></arg>
|
||||||
|
<arg choice=plain><replaceable>channel</replaceable></arg>
|
||||||
|
<arg choice=plain>:<replaceable>text</replaceable></arg>
|
||||||
|
</cmdsynopsis>
|
||||||
|
<para>
|
||||||
|
Providing you are opped (+o) or voiced (+v) in
|
||||||
|
<replaceable>channel</replaceable>, and <replaceable>nick</replaceable>
|
||||||
|
is a member of <replaceable>channel</replaceable>, CPRIVMSG generates a PRIVMSG towards
|
||||||
|
<replaceable>nick</replaceable>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
CPRIVMSG bypasses any anti-spam measures in place.
|
||||||
|
If you get <quote>Targets changing too fast, message dropped</quote>,
|
||||||
|
you should probably use this command.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Support of this command is indicated by the CPRIVMSG token in
|
||||||
|
RPL_ISUPPORT (005).
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>HELP</title>
|
||||||
|
<cmdsynopsis><command>HELP</command>
|
||||||
|
<arg><replaceable>topic</replaceable></arg>
|
||||||
|
</cmdsynopsis>
|
||||||
|
<para>
|
||||||
|
Displays help information. <replaceable>topic</replaceable> can
|
||||||
|
be INDEX, CREDITS, UMODE, CMODE, SNOMASK or a command name.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
There are separate help files for users and opers. Opers can use
|
||||||
|
UHELP to query the user help files.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>KNOCK</title>
|
||||||
|
<cmdsynopsis><command>KNOCK</command>
|
||||||
|
<arg choice=plain><replaceable>channel</replaceable></arg>
|
||||||
|
</cmdsynopsis>
|
||||||
|
<para>
|
||||||
|
Requests an invite to the given channel. The channel must be
|
||||||
|
locked somehow (+ikl), must not be +p and you may not be banned
|
||||||
|
or quieted. Also, this command is rate limited.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
If successful, all channel operators will receive a 710 numeric.
|
||||||
|
The recipient field of this numeric is the channel.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Support of this command is indicated by the KNOCK token in
|
||||||
|
RPL_ISUPPORT (005).
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>MONITOR</title>
|
||||||
|
<para>
|
||||||
|
Server side notify list. This list contains nicks. When a user
|
||||||
|
connects, quits with a listed nick or changes to or from a listed
|
||||||
|
nick, you will receive a 730 numeric if the nick went online and
|
||||||
|
a 731 numeric if the nick went offline.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Support of this command is indicated by the MONITOR token in
|
||||||
|
RPL_ISUPPORT (005); the parameter indicates the maximum number
|
||||||
|
of nicknames you may have in your monitor list.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
You may only use this command once per second.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
More details can be found in <filename>doc/monitor.txt</filename>
|
||||||
|
in the source distribution.
|
||||||
|
</para>
|
||||||
|
<cmdsynopsis><command>MONITOR +</command>
|
||||||
|
<arg choice=plain><replaceable>nick</replaceable>,</arg>
|
||||||
|
<arg choice=plain><replaceable>...</replaceable></arg>
|
||||||
|
</cmdsynopsis>
|
||||||
|
<para>
|
||||||
|
Adds nicks to your monitor list. You will receive 730 and 731
|
||||||
|
numerics for the nicks.
|
||||||
|
</para>
|
||||||
|
<cmdsynopsis><command>MONITOR -</command>
|
||||||
|
<arg choice=plain><replaceable>nick</replaceable>,</arg>
|
||||||
|
<arg choice=plain><replaceable>...</replaceable></arg>
|
||||||
|
</cmdsynopsis>
|
||||||
|
<para>
|
||||||
|
Removes nicks from your monitor list. No output is generated for
|
||||||
|
this command.
|
||||||
|
</para>
|
||||||
|
<cmdsynopsis><command>MONITOR C</command>
|
||||||
|
</cmdsynopsis>
|
||||||
|
<para>
|
||||||
|
Clears your monitor list. No output is generated for
|
||||||
|
this command.
|
||||||
|
</para>
|
||||||
|
<cmdsynopsis><command>MONITOR L</command>
|
||||||
|
</cmdsynopsis>
|
||||||
|
<para>
|
||||||
|
Lists all nicks on your monitor list, using 732 numerics and
|
||||||
|
ending with a 733 numeric.
|
||||||
|
</para>
|
||||||
|
<cmdsynopsis><command>MONITOR S</command>
|
||||||
|
</cmdsynopsis>
|
||||||
|
<para>
|
||||||
|
Shows status for all nicks on your monitor list, using 730 and 731
|
||||||
|
numerics.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
</sect1>
|
||||||
|
</chapter>
|
||||||
|
<!-- Keep this comment at the end of the file
|
||||||
|
Local variables:
|
||||||
|
mode: sgml
|
||||||
|
sgml-omittag:t
|
||||||
|
sgml-shorttag:t
|
||||||
|
sgml-namecase-general:t
|
||||||
|
sgml-general-insert-case:lower
|
||||||
|
sgml-minimize-attributes:nil
|
||||||
|
sgml-always-quote-attributes:t
|
||||||
|
sgml-indent-step:2
|
||||||
|
sgml-indent-data:t
|
||||||
|
sgml-parent-document: ("charybdis-oper-guide.sgml" "book")
|
||||||
|
sgml-exposed-tags:nil
|
||||||
|
sgml-local-ecat-files:nil
|
||||||
|
fill-column:105
|
||||||
|
End:
|
||||||
|
-->
|
333
doc/sgml/oper-guide/umodes.sgml
Normal file
333
doc/sgml/oper-guide/umodes.sgml
Normal file
|
@ -0,0 +1,333 @@
|
||||||
|
<chapter id="umodes">
|
||||||
|
<title>Umodes</title>
|
||||||
|
<sect1 id="umodelist">
|
||||||
|
<title>Meanings of user modes</title>
|
||||||
|
<sect2>
|
||||||
|
<title>+a, server administrator</title>
|
||||||
|
<para>
|
||||||
|
This vanity usermode is used to denote a server administrator in WHOIS output.
|
||||||
|
All local <quote>admin</quote> privileges are independent of it, though services
|
||||||
|
packages may grant extra privileges to +a users.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+D, deaf</title>
|
||||||
|
<para>
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
This is a user umode, which anybody can set. It is not specific to operators.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
Users with the +D umode set will not receive messages sent to
|
||||||
|
channels. Joins, parts, topic changes, mode changes, etc are
|
||||||
|
received as normal, as are private messages.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Support of this umode is indicated by the DEAF token in
|
||||||
|
RPL_ISUPPORT (005); the parameter indicates the letter
|
||||||
|
of the umode. Note that several common IRCD implementations have
|
||||||
|
an umode like this (typically +d) but do not have the token in 005.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+g, Caller ID</title>
|
||||||
|
<para>
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
This is a user umode, which anybody can set. It is not specific to operators.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
Users with the +g umode set will only receive private messages from users on a
|
||||||
|
session-defined whitelist, defined by the /accept command. If a user who is not
|
||||||
|
on the whitelist attempts to send a private message, the target user will receive a rate-limited notice saying that the user
|
||||||
|
wishes to speak to them.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Network operators are not affected by the callerid whitelist system in the event
|
||||||
|
that they need to speak to users who have it enabled.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Support of this umode is indicated by the CALLERID token in
|
||||||
|
RPL_ISUPPORT (005); the optional parameter indicates the letter
|
||||||
|
of the umode, otherwise +g.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+i, invisible</title>
|
||||||
|
<para>
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
This is a user umode, which anybody can set. It is not specific to operators.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
Invisible users do not show up in WHO and NAMES unless you can see them.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<!-- not planned (jilles)
|
||||||
|
<sect2>
|
||||||
|
<title>+I, refuse invite</title>
|
||||||
|
<para>
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
This is a user umode, which anybody can set. It is not specific to operators.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
If you have the +I umode set, nobody will be able to issue an INVITE to let you
|
||||||
|
in to a channel.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This mode is not yet implemented. It will be implemented in Charybdis 1.1.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
-->
|
||||||
|
<sect2>
|
||||||
|
<title>+l, receive locops</title>
|
||||||
|
<para>
|
||||||
|
LOCOPS is a version of OPERWALL that is sent to opers on a single
|
||||||
|
server only. With cluster{} and shared{} blocks they can optionally
|
||||||
|
be propagated further.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Unlike OPERWALL, any oper can send and receive LOCOPS.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+o, operator</title>
|
||||||
|
<para>
|
||||||
|
This indicates global operator status.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+Q, disable forwarding</title>
|
||||||
|
<para>
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
This is a user umode, which anybody can set. It is not specific to operators.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
This umode prevents you from being affected by any of the channel forwarding mechanisms. In
|
||||||
|
any event where you would normally be forwarded, instead you will get the usual error message
|
||||||
|
as if no forwarding was in effect.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+R, reject messages from unauthenticated users</title>
|
||||||
|
<para>
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
This is a user umode, which anybody can set. It is not specific to operators.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
If a user has the +R umode set, then any users who are not authenticated
|
||||||
|
will receive an error message if they attempt to send a private
|
||||||
|
message or notice to the +R user.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Opers and accepted users (like in +g) are exempt.
|
||||||
|
Unlike +g, the target user is not notified of failed messages.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+s, receive server notices</title>
|
||||||
|
<para>
|
||||||
|
This umode allows an oper to receive server notices.
|
||||||
|
The requested types of server notices are specified as a
|
||||||
|
parameter (<quote>snomask</quote>) to this umode.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+S, network service</title>
|
||||||
|
<para>
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
This umode can only be set by servers named in a service{}
|
||||||
|
block.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
This umode grants various features useful for services. For example,
|
||||||
|
clients with this umode cannot be kicked or deopped on channels,
|
||||||
|
do not show channels the querying user is not on in WHOIS,
|
||||||
|
and do not appear in /stats p.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The exact effects of this umode are variable; no user or oper on
|
||||||
|
an actual charybdis server can set it.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+w, receive wallops</title>
|
||||||
|
<para>
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
This is a user umode, which anybody can set. It is not specific to operators.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
Users with the +w umode set will receive WALLOPS messages sent by opers.
|
||||||
|
Opers with +w additionally receive WALLOPS sent by servers (e.g.
|
||||||
|
remote CONNECT, remote SQUIT, many services packages).
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+z, receive operwall</title>
|
||||||
|
<para>
|
||||||
|
OPERWALL differs from WALLOPS in that the ability to receive such messages is
|
||||||
|
restricted. Opers with +z set will receive OPERWALL messages.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
</sect1>
|
||||||
|
<sect1 id="snomaskusage">
|
||||||
|
<title>Snomask usage</title>
|
||||||
|
<para>
|
||||||
|
Usage is as follows:
|
||||||
|
</para>
|
||||||
|
<cmdsynopsis><command>MODE</command>
|
||||||
|
<arg choice=plain><replaceable>nick</replaceable></arg>
|
||||||
|
<arg choice=plain>+s</arg>
|
||||||
|
<arg choice=plain><replaceable>+/-flags</replaceable></arg>
|
||||||
|
</cmdsynopsis>
|
||||||
|
<para>
|
||||||
|
To set snomasks.
|
||||||
|
</para>
|
||||||
|
<cmdsynopsis><command>MODE</command>
|
||||||
|
<arg choice=plain><replaceable>nick</replaceable></arg>
|
||||||
|
<arg choice=plain>-s</arg>
|
||||||
|
</cmdsynopsis>
|
||||||
|
<para>
|
||||||
|
To clear all snomasks.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Umode +s will be set if at least one snomask is set.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Umode +s is oper only by default, but even if you allow nonopers to
|
||||||
|
set it, they will not get any server notices.
|
||||||
|
</para>
|
||||||
|
</sect1>
|
||||||
|
<sect1 id="snomasklist">
|
||||||
|
<title>Meanings of server notice masks</title>
|
||||||
|
<sect2>
|
||||||
|
<title>+b, bot warnings</title>
|
||||||
|
<para>
|
||||||
|
Opers with the +b snomask set will receive warning messages from the server when potential
|
||||||
|
flooders and spambots are detected.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+c, client connections</title>
|
||||||
|
<para>
|
||||||
|
Opers who have the +c snomask set will receive server notices when clients attach to the
|
||||||
|
local server.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+C, extended client connection notices</title>
|
||||||
|
<para>
|
||||||
|
Opers who have the +C snomask set will receive server notices when clients attach to the
|
||||||
|
local server. Unlike the +c snomask, the information is displayed in a format intended
|
||||||
|
to be parsed by scripts, and includes the two unused fields of the USER command.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+d, debug</title>
|
||||||
|
<para>
|
||||||
|
The +d snomask provides opers extra information which may be of interest to debuggers.
|
||||||
|
It will also cause the user to receive server notices if certain assertions fail inside the
|
||||||
|
server. Its precise meaning is variable. Do not depend on the
|
||||||
|
effects of this snomask as they can and will change without notice in later revisions.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+f, full warning</title>
|
||||||
|
<para>
|
||||||
|
Opers with the +f snomask set will receive notices when a user
|
||||||
|
connection is denied because a connection limit is exceeded
|
||||||
|
(one of the limits in a class{} block, or the total per-server
|
||||||
|
limit settable with /quote set max).
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+k, server kill notices</title>
|
||||||
|
<para>
|
||||||
|
Opers with the +k snomask set will receive server notices when
|
||||||
|
services kill users and when
|
||||||
|
other servers kill and save (forced nick change to UID) users.
|
||||||
|
Kills and saves by this server are on +d or +s.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+n, nick change notices</title>
|
||||||
|
<para>
|
||||||
|
An oper with +n set will receive a server notice every time a local user changes their nick,
|
||||||
|
giving the old and new nicks.
|
||||||
|
This is mostly useful for bots that track all users on a single server.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+r, notices on name rejections</title>
|
||||||
|
<para>
|
||||||
|
Opers with this snomask set will receive a server notice when somebody tries to use an
|
||||||
|
invalid username, or if a dumb HTTP proxy tries to connect.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+s, generic server notices</title>
|
||||||
|
<para>
|
||||||
|
This snomask allows an oper to receive generic server notices.
|
||||||
|
This includes kills from opers (except services).
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+u, unauthorized connections</title>
|
||||||
|
<para>
|
||||||
|
This snomask allows an oper to see when users try to connect who do not have an
|
||||||
|
available auth{} block.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+x, extra routing notices</title>
|
||||||
|
<para>
|
||||||
|
Opers who have the +x snomask set will get notices about servers
|
||||||
|
connecting and disconnecting on the whole network. This includes
|
||||||
|
all servers connected behind the affected link. This can get
|
||||||
|
rather noisy but is useful for keeping track of all linked
|
||||||
|
servers.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+y, spy</title>
|
||||||
|
<para>
|
||||||
|
Opers with +y receive notices when users try to join RESV'ed (<quote>juped</quote>) channels.
|
||||||
|
Additionally, if certain extension modules are loaded, they will
|
||||||
|
receive notices when special commands are used and/or when they
|
||||||
|
are whoised.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
<sect2>
|
||||||
|
<title>+Z, operspy notices</title>
|
||||||
|
<para>
|
||||||
|
Opers with +Z receive notices whenever an oper anywhere on the
|
||||||
|
network uses operspy.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This snomask can be configured to be only effective for admins.
|
||||||
|
</para>
|
||||||
|
</sect2>
|
||||||
|
</sect1>
|
||||||
|
</chapter>
|
||||||
|
<!-- Keep this comment at the end of the file
|
||||||
|
Local variables:
|
||||||
|
mode: sgml
|
||||||
|
sgml-omittag:t
|
||||||
|
sgml-shorttag:t
|
||||||
|
sgml-namecase-general:t
|
||||||
|
sgml-general-insert-case:lower
|
||||||
|
sgml-minimize-attributes:nil
|
||||||
|
sgml-always-quote-attributes:t
|
||||||
|
sgml-indent-step:2
|
||||||
|
sgml-indent-data:t
|
||||||
|
sgml-parent-document: ("charybdis-oper-guide.sgml" "book")
|
||||||
|
sgml-exposed-tags:nil
|
||||||
|
fill-column: 105
|
||||||
|
sgml-validate-command: "nsgmls -e -g -s -u charybdis-oper-guide.sgml"
|
||||||
|
End:
|
||||||
|
-->
|
330
doc/technical/README.TSora
Normal file
330
doc/technical/README.TSora
Normal 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.
|
||||||
|
|
||||||
|
|
34
doc/technical/capab.txt
Normal file
34
doc/technical/capab.txt
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
Server capabilities
|
||||||
|
William Pitcock <nenolod -at- nenolod.net>
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Not all TSora IRCd's support these.
|
||||||
|
|
||||||
|
QS - supports Quit Storm (SQUIT does not have to send recursive quits)
|
||||||
|
EX - supports ban exceptions (+e)
|
||||||
|
CHW - supports messages directed to channel operators only i.e. @#channel
|
||||||
|
IE - supports invite exceptions (+I)
|
||||||
|
EOB - supports end of burst notification (EOB token)
|
||||||
|
KLN - supports remote KLINE
|
||||||
|
UNKLN - supports remote UNKLINE
|
||||||
|
GLN - supports hybrid7-style GLINE (:oper GLINE user host :reason)
|
||||||
|
HOPS - supports halfops (+h -- %<nick>)
|
||||||
|
HUB - denotes that the target server is a HUB
|
||||||
|
AOPS - supports anonymous ops (+a, op hiding/op status hiding)
|
||||||
|
KNOCK - supports KNOCK extension (request invite to +ikl channel)
|
||||||
|
TBURST - supports old TBURST command [broken, don't use.]
|
||||||
|
TB - supports new TB command [do use.]
|
||||||
|
PARA - supports sending invite notices via INVITE from server
|
||||||
|
ENCAP - supports message encapsulation
|
||||||
|
SERVICES - supports ratbox's services extensions
|
||||||
|
SAVE - supports SAVE extension (friendlier alternative to KILL on nick collide)
|
||||||
|
RSFNC - supports RSFNC extension (forcenick)
|
||||||
|
CLUSTER - supports remote XLINE, UNXLINE, RESV, UNRESV and LOCOPS
|
||||||
|
EUID - supports EUID, non-ENCAP CHGHOST and NICKDELAY
|
||||||
|
ZIP - supports ziplinks
|
||||||
|
ENC - supports encryption (cryptlinks)
|
||||||
|
|
||||||
|
The KLN, UNKLN and CLUSTER capabilities do not apply to klines, xlines
|
||||||
|
and resvs sent over ENCAP.
|
||||||
|
|
||||||
|
Disabling ban/invite exceptions in ircd.conf does not remove the EX/IE capabs.
|
26
doc/technical/cluster.txt
Normal file
26
doc/technical/cluster.txt
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
$Id: cluster.txt 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
|
||||||
|
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>
|
||||||
|
|
71
doc/technical/euid.txt
Normal file
71
doc/technical/euid.txt
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
$Id: euid.txt 1863 2006-08-27 13:40:37Z jilles $
|
||||||
|
|
||||||
|
Extended UID command proposal
|
||||||
|
Jilles Tjoelker <jilles@stack.nl>
|
||||||
|
|
||||||
|
Introduction
|
||||||
|
------------
|
||||||
|
|
||||||
|
The current protocol to deal with real and visible hosts, with UID, ENCAP
|
||||||
|
REALHOST and ENCAP CHGHOST commands has several problems.
|
||||||
|
|
||||||
|
In some cases (MONITOR) real hosts are used inappropriately because the UID
|
||||||
|
command contains the real host for new users. In other cases (atheme
|
||||||
|
akills), the visible host is used inappropriately because the UID command
|
||||||
|
contains the visible host for burst users. In both cases nothing is sent
|
||||||
|
after the UID command if real and visible hosts are equal. In the latter
|
||||||
|
case this problem can be worked around with end-of-burst detection but in
|
||||||
|
the former case that is not possible.
|
||||||
|
|
||||||
|
This can be fixed by sending both real and visible host in the same command.
|
||||||
|
|
||||||
|
This command can also include the data that is currently sent with ENCAP
|
||||||
|
LOGIN.
|
||||||
|
|
||||||
|
Another problem is that CHGHOST is an ENCAP command although it is important
|
||||||
|
for synchronization. One of the problems is that the target often remains
|
||||||
|
a UID even if sent to a TS5 server (various old services packages).
|
||||||
|
|
||||||
|
This can be fixed by making it a regular command.
|
||||||
|
|
||||||
|
Current commands
|
||||||
|
----------------
|
||||||
|
|
||||||
|
(TS6 form only)
|
||||||
|
|
||||||
|
:<SID> UID <NICK> <HOPS> <TS> +<UMODE> <USERNAME> <HOSTNAME> <IP> <UID> :<GECOS>
|
||||||
|
|
||||||
|
Introduces a user, see Lee Hardy's ts6.txt.
|
||||||
|
|
||||||
|
:<UID> ENCAP * REALHOST <REALHOST>
|
||||||
|
|
||||||
|
Sets the real host of a user (the hostname in UID is the visible host).
|
||||||
|
|
||||||
|
:<SID> ENCAP * CHGHOST <UID> <VHOST>
|
||||||
|
|
||||||
|
Sets/changes the visible host of a user (the hostname in UID is the real host).
|
||||||
|
|
||||||
|
:<UID> ENCAP * LOGIN <ACCOUNT>
|
||||||
|
|
||||||
|
Sets the login name of a user.
|
||||||
|
|
||||||
|
New commands
|
||||||
|
------------
|
||||||
|
|
||||||
|
:<SID> EUID <NICK> <HOPS> <TS> +<UMODE> <USERNAME> <VHOST> <IP> <UID> <REALHOST> <ACCOUNT> :<GECOS>
|
||||||
|
|
||||||
|
Introduces a user. The hostname field is now always the visible host.
|
||||||
|
The realhost field is * if the real host is equal to the visible host.
|
||||||
|
The account field is * if the login is not set.
|
||||||
|
Note that even if both new fields are *, an EUID command still carries more
|
||||||
|
information than a UID command (namely that real host is visible host and the
|
||||||
|
user is not logged in with services). Hence a NICK or UID command received
|
||||||
|
from a remote server should not be sent in EUID form to other servers.
|
||||||
|
|
||||||
|
:<SID> CHGHOST <UID> <VHOST>
|
||||||
|
|
||||||
|
Changes the visible host of a user.
|
||||||
|
|
||||||
|
A new server capab named EUID will be sent if these commands are supported.
|
||||||
|
If the capab is not present, the old commands must be used.
|
||||||
|
EUID can (in principle) also be used with TS5.
|
84
doc/technical/event.txt
Normal file
84
doc/technical/event.txt
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
Overview of the event subsystem
|
||||||
|
Adrian Chadd <adrian@creative.net.au>
|
||||||
|
|
||||||
|
$Id: event.txt 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
|
||||||
|
|
||||||
|
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!
|
||||||
|
|
81
doc/technical/fd-management.txt
Normal file
81
doc/technical/fd-management.txt
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
Overview of the filedescriptor subsystem
|
||||||
|
Adrian Chadd <adrian@creative.net.au>
|
||||||
|
|
||||||
|
$Id: fd-management.txt 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
|
||||||
|
|
||||||
|
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().
|
||||||
|
|
37
doc/technical/file-management.txt
Normal file
37
doc/technical/file-management.txt
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
Overview of the file management subsystem
|
||||||
|
Adrian Chadd <adrian@creative.net.au>
|
||||||
|
|
||||||
|
$Id: file-management.txt 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
|
||||||
|
|
||||||
|
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().
|
||||||
|
|
115
doc/technical/hostmask.txt
Normal file
115
doc/technical/hostmask.txt
Normal file
|
@ -0,0 +1,115 @@
|
||||||
|
The hostmask/netmask system.
|
||||||
|
Copyright(C) 2001 by Andrew Miller(A1kmm)<a1kmm@mware.virtualave.net>
|
||||||
|
$Id: hostmask.txt 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
|
||||||
|
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.
|
19
doc/technical/index.txt
Normal file
19
doc/technical/index.txt
Normal 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 6 2005-09-10 01:02:21Z nenolod $
|
139
doc/technical/linebuf.txt
Normal file
139
doc/technical/linebuf.txt
Normal 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 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
|
||||||
|
|
||||||
|
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 ..
|
||||||
|
|
105
doc/technical/network.txt
Normal file
105
doc/technical/network.txt
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
Overview of the network subsystem
|
||||||
|
Adrian Chadd <adrian@creative.net.au>
|
||||||
|
|
||||||
|
$Id: network.txt 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
|
||||||
|
|
||||||
|
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.
|
3643
doc/technical/rfc1459.txt
Normal file
3643
doc/technical/rfc1459.txt
Normal file
File diff suppressed because it is too large
Load diff
253
doc/technical/send.txt
Normal file
253
doc/technical/send.txt
Normal file
|
@ -0,0 +1,253 @@
|
||||||
|
|
||||||
|
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,
|
||||||
|
acptr->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_one_prefix()
|
||||||
|
- Sends a message to a remote client, with proper
|
||||||
|
prefix and target (name or UID).
|
||||||
|
usage - sendto_one_prefix(struct Client *target_p,
|
||||||
|
struct Client *source_p,
|
||||||
|
const char *command,
|
||||||
|
const char *pattern, ...)
|
||||||
|
|
||||||
|
typical use:
|
||||||
|
|
||||||
|
sendto_one_prefix(target_p, source_p, "INVITE", ":%s",
|
||||||
|
chptr->chname);
|
||||||
|
|
||||||
|
|
||||||
|
sendto_one_notice()
|
||||||
|
- Sends a notice from this server to target. Target may
|
||||||
|
be a local or remote client.
|
||||||
|
Prefix and target are chosen based on TS6 capability.
|
||||||
|
|
||||||
|
typical use:
|
||||||
|
|
||||||
|
sendto_one_notice(source_p, ":You suck. Yes, really.");
|
||||||
|
|
||||||
|
sendto_one_numeric()
|
||||||
|
- Sends a numeric from this server to target. Target may
|
||||||
|
be a local or remote client.
|
||||||
|
Prefix and target are chosen based on TS6 capability.
|
||||||
|
|
||||||
|
typical use:
|
||||||
|
|
||||||
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
|
"p :%u staff members", count);
|
||||||
|
|
||||||
|
sendto_channel_flags()
|
||||||
|
- 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.
|
||||||
|
For type use one of:
|
||||||
|
ONLY_SERVERS ALL_MEMBERS ONLY_CHANOPS ONLY_CHANOPSVOICED
|
||||||
|
If type is not ALL_MEMBERS it's not sent to not-CHW-capable
|
||||||
|
servers.
|
||||||
|
Deaf (umode +D) clients are always skipped.
|
||||||
|
|
||||||
|
usage - sendto_channel_flags(struct Client *one,
|
||||||
|
int type,
|
||||||
|
struct Client *from,
|
||||||
|
struct Channel *chptr,
|
||||||
|
const char *pattern, ... );
|
||||||
|
|
||||||
|
sendto_channel_butone(cptr, ALL_MEMBERS, 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_server()
|
||||||
|
- This function sends specified var args message
|
||||||
|
to all connected servers except the client "one"
|
||||||
|
which have all of "caps" capabilities but none
|
||||||
|
of "nocaps" capabilities.
|
||||||
|
|
||||||
|
If "chptr" is not NULL and is a local channel,
|
||||||
|
nothing is sent.
|
||||||
|
|
||||||
|
usage - sendto_server(struct Client *one,
|
||||||
|
struct Channel *chptr,
|
||||||
|
unsigned long caps,
|
||||||
|
unsigned long nocaps,
|
||||||
|
const char *format, ... );
|
||||||
|
|
||||||
|
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 to send only 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.
|
||||||
|
The message is also sent to deaf (umode +D) clients.
|
||||||
|
|
||||||
|
usage - sendto_channel_local(int 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
|
||||||
|
ONLY_CHANOPS_VOICED - only chanops and voiced see this
|
||||||
|
ONLY_CHANOPS - only chanops see this
|
||||||
|
|
||||||
|
|
||||||
|
sendto_match_butone()
|
||||||
|
- 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 - sendto_match_butone(struct Client *one,
|
||||||
|
struct Client *source_p,
|
||||||
|
char *mask,
|
||||||
|
int what,
|
||||||
|
const char *pattern, ... );
|
||||||
|
|
||||||
|
one is the client not to send to
|
||||||
|
mask is the actual mask
|
||||||
|
what is either MATCH_HOST or MATCH_SERVER
|
||||||
|
|
||||||
|
sendto_match_servs()
|
||||||
|
- Allows sending a message to servers whose names match
|
||||||
|
the given mask. A message is also sent to non-matching
|
||||||
|
servers which have matching servers behind them.
|
||||||
|
Used for ENCAP, remote kline, etc.
|
||||||
|
No message is sent to source_p->from.
|
||||||
|
|
||||||
|
usage - sendto_match_servs(struct Client *source_p,
|
||||||
|
const char *mask,
|
||||||
|
int cap, int nocap,
|
||||||
|
const char *pattern, ...);
|
||||||
|
|
||||||
|
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 *command,
|
||||||
|
const char *pattern, ...);
|
||||||
|
|
||||||
|
e.g.
|
||||||
|
sendto_anywhere(target_p, source_p,
|
||||||
|
"PRIVMSG", ":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 umodes. UMODE_ALL is UMODE_SERVNOTICE.
|
||||||
|
the message is sent as a server notice, prefixed with
|
||||||
|
"*** Notice -- ".
|
||||||
|
|
||||||
|
usage - sendto_realops_flags(int flags,
|
||||||
|
const char *pattern, ... );
|
||||||
|
|
||||||
|
e.g.
|
||||||
|
sendto_realops_flags(UMODE_ALL,
|
||||||
|
"Don't eat the yellow snow");
|
||||||
|
|
||||||
|
sendto_wallops_flags()
|
||||||
|
- sends specified message to opers/users locally,
|
||||||
|
depending on umodes. used for messages that need
|
||||||
|
to be in wallops form
|
||||||
|
- some policy decisions about who gets what live in here
|
||||||
|
|
||||||
|
usage - sendto_wallops_flags(int flags,
|
||||||
|
struct Client *, const char *patterm ...);
|
||||||
|
|
||||||
|
e.g.
|
||||||
|
sendto_wallops_flags(UMODE_LOCOPS,
|
||||||
|
sptr, "Message");
|
||||||
|
|
||||||
|
-- Diane Bruce
|
||||||
|
Updated Jan 2006 by jilles with ratbox and late hybrid7 changes
|
||||||
|
|
||||||
|
$Id: send.txt 587 2006-01-27 19:45:11Z jilles $
|
151
doc/technical/ts5.txt
Normal file
151
doc/technical/ts5.txt
Normal file
|
@ -0,0 +1,151 @@
|
||||||
|
Overview of the TS5 system
|
||||||
|
Lee H <lee@leeh.co.uk>
|
||||||
|
|
||||||
|
$Id: ts5.txt 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
|
||||||
|
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
|
269
doc/technical/ts6.txt
Normal file
269
doc/technical/ts6.txt
Normal file
|
@ -0,0 +1,269 @@
|
||||||
|
$Id: ts6.txt 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
|
||||||
|
TS6 Proposal (v7)
|
||||||
|
Written by Lee H <lee@leeh.co.uk>
|
||||||
|
Ideas borrowed heavily from ircnet (Beeth, jv, Q)
|
||||||
|
|
||||||
|
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> +<CHANMODES>
|
||||||
|
|
||||||
|
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, <CHANMODES> are the channels current modes.
|
||||||
|
|
||||||
|
A server receiving a JOIN must apply normal channel TS rules to the JOIN.
|
||||||
|
|
||||||
|
It should be noted that whilst JOIN would not normally create a
|
||||||
|
channel, during specific race conditions it can. This can create
|
||||||
|
a ban 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:
|
||||||
|
:<UID> TMODE <TS> <CHANNAME> <MODESTRING>
|
||||||
|
|
||||||
|
This command is used for clients issuing modes on a channel.
|
||||||
|
|
||||||
|
<UID> is the UID of the client 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 into TMODE
|
||||||
|
to send to other TS6 capable servers.
|
||||||
|
|
38
doc/tgchange.txt
Normal file
38
doc/tgchange.txt
Normal 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 6 2005-09-10 01:02:21Z nenolod $
|
113
doc/whats-new-2.0.txt
Normal file
113
doc/whats-new-2.0.txt
Normal file
|
@ -0,0 +1,113 @@
|
||||||
|
$Id: whats-new-2.0.txt 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
|
||||||
|
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 ;)
|
69
doc/whats-new-2.1.txt
Normal file
69
doc/whats-new-2.1.txt
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
# $Id: whats-new-2.1.txt 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
|
||||||
|
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.
|
1
extensions/.cvsignore
Normal file
1
extensions/.cvsignore
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Makefile
|
1
extensions/.indent.pro
vendored
Normal file
1
extensions/.indent.pro
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
-i8 -bli0 -cs -ut -nsai -nsaw -nsaf -npcs -nprs -l100
|
101
extensions/Makefile.in
Normal file
101
extensions/Makefile.in
Normal file
|
@ -0,0 +1,101 @@
|
||||||
|
#
|
||||||
|
# Makefile.in for ircd/contrib
|
||||||
|
#
|
||||||
|
# $Id: Makefile.in 1849 2006-08-23 12:40:21Z jilles $
|
||||||
|
#
|
||||||
|
CC = @CC@
|
||||||
|
RM = @RM@
|
||||||
|
SED = @SED@
|
||||||
|
LEX = @LEX@
|
||||||
|
LEXLIB = @LEXLIB@
|
||||||
|
CFLAGS = @IRC_CFLAGS@ -DIRCD_PREFIX=\"@prefix@\"
|
||||||
|
PICFLAGS = @PICFLAGS@
|
||||||
|
MKDEP = @MKDEP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_SUID = @INSTALL_PROGRAM@ -o root -m 4755
|
||||||
|
SHELL = /bin/sh
|
||||||
|
AUTOMODULEDIR = @moduledir@/extensions
|
||||||
|
|
||||||
|
SSL_LIBS = @SSL_LIBS@
|
||||||
|
SSL_INCLUDES = @SSL_INCLUDES@
|
||||||
|
|
||||||
|
IRCDLIBS = @LIBS@ $(SSL_LIBS)
|
||||||
|
|
||||||
|
INCLUDES = -I. -I../include -I../libcharybdis -I../adns $(SSL_INCLUDES)
|
||||||
|
CPPFLAGS = ${INCLUDES} @CPPFLAGS@
|
||||||
|
|
||||||
|
SRCS = \
|
||||||
|
createauthonly.c \
|
||||||
|
extb_account.c \
|
||||||
|
extb_canjoin.c \
|
||||||
|
extb_channel.c \
|
||||||
|
extb_oper.c \
|
||||||
|
extb_server.c \
|
||||||
|
extb_realname.c \
|
||||||
|
extb_extgecos.c \
|
||||||
|
hurt.c \
|
||||||
|
ip_cloaking.c \
|
||||||
|
sno_farconnect.c \
|
||||||
|
sno_globalkline.c \
|
||||||
|
sno_globaloper.c \
|
||||||
|
m_42.c \
|
||||||
|
m_findforwards.c \
|
||||||
|
m_identify.c \
|
||||||
|
m_mkpasswd.c \
|
||||||
|
m_ojoin.c \
|
||||||
|
m_olist.c \
|
||||||
|
m_okick.c \
|
||||||
|
m_omode.c \
|
||||||
|
m_opme.c \
|
||||||
|
m_webirc.c \
|
||||||
|
no_oper_invis.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_trace_notice.c \
|
||||||
|
spy_whois_notice.c \
|
||||||
|
spy_whois_notice_global.c \
|
||||||
|
example_module.c
|
||||||
|
|
||||||
|
OBJS = ${SRCS:.c=.so}
|
||||||
|
|
||||||
|
default: build
|
||||||
|
build: all
|
||||||
|
all: $(OBJS)
|
||||||
|
|
||||||
|
install: all
|
||||||
|
-@if test ! -d $(DESTDIR)$(AUTOMODULEDIR); then \
|
||||||
|
mkdir $(DESTDIR)$(AUTOMODULEDIR); \
|
||||||
|
fi
|
||||||
|
@echo "Installing modules into $(DESTDIR)$(AUTOMODULEDIR) .."
|
||||||
|
@for file in $(OBJS); do \
|
||||||
|
$(INSTALL_DATA) $$file $(DESTDIR)$(AUTOMODULEDIR); \
|
||||||
|
done
|
||||||
|
|
||||||
|
.SUFFIXES: .so
|
||||||
|
|
||||||
|
.c.so:
|
||||||
|
${CC} ${PICFLAGS} ${CPPFLAGS} ${CFLAGS} $< -o $@
|
||||||
|
|
||||||
|
.PHONY: depend clean distclean
|
||||||
|
depend:
|
||||||
|
@${MKDEP} ${CPPFLAGS} ${SRCS} > .depend
|
||||||
|
@sed s/\\\.o/\\\.so/ < .depend > .depend.tmp
|
||||||
|
@sed -e '/^# DO NOT DELETE THIS LINE/,$$d' <Makefile >Makefile.depend
|
||||||
|
@echo '# DO NOT DELETE THIS LINE!!!' >>Makefile.depend
|
||||||
|
@echo '# make depend needs it.' >>Makefile.depend
|
||||||
|
@cat .depend.tmp >>Makefile.depend
|
||||||
|
@mv Makefile.depend Makefile
|
||||||
|
@rm -f .depend.tmp .depend
|
||||||
|
|
||||||
|
clean:
|
||||||
|
${RM} -f *.so *~
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
${RM} -f Makefile
|
||||||
|
|
68
extensions/README
Normal file
68
extensions/README
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
$Id: README 1622 2006-06-04 03:01:05Z beu $
|
||||||
|
|
||||||
|
This directory contains extensions (modules) to charybdis ircd that
|
||||||
|
have been contributed by other people, or written by our development
|
||||||
|
team. Unsupported extensions live under unsupported/.
|
||||||
|
|
||||||
|
|
||||||
|
Modules
|
||||||
|
-------
|
||||||
|
|
||||||
|
createauthonly.c - Only allow authenticated (identified) users to create
|
||||||
|
channels.
|
||||||
|
|
||||||
|
ip_cloaking.c - Cloak (spoof) the host for users that have umode +h.
|
||||||
|
|
||||||
|
m_42.c - The Answer to Life, the Universe, and Everything.
|
||||||
|
Syntax: 42
|
||||||
|
|
||||||
|
m_findforwards.c - Find channels that forward (+f) to a given channel.
|
||||||
|
Syntax: FINDFORWARDS <channel>
|
||||||
|
|
||||||
|
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_omode.c - OMODE - Allows an admin to do all sorts of evil upon a
|
||||||
|
channel, sets modes with extreme prejudice
|
||||||
|
|
||||||
|
no_oper_invis.c - Disallow opers setting marking themselves as invisible
|
||||||
|
(+i) unless they have the hidden_oper flag.
|
||||||
|
|
||||||
|
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_trace_notice.c - Spy on clients doing TRACE/LTRACE
|
||||||
|
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.
|
||||||
|
|
||||||
|
Snomask Modules
|
||||||
|
---------------
|
||||||
|
|
||||||
|
sno_farconnect.c - Remote client connect/exit notices (snomask +F)
|
||||||
|
sno_globalkline.c - Global K/D/X-line activation notices
|
||||||
|
sno_globaloper.c - Global oper-up notices
|
37
extensions/createauthonly.c
Normal file
37
extensions/createauthonly.c
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
/*
|
||||||
|
* This module restricts channel creation to authenticated users
|
||||||
|
* only. This module could be useful for running private chat
|
||||||
|
* systems, or if a network gets droneflood problems. It will
|
||||||
|
* return ERR_NEEDREGGEDNICK on failure.
|
||||||
|
* -- nenolod
|
||||||
|
*
|
||||||
|
* $Id: createauthonly.c 833 2006-02-15 00:27:59Z jilles $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "hook.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
#include "send.h"
|
||||||
|
#include "s_conf.h"
|
||||||
|
#include "snomask.h"
|
||||||
|
#include "numeric.h"
|
||||||
|
|
||||||
|
static void h_can_create_channel_authenticated(hook_data_client_approval *);
|
||||||
|
|
||||||
|
mapi_hfn_list_av1 restrict_hfnlist[] = {
|
||||||
|
{ "can_create_channel", (hookfn) h_can_create_channel_authenticated },
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECLARE_MODULE_AV1(createauthonly, NULL, NULL, NULL, NULL, restrict_hfnlist, "$Revision: 833 $");
|
||||||
|
|
||||||
|
static void
|
||||||
|
h_can_create_channel_authenticated(hook_data_client_approval *data)
|
||||||
|
{
|
||||||
|
struct Client *source_p = data->client;
|
||||||
|
|
||||||
|
if (*source_p->user->suser == '\0')
|
||||||
|
data->approved = ERR_NEEDREGGEDNICK;
|
||||||
|
}
|
280
extensions/example_module.c
Normal file
280
extensions/example_module.c
Normal file
|
@ -0,0 +1,280 @@
|
||||||
|
/************************************************************************
|
||||||
|
* 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 494 2006-01-15 16:08:28Z jilles $
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* List of ircd includes from ../include/ */
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "modules.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: 494 $");
|
||||||
|
|
||||||
|
/* 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_snomask(SNO_GENERAL, L_ALL, "Called example hook!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* END OF EXAMPLE MODULE */
|
43
extensions/extb_account.c
Normal file
43
extensions/extb_account.c
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
/*
|
||||||
|
* Account extban type: bans all users with any/matching account
|
||||||
|
* -- jilles
|
||||||
|
*
|
||||||
|
* $Id: extb_account.c 1299 2006-05-11 15:43:03Z jilles $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
|
||||||
|
static int _modinit(void);
|
||||||
|
static void _moddeinit(void);
|
||||||
|
static int eb_account(const char *data, struct Client *client_p, struct Channel *chptr, long mode_type);
|
||||||
|
|
||||||
|
DECLARE_MODULE_AV1(extb_account, _modinit, _moddeinit, NULL, NULL, NULL, "$Revision: 1299 $");
|
||||||
|
|
||||||
|
static int
|
||||||
|
_modinit(void)
|
||||||
|
{
|
||||||
|
extban_table['a'] = eb_account;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_moddeinit(void)
|
||||||
|
{
|
||||||
|
extban_table['a'] = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int eb_account(const char *data, struct Client *client_p,
|
||||||
|
struct Channel *chptr, long mode_type)
|
||||||
|
{
|
||||||
|
|
||||||
|
(void)chptr;
|
||||||
|
/* $a alone matches any logged in user */
|
||||||
|
if (data == NULL)
|
||||||
|
return EmptyString(client_p->user->suser) ? EXTBAN_NOMATCH : EXTBAN_MATCH;
|
||||||
|
/* $a:MASK matches users logged in under matching account */
|
||||||
|
return match(data, client_p->user->suser) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
|
||||||
|
}
|
67
extensions/extb_canjoin.c
Normal file
67
extensions/extb_canjoin.c
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
/*
|
||||||
|
* Canjoin extban type: matches users who are or are not banned from a
|
||||||
|
* specified channel.
|
||||||
|
* -- nenolod/jilles
|
||||||
|
*
|
||||||
|
* $Id: extb_canjoin.c 1841 2006-08-22 17:30:03Z jilles $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "channel.h"
|
||||||
|
#include "hash.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
|
||||||
|
static int _modinit(void);
|
||||||
|
static void _moddeinit(void);
|
||||||
|
static int eb_canjoin(const char *data, struct Client *client_p, struct Channel *chptr, long mode_type);
|
||||||
|
|
||||||
|
DECLARE_MODULE_AV1(extb_canjoin, _modinit, _moddeinit, NULL, NULL, NULL, "$Revision: 1841 $");
|
||||||
|
|
||||||
|
static int
|
||||||
|
_modinit(void)
|
||||||
|
{
|
||||||
|
extban_table['j'] = eb_canjoin;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_moddeinit(void)
|
||||||
|
{
|
||||||
|
extban_table['j'] = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int eb_canjoin(const char *data, struct Client *client_p,
|
||||||
|
struct Channel *chptr, long mode_type)
|
||||||
|
{
|
||||||
|
struct Channel *chptr2;
|
||||||
|
int ret;
|
||||||
|
static int recurse = 0;
|
||||||
|
|
||||||
|
(void)mode_type;
|
||||||
|
/* don't process a $j in a $j'ed list */
|
||||||
|
if (recurse)
|
||||||
|
return EXTBAN_INVALID;
|
||||||
|
if (data == NULL)
|
||||||
|
return EXTBAN_INVALID;
|
||||||
|
chptr2 = find_channel(data);
|
||||||
|
/* must exist, and no point doing this with the same channel */
|
||||||
|
if (chptr2 == NULL || chptr2 == chptr)
|
||||||
|
return EXTBAN_INVALID;
|
||||||
|
/* require consistent target */
|
||||||
|
if (chptr->chname[0] == '#' && data[0] == '&')
|
||||||
|
return EXTBAN_INVALID;
|
||||||
|
/* this allows getting some information about ban exceptions
|
||||||
|
* but +s/+p doesn't seem the right criterion */
|
||||||
|
#if 0
|
||||||
|
/* privacy! don't allow +s/+p channels to influence another channel */
|
||||||
|
if (!PubChannel(chptr2))
|
||||||
|
return EXTBAN_INVALID;
|
||||||
|
#endif
|
||||||
|
recurse = 1;
|
||||||
|
ret = is_banned(chptr2, client_p, NULL, NULL, NULL) == CHFL_BAN ? EXTBAN_MATCH : EXTBAN_NOMATCH;
|
||||||
|
recurse = 0;
|
||||||
|
return ret;
|
||||||
|
}
|
54
extensions/extb_channel.c
Normal file
54
extensions/extb_channel.c
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
/*
|
||||||
|
* Channel extban type: matches users who are in a certain public channel
|
||||||
|
* -- jilles
|
||||||
|
*
|
||||||
|
* $Id: extb_channel.c 1723 2006-07-06 15:23:58Z jilles $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "channel.h"
|
||||||
|
#include "hash.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
|
||||||
|
static int _modinit(void);
|
||||||
|
static void _moddeinit(void);
|
||||||
|
static int eb_channel(const char *data, struct Client *client_p, struct Channel *chptr, long mode_type);
|
||||||
|
|
||||||
|
DECLARE_MODULE_AV1(extb_channel, _modinit, _moddeinit, NULL, NULL, NULL, "$Revision: 1723 $");
|
||||||
|
|
||||||
|
static int
|
||||||
|
_modinit(void)
|
||||||
|
{
|
||||||
|
extban_table['c'] = eb_channel;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_moddeinit(void)
|
||||||
|
{
|
||||||
|
extban_table['c'] = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int eb_channel(const char *data, struct Client *client_p,
|
||||||
|
struct Channel *chptr, long mode_type)
|
||||||
|
{
|
||||||
|
struct Channel *chptr2;
|
||||||
|
|
||||||
|
(void)chptr;
|
||||||
|
(void)mode_type;
|
||||||
|
if (data == NULL)
|
||||||
|
return EXTBAN_INVALID;
|
||||||
|
chptr2 = find_channel(data);
|
||||||
|
if (chptr2 == NULL)
|
||||||
|
return EXTBAN_INVALID;
|
||||||
|
/* require consistent target */
|
||||||
|
if (chptr->chname[0] == '#' && data[0] == '&')
|
||||||
|
return EXTBAN_INVALID;
|
||||||
|
/* privacy! don't allow +s/+p channels to influence another channel */
|
||||||
|
if (!PubChannel(chptr2))
|
||||||
|
return EXTBAN_INVALID;
|
||||||
|
return IsMember(client_p, chptr2) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
|
||||||
|
}
|
59
extensions/extb_extgecos.c
Normal file
59
extensions/extb_extgecos.c
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
/*
|
||||||
|
* Extended extban type: bans all users with matching nick!user@host#gecos.
|
||||||
|
* Requested by Lockwood.
|
||||||
|
* - nenolod
|
||||||
|
*
|
||||||
|
* $Id: extb_realname.c 1339 2006-05-17 00:45:40Z nenolod $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
|
||||||
|
static int _modinit(void);
|
||||||
|
static void _moddeinit(void);
|
||||||
|
static int eb_extended(const char *data, struct Client *client_p, struct Channel *chptr, long mode_type);
|
||||||
|
|
||||||
|
DECLARE_MODULE_AV1(extb_extended, _modinit, _moddeinit, NULL, NULL, NULL, "$Revision: 1339 $");
|
||||||
|
|
||||||
|
static int
|
||||||
|
_modinit(void)
|
||||||
|
{
|
||||||
|
extban_table['x'] = eb_extended;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_moddeinit(void)
|
||||||
|
{
|
||||||
|
extban_table['x'] = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int eb_extended(const char *data, struct Client *client_p,
|
||||||
|
struct Channel *chptr, long mode_type)
|
||||||
|
{
|
||||||
|
char buf[BUFSIZE];
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
(void)chptr;
|
||||||
|
|
||||||
|
if (data == NULL)
|
||||||
|
return EXTBAN_INVALID;
|
||||||
|
|
||||||
|
ircsnprintf(buf, BUFSIZE, "%s!%s@%s#%s",
|
||||||
|
client_p->name, client_p->username, client_p->host, client_p->info);
|
||||||
|
|
||||||
|
ret = match(data, buf) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
|
||||||
|
|
||||||
|
if (ret == EXTBAN_NOMATCH && IsDynSpoof(client_p))
|
||||||
|
{
|
||||||
|
ircsnprintf(buf, BUFSIZE, "%s!%s@%s#%s",
|
||||||
|
client_p->name, client_p->username, client_p->orighost, client_p->info);
|
||||||
|
|
||||||
|
ret = match(data, buf) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
42
extensions/extb_oper.c
Normal file
42
extensions/extb_oper.c
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
/*
|
||||||
|
* Oper extban type: matches opers
|
||||||
|
* -- jilles
|
||||||
|
*
|
||||||
|
* $Id: extb_oper.c 1299 2006-05-11 15:43:03Z jilles $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
|
||||||
|
static int _modinit(void);
|
||||||
|
static void _moddeinit(void);
|
||||||
|
static int eb_oper(const char *data, struct Client *client_p, struct Channel *chptr, long mode_type);
|
||||||
|
|
||||||
|
DECLARE_MODULE_AV1(extb_oper, _modinit, _moddeinit, NULL, NULL, NULL, "$Revision: 1299 $");
|
||||||
|
|
||||||
|
static int
|
||||||
|
_modinit(void)
|
||||||
|
{
|
||||||
|
extban_table['o'] = eb_oper;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_moddeinit(void)
|
||||||
|
{
|
||||||
|
extban_table['o'] = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int eb_oper(const char *data, struct Client *client_p,
|
||||||
|
struct Channel *chptr, long mode_type)
|
||||||
|
{
|
||||||
|
|
||||||
|
(void)chptr;
|
||||||
|
(void)data;
|
||||||
|
(void)mode_type;
|
||||||
|
/* perhaps use data somehow? (opernick/flags?) */
|
||||||
|
return IsOper(client_p) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
|
||||||
|
}
|
44
extensions/extb_realname.c
Normal file
44
extensions/extb_realname.c
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
/*
|
||||||
|
* Realname extban type: bans all users with matching gecos
|
||||||
|
* -- jilles
|
||||||
|
*
|
||||||
|
* $Id: extb_realname.c 1299 2006-05-11 15:43:03Z jilles $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
|
||||||
|
static int _modinit(void);
|
||||||
|
static void _moddeinit(void);
|
||||||
|
static int eb_realname(const char *data, struct Client *client_p, struct Channel *chptr, long mode_type);
|
||||||
|
|
||||||
|
DECLARE_MODULE_AV1(extb_realname, _modinit, _moddeinit, NULL, NULL, NULL, "$Revision: 1299 $");
|
||||||
|
|
||||||
|
static int
|
||||||
|
_modinit(void)
|
||||||
|
{
|
||||||
|
extban_table['r'] = eb_realname;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_moddeinit(void)
|
||||||
|
{
|
||||||
|
extban_table['r'] = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int eb_realname(const char *data, struct Client *client_p,
|
||||||
|
struct Channel *chptr, long mode_type)
|
||||||
|
{
|
||||||
|
|
||||||
|
(void)chptr;
|
||||||
|
/* This type is not safe for exceptions */
|
||||||
|
if (mode_type == CHFL_EXCEPTION || mode_type == CHFL_INVEX)
|
||||||
|
return EXTBAN_INVALID;
|
||||||
|
if (data == NULL)
|
||||||
|
return EXTBAN_INVALID;
|
||||||
|
return match(data, client_p->info) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
|
||||||
|
}
|
44
extensions/extb_server.c
Normal file
44
extensions/extb_server.c
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
/*
|
||||||
|
* Server name extban type: bans all users using a certain server
|
||||||
|
* -- jilles
|
||||||
|
*
|
||||||
|
* $Id: extb_server.c 1299 2006-05-11 15:43:03Z jilles $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
|
||||||
|
static int _modinit(void);
|
||||||
|
static void _moddeinit(void);
|
||||||
|
static int eb_server(const char *data, struct Client *client_p, struct Channel *chptr, long mode_type);
|
||||||
|
|
||||||
|
DECLARE_MODULE_AV1(extb_server, _modinit, _moddeinit, NULL, NULL, NULL, "$Revision: 1299 $");
|
||||||
|
|
||||||
|
static int
|
||||||
|
_modinit(void)
|
||||||
|
{
|
||||||
|
extban_table['s'] = eb_server;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_moddeinit(void)
|
||||||
|
{
|
||||||
|
extban_table['s'] = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int eb_server(const char *data, struct Client *client_p,
|
||||||
|
struct Channel *chptr, long mode_type)
|
||||||
|
{
|
||||||
|
|
||||||
|
(void)chptr;
|
||||||
|
/* This type is not safe for exceptions */
|
||||||
|
if (mode_type == CHFL_EXCEPTION || mode_type == CHFL_INVEX)
|
||||||
|
return EXTBAN_INVALID;
|
||||||
|
if (data == NULL)
|
||||||
|
return EXTBAN_INVALID;
|
||||||
|
return match(data, me.name) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
|
||||||
|
}
|
669
extensions/hurt.c
Normal file
669
extensions/hurt.c
Normal file
|
@ -0,0 +1,669 @@
|
||||||
|
/*
|
||||||
|
* charybdis: an advanced Internet Relay Chat Daemon(ircd).
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006 charybdis development team
|
||||||
|
* All rights reserved
|
||||||
|
*
|
||||||
|
* $Id: hurt.c 1905 2006-08-29 14:51:31Z jilles $
|
||||||
|
*/
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "hook.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
#include "send.h"
|
||||||
|
#include "numeric.h"
|
||||||
|
#include "hostmask.h"
|
||||||
|
#include "event.h"
|
||||||
|
#include "s_conf.h"
|
||||||
|
#include "s_newconf.h"
|
||||||
|
#include "hash.h"
|
||||||
|
|
||||||
|
/* {{{ Structures */
|
||||||
|
#define HURT_CUTOFF (10) /* protocol messages. */
|
||||||
|
#define HURT_DEFAULT_EXPIRE (7 * 24 * 60) /* minutes. */
|
||||||
|
#define HURT_EXIT_REASON "Hurt: Failed to identify to services"
|
||||||
|
|
||||||
|
enum {
|
||||||
|
HEAL_NICK = 0,
|
||||||
|
HEAL_IP
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct _hurt_state {
|
||||||
|
time_t start_time;
|
||||||
|
uint32_t n_hurts;
|
||||||
|
dlink_list hurt_clients;
|
||||||
|
uint16_t cutoff;
|
||||||
|
time_t default_expire;
|
||||||
|
const char *exit_reason;
|
||||||
|
} hurt_state_t;
|
||||||
|
|
||||||
|
typedef struct _hurt {
|
||||||
|
const char *ip;
|
||||||
|
struct sockaddr *saddr;
|
||||||
|
int saddr_bits;
|
||||||
|
const char *reason;
|
||||||
|
time_t expire;
|
||||||
|
} hurt_t;
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
/* {{{ Prototypes */
|
||||||
|
static int mo_hurt(struct Client *, struct Client *, int, const char **);
|
||||||
|
static int me_hurt(struct Client *, struct Client *, int, const char **);
|
||||||
|
static int mo_heal(struct Client *, struct Client *, int, const char **);
|
||||||
|
static int me_heal(struct Client *, struct Client *, int, const char **);
|
||||||
|
|
||||||
|
static int modinit(void);
|
||||||
|
static void modfini(void);
|
||||||
|
|
||||||
|
static void client_exit_hook(hook_data_client_exit *);
|
||||||
|
static void new_local_user_hook(struct Client *);
|
||||||
|
static void doing_stats_hook(hook_data_int *hdata);
|
||||||
|
|
||||||
|
static void hurt_check_event(void *);
|
||||||
|
static void hurt_expire_event(void *);
|
||||||
|
|
||||||
|
static hurt_t *hurt_new(time_t, const char *, const char *);
|
||||||
|
static void hurt_add(hurt_t *);
|
||||||
|
static void hurt_propagate(struct Client *, struct Client *, hurt_t *);
|
||||||
|
static hurt_t *hurt_find(const char *ip);
|
||||||
|
static hurt_t *hurt_find_exact(const char *ip);
|
||||||
|
static void hurt_remove(const char *ip);
|
||||||
|
static void hurt_destroy(void *hurt);
|
||||||
|
|
||||||
|
static int heal_nick(struct Client *, struct Client *);
|
||||||
|
|
||||||
|
static int nick_is_valid(const char *);
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
/* {{{ State containers */
|
||||||
|
|
||||||
|
dlink_list hurt_confs = { NULL, NULL, 0 };
|
||||||
|
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
/* {{{ Messages */
|
||||||
|
struct Message hurt_msgtab = {
|
||||||
|
"HURT", 0, 0, 0, MFLG_SLOW, {
|
||||||
|
mg_ignore, mg_ignore, mg_ignore,
|
||||||
|
mg_ignore, {me_hurt, 0}, {mo_hurt, 3}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Message heal_msgtab = {
|
||||||
|
"HEAL", 0, 0, 0, MFLG_SLOW, {
|
||||||
|
mg_ignore, mg_ignore, mg_ignore,
|
||||||
|
mg_ignore, {me_heal, 0}, {mo_heal, 2}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
/* {{{ Misc module stuff */
|
||||||
|
mapi_hfn_list_av1 hurt_hfnlist[] = {
|
||||||
|
{"client_exit", (hookfn) client_exit_hook},
|
||||||
|
{"new_local_user", (hookfn) new_local_user_hook},
|
||||||
|
{"doing_stats", (hookfn) doing_stats_hook},
|
||||||
|
{NULL, NULL},
|
||||||
|
};
|
||||||
|
|
||||||
|
mapi_clist_av1 hurt_clist[] = { &hurt_msgtab, &heal_msgtab, NULL };
|
||||||
|
|
||||||
|
DECLARE_MODULE_AV1(
|
||||||
|
hurt,
|
||||||
|
modinit,
|
||||||
|
modfini,
|
||||||
|
hurt_clist,
|
||||||
|
NULL,
|
||||||
|
hurt_hfnlist,
|
||||||
|
"$Revision: 1905 $"
|
||||||
|
);
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
hurt_state_t hurt_state = {
|
||||||
|
.cutoff = HURT_CUTOFF,
|
||||||
|
.default_expire = HURT_DEFAULT_EXPIRE,
|
||||||
|
.exit_reason = HURT_EXIT_REASON,
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Module constructor/destructor.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* {{{ static int modinit() */
|
||||||
|
static int
|
||||||
|
modinit(void)
|
||||||
|
{
|
||||||
|
/* set-up hurt_state. */
|
||||||
|
hurt_state.start_time = CurrentTime;
|
||||||
|
|
||||||
|
/* add our event handlers. */
|
||||||
|
eventAdd("hurt_expire", hurt_expire_event, NULL, 60);
|
||||||
|
eventAdd("hurt_check", hurt_check_event, NULL, 5);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
/* {{{ static void modfini() */
|
||||||
|
static void
|
||||||
|
modfini(void)
|
||||||
|
{
|
||||||
|
dlink_node *ptr, *next_ptr;
|
||||||
|
|
||||||
|
/* and delete our events. */
|
||||||
|
eventDelete(hurt_expire_event, NULL);
|
||||||
|
eventDelete(hurt_check_event, NULL);
|
||||||
|
|
||||||
|
DLINK_FOREACH_SAFE (ptr, next_ptr, hurt_state.hurt_clients.head)
|
||||||
|
{
|
||||||
|
dlinkDestroy(ptr, &hurt_state.hurt_clients);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Message handlers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* {{{ static int mo_hurt()
|
||||||
|
*
|
||||||
|
* HURT [<expire>] <ip> <reason>
|
||||||
|
*
|
||||||
|
* parv[1] - expire or ip
|
||||||
|
* parv[2] - ip or reason
|
||||||
|
* parv[3] - reason or NULL
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
mo_hurt(struct Client *client_p, struct Client *source_p,
|
||||||
|
int parc, const char **parv)
|
||||||
|
{
|
||||||
|
const char *ip, *expire, *reason;
|
||||||
|
int expire_time;
|
||||||
|
hurt_t *hurt;
|
||||||
|
struct Client *target_p;
|
||||||
|
|
||||||
|
if (!IsOperK(source_p)) {
|
||||||
|
sendto_one(source_p, form_str(ERR_NOPRIVS), me.name,
|
||||||
|
source_p->name, "kline");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (parc == 3)
|
||||||
|
expire = NULL, ip = parv[1], reason = parv[2];
|
||||||
|
else
|
||||||
|
expire = parv[1], ip = parv[2], reason = parv[3];
|
||||||
|
|
||||||
|
if (!expire)
|
||||||
|
expire_time = HURT_DEFAULT_EXPIRE;
|
||||||
|
if (expire && (expire_time = valid_temp_time(expire)) < 1) {
|
||||||
|
sendto_one(source_p,
|
||||||
|
":%s NOTICE %s :Permanent HURTs are not supported",
|
||||||
|
me.name, source_p->name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (EmptyString(reason)) {
|
||||||
|
sendto_one(source_p,
|
||||||
|
":%s NOTICE %s :Empty HURT reasons are bad for business",
|
||||||
|
me.name, source_p->name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Is this a client? */
|
||||||
|
if (strchr(ip, '.') == NULL && strchr(ip, ':') == NULL)
|
||||||
|
{
|
||||||
|
target_p = find_named_person(ip);
|
||||||
|
if (target_p == NULL)
|
||||||
|
{
|
||||||
|
sendto_one_numeric(source_p, ERR_NOSUCHNICK,
|
||||||
|
form_str(ERR_NOSUCHNICK), ip);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
ip = target_p->orighost;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!strncmp(ip, "*@", 2))
|
||||||
|
ip += 2;
|
||||||
|
if (strchr(ip, '!') || strchr(ip, '@'))
|
||||||
|
{
|
||||||
|
sendto_one_notice(source_p, ":Invalid HURT mask [%s]",
|
||||||
|
ip);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hurt_find(ip) != NULL) {
|
||||||
|
sendto_one(source_p,
|
||||||
|
":%s NOTICE %s :[%s] already HURT",
|
||||||
|
me.name, source_p->name, ip);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* okay, we've got this far, now it's time to add the the HURT locally
|
||||||
|
* and propagate it to other servers on the network.
|
||||||
|
*/
|
||||||
|
sendto_realops_snomask(SNO_GENERAL, L_ALL,
|
||||||
|
"%s added HURT on [%s] for %ld minutes with reason [%s]",
|
||||||
|
get_oper_name(source_p), ip, (long) expire_time / 60, reason);
|
||||||
|
|
||||||
|
hurt = hurt_new(expire_time, ip, reason);
|
||||||
|
hurt_add(hurt);
|
||||||
|
hurt_propagate(NULL, source_p, hurt);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
/* {{{ static int me_hurt()
|
||||||
|
*
|
||||||
|
* [ENCAP mask] HURT <target> <expire> <ip> <reason>
|
||||||
|
*
|
||||||
|
* parv[1] - expire
|
||||||
|
* parv[2] - ip
|
||||||
|
* parv[3] - reason
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
me_hurt(struct Client *client_p, struct Client *source_p,
|
||||||
|
int parc, const char **parv)
|
||||||
|
{
|
||||||
|
time_t expire_time;
|
||||||
|
hurt_t *hurt;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* right... if we don't get enough arguments, or if we get any invalid
|
||||||
|
* arguments, just ignore this request - shit happens, and it's not worth
|
||||||
|
* dropping a server over.
|
||||||
|
*/
|
||||||
|
if (parc < 4 || !IsPerson(source_p))
|
||||||
|
return 0;
|
||||||
|
if ((expire_time = atoi(parv[1])) < 1)
|
||||||
|
return 0;
|
||||||
|
if (hurt_find(parv[2]) != NULL)
|
||||||
|
return 0;
|
||||||
|
if (EmptyString(parv[3]))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
sendto_realops_snomask(SNO_GENERAL, L_ALL,
|
||||||
|
"%s added HURT on [%s] for %ld minutes with reason [%s]",
|
||||||
|
get_oper_name(source_p), parv[2], (long) expire_time / 60, parv[3]);
|
||||||
|
hurt = hurt_new(expire_time, parv[2], parv[3]);
|
||||||
|
hurt_add(hurt);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
/* {{{ static int mo_heal()
|
||||||
|
*
|
||||||
|
* HURT <nick>|<ip>
|
||||||
|
*
|
||||||
|
* parv[1] - nick or ip
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
mo_heal(struct Client *client_p, struct Client *source_p,
|
||||||
|
int parc, const char **parv)
|
||||||
|
{
|
||||||
|
struct Client *target_p;
|
||||||
|
|
||||||
|
if (!IsOperUnkline(source_p))
|
||||||
|
{
|
||||||
|
sendto_one(source_p, form_str(ERR_NOPRIVS),
|
||||||
|
me.name, source_p->name, "unkline");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nick_is_valid(parv[1]))
|
||||||
|
{
|
||||||
|
target_p = find_named_person(parv[1]);
|
||||||
|
if (target_p == NULL)
|
||||||
|
{
|
||||||
|
sendto_one_numeric(source_p, ERR_NOSUCHNICK,
|
||||||
|
form_str(ERR_NOSUCHNICK), parv[1]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (MyConnect(target_p))
|
||||||
|
heal_nick(source_p, target_p);
|
||||||
|
else
|
||||||
|
sendto_one(target_p, ":%s ENCAP %s HEAL %s",
|
||||||
|
get_id(source_p, target_p),
|
||||||
|
target_p->servptr->name,
|
||||||
|
get_id(target_p, target_p));
|
||||||
|
}
|
||||||
|
else if (strchr(parv[1], '.'))
|
||||||
|
{
|
||||||
|
if (hurt_find_exact(parv[1]) == NULL)
|
||||||
|
{
|
||||||
|
sendto_one(source_p, ":%s NOTICE %s :Mask [%s] is not HURT",
|
||||||
|
me.name, source_p->name, parv[1]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
hurt_remove(parv[1]);
|
||||||
|
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s removed HURT on %s",
|
||||||
|
get_oper_name(source_p), parv[1]);
|
||||||
|
sendto_server(NULL, NULL, NOCAPS, NOCAPS, ":%s ENCAP * HEAL %s",
|
||||||
|
source_p->name, parv[1]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sendto_one(source_p,
|
||||||
|
":%s NOTICE %s :[%s] is not a valid IP address/nick",
|
||||||
|
me.name, source_p->name, parv[1]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
static int
|
||||||
|
me_heal(struct Client *client_p, struct Client *source_p,
|
||||||
|
int parc, const char **parv)
|
||||||
|
{
|
||||||
|
struct Client *target_p;
|
||||||
|
|
||||||
|
/* as noted in me_hurt(), if we don't get sufficient arguments...
|
||||||
|
* *poof*, it's dropped...
|
||||||
|
*/
|
||||||
|
if (parc < 2)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (nick_is_valid(parv[1]))
|
||||||
|
{
|
||||||
|
target_p = find_person(parv[1]);
|
||||||
|
if (target_p != NULL && MyConnect(target_p))
|
||||||
|
heal_nick(source_p, target_p);
|
||||||
|
}
|
||||||
|
else if (strchr(parv[1], '.')) /* host or mask to remove ban for */
|
||||||
|
{
|
||||||
|
if (hurt_find_exact(parv[1]) == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
hurt_remove(parv[1]);
|
||||||
|
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s removed HURT on %s",
|
||||||
|
get_oper_name(source_p), parv[1]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Event handlers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* {{{ static void hurt_check_event() */
|
||||||
|
static void
|
||||||
|
hurt_check_event(void *arg)
|
||||||
|
{
|
||||||
|
dlink_node *ptr, *next_ptr;
|
||||||
|
struct Client *client_p;
|
||||||
|
|
||||||
|
DLINK_FOREACH_SAFE (ptr, next_ptr, hurt_state.hurt_clients.head) {
|
||||||
|
client_p = ptr->data;
|
||||||
|
if (!EmptyString(client_p->user->suser))
|
||||||
|
{
|
||||||
|
dlinkDestroy(ptr, &hurt_state.hurt_clients);
|
||||||
|
sendto_one_notice(client_p, ":HURT restriction removed for this session");
|
||||||
|
USED_TARGETS(client_p) = 0;
|
||||||
|
client_p->localClient->target_last = CurrentTime; /* don't ask --nenolod */
|
||||||
|
}
|
||||||
|
else if (client_p->localClient->receiveM > hurt_state.cutoff)
|
||||||
|
exit_client(NULL, client_p, &me, hurt_state.exit_reason);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
/* {{{ static void hurt_expire_event() */
|
||||||
|
static void
|
||||||
|
hurt_expire_event(void *unused)
|
||||||
|
{
|
||||||
|
dlink_node *ptr, *next_ptr;
|
||||||
|
hurt_t *hurt;
|
||||||
|
|
||||||
|
DLINK_FOREACH_SAFE (ptr, next_ptr, hurt_confs.head)
|
||||||
|
{
|
||||||
|
hurt = (hurt_t *) ptr->data;
|
||||||
|
|
||||||
|
if (hurt->expire <= CurrentTime)
|
||||||
|
{
|
||||||
|
dlinkFindDestroy(hurt, &hurt_confs);
|
||||||
|
hurt_destroy(hurt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hook functions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* {{{ static void client_exit_hook() */
|
||||||
|
static void
|
||||||
|
client_exit_hook(hook_data_client_exit *data)
|
||||||
|
{
|
||||||
|
s_assert(data != NULL);
|
||||||
|
s_assert(data->target != NULL);
|
||||||
|
|
||||||
|
dlinkFindDestroy(data->target, &hurt_state.hurt_clients);
|
||||||
|
}
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
/* {{{ static void new_local_user_hook() */
|
||||||
|
static void
|
||||||
|
new_local_user_hook(struct Client *source_p)
|
||||||
|
{
|
||||||
|
if (IsAnyDead(source_p) || !EmptyString(source_p->user->suser) ||
|
||||||
|
IsExemptKline(source_p))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (hurt_find(source_p->sockhost) || hurt_find(source_p->orighost))
|
||||||
|
{
|
||||||
|
USED_TARGETS(source_p) = 10;
|
||||||
|
source_p->localClient->target_last = CurrentTime + 600; /* don't ask --nenolod */
|
||||||
|
SetTGChange(source_p);
|
||||||
|
dlinkAddAlloc(source_p, &hurt_state.hurt_clients);
|
||||||
|
sendto_one_notice(source_p, ":You are hurt. Please identify to services immediately, or use /stats p for assistance.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
/* {{{ static void doing_stats_hook() */
|
||||||
|
static void
|
||||||
|
doing_stats_hook(hook_data_int *hdata)
|
||||||
|
{
|
||||||
|
dlink_node *ptr;
|
||||||
|
hurt_t *hurt;
|
||||||
|
struct Client *source_p;
|
||||||
|
|
||||||
|
s_assert(hdata);
|
||||||
|
s_assert(hdata->client);
|
||||||
|
|
||||||
|
source_p = hdata->client;
|
||||||
|
if(hdata->arg2 != (int) 's')
|
||||||
|
return;
|
||||||
|
if((ConfigFileEntry.stats_k_oper_only == 2) && !IsOper(source_p))
|
||||||
|
return;
|
||||||
|
if ((ConfigFileEntry.stats_k_oper_only == 1) && !IsOper(source_p))
|
||||||
|
{
|
||||||
|
hurt = hurt_find(source_p->sockhost);
|
||||||
|
if (hurt != NULL)
|
||||||
|
{
|
||||||
|
sendto_one_numeric(source_p, RPL_STATSKLINE,
|
||||||
|
form_str(RPL_STATSKLINE), 's',
|
||||||
|
"*", hurt->ip, hurt->reason, "", "");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
hurt = hurt_find(source_p->orighost);
|
||||||
|
if (hurt != NULL)
|
||||||
|
{
|
||||||
|
sendto_one_numeric(source_p, RPL_STATSKLINE,
|
||||||
|
form_str(RPL_STATSKLINE), 's',
|
||||||
|
"*", hurt->ip, hurt->reason, "", "");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLINK_FOREACH(ptr, hurt_confs.head)
|
||||||
|
{
|
||||||
|
hurt = (hurt_t *) ptr->data;
|
||||||
|
sendto_one_numeric(source_p, RPL_STATSKLINE,
|
||||||
|
form_str(RPL_STATSKLINE), 's',
|
||||||
|
"*", hurt->ip, hurt->reason, "", "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
/* {{{ static void hurt_propagate()
|
||||||
|
*
|
||||||
|
* client_p - specific server to propagate HURT to, or NULL to propagate to all
|
||||||
|
* servers.
|
||||||
|
* source_p - source (oper who added the HURT)
|
||||||
|
* hurt - HURT to be propagated
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
hurt_propagate(struct Client *client_p, struct Client *source_p, hurt_t *hurt)
|
||||||
|
{
|
||||||
|
if (client_p)
|
||||||
|
sendto_one(client_p,
|
||||||
|
":%s ENCAP %s HURT %ld %s :%s",
|
||||||
|
source_p->name, client_p->name,
|
||||||
|
(long)(hurt->expire - CurrentTime),
|
||||||
|
hurt->ip, hurt->reason);
|
||||||
|
else
|
||||||
|
sendto_server(&me, NULL, NOCAPS, NOCAPS,
|
||||||
|
":%s ENCAP * HURT %ld %s :%s",
|
||||||
|
source_p->name,
|
||||||
|
(long)(hurt->expire - CurrentTime),
|
||||||
|
hurt->ip, hurt->reason);
|
||||||
|
}
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
/* {{{ static hurt_t *hurt_new() */
|
||||||
|
static hurt_t *
|
||||||
|
hurt_new(time_t expire, const char *ip, const char *reason)
|
||||||
|
{
|
||||||
|
hurt_t *hurt;
|
||||||
|
|
||||||
|
hurt = MyMalloc(sizeof(hurt_t));
|
||||||
|
|
||||||
|
DupString(hurt->ip, ip);
|
||||||
|
DupString(hurt->reason, reason);
|
||||||
|
hurt->expire = CurrentTime + expire;
|
||||||
|
|
||||||
|
return hurt;
|
||||||
|
}
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
/* {{{ static void hurt_destroy() */
|
||||||
|
static void
|
||||||
|
hurt_destroy(void *hurt)
|
||||||
|
{
|
||||||
|
hurt_t *h;
|
||||||
|
|
||||||
|
if (!hurt)
|
||||||
|
return;
|
||||||
|
|
||||||
|
h = (hurt_t *) hurt;
|
||||||
|
MyFree((char *) h->ip);
|
||||||
|
MyFree((char *) h->reason);
|
||||||
|
MyFree(h);
|
||||||
|
}
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
static void
|
||||||
|
hurt_add(hurt_t *hurt)
|
||||||
|
{
|
||||||
|
dlinkAddAlloc(hurt, &hurt_confs);
|
||||||
|
}
|
||||||
|
|
||||||
|
static hurt_t *
|
||||||
|
hurt_find_exact(const char *ip)
|
||||||
|
{
|
||||||
|
dlink_node *ptr;
|
||||||
|
hurt_t *hurt;
|
||||||
|
|
||||||
|
DLINK_FOREACH(ptr, hurt_confs.head)
|
||||||
|
{
|
||||||
|
hurt = (hurt_t *) ptr->data;
|
||||||
|
|
||||||
|
if (!strcasecmp(ip, hurt->ip))
|
||||||
|
return hurt;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static hurt_t *
|
||||||
|
hurt_find(const char *ip)
|
||||||
|
{
|
||||||
|
dlink_node *ptr;
|
||||||
|
hurt_t *hurt;
|
||||||
|
|
||||||
|
DLINK_FOREACH(ptr, hurt_confs.head)
|
||||||
|
{
|
||||||
|
hurt = (hurt_t *) ptr->data;
|
||||||
|
|
||||||
|
if (match(hurt->ip, ip))
|
||||||
|
return hurt;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
hurt_remove(const char *ip)
|
||||||
|
{
|
||||||
|
hurt_t *hurt = hurt_find_exact(ip);
|
||||||
|
|
||||||
|
dlinkFindDestroy(hurt, &hurt_confs);
|
||||||
|
hurt_destroy(hurt);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* {{{ static int heal_nick() */
|
||||||
|
static int
|
||||||
|
heal_nick(struct Client *source_p, struct Client *target_p)
|
||||||
|
{
|
||||||
|
if (dlinkFindDestroy(target_p, &hurt_state.hurt_clients))
|
||||||
|
{
|
||||||
|
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s used HEAL on %s",
|
||||||
|
get_oper_name(source_p), get_client_name(target_p, HIDE_IP));
|
||||||
|
sendto_one_notice(target_p, ":HURT restriction temporarily removed by operator");
|
||||||
|
sendto_one_notice(source_p, ":HURT restriction on %s temporarily removed", target_p->name);
|
||||||
|
USED_TARGETS(target_p) = 0;
|
||||||
|
target_p->localClient->target_last = CurrentTime; /* don't ask --nenolod */
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sendto_one_notice(source_p, ":%s was not hurt", target_p->name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Anything else...
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* {{{ static int nick_is_valid() */
|
||||||
|
static int
|
||||||
|
nick_is_valid(const char *nick)
|
||||||
|
{
|
||||||
|
const char *s = nick;
|
||||||
|
|
||||||
|
for (; *s != '\0'; s++) {
|
||||||
|
if (!IsNickChar(*s))
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* vim: ts=8 sw=8 noet fdm=marker tw=80
|
||||||
|
*/
|
176
extensions/ip_cloaking.c
Normal file
176
extensions/ip_cloaking.c
Normal file
|
@ -0,0 +1,176 @@
|
||||||
|
/* $Id: ip_cloaking.c 2805 2006-12-05 12:45:43Z jilles $ */
|
||||||
|
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "hook.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
#include "send.h"
|
||||||
|
#include "s_conf.h"
|
||||||
|
#include "s_user.h"
|
||||||
|
#include "s_serv.h"
|
||||||
|
#include "tools.h"
|
||||||
|
#include "numeric.h"
|
||||||
|
|
||||||
|
/* if you're modifying this module, you'll probably to change this */
|
||||||
|
#define KEY 0x13748cfa
|
||||||
|
|
||||||
|
static int
|
||||||
|
_modinit(void)
|
||||||
|
{
|
||||||
|
/* add the usermode to the available slot */
|
||||||
|
user_modes['h'] = find_umode_slot();
|
||||||
|
construct_umodebuf();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_moddeinit(void)
|
||||||
|
{
|
||||||
|
/* disable the umode and remove it from the available list */
|
||||||
|
user_modes['h'] = 0;
|
||||||
|
construct_umodebuf();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void check_umode_change(void *data);
|
||||||
|
static void check_new_user(void *data);
|
||||||
|
mapi_hfn_list_av1 ip_cloaking_hfnlist[] = {
|
||||||
|
{ "umode_changed", (hookfn) check_umode_change },
|
||||||
|
{ "new_local_user", (hookfn) check_new_user },
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECLARE_MODULE_AV1(ip_cloaking, _modinit, _moddeinit, NULL, NULL,
|
||||||
|
ip_cloaking_hfnlist, "$Revision: 2805 $");
|
||||||
|
|
||||||
|
static void
|
||||||
|
distribute_hostchange(struct Client *client)
|
||||||
|
{
|
||||||
|
if (irccmp(client->host, client->orighost))
|
||||||
|
sendto_one_numeric(client, RPL_HOSTHIDDEN, "%s :is now your hidden host",
|
||||||
|
client->host);
|
||||||
|
else
|
||||||
|
sendto_one_numeric(client, RPL_HOSTHIDDEN, "%s :hostname reset",
|
||||||
|
client->host);
|
||||||
|
|
||||||
|
sendto_server(NULL, NULL,
|
||||||
|
CAP_EUID | CAP_TS6, NOCAPS, ":%s CHGHOST %s :%s",
|
||||||
|
use_id(&me), use_id(client), client->host);
|
||||||
|
sendto_server(NULL, NULL,
|
||||||
|
CAP_TS6, CAP_EUID, ":%s ENCAP * CHGHOST %s :%s",
|
||||||
|
use_id(&me), use_id(client), client->host);
|
||||||
|
sendto_server(NULL, NULL,
|
||||||
|
NOCAPS, CAP_TS6, ":%s ENCAP * CHGHOST %s :%s",
|
||||||
|
me.name, client->name, client->host);
|
||||||
|
if (irccmp(client->host, client->orighost))
|
||||||
|
SetDynSpoof(client);
|
||||||
|
else
|
||||||
|
ClearDynSpoof(client);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
do_host_cloak(const char *inbuf, char *outbuf, int ipmask)
|
||||||
|
{
|
||||||
|
int cyc;
|
||||||
|
unsigned int hosthash = 1, hosthash2 = 1;
|
||||||
|
unsigned int maxcycle = strlen(inbuf);
|
||||||
|
int len1;
|
||||||
|
const char *rest, *next;
|
||||||
|
|
||||||
|
for (cyc = 0; cyc < maxcycle - 2; cyc += 2)
|
||||||
|
hosthash *= (unsigned int) inbuf[cyc];
|
||||||
|
|
||||||
|
/* safety: decrement ourselves two steps back */
|
||||||
|
for (cyc = maxcycle - 1; cyc >= 1; cyc -= 2)
|
||||||
|
hosthash2 *= (unsigned int) inbuf[cyc];
|
||||||
|
|
||||||
|
/* lets do some bitshifting -- this pretty much destroys the IP
|
||||||
|
* sequence, while still providing a checksum. exactly what
|
||||||
|
* we're shooting for. --nenolod
|
||||||
|
*/
|
||||||
|
hosthash += (hosthash2 / KEY);
|
||||||
|
hosthash2 += (hosthash / KEY);
|
||||||
|
|
||||||
|
if (ipmask == 0)
|
||||||
|
{
|
||||||
|
ircsnprintf(outbuf, HOSTLEN, "%s-%X%X",
|
||||||
|
ServerInfo.network_name, hosthash2, hosthash);
|
||||||
|
len1 = strlen(outbuf);
|
||||||
|
rest = strchr(inbuf, '.');
|
||||||
|
if (rest == NULL)
|
||||||
|
rest = ".";
|
||||||
|
/* try to avoid truncation -- jilles */
|
||||||
|
while (len1 + strlen(rest) >= HOSTLEN && (next = strchr(rest + 1, '.')) != NULL)
|
||||||
|
rest = next;
|
||||||
|
strlcat(outbuf, rest, HOSTLEN);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ircsnprintf(outbuf, HOSTLEN, "%X%X.%s",
|
||||||
|
hosthash2, hosthash, ServerInfo.network_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
check_umode_change(void *vdata)
|
||||||
|
{
|
||||||
|
hook_data_umode_changed *data = (hook_data_umode_changed *)vdata;
|
||||||
|
struct Client *source_p = data->client;
|
||||||
|
|
||||||
|
if (!MyClient(source_p))
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* didn't change +h umode, we don't need to do anything */
|
||||||
|
if (!((data->oldumodes ^ source_p->umodes) & user_modes['h']))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (source_p->umodes & user_modes['h'])
|
||||||
|
{
|
||||||
|
if (IsIPSpoof(source_p) || source_p->localClient->mangledhost == NULL || (IsDynSpoof(source_p) && strcmp(source_p->host, source_p->localClient->mangledhost)))
|
||||||
|
{
|
||||||
|
source_p->umodes &= ~user_modes['h'];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (strcmp(source_p->host, source_p->localClient->mangledhost))
|
||||||
|
{
|
||||||
|
strlcpy(source_p->host, source_p->localClient->mangledhost, HOSTLEN);
|
||||||
|
distribute_hostchange(source_p);
|
||||||
|
}
|
||||||
|
else /* not really nice, but we need to send this numeric here */
|
||||||
|
sendto_one_numeric(source_p, RPL_HOSTHIDDEN, "%s :is now your hidden host",
|
||||||
|
source_p->host);
|
||||||
|
}
|
||||||
|
else if (!(source_p->umodes & user_modes['h']))
|
||||||
|
{
|
||||||
|
if (source_p->localClient->mangledhost != NULL &&
|
||||||
|
!strcmp(source_p->host, source_p->localClient->mangledhost))
|
||||||
|
{
|
||||||
|
strlcpy(source_p->host, source_p->orighost, HOSTLEN);
|
||||||
|
distribute_hostchange(source_p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
check_new_user(void *vdata)
|
||||||
|
{
|
||||||
|
struct Client *source_p = (void *)vdata;
|
||||||
|
|
||||||
|
if (IsIPSpoof(source_p))
|
||||||
|
{
|
||||||
|
source_p->umodes &= ~user_modes['h'];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
source_p->localClient->mangledhost = MyMalloc(HOSTLEN);
|
||||||
|
if (!irccmp(source_p->orighost, source_p->sockhost))
|
||||||
|
do_host_cloak(source_p->orighost, source_p->localClient->mangledhost, 1);
|
||||||
|
else
|
||||||
|
do_host_cloak(source_p->orighost, source_p->localClient->mangledhost, 0);
|
||||||
|
if (IsDynSpoof(source_p))
|
||||||
|
source_p->umodes &= ~user_modes['h'];
|
||||||
|
if (source_p->umodes & user_modes['h'])
|
||||||
|
{
|
||||||
|
strlcpy(source_p->host, source_p->localClient->mangledhost, sizeof(source_p->host));
|
||||||
|
if (irccmp(source_p->host, source_p->orighost))
|
||||||
|
SetDynSpoof(source_p);
|
||||||
|
}
|
||||||
|
}
|
36
extensions/m_42.c
Normal file
36
extensions/m_42.c
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) infinity-infinity God <God@Heaven>
|
||||||
|
*
|
||||||
|
* Bob was here
|
||||||
|
* $Id: m_42.c 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdinc.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[]);
|
||||||
|
|
||||||
|
struct Message hgtg_msgtab = {
|
||||||
|
"42", 0, 0, 0, MFLG_SLOW,
|
||||||
|
{ mg_ignore, {mclient_42, 0}, mg_ignore, mg_ignore, mg_ignore, {mclient_42, 0}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
mapi_clist_av1 hgtg_clist[] = { &hgtg_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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
117
extensions/m_findforwards.c
Normal file
117
extensions/m_findforwards.c
Normal file
|
@ -0,0 +1,117 @@
|
||||||
|
/*
|
||||||
|
* IRC - Internet Relay Chat, contrib/m_findforwards.c
|
||||||
|
* Copyright (C) 2002 Hybrid Development Team
|
||||||
|
* Copyright (C) 2004 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_findforwards.c 986 2006-03-08 00:10:46Z jilles $
|
||||||
|
*/
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "tools.h"
|
||||||
|
#include "channel.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "hash.h"
|
||||||
|
#include "irc_string.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
#include "numeric.h"
|
||||||
|
#include "s_user.h"
|
||||||
|
#include "s_conf.h"
|
||||||
|
#include "s_newconf.h"
|
||||||
|
#include "send.h"
|
||||||
|
#include "msg.h"
|
||||||
|
#include "parse.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "packet.h"
|
||||||
|
|
||||||
|
static int m_findforwards(struct Client *client_p, struct Client *source_p,
|
||||||
|
int parc, const char *parv[]);
|
||||||
|
|
||||||
|
struct Message findforwards_msgtab = {
|
||||||
|
"FINDFORWARDS", 0, 0, 0, MFLG_SLOW,
|
||||||
|
{mg_unreg, {m_findforwards, 2}, mg_ignore, mg_ignore, mg_ignore, {m_findforwards, 2}}
|
||||||
|
};
|
||||||
|
|
||||||
|
mapi_clist_av1 findforwards_clist[] = { &findforwards_msgtab, NULL };
|
||||||
|
|
||||||
|
DECLARE_MODULE_AV1(findforwards, NULL, NULL, findforwards_clist, NULL, NULL, "$Revision: 986 $");
|
||||||
|
|
||||||
|
/*
|
||||||
|
** mo_findforwards
|
||||||
|
** parv[0] = sender prefix
|
||||||
|
** parv[1] = channel
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
m_findforwards(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
|
||||||
|
{
|
||||||
|
static time_t last_used = 0;
|
||||||
|
struct Channel *chptr;
|
||||||
|
struct membership *msptr;
|
||||||
|
dlink_node *ptr;
|
||||||
|
char buf[414];
|
||||||
|
char *p = buf, *end = buf + sizeof buf - 1;
|
||||||
|
*p = '\0';
|
||||||
|
|
||||||
|
/* Allow ircops to search for forwards to nonexistent channels */
|
||||||
|
if(!IsOper(source_p))
|
||||||
|
{
|
||||||
|
if((chptr = find_channel(parv[1])) == NULL || (msptr = find_channel_membership(chptr, source_p)) == NULL)
|
||||||
|
{
|
||||||
|
sendto_one_numeric(source_p, ERR_NOTONCHANNEL,
|
||||||
|
form_str(ERR_NOTONCHANNEL), parv[1]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!is_chanop(msptr))
|
||||||
|
{
|
||||||
|
sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
|
||||||
|
me.name, source_p->name, parv[1]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if((last_used + ConfigFileEntry.pace_wait) > CurrentTime)
|
||||||
|
{
|
||||||
|
sendto_one(source_p, form_str(RPL_LOAD2HI),
|
||||||
|
me.name, source_p->name, "FINDFORWARDS");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
last_used = CurrentTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
DLINK_FOREACH(ptr, global_channel_list.head)
|
||||||
|
{
|
||||||
|
chptr = ptr->data;
|
||||||
|
if(chptr->mode.forward && !irccmp(chptr->mode.forward, parv[1]))
|
||||||
|
{
|
||||||
|
if(p + strlen(chptr->chname) >= end - 13)
|
||||||
|
{
|
||||||
|
strcpy(p, "<truncated> ");
|
||||||
|
p += 12;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
strcpy(p, chptr->chname);
|
||||||
|
p += strlen(chptr->chname);
|
||||||
|
*p++ = ' ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(buf[0])
|
||||||
|
*(--p) = '\0';
|
||||||
|
|
||||||
|
sendto_one_notice(source_p, ":Forwards for %s: %s", parv[1], buf);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
101
extensions/m_identify.c
Normal file
101
extensions/m_identify.c
Normal file
|
@ -0,0 +1,101 @@
|
||||||
|
/*
|
||||||
|
* m_identify.c: dalnet-style /identify that sends to nickserv or chanserv
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006 Jilles Tjoelker
|
||||||
|
* Copyright (C) 2006 charybdis 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_identify.c 2729 2006-11-09 23:52:06Z jilles $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "common.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
#include "irc_string.h"
|
||||||
|
#include "numeric.h"
|
||||||
|
#include "s_conf.h"
|
||||||
|
#include "s_log.h"
|
||||||
|
#include "s_serv.h"
|
||||||
|
#include "send.h"
|
||||||
|
#include "msg.h"
|
||||||
|
#include "parse.h"
|
||||||
|
#include "modules.h"
|
||||||
|
|
||||||
|
#define SVS_chanserv_NICK "ChanServ"
|
||||||
|
#define SVS_nickserv_NICK "NickServ"
|
||||||
|
|
||||||
|
char *reconstruct_parv(int parc, const char *parv[]);
|
||||||
|
|
||||||
|
static int m_identify(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
|
||||||
|
|
||||||
|
struct Message identify_msgtab = {
|
||||||
|
"IDENTIFY", 0, 0, 0, MFLG_SLOW,
|
||||||
|
{mg_unreg, {m_identify, 0}, mg_ignore, mg_ignore, mg_ignore, {m_identify, 0}}
|
||||||
|
};
|
||||||
|
|
||||||
|
mapi_clist_av1 identify_clist[] = {
|
||||||
|
&identify_msgtab,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
DECLARE_MODULE_AV1(identify, NULL, NULL, identify_clist, NULL, NULL, "$Revision: 2729 $");
|
||||||
|
|
||||||
|
char *reconstruct_parv(int parc, const char *parv[])
|
||||||
|
{
|
||||||
|
static char tmpbuf[BUFSIZE]; int i;
|
||||||
|
|
||||||
|
strlcpy(tmpbuf, parv[0], BUFSIZE);
|
||||||
|
for (i = 1; i < parc; i++)
|
||||||
|
{
|
||||||
|
strlcat(tmpbuf, " ", BUFSIZE);
|
||||||
|
strlcat(tmpbuf, parv[i], BUFSIZE);
|
||||||
|
}
|
||||||
|
return tmpbuf;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int m_identify(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
|
||||||
|
{
|
||||||
|
const char *nick;
|
||||||
|
struct Client *target_p;
|
||||||
|
|
||||||
|
if (parc < 2 || EmptyString(parv[1]))
|
||||||
|
{
|
||||||
|
sendto_one(source_p, form_str(ERR_NOTEXTTOSEND), me.name, source_p->name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
nick = parv[1][0] == '#' ? SVS_chanserv_NICK : SVS_nickserv_NICK;
|
||||||
|
if ((target_p = find_named_person(nick)) && IsService(target_p))
|
||||||
|
{
|
||||||
|
sendto_one(target_p, ":%s PRIVMSG %s :IDENTIFY %s", get_id(source_p, target_p), get_id(target_p, target_p), reconstruct_parv(parc - 1, &parv[1]));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sendto_one_numeric(source_p, ERR_SERVICESDOWN, form_str(ERR_SERVICESDOWN), nick);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
169
extensions/m_mkpasswd.c
Normal file
169
extensions/m_mkpasswd.c
Normal 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 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* List of ircd includes from ../include/ */
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "common.h" /* FALSE bleah */
|
||||||
|
#include "ircd.h"
|
||||||
|
#include "irc_string.h"
|
||||||
|
#include "numeric.h"
|
||||||
|
#include "patricia.h"
|
||||||
|
#include "s_newconf.h"
|
||||||
|
#include "s_conf.h"
|
||||||
|
#include "s_log.h"
|
||||||
|
#include "s_serv.h"
|
||||||
|
#include "send.h"
|
||||||
|
#include "msg.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: 6 $");
|
||||||
|
|
||||||
|
|
||||||
|
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) > CurrentTime)
|
||||||
|
{
|
||||||
|
/* safe enough to give this on a local connect only */
|
||||||
|
sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, parv[0]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
last_used = CurrentTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
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[random() % 64];
|
||||||
|
salt[1] = saltChars[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[random() % 64];
|
||||||
|
salt[11] = '$';
|
||||||
|
salt[12] = '\0';
|
||||||
|
return salt;
|
||||||
|
}
|
155
extensions/m_ojoin.c
Normal file
155
extensions/m_ojoin.c
Normal file
|
@ -0,0 +1,155 @@
|
||||||
|
/* contrib/m_ojoin.c
|
||||||
|
* Copyright (C) 2002 Hybrid Development Team
|
||||||
|
* Copyright (C) 2004 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 3121 2007-01-02 13:23:04Z jilles $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "tools.h"
|
||||||
|
#include "patricia.h"
|
||||||
|
#include "channel.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
#include "numeric.h"
|
||||||
|
#include "s_log.h"
|
||||||
|
#include "s_serv.h"
|
||||||
|
#include "s_conf.h"
|
||||||
|
#include "s_newconf.h"
|
||||||
|
#include "send.h"
|
||||||
|
#include "whowas.h"
|
||||||
|
#include "irc_string.h"
|
||||||
|
#include "hash.h"
|
||||||
|
#include "msg.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: 3121 $");
|
||||||
|
|
||||||
|
/*
|
||||||
|
** 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
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]--;
|
||||||
|
|
||||||
|
sendto_wallops_flags(UMODE_WALLOP, &me,
|
||||||
|
"OJOIN called for %s by %s!%s@%s",
|
||||||
|
parv[1], source_p->name, source_p->username, source_p->host);
|
||||||
|
ilog(L_MAIN, "OJOIN called for %s by %s",
|
||||||
|
parv[1], get_oper_name(source_p));
|
||||||
|
/* only sends stuff for #channels remotely */
|
||||||
|
sendto_server(NULL, chptr, NOCAPS, NOCAPS,
|
||||||
|
":%s WALLOPS :OJOIN called for %s by %s!%s@%s",
|
||||||
|
me.name, parv[1],
|
||||||
|
source_p->name, source_p->username, source_p->host);
|
||||||
|
|
||||||
|
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);
|
||||||
|
sendto_one(source_p, form_str(RPL_TOPICWHOTIME), me.name,
|
||||||
|
source_p->name, chptr->chname, chptr->topic_info, chptr->topic_time);
|
||||||
|
}
|
||||||
|
|
||||||
|
source_p->localClient->last_join_time = CurrentTime;
|
||||||
|
channel_member_names(chptr, source_p, 1);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
142
extensions/m_okick.c
Normal file
142
extensions/m_okick.c
Normal file
|
@ -0,0 +1,142 @@
|
||||||
|
/*
|
||||||
|
* 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 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_okick.c 3117 2007-01-02 13:11:04Z jilles $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "tools.h"
|
||||||
|
#include "channel.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "irc_string.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
#include "numeric.h"
|
||||||
|
#include "send.h"
|
||||||
|
#include "msg.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "parse.h"
|
||||||
|
#include "hash.h"
|
||||||
|
#include "packet.h"
|
||||||
|
#include "s_conf.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: 3117 $");
|
||||||
|
|
||||||
|
/*
|
||||||
|
** 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) TOPICLEN)
|
||||||
|
comment[TOPICLEN] = '\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_wallops_flags(UMODE_WALLOP, &me,
|
||||||
|
"OKICK called for %s %s by %s!%s@%s",
|
||||||
|
chptr->chname, target_p->name,
|
||||||
|
source_p->name, source_p->username, source_p->host);
|
||||||
|
ilog(L_MAIN, "OKICK called for %s %s by %s",
|
||||||
|
chptr->chname, target_p->name,
|
||||||
|
get_oper_name(source_p));
|
||||||
|
/* only sends stuff for #channels remotely */
|
||||||
|
sendto_server(NULL, chptr, NOCAPS, NOCAPS,
|
||||||
|
":%s WALLOPS :OKICK called for %s %s by %s!%s@%s",
|
||||||
|
me.name, chptr->chname, target_p->name,
|
||||||
|
source_p->name, source_p->username, source_p->host);
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
152
extensions/m_olist.c
Normal file
152
extensions/m_olist.c
Normal file
|
@ -0,0 +1,152 @@
|
||||||
|
/*
|
||||||
|
* 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 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_olist.c 6 2005-09-10 01:02:21Z nenolod $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "tools.h"
|
||||||
|
#include "patricia.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 "irc_string.h"
|
||||||
|
#include "hash.h"
|
||||||
|
#include "msg.h"
|
||||||
|
#include "parse.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "s_newconf.h"
|
||||||
|
#include "sprintf_irc.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: 6 $");
|
||||||
|
|
||||||
|
#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;
|
||||||
|
dlink_node *ptr;
|
||||||
|
sendto_one(source_p, form_str(RPL_LISTSTART), me.name, source_p->name);
|
||||||
|
|
||||||
|
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,
|
||||||
|
dlink_list_length(&chptr->members),
|
||||||
|
chptr->topic == NULL ? "" : chptr->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, dlink_list_length(&chptr->members),
|
||||||
|
chptr->topic ? chptr->topic : "");
|
||||||
|
}
|
171
extensions/m_omode.c
Normal file
171
extensions/m_omode.c
Normal file
|
@ -0,0 +1,171 @@
|
||||||
|
/*
|
||||||
|
* Charybdis: an advanced Internet Relay Chat Daemon(ircd).
|
||||||
|
* m_omode.c: allows oper mode hacking
|
||||||
|
*
|
||||||
|
* Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
|
||||||
|
* Copyright (C) 1996-2002 Hybrid Development Team
|
||||||
|
* Copyright (C) 2002-2004 ircd-ratbox development team
|
||||||
|
* Copyright (C) 2006 Charybdis 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_omode.c 3121 2007-01-02 13:23:04Z jilles $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "tools.h"
|
||||||
|
#include "channel.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "hash.h"
|
||||||
|
#include "irc_string.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
#include "numeric.h"
|
||||||
|
#include "s_user.h"
|
||||||
|
#include "s_conf.h"
|
||||||
|
#include "s_newconf.h"
|
||||||
|
#include "s_serv.h"
|
||||||
|
#include "send.h"
|
||||||
|
#include "msg.h"
|
||||||
|
#include "parse.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "packet.h"
|
||||||
|
|
||||||
|
static int mo_omode(struct Client *, struct Client *, int, const char **);
|
||||||
|
|
||||||
|
struct Message omode_msgtab = {
|
||||||
|
"OMODE", 0, 0, 0, MFLG_SLOW,
|
||||||
|
{mg_unreg, mg_not_oper, mg_ignore, mg_ignore, mg_ignore, {mo_omode, 3}}
|
||||||
|
};
|
||||||
|
|
||||||
|
mapi_clist_av1 omode_clist[] = { &omode_msgtab, NULL };
|
||||||
|
|
||||||
|
DECLARE_MODULE_AV1(omode, NULL, NULL, omode_clist, NULL, NULL, "$Revision: 3121 $");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* mo_omode - MODE command handler
|
||||||
|
* parv[0] - sender
|
||||||
|
* parv[1] - channel
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
mo_omode(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
|
||||||
|
{
|
||||||
|
struct Channel *chptr = NULL;
|
||||||
|
struct membership *msptr;
|
||||||
|
char params[512];
|
||||||
|
int i;
|
||||||
|
int wasonchannel;
|
||||||
|
|
||||||
|
/* admins only */
|
||||||
|
if(!IsOperAdmin(source_p))
|
||||||
|
{
|
||||||
|
sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "admin");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Now, try to find the channel in question */
|
||||||
|
if(!IsChanPrefix(parv[1][0]) || !check_channel_name(parv[1]))
|
||||||
|
{
|
||||||
|
sendto_one_numeric(source_p, ERR_BADCHANNAME,
|
||||||
|
form_str(ERR_BADCHANNAME), parv[1]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
chptr = find_channel(parv[1]);
|
||||||
|
|
||||||
|
if(chptr == NULL)
|
||||||
|
{
|
||||||
|
sendto_one_numeric(source_p, ERR_NOSUCHCHANNEL,
|
||||||
|
form_str(ERR_NOSUCHCHANNEL), parv[1]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Now know the channel exists */
|
||||||
|
msptr = find_channel_membership(chptr, source_p);
|
||||||
|
wasonchannel = msptr != NULL;
|
||||||
|
|
||||||
|
if (is_chanop(msptr))
|
||||||
|
{
|
||||||
|
sendto_one_notice(source_p, ":Use a normal MODE you idiot");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
params[0] = '\0';
|
||||||
|
for (i = 2; i < parc; i++)
|
||||||
|
{
|
||||||
|
if (i != 2)
|
||||||
|
strlcat(params, " ", sizeof params);
|
||||||
|
strlcat(params, parv[i], sizeof params);
|
||||||
|
}
|
||||||
|
|
||||||
|
sendto_wallops_flags(UMODE_WALLOP, &me,
|
||||||
|
"OMODE called for [%s] [%s] by %s!%s@%s",
|
||||||
|
parv[1], params, source_p->name, source_p->username, source_p->host);
|
||||||
|
ilog(L_MAIN, "OMODE called for [%s] [%s] by %s",
|
||||||
|
parv[1], params, get_oper_name(source_p));
|
||||||
|
|
||||||
|
if(*chptr->chname != '&')
|
||||||
|
sendto_server(NULL, NULL, NOCAPS, NOCAPS,
|
||||||
|
":%s WALLOPS :OMODE called for [%s] [%s] by %s!%s@%s",
|
||||||
|
me.name, parv[1], params, source_p->name, source_p->username,
|
||||||
|
source_p->host);
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
set_channel_mode(client_p, source_p->servptr, chptr, msptr,
|
||||||
|
parc - 2, parv + 2);
|
||||||
|
#else
|
||||||
|
if (parc == 4 && !strcmp(parv[2], "+o") && !irccmp(parv[3], source_p->name))
|
||||||
|
{
|
||||||
|
/* Opping themselves */
|
||||||
|
if (!wasonchannel)
|
||||||
|
{
|
||||||
|
sendto_one_numeric(source_p, ERR_USERNOTINCHANNEL,
|
||||||
|
form_str(ERR_USERNOTINCHANNEL), parv[3], chptr->chname);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +o %s",
|
||||||
|
me.name, parv[1], source_p->name);
|
||||||
|
sendto_server(NULL, chptr, CAP_TS6, NOCAPS,
|
||||||
|
":%s TMODE %ld %s +o %s",
|
||||||
|
me.id, (long) chptr->channelts, parv[1],
|
||||||
|
source_p->id);
|
||||||
|
sendto_server(NULL, chptr, NOCAPS, CAP_TS6,
|
||||||
|
":%s MODE %s +o %s",
|
||||||
|
me.name, parv[1], source_p->name);
|
||||||
|
msptr->flags |= CHFL_CHANOP;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Hack it so set_channel_mode() will accept */
|
||||||
|
if (wasonchannel)
|
||||||
|
msptr->flags |= CHFL_CHANOP;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
add_user_to_channel(chptr, source_p, CHFL_CHANOP);
|
||||||
|
msptr = find_channel_membership(chptr, source_p);
|
||||||
|
}
|
||||||
|
set_channel_mode(client_p, source_p, chptr, msptr,
|
||||||
|
parc - 2, parv + 2);
|
||||||
|
/* We know they were not opped before and they can't have opped
|
||||||
|
* themselves as set_channel_mode() does not allow that
|
||||||
|
* -- jilles */
|
||||||
|
if (wasonchannel)
|
||||||
|
msptr->flags &= ~CHFL_CHANOP;
|
||||||
|
else
|
||||||
|
remove_user_from_channel(msptr);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
119
extensions/m_opme.c
Normal file
119
extensions/m_opme.c
Normal file
|
@ -0,0 +1,119 @@
|
||||||
|
/* contrib/m_opme.c
|
||||||
|
* Copyright (C) 2002 Hybrid Development Team
|
||||||
|
* Copyright (C) 2004 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 3121 2007-01-02 13:23:04Z jilles $
|
||||||
|
*/
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "tools.h"
|
||||||
|
#include "patricia.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 "irc_string.h"
|
||||||
|
#include "hash.h"
|
||||||
|
#include "msg.h"
|
||||||
|
#include "parse.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "s_conf.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: 3121 $");
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
** 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;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
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",
|
||||||
|
parv[1], get_oper_name(source_p));
|
||||||
|
|
||||||
|
/* 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;
|
||||||
|
}
|
143
extensions/m_webirc.c
Normal file
143
extensions/m_webirc.c
Normal file
|
@ -0,0 +1,143 @@
|
||||||
|
/*
|
||||||
|
* 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-2006 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 2757 2006-11-10 22:58:15Z jilles $
|
||||||
|
*/
|
||||||
|
/* 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 "client.h" /* client struct */
|
||||||
|
#include "irc_string.h"
|
||||||
|
#include "hostmask.h"
|
||||||
|
#include "send.h" /* sendto_one */
|
||||||
|
#include "numeric.h" /* ERR_xxx */
|
||||||
|
#include "ircd.h" /* me */
|
||||||
|
#include "msg.h"
|
||||||
|
#include "parse.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, 4}, 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: 20702 $");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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",
|
||||||
|
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->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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
strlcpy(source_p->sockhost, parv[4], sizeof(source_p->sockhost));
|
||||||
|
|
||||||
|
if(strlen(parv[3]) <= HOSTLEN)
|
||||||
|
strlcpy(source_p->host, parv[3], sizeof(source_p->host));
|
||||||
|
else
|
||||||
|
strlcpy(source_p->host, source_p->sockhost, sizeof(source_p->host));
|
||||||
|
|
||||||
|
inetpton_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,
|
||||||
|
source_p->localClient->ip.ss_family)))
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
41
extensions/no_oper_invis.c
Normal file
41
extensions/no_oper_invis.c
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
/*
|
||||||
|
* Deny opers setting themselves +i unless they are bots (i.e. have
|
||||||
|
* hidden_oper privilege).
|
||||||
|
* -- jilles
|
||||||
|
*
|
||||||
|
* $Id: no_oper_invis.c 1086 2006-03-17 23:20:30Z jilles $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "hook.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
#include "send.h"
|
||||||
|
#include "s_conf.h"
|
||||||
|
#include "s_newconf.h"
|
||||||
|
|
||||||
|
static void h_noi_umode_changed(hook_data_umode_changed *);
|
||||||
|
|
||||||
|
mapi_hfn_list_av1 noi_hfnlist[] = {
|
||||||
|
{ "umode_changed", (hookfn) h_noi_umode_changed },
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECLARE_MODULE_AV1(no_oper_invis, NULL, NULL, NULL, NULL, noi_hfnlist, "$Revision: 1086 $");
|
||||||
|
|
||||||
|
static void
|
||||||
|
h_noi_umode_changed(hook_data_umode_changed *hdata)
|
||||||
|
{
|
||||||
|
struct Client *source_p = hdata->client;
|
||||||
|
|
||||||
|
if (MyClient(source_p) && IsOper(source_p) && !IsOperInvis(source_p) &&
|
||||||
|
IsInvisible(source_p))
|
||||||
|
{
|
||||||
|
ClearInvisible(source_p);
|
||||||
|
/* If they tried /umode +i, complain; do not complain
|
||||||
|
* if they opered up while invisible -- jilles */
|
||||||
|
if (hdata->oldumodes & UMODE_OPER)
|
||||||
|
sendto_one_notice(source_p, ":*** Opers may not set themselves invisible");
|
||||||
|
}
|
||||||
|
}
|
81
extensions/sno_farconnect.c
Normal file
81
extensions/sno_farconnect.c
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
/*
|
||||||
|
* Remote client connect/exit notices on snomask +F (far).
|
||||||
|
* To avoid flooding, connects/exits part of netjoins/netsplits are not shown.
|
||||||
|
* Consequently, it is not possible to use these notices to keep track
|
||||||
|
* of all clients.
|
||||||
|
* -- jilles
|
||||||
|
*
|
||||||
|
* $Id: sno_farconnect.c 1869 2006-08-27 14:24:25Z jilles $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "hook.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
#include "send.h"
|
||||||
|
#include "s_conf.h"
|
||||||
|
#include "snomask.h"
|
||||||
|
|
||||||
|
static int _modinit(void);
|
||||||
|
static void _moddeinit(void);
|
||||||
|
static void h_gcn_new_remote_user(struct Client *);
|
||||||
|
static void h_gcn_client_exit(hook_data_client_exit *);
|
||||||
|
|
||||||
|
mapi_hfn_list_av1 gcn_hfnlist[] = {
|
||||||
|
{ "new_remote_user", (hookfn) h_gcn_new_remote_user },
|
||||||
|
{ "client_exit", (hookfn) h_gcn_client_exit },
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECLARE_MODULE_AV1(globalconnexit, _modinit, _moddeinit, NULL, NULL, gcn_hfnlist, "$Revision: 1869 $");
|
||||||
|
|
||||||
|
static int
|
||||||
|
_modinit(void)
|
||||||
|
{
|
||||||
|
/* add the snomask to the available slot */
|
||||||
|
snomask_modes['F'] = find_snomask_slot();
|
||||||
|
|
||||||
|
/* show the fact that we are showing user information in /version */
|
||||||
|
opers_see_all_users = 1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_moddeinit(void)
|
||||||
|
{
|
||||||
|
/* disable the snomask and remove it from the available list */
|
||||||
|
snomask_modes['F'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
h_gcn_new_remote_user(struct Client *source_p)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (!HasSentEob(source_p->servptr))
|
||||||
|
return;
|
||||||
|
sendto_realops_snomask_from(snomask_modes['F'], L_ALL, source_p->servptr,
|
||||||
|
"Client connecting: %s (%s@%s) [%s] {%s} [%s]",
|
||||||
|
source_p->name, source_p->username, source_p->orighost,
|
||||||
|
show_ip(NULL, source_p) ? source_p->sockhost : "255.255.255.255",
|
||||||
|
"?", source_p->info);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
h_gcn_client_exit(hook_data_client_exit *hdata)
|
||||||
|
{
|
||||||
|
struct Client *source_p;
|
||||||
|
|
||||||
|
source_p = hdata->target;
|
||||||
|
|
||||||
|
if (MyConnect(source_p) || !IsClient(source_p))
|
||||||
|
return;
|
||||||
|
if (!HasSentEob(source_p->servptr))
|
||||||
|
return;
|
||||||
|
sendto_realops_snomask_from(snomask_modes['F'], L_ALL, source_p->servptr,
|
||||||
|
"Client exiting: %s (%s@%s) [%s] [%s]",
|
||||||
|
source_p->name,
|
||||||
|
source_p->username, source_p->host, hdata->comment,
|
||||||
|
show_ip(NULL, source_p) ? source_p->sockhost : "255.255.255.255");
|
||||||
|
}
|
51
extensions/sno_globalkline.c
Normal file
51
extensions/sno_globalkline.c
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
/*
|
||||||
|
* Shows notices if remote clients exit with "Bad user info" or
|
||||||
|
* ConfigFileEntry.kline_reason.
|
||||||
|
* Assumes client_exit is enabled so users can't fake these reasons,
|
||||||
|
* and kline_reason is enabled and the same everywhere.
|
||||||
|
* Yes, this is a hack, but it is simple and avoids sending
|
||||||
|
* more data across servers -- jilles
|
||||||
|
*
|
||||||
|
* $Id: sno_globalkline.c 613 2006-01-29 03:03:02Z nenolod $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "hook.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
#include "send.h"
|
||||||
|
#include "s_conf.h"
|
||||||
|
|
||||||
|
static void h_gla_client_exit(hook_data_client_exit *);
|
||||||
|
|
||||||
|
mapi_hfn_list_av1 gla_hfnlist[] = {
|
||||||
|
{ "client_exit", (hookfn) h_gla_client_exit },
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECLARE_MODULE_AV1(globallineactive, NULL, NULL, NULL, NULL, gla_hfnlist, "$Revision: 613 $");
|
||||||
|
|
||||||
|
static void
|
||||||
|
h_gla_client_exit(hook_data_client_exit *hdata)
|
||||||
|
{
|
||||||
|
struct Client *source_p;
|
||||||
|
|
||||||
|
source_p = hdata->target;
|
||||||
|
|
||||||
|
if (MyConnect(source_p) || !IsClient(source_p))
|
||||||
|
return;
|
||||||
|
if (!strcmp(hdata->comment, "Bad user info"))
|
||||||
|
{
|
||||||
|
sendto_realops_snomask_from(SNO_GENERAL, L_ALL, source_p->servptr,
|
||||||
|
"XLINE active for %s[%s@%s]",
|
||||||
|
source_p->name, source_p->username, source_p->host);
|
||||||
|
}
|
||||||
|
else if (ConfigFileEntry.kline_reason != NULL &&
|
||||||
|
!strcmp(hdata->comment, ConfigFileEntry.kline_reason))
|
||||||
|
{
|
||||||
|
sendto_realops_snomask_from(SNO_GENERAL, L_ALL, source_p->servptr,
|
||||||
|
"K/D/GLINE active for %s[%s@%s]",
|
||||||
|
source_p->name, source_p->username, source_p->host);
|
||||||
|
}
|
||||||
|
}
|
38
extensions/sno_globaloper.c
Normal file
38
extensions/sno_globaloper.c
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
/*
|
||||||
|
* Remote oper up notices.
|
||||||
|
*
|
||||||
|
* $Id: sno_globaloper.c 639 2006-01-29 21:42:06Z jilles $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "hook.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
#include "send.h"
|
||||||
|
#include "s_conf.h"
|
||||||
|
#include "snomask.h"
|
||||||
|
|
||||||
|
static void h_sgo_umode_changed(void *);
|
||||||
|
|
||||||
|
mapi_hfn_list_av1 sgo_hfnlist[] = {
|
||||||
|
{ "umode_changed", (hookfn) h_sgo_umode_changed },
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
DECLARE_MODULE_AV1(sno_globaloper, NULL, NULL, NULL, NULL, sgo_hfnlist, "$Revision: 639 $");
|
||||||
|
|
||||||
|
static void
|
||||||
|
h_sgo_umode_changed(void *vdata)
|
||||||
|
{
|
||||||
|
hook_data_umode_changed *data = (hook_data_umode_changed *)vdata;
|
||||||
|
struct Client *source_p = data->client;
|
||||||
|
|
||||||
|
if (MyConnect(source_p) || !HasSentEob(source_p->servptr))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!(data->oldumodes & UMODE_OPER) && IsOper(source_p))
|
||||||
|
sendto_realops_snomask_from(SNO_GENERAL, L_ALL, source_p->servptr,
|
||||||
|
"%s (%s@%s) is now an operator",
|
||||||
|
source_p->name, source_p->username, source_p->host);
|
||||||
|
}
|
47
extensions/spy_admin_notice.c
Normal file
47
extensions/spy_admin_notice.c
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
/*
|
||||||
|
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* $Id: spy_admin_notice.c 498 2006-01-15 16:40:33Z jilles $
|
||||||
|
*/
|
||||||
|
#include "stdinc.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: 498 $");
|
||||||
|
|
||||||
|
void
|
||||||
|
show_admin(hook_data *data)
|
||||||
|
{
|
||||||
|
sendto_realops_snomask(SNO_SPY, L_ALL,
|
||||||
|
"admin requested by %s (%s@%s) [%s]",
|
||||||
|
data->client->name, data->client->username,
|
||||||
|
data->client->host, data->client->user->server);
|
||||||
|
}
|
47
extensions/spy_info_notice.c
Normal file
47
extensions/spy_info_notice.c
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
/*
|
||||||
|
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* $Id: spy_info_notice.c 498 2006-01-15 16:40:33Z jilles $
|
||||||
|
*/
|
||||||
|
#include "stdinc.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: 498 $");
|
||||||
|
|
||||||
|
void
|
||||||
|
show_info(hook_data *data)
|
||||||
|
{
|
||||||
|
sendto_realops_snomask(SNO_SPY, L_ALL,
|
||||||
|
"info requested by %s (%s@%s) [%s]",
|
||||||
|
data->client->name, data->client->username,
|
||||||
|
data->client->host, data->client->user->server);
|
||||||
|
}
|
49
extensions/spy_links_notice.c
Normal file
49
extensions/spy_links_notice.c
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
/*
|
||||||
|
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* $Id: spy_links_notice.c 498 2006-01-15 16:40:33Z jilles $
|
||||||
|
*/
|
||||||
|
#include "stdinc.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: 498 $");
|
||||||
|
|
||||||
|
void
|
||||||
|
show_links(hook_data *data)
|
||||||
|
{
|
||||||
|
const char *mask = data->arg1;
|
||||||
|
|
||||||
|
sendto_realops_snomask(SNO_SPY, L_ALL,
|
||||||
|
"LINKS '%s' requested by %s (%s@%s) [%s]",
|
||||||
|
mask, data->client->name, data->client->username,
|
||||||
|
data->client->host, data->client->user->server);
|
||||||
|
}
|
47
extensions/spy_motd_notice.c
Normal file
47
extensions/spy_motd_notice.c
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
/*
|
||||||
|
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* $Id: spy_motd_notice.c 498 2006-01-15 16:40:33Z jilles $
|
||||||
|
*/
|
||||||
|
#include "stdinc.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: 498 $");
|
||||||
|
|
||||||
|
void
|
||||||
|
show_motd(hook_data *data)
|
||||||
|
{
|
||||||
|
sendto_realops_snomask(SNO_SPY, L_ALL,
|
||||||
|
"motd requested by %s (%s@%s) [%s]",
|
||||||
|
data->client->name, data->client->username,
|
||||||
|
data->client->host, data->client->user->server);
|
||||||
|
}
|
70
extensions/spy_stats_notice.c
Normal file
70
extensions/spy_stats_notice.c
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
/*
|
||||||
|
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* $Id: spy_stats_notice.c 498 2006-01-15 16:40:33Z jilles $
|
||||||
|
*/
|
||||||
|
#include "stdinc.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: 498 $");
|
||||||
|
|
||||||
|
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_snomask(SNO_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->user->server, name);
|
||||||
|
else
|
||||||
|
sendto_realops_snomask(SNO_SPY, L_ALL,
|
||||||
|
"STATS %c requested by %s (%s@%s) [%s]",
|
||||||
|
statchar, data->client->name,
|
||||||
|
data->client->username,
|
||||||
|
data->client->host, data->client->user->server);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sendto_realops_snomask(SNO_SPY, L_ALL,
|
||||||
|
"STATS %c requested by %s (%s@%s) [%s]",
|
||||||
|
statchar, data->client->name, data->client->username,
|
||||||
|
data->client->host, data->client->user->server);
|
||||||
|
}
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue