[IRC-Dev CVS] [CVS] Module ircd-ircdev: Change committed
Brought to you by:
zolty
From: Toni G. <zo...@us...> - 2005-09-01 11:25:59
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-09-01 11:25:52 UTC Modified files: ChangeLog ChangeLog.es RELEASE.NOTES RELEASE.NOTES.es configure configure.in doc/ircd.sample-en.conf doc/ircd.sample-es.conf doc/en/features.txt doc/en/log.txt doc/en/api/features.txt doc/en/api/modebuf.txt doc/en/api/motd.txt include/channel.h include/ircd_features.h include/numeric.h include/patchlevel.h include/s_conf.h include/supported.h include/sys.h ircd/IPcheck.c ircd/channel.c ircd/class.c ircd/engine_epoll.c ircd/engine_select.c ircd/gline.c ircd/ircd.c ircd/ircd_auth.c ircd/ircd_features.c ircd/ircd_log.c ircd/ircd_parser.y ircd/listener.c ircd/m_burst.c ircd/m_join.c ircd/m_kick.c ircd/m_trace.c ircd/parse.c ircd/s_bsd.c ircd/s_conf.c ircd/s_err.c Log message: Author: zoltan <zo...@ir...> Log message: 2005-09-01 Toni García <zo...@ir...> 1.0.alpha43 * Sincronización Undernet ---------------------- diff included ---------------------- Index: ircd-ircdev/ChangeLog diff -u ircd-ircdev/ChangeLog:1.44 ircd-ircdev/ChangeLog:1.45 --- ircd-ircdev/ChangeLog:1.44 Sun Jul 3 13:21:41 2005 +++ ircd-ircdev/ChangeLog Thu Sep 1 04:25:42 2005 @@ -1,10 +1,13 @@ # # ChangeLog for ircd-ircdev # -# $Id: ChangeLog,v 1.44 2005/07/03 20:21:41 zolty Exp $ +# $Id: ChangeLog,v 1.45 2005/09/01 11:25:42 zolty Exp $ # # Insert new changes at beginning of the change list. # +2005-09-01 Toni García <zo...@ir...> 1.0.alpha43 + * Undernet synchronization + 2005-07-03 Toni García <zo...@ir...> 1.0.alpha42 * Undernet synchronization Index: ircd-ircdev/ChangeLog.es diff -u ircd-ircdev/ChangeLog.es:1.44 ircd-ircdev/ChangeLog.es:1.45 --- ircd-ircdev/ChangeLog.es:1.44 Sun Jul 3 13:21:41 2005 +++ ircd-ircdev/ChangeLog.es Thu Sep 1 04:25:42 2005 @@ -1,10 +1,13 @@ # # Log de Cambios para ircd-ircdev # -# $Id: ChangeLog.es,v 1.44 2005/07/03 20:21:41 zolty Exp $ +# $Id: ChangeLog.es,v 1.45 2005/09/01 11:25:42 zolty Exp $ # # Insertar los nuevos cambios al principio de esta lista de cambios. # +2005-09-01 Toni García <zo...@ir...> 1.0.alpha43 + * Sincronización Undernet + 2005-07-03 Toni García <zo...@ir...> 1.0.alpha42 * Sincronización Undernet Index: ircd-ircdev/RELEASE.NOTES diff -u ircd-ircdev/RELEASE.NOTES:1.2 ircd-ircdev/RELEASE.NOTES:1.3 --- ircd-ircdev/RELEASE.NOTES:1.2 Sat Apr 23 08:57:00 2005 +++ ircd-ircdev/RELEASE.NOTES Thu Sep 1 04:25:42 2005 @@ -8,7 +8,7 @@ ircu2.10.07 (based on IRC-Hispano ircdh and Terraircu). IRC-Dev ircd is only compatible with servers that implement the P10 protocol. It has been tested to link against old ircds, but some features (notably -IPv6 support) are not supported by old ircds. +IPv6 support and oplevels) are not supported by old ircds. Enhancements: @@ -34,6 +34,19 @@ and allows that external program to assign an account stamp to the incoming user. +A new channel mode, +D, has been added for auditorium-style channels. +These are channels where most users listen but do not speak or receive +ops or voice. The effect of +D is that the server waits to send the +JOIN message for new users until the user gets ops or voice or sends a +message to the channel. A list of join-delayed users in a channel may +be retrieved by using /NAMES -d #channel. The response to /NAMES -d +uses the same format as numeric 353, but uses numeric 355 instead. If +an op removes +D while there are still join-delayed users, the server +automatically sets mode +d, and removes +d when the last user's join +is shown. It is not possible to set channel mode +d manually; its +purpose is to warn channel users that there are "hidden" users in the +channel. + More than one hashing mechanism is now supported for oper passwords, and a new tool (ircd/umkpasswd) is provided to generate them. Index: ircd-ircdev/RELEASE.NOTES.es diff -u ircd-ircdev/RELEASE.NOTES.es:1.2 ircd-ircdev/RELEASE.NOTES.es:1.3 --- ircd-ircdev/RELEASE.NOTES.es:1.2 Sat Apr 23 08:57:02 2005 +++ ircd-ircdev/RELEASE.NOTES.es Thu Sep 1 04:25:42 2005 @@ -9,7 +9,7 @@ Terraircu). El ircd de IRC-Dev es compatible solamente con servidores que tengan implementado el protocolo P10. Ha sido probado el link con ircds antiguos, pero muchas caracteristicas (notablemente el soporte -IPv6) no están soportadas por ircds viejos. +IPv6 y oplevels) no están soportadas por ircds viejos. Implementaciones: @@ -36,6 +36,20 @@ el servidor y permite que ese programa externo asigne una cuenta de acceso al usuario entrante. +Un nuevo modo de canal, +d, se ha agregado para los canales estilo +auditorio. Estos son canales donde la mayoría de los usuarios escuchan +pero no hablan ni reciben ops o voz. El efecto de +D es que el servidor +espera para enviar el mensaje del JOIN para los nuevos usuarios hasta +que el usuario consigue ops o voz o envía un mensaje al canal. La lista +de usuarios con entrada retrasada en un canal se puede sacar usando +/NAMES -d #canal. La respuesta al /NAMES -d utiliza el mismo formato que +el numérico 353, pero usa el numérico 355. Si un op quita el +D mientras +que todavía hay usuarios con entrada retrasada, el servidor ajusta el modo ++d automáticamente, y quita +d cuando se muestra la entrada del ultimo +usuario. No es posible fijar el modo +d del canal manualmente; su +próposito es advertir a los usuarios del canal de que hay usuarios +"ocultos" en el canal. + Más de un mecanismo del hashing está soportado ahora para las contraseñas de operador (IRCOP), y se proporciona una herramienta nueva (ircd/umkpasswd) para generarlas. Index: ircd-ircdev/configure diff -u ircd-ircdev/configure:1.18 ircd-ircdev/configure:1.19 --- ircd-ircdev/configure:1.18 Mon May 16 04:22:48 2005 +++ ircd-ircdev/configure Thu Sep 1 04:25:42 2005 @@ -7765,6 +7765,71 @@ echo "$as_me: error: Cannot find a type with size of 64 bits" >&2;} { (exit 1); exit 1; }; } fi +echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5 +echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6 +if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/types.h> +#include <netinet/in.h> + +int +main () +{ +if ((struct sockaddr_in6 *) 0) + return 0; +if (sizeof (struct sockaddr_in6)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_struct_sockaddr_in6=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_struct_sockaddr_in6=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5 +echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6 +if test $ac_cv_type_struct_sockaddr_in6 = yes; then + unet_have_sockaddr_in6="yes" +else + unet_have_sockaddr_in6="no" +fi + + echo "$as_me:$LINENO: checking for socklen_t" >&5 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${ac_cv_type_socklen_t+set}" = set; then @@ -7776,7 +7841,9 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default +#include <sys/types.h> +#include<sys/socket.h> + int main () { @@ -7825,33 +7892,29 @@ : else -cat >>confdefs.h <<_ACEOF -#define socklen_t unsigned int -_ACEOF - -fi - -echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5 -echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6 -if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then + echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5 +echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6 + if test "${curl_cv_socklen_t_equiv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + + curl_cv_socklen_t_equiv= + for arg2 in "struct sockaddr" void ; do + for t in int size_t unsigned long "unsigned long" ; do + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <sys/types.h> -#include <netinet/in.h> - +#include <sys/socket.h> +int getpeername (int $arg2 *, $t *); int main () { -if ((struct sockaddr_in6 *) 0) - return 0; -if (sizeof (struct sockaddr_in6)) - return 0; +$t len; + getpeername(0, 0, &len); ; return 0; } @@ -7878,21 +7941,26 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_struct_sockaddr_in6=yes + curl_cv_socklen_t_equiv="$t" + break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_struct_sockaddr_in6=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done + done + fi -echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5 -echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6 -if test $ac_cv_type_struct_sockaddr_in6 = yes; then - unet_have_sockaddr_in6="yes" -else - unet_have_sockaddr_in6="no" + + echo "$as_me:$LINENO: result: $curl_cv_socklen_t_equiv" >&5 +echo "${ECHO_T}$curl_cv_socklen_t_equiv" >&6 + +cat >>confdefs.h <<_ACEOF +#define socklen_t $curl_cv_socklen_t_equiv +_ACEOF + fi Index: ircd-ircdev/configure.in diff -u ircd-ircdev/configure.in:1.17 ircd-ircdev/configure.in:1.18 --- ircd-ircdev/configure.in:1.17 Mon May 16 04:22:49 2005 +++ ircd-ircdev/configure.in Thu Sep 1 04:25:42 2005 @@ -22,7 +22,7 @@ dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl $Id: configure.in,v 1.17 2005/05/16 11:22:49 zolty Exp $ +dnl $Id: configure.in,v 1.18 2005/09/01 11:25:42 zolty Exp $ dnl dnl Make sure we are in the correct directory (someone could have run @@ -79,10 +79,35 @@ AC_STRUCT_TM AC_TYPE_UID_T unet_CHECK_TYPE_SIZES -AC_CHECK_TYPE(socklen_t, unsigned int) AC_CHECK_TYPE(struct sockaddr_in6, [unet_have_sockaddr_in6="yes"], [unet_have_sockaddr_in6="no"], [#include <sys/types.h> #include <netinet/in.h>]) +dnl Check for socklen_t. In traditional BSD this is an int, but some +dnl OSes use a different type. Test until we find something that will +dnl work properly. Test borrowed from a patch submitted for Python. +AC_CHECK_TYPE([socklen_t], ,[ + AC_MSG_CHECKING([for socklen_t equivalent]) + AC_CACHE_VAL([curl_cv_socklen_t_equiv], + [ +dnl Systems have either "struct sockaddr*" or "void*" as second +dnl arg to getpeername. + curl_cv_socklen_t_equiv= + for arg2 in "struct sockaddr" void ; do + for t in int size_t unsigned long "unsigned long" ; do + AC_TRY_COMPILE([#include <sys/types.h> +#include <sys/socket.h> +int getpeername (int $arg2 *, $t *);],[$t len; + getpeername(0, 0, &len);], [curl_cv_socklen_t_equiv="$t" + break]) + done + done + ]) + AC_MSG_RESULT($curl_cv_socklen_t_equiv) + AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv, + [type to use in place of socklen_t if not defined])], + [#include <sys/types.h> +#include<sys/socket.h>]) + dnl Checks for library functions. AC_CHECK_FUNCS([kqueue setrlimit getrusage times]) Index: ircd-ircdev/doc/en/api/features.txt diff -u ircd-ircdev/doc/en/api/features.txt:1.2 ircd-ircdev/doc/en/api/features.txt:1.3 --- ircd-ircdev/doc/en/api/features.txt:1.2 Wed Jan 5 08:38:12 2005 +++ ircd-ircdev/doc/en/api/features.txt Thu Sep 1 04:25:42 2005 @@ -1,4 +1,4 @@ -$Id: features.txt,v 1.2 2005/01/05 16:38:12 zolty Exp $ +$Id: features.txt,v 1.3 2005/09/01 11:25:42 zolty Exp $ As of u2.10.11, most of the compile-time configuration options present in previous versions of ircu have been provided via the configuration @@ -63,13 +63,13 @@ Marking Features When the configuration file is read, there must be some way to -determine if a particular F-line has been removed since the last time -the configuration file was read. The way this is done in the features -subsystem is to have a "mark" for each feature. Prior to reading the -configuration file, all marks are cleared for all features (and all -"unmark" call-backs are called). As each F-line is encountered and -processed, that feature's mark is set. Finally, when the -configuration file has been fully read, all remaining unmarked +determine if a particular Feature entry has been removed since the +last time the configuration file was read. The way this is done in +the features subsystem is to have a "mark" for each feature. Prior to +reading the configuration file, all marks are cleared for all features +(and all "unmark" call-backs are called). As each Feature entry is +encountered and processed, that feature's mark is set. Finally, when +the configuration file has been fully read, all remaining unmarked features are reset to their default values (and all "mark" call-backs are called). @@ -150,8 +150,8 @@ <function> void feature_report(struct Client* to); -Reports all F-lines to a user using RPL_STATSFLINE, except those which -the user is not permitted to see due to flag settings. +Reports all Feature entries to a user using RPL_STATSFLINE, except +those which the user is not permitted to see due to flag settings. </function> <function> Index: ircd-ircdev/doc/en/api/modebuf.txt diff -u ircd-ircdev/doc/en/api/modebuf.txt:1.2 ircd-ircdev/doc/en/api/modebuf.txt:1.3 --- ircd-ircdev/doc/en/api/modebuf.txt:1.2 Wed Jan 5 08:38:12 2005 +++ ircd-ircdev/doc/en/api/modebuf.txt Thu Sep 1 04:25:42 2005 @@ -1,4 +1,4 @@ -$Id: modebuf.txt,v 1.2 2005/01/05 16:38:12 zolty Exp $ +$Id: modebuf.txt,v 1.3 2005/09/01 11:25:42 zolty Exp $ Generating and parsing channel mode strings is often a very complicated process. The ModeBuf interface, along with the associated @@ -103,10 +103,10 @@ <macro> #define MODEBUF_DEST_HACK4 0x8000 /* Send a HACK(4) notice, TS == 0 */ -Some servers are special. When a server that has a U-line issues a -mode change, we send a "HACK(4)" message to differentiate it from an -ordinary server changing a channel mode. This is the flag that must -be passed to modebuf_init() to cause that behavior. +Some servers are special. When a server that has a Uworld entry +issues a mode change, we send a "HACK(4)" message to differentiate it +from an ordinary server changing a channel mode. This is the flag +that must be passed to modebuf_init() to cause that behavior. </macro> <function> Index: ircd-ircdev/doc/en/api/motd.txt diff -u ircd-ircdev/doc/en/api/motd.txt:1.2 ircd-ircdev/doc/en/api/motd.txt:1.3 --- ircd-ircdev/doc/en/api/motd.txt:1.2 Wed Jan 5 08:38:12 2005 +++ ircd-ircdev/doc/en/api/motd.txt Thu Sep 1 04:25:42 2005 @@ -1,4 +1,4 @@ -$Id: motd.txt,v 1.2 2005/01/05 16:38:12 zolty Exp $ +$Id: motd.txt,v 1.3 2005/09/01 11:25:42 zolty Exp $ The server has a Message of the Day (MOTD) which is often used for describing the Acceptable Usage Policy, where to get help if you have @@ -21,12 +21,11 @@ This function sends an appropriate MOTD to the client specified by _cptr_. If _cptr_ is not a local client, the remote MOTD will be -sent; otherwise, an attempt will be made to find a T-line in the -configuration file that matches the client. If no T-line can be +sent; otherwise, an attempt will be made to find a Motd entry in the +configuration file that matches the client. If no Motd entry can be found, the default MOTD will be sent to the client. This function returns 0 for the convenience of other functions that must have an -integer return value. -</function> +integer return value. </function> <function> void motd_signon(struct Client* cptr); @@ -62,7 +61,7 @@ <function> void motd_report(struct Client *to); -The motd_report() function sends a list of the T-lines stored in +The motd_report() function sends a list of the Motd entries stored in memory to the client specified by _to_. Access control should be handled by the caller. </function> Index: ircd-ircdev/doc/en/features.txt diff -u ircd-ircdev/doc/en/features.txt:1.2 ircd-ircdev/doc/en/features.txt:1.3 --- ircd-ircdev/doc/en/features.txt:1.2 Wed Jan 26 09:19:41 2005 +++ ircd-ircdev/doc/en/features.txt Thu Sep 1 04:25:42 2005 @@ -1,9 +1,9 @@ -$Id: features.txt,v 1.2 2005/01/26 17:19:41 zolty Exp $ +$Id: features.txt,v 1.3 2005/09/01 11:25:42 zolty Exp $ Many of the old compile-time options are now configured through the server configuration file, ircd.conf. This file is intended to document each of these features. Logging, although also configured -through the use of "Features" Block, is documented in doc/*/log.txt. +through the use of Feature entries, is documented in doc/*/log.txt. NOTE THAT THESE NAMES ARE CASE SENSITIVE! Values are not case sensitive unless stated otherwise in the documentation for that feature. @@ -343,6 +343,15 @@ in nickname length for a network. +CHANNELLEN + * Type: integer + * Default: 200 + +This is the allowed length of locally created channels. It may not be +larger than the CHANNELLEN #define. Like the NICKLEN feature, this is +intended to ease changes in channel name length across a network. + + AVBANLEN * Type: integer * Default: 40 @@ -439,8 +448,8 @@ This is the default frequency that the server attempts to reconnect with its uplink server if it is set to auto connect to it. Note that -this value is overridden by a "Class" block in ircd.conf if the "Connect" -block in ircd.conf assign a specific class to the connection (recommended). +this value is overridden by a "Class" block in ircd.conf if the Connect +entries in ircd.conf assign a specific class to the connection (recommended). DEFAULTMAXSENDQLENGTH @@ -449,9 +458,7 @@ This is the default value of the maximum sendQ length of connection classes (see doc/ircd.sample-*.conf for details on "Class" blocks). You will -probably always override this value in your "ircd.conf" with the -"Class" block. The given value used to be an often used value for client -sendQs. +generally override this value in your "ircd.conf" with a Class block. GLINEMAXUSERCOUNT @@ -604,13 +611,12 @@ * Type: boolean * Default: FALSE -For u2.10.11, several new oper-only features have been added that -involve changes to the server<->server protocol. Until the entire -network is running the new version, these features cannot be enabled. -This configuration option provides a single switch to prevent the use -of these features until the entire network has been upgraded. It is -not required that all servers set this to "TRUE" in order for the -features to be used. +Since u2.10.11, several new oper-only features have been added that +involve changes to the server<->server protocol. This configuration +option provides a single switch to prevent the use of these features +until the entire network has been upgraded. It is not required that +all servers set this to "TRUE" in order for the features to be used, +as long as all servers are running u2.10.11 or above. HIS_SNOTICES Index: ircd-ircdev/doc/en/log.txt diff -u ircd-ircdev/doc/en/log.txt:1.2 ircd-ircdev/doc/en/log.txt:1.3 --- ircd-ircdev/doc/en/log.txt:1.2 Sat May 7 15:23:39 2005 +++ ircd-ircdev/doc/en/log.txt Thu Sep 1 04:25:42 2005 @@ -1,10 +1,10 @@ -$Id: log.txt,v 1.2 2005/05/07 22:23:39 zolty Exp $ +$Id: log.txt,v 1.3 2005/09/01 11:25:42 zolty Exp $ Older versions of ircd had no consistent way of logging various actions. Some things, such as G-lines, were written out to log files with names compiled into the server. Others could only be logged through syslog. Some required that their log files exist beforehand. -For u2.10.11, this situation has changed dramatically. +Starting with u2.10.11, this situation has changed dramatically. All logging in the server is now unified through a single logging subsystem. Unfortunately, the server still does not generate all the @@ -139,30 +139,31 @@ The IRC server has a default facility that it uses when sending log messages to syslog. The default facility may be overridden for each individual subsystem, but the default itself can be changed with an -appropriate F-line in the configuration file. The facility normally -defaults to "USER," but may be configured to be any of AUTH, CRON, -DAEMON, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, +appropriate Feature entry in the configuration file. The facility +normally defaults to "USER," but may be configured to be any of AUTH, +CRON, DAEMON, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7, LPR, MAIL, NEWS, USER, or UUCP. Some systems also have the -AUTHPRIV facility. To configure this default, add an F-line to the -configuration file that looks like "F:LOG:<facility>"; <facility> -should be replaced with the string for the desired default syslog -facility. +AUTHPRIV facility. To configure this default, add a Feature line to +the configuration file that looks like "LOG" = "<facility>"; +<facility> should be replaced with the string for the desired default +syslog facility. Log Files Each subsystem may be configured to send its log messages to any -single log file with an F-line like "F:LOG:<subsys>:FILE:<file>"; -<subsys> should be replaced with one of the subsystem names described -above, and <file> should be a file name for the log file. The file -name may be relative to the server's data directory ("DPATH"), or it -may be an absolute path name. Note that if you're using chroot, these -absolute path names will be relative to the server's root directory. +single log file with a Feature entry like "LOG" = "<subsys>" "FILE" +"<file>"; <subsys> should be replaced with one of the subsystem names +described above, and <file> should be a file name for the log file. +The file name may be relative to the server's data directory +("DPATH"), or it may be an absolute path name. Note that if you're +using chroot, these absolute path names will be relative to the +server's root directory. Logging to Syslog By default, except for the CONFIG subsystem, no logs are sent to -syslog. This can be overridden using an F-line like -"F:LOG:<subsys>:FACILITY:<facility>"; <subsys>, as above, should be +syslog. This can be overridden using an Feature entry like "LOG" = +"<subsys>" "FACILITY" "<facility>"; <subsys>, as above, should be replaced with one of the subsystem names described above, and <facility> must be one of the facility strings mentioned under "Default Syslog Facility." The facility string may also be "NONE," to @@ -182,14 +183,14 @@ are OLDSNO, SERVKILL, OPERKILL, HACK2, HACK3, UNAUTH, TCPCOMMON, TOOMANY, HACK4, GLINE, NETWORK, IPMISMATCH, THROTTLE, OLDREALOP, CONNEXIT, and DEBUG. The special mask name "NONE" inhibits sending of -server notices for a particular subsystem. The F-line for this -configuration looks like "F:LOG:<subsys>:SNOMASK:<mask>"; again, +server notices for a particular subsystem. The Feature entry for this +configuration looks like "LOG" = "<subsys>" "SNOMASK" "<mask>"; again, <subsys> is one of the subsystems described above, and <mask> is one of the mask names. Setting Minimum Logging Level The minimum log level for a particular subsystem may be set with an -F-line like "F:LOG:<subsys>:LEVEL:<level>"; here, <subsys> is yet -again one of the subsystems described above, and <level> is one of the -level names, also described above. +Feature entry like "LOG" = "<subsys>" "LEVEL" "<level>"; here, +<subsys> is yet again one of the subsystems described above, and +<level> is one of the level names, also described above. Index: ircd-ircdev/doc/ircd.sample-en.conf diff -u ircd-ircdev/doc/ircd.sample-en.conf:1.21 ircd-ircdev/doc/ircd.sample-en.conf:1.22 --- ircd-ircdev/doc/ircd.sample-en.conf:1.21 Sat May 7 15:32:20 2005 +++ ircd-ircdev/doc/ircd.sample-en.conf Thu Sep 1 04:25:42 2005 @@ -1,6 +1,6 @@ # ircd.conf - configuration file for IRC-Dev's IRCD. # -# Last Updated: 8, May 2005. +# Last Updated: 1, Sep 2005. # # Written by Niels <ni...@un...>, based on the original example.conf, # server code and some real-life (ahem) experience. @@ -64,7 +64,7 @@ # be the address of a physical interface on the host. This address is # used for outgoing connections if the "Connect" block does not override # it. See "Port" block for listener virtual hosting. If in doubt, -# leave it out. +# leave it out -- or use "*", which has the same meaning as no vhost. # # You may specify both an IPv4 virtual host and an IPv6 virtual host, # to indicate which address should be used for outbound connections @@ -160,6 +160,12 @@ maxlinks = 100; usermode = "+iw"; }; +Class { + name = "Other"; + pingfreq = 1 minutes 30 seconds; + sendq = 160000; + maxlinks = 400; +}; Client { class = "Other"; @@ -172,12 +178,6 @@ maxlinks = 5; }; Class { - name = "Other"; - pingfreq = 1 minutes 30 seconds; - sendq = 160000; - maxlinks = 400; -}; -Class { name = "Opers"; pingfreq = 1 minutes 30 seconds; sendq = 160000; @@ -460,9 +460,9 @@ # # # The default reason is: "You are banned from this server" -# Note that K-lines are local to the server; if you ban a person or a +# Note that Kill blocks are local to the server; if you ban a person or a # whole domain from your server, they can get on IRC via any other server -# that doesn't have them K-lined (yet). +# that doesn't have them Killed (yet). # # With a simple comment, using quotes: Kill { host = "*.au"; reason = "Please use a nearer server"; }; @@ -785,6 +785,7 @@ # "KILLCHASETIMELIMIT" = "30"; # "MAXCHANNELSPERUSER" = "10"; # "NICKLEN" = "12"; +# "CHANNELLEN" = "200"; # "AVBANLEN" = "40"; # "MAXBANS" = "45"; # "MAXSILES" = "15"; Index: ircd-ircdev/doc/ircd.sample-es.conf diff -u ircd-ircdev/doc/ircd.sample-es.conf:1.16 ircd-ircdev/doc/ircd.sample-es.conf:1.17 --- ircd-ircdev/doc/ircd.sample-es.conf:1.16 Sat May 7 15:32:20 2005 +++ ircd-ircdev/doc/ircd.sample-es.conf Thu Sep 1 04:25:42 2005 @@ -1,6 +1,6 @@ # ircd.conf - archivo de configuración para el IRCD de IRC-Dev. # -# Ultima actualización: 8, May 2005. +# Ultima actualización: 1, Sep 2005. # # Escrito por Niels <ni...@un...>, basado en el archivo example.conf # original, en el código del servidor y la experiencia de la vida real. @@ -70,7 +70,8 @@ # La dirección DEBE ser la dirección de una interfaz física en el host. # Esta dirección se utiliza para las conexiones salientes si el bloque # "Connect" no la elimina. Veáse el bloque "Port" para la escucha con -# virtual hosting. En caso de duda no pongas nada. +# virtual hosting. En caso de duda no pongas nada o usa "*" que tiene el +# mismo significado que no tener vhost. # # Puedes especificar un virtualhost de IPv4 y un virtualhost de IPv6, # para indicar cuál de las direcciones se debe utilizar para las @@ -169,6 +170,12 @@ maxlinks = 100; usermode = "+iw"; }; +Class { + name = "Otros"; + pingfreq = 1 minutes 30 seconds; + sendq = 160000; + maxlinks = 400; +}; Client { class = "Otros"; @@ -181,12 +188,6 @@ maxlinks = 5; }; Class { - name = "Otros"; - pingfreq = 1 minutes 30 seconds; - sendq = 160000; - maxlinks = 400; -}; -Class { name = "Opers"; pingfreq = 1 minutes 30 seconds; sendq = 160000; @@ -482,9 +483,9 @@ # # # La razón por defecto es: "You are banned from this server" -# Notese que las "K-lines" son locales al servidor; si se prohibe a una -# persona o un dominio entero de tu servidor, aun pueden entrar al IRC -# por otro servidor que no tengan "K-lined" (aun). +# Notese que los bloques "Kill" son locales al servidor; si se prohibe +# a una persona o un dominio entero de tu servidor, aun pueden entrar +# al IRC por otro servidor que no tengan "Killed" (aun). # # Con un simple comentario, usando comillas: Kill { host = "*.au"; reason = "Por favor, use un servidor más cercano"; }; @@ -495,7 +496,7 @@ # El archivo puede contener, por ejemplo, una razón, un enlace a las normas # del servidor y una dirección de contacto. Observe la combinación del username -y el host en el campo "host". +#y el host en el campo "host". Kill { host = "*lu...@un..."; @@ -822,6 +823,7 @@ # "KILLCHASETIMELIMIT" = "30"; # "MAXCHANNELSPERUSER" = "10"; # "NICKLEN" = "12"; +# "CHANNELLEN" = "200"; # "AVBANLEN" = "40"; # "MAXBANS" = "45"; # "MAXSILES" = "15"; Index: ircd-ircdev/include/channel.h diff -u ircd-ircdev/include/channel.h:1.12 ircd-ircdev/include/channel.h:1.13 --- ircd-ircdev/include/channel.h:1.12 Wed Jun 22 02:58:52 2005 +++ ircd-ircdev/include/channel.h Thu Sep 1 04:25:42 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Channel management and maintenance. - * @version $Id: channel.h,v 1.12 2005/06/22 09:58:52 zolty Exp $ + * @version $Id: channel.h,v 1.13 2005/09/01 11:25:42 zolty Exp $ */ #ifndef INCLUDED_channel_h #define INCLUDED_channel_h @@ -49,9 +49,6 @@ #define MODEBUFLEN 200 /**< Maximum length of a mode */ #define KEYLEN 23 /**< Maximum length of a key */ -#if defined(UNDERNET) -#define PASSLEN 23 /**< Maximum length of a password */ -#endif #define CHANNELLEN 200 /**< Maximum length of a channel */ #define MAXJOINARGS 15 /**< number of slots for join buffer */ @@ -305,8 +302,8 @@ unsigned int limit; char key[KEYLEN + 1]; #if defined(UNDERNET) - char upass[PASSLEN + 1]; - char apass[PASSLEN + 1]; + char upass[KEYLEN + 1]; + char apass[KEYLEN + 1]; #endif }; Index: ircd-ircdev/include/ircd_features.h diff -u ircd-ircdev/include/ircd_features.h:1.12 ircd-ircdev/include/ircd_features.h:1.13 --- ircd-ircdev/include/ircd_features.h:1.12 Sat Apr 2 11:47:34 2005 +++ ircd-ircdev/include/ircd_features.h Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Public interfaces and declarations for dealing with configurable features. - * @version $Id: ircd_features.h,v 1.12 2005/04/02 19:47:34 zolty Exp $ + * @version $Id: ircd_features.h,v 1.13 2005/09/01 11:25:42 zolty Exp $ */ #ifndef INCLUDED_features_h #define INCLUDED_features_h @@ -29,6 +29,8 @@ struct Client; struct StatDesc; +extern struct Client his; + /** Contains all feature settings for ircu. * For documentation of each, see doc/readme.features. */ @@ -66,6 +68,7 @@ FEAT_KILLCHASETIMELIMIT, FEAT_MAXCHANNELSPERUSER, FEAT_NICKLEN, + FEAT_AVBANLEN, FEAT_MAXBANS, FEAT_MAXSILES, @@ -83,6 +86,7 @@ FEAT_IPCHECK_CLONE_LIMIT, FEAT_IPCHECK_CLONE_PERIOD, FEAT_IPCHECK_CLONE_DELAY, + FEAT_CHANNELLEN, /* Some misc. default paths */ FEAT_MPATH, Index: ircd-ircdev/include/numeric.h diff -u ircd-ircdev/include/numeric.h:1.14 ircd-ircdev/include/numeric.h:1.15 --- ircd-ircdev/include/numeric.h:1.14 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/include/numeric.h Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Declarations of numeric replies and supporting functions. - * @version $Id: numeric.h,v 1.14 2005/06/22 07:54:29 zolty Exp $ + * @version $Id: numeric.h,v 1.15 2005/09/01 11:25:42 zolty Exp $ */ #ifndef INCLUDED_numeric_h #define INCLUDED_numeric_h @@ -467,8 +467,8 @@ #define ERR_CHANSECURED 562 /* Undernet extension */ #define ERR_UPASSSET 563 /* Undernet extension */ #define ERR_UPASSNOTSET 564 /* Undernet extension */ -#define ERR_NOMANAGER_LONG 565 /* Undernet extension */ -#define ERR_NOMANAGER_SHORT 566 /* Undernet extension */ +/* ERR_NOMANAGER_LONG 565 no longer used */ +#define ERR_NOMANAGER 566 /* Undernet extension */ #define ERR_UPASS_SAME_APASS 567 /* Undernet extension */ #define RPL_LOGON 600 /* Dalnet extension */ Index: ircd-ircdev/include/patchlevel.h diff -u ircd-ircdev/include/patchlevel.h:1.43 ircd-ircdev/include/patchlevel.h:1.44 --- ircd-ircdev/include/patchlevel.h:1.43 Sun Jul 3 13:21:41 2005 +++ ircd-ircdev/include/patchlevel.h Thu Sep 1 04:25:42 2005 @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: patchlevel.h,v 1.43 2005/07/03 20:21:41 zolty Exp $ + * $Id: patchlevel.h,v 1.44 2005/09/01 11:25:42 zolty Exp $ * */ -#define PATCHLEVEL ".alpha42" +#define PATCHLEVEL ".alpha43" #define RELEASE "1.0" Index: ircd-ircdev/include/s_conf.h diff -u ircd-ircdev/include/s_conf.h:1.12 ircd-ircdev/include/s_conf.h:1.13 --- ircd-ircdev/include/s_conf.h:1.12 Thu Apr 28 15:00:08 2005 +++ ircd-ircdev/include/s_conf.h Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file s_conf.h * @brief ircd configuration file API. - * @version $Id: s_conf.h,v 1.12 2005/04/28 22:00:08 zolty Exp $ + * @version $Id: s_conf.h,v 1.13 2005/09/01 11:25:42 zolty Exp $ */ #ifndef INCLUDED_s_conf_h #define INCLUDED_s_conf_h @@ -208,6 +208,7 @@ extern void lookup_confhost(struct ConfItem *aconf); extern void conf_parse_userhost(struct ConfItem *aconf, char *host); extern struct ConfItem *conf_debug_iline(const char *client); +extern void free_mapping(struct s_map *smap); extern void yyerror(const char *msg); Index: ircd-ircdev/include/supported.h diff -u ircd-ircdev/include/supported.h:1.8 ircd-ircdev/include/supported.h:1.9 --- ircd-ircdev/include/supported.h:1.8 Wed May 25 09:56:23 2005 +++ ircd-ircdev/include/supported.h Thu Sep 1 04:25:42 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: supported.h,v 1.8 2005/05/25 16:56:23 zolty Exp $ + * $Id: supported.h,v 1.9 2005/09/01 11:25:42 zolty Exp $ * */ #ifndef INCLUDED_supported_h @@ -37,6 +37,7 @@ */ #define FEATURES1 \ "AWAYLEN=%i" \ + " MAXCHANNELLEN=%i" \ " CHANNELLEN=%i" \ " MAXNICKLEN=%i" \ " NICKLEN=%i" \ @@ -71,12 +72,12 @@ " SAFELIST" -#define FEATURESVALUES1 AWAYLEN, CHANNELLEN, NICKLEN, feature_int(FEAT_NICKLEN), TOPICLEN +#define FEATURESVALUES1 AWAYLEN, CHANNELLEN, feature_int(FEAT_CHANNELLEN), NICKLEN, feature_int(FEAT_NICKLEN), TOPICLEN #if defined(DDB) || defined(SERVICES) -#define FEATURESVALUES2 "b,k,l,imnpstrRD", feature_bool(FEAT_LOCAL_CHANNELS) ? "#&" : "#", "(qov).@+", ".@+" +#define FEATURESVALUES2 "b,k,l,imnpstrRDd", feature_bool(FEAT_LOCAL_CHANNELS) ? "#&" : "#", "(qov).@+", ".@+" #else -#define FEATURESVALUES2 "b,k,l,imnpstRD", feature_bool(FEAT_LOCAL_CHANNELS) ? "#&" : "#", "(ov)@+", "@+" +#define FEATURESVALUES2 "b,k,l,imnpstRDd", feature_bool(FEAT_LOCAL_CHANNELS) ? "#&" : "#", "(ov)@+", "@+" #endif #define FEATURESVALUES3 feature_int(FEAT_MAXCHANNELSPERUSER), feature_int(FEAT_MAXBANS), \ Index: ircd-ircdev/include/sys.h diff -u ircd-ircdev/include/sys.h:1.4 ircd-ircdev/include/sys.h:1.5 --- ircd-ircdev/include/sys.h:1.4 Mon Jan 10 04:22:00 2005 +++ ircd-ircdev/include/sys.h Thu Sep 1 04:25:42 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: sys.h,v 1.4 2005/01/10 12:22:00 zolty Exp $ + * $Id: sys.h,v 1.5 2005/09/01 11:25:42 zolty Exp $ * */ #ifndef INCLUDED_sys_h @@ -31,13 +31,6 @@ */ #define MAXCLIENTS (MAXCONNECTIONS-24) -/* Define FD_SETSIZE to what we want before including sys/types.h on BSD */ -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__bsdi__) -#if ((!defined(USE_POLL)) && (!defined(FD_SETSIZE))) -#define FD_SETSIZE ((MAXCONNECTIONS)+4) -#endif -#endif - #define IRCD_MAX(a, b) ((a) > (b) ? (a) : (b)) #define IRCD_MIN(a, b) ((a) < (b) ? (a) : (b)) Index: ircd-ircdev/ircd/IPcheck.c diff -u ircd-ircdev/ircd/IPcheck.c:1.11 ircd-ircdev/ircd/IPcheck.c:1.12 --- ircd-ircdev/ircd/IPcheck.c:1.11 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/ircd/IPcheck.c Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Code to count users connected from particular IP addresses. - * @version $Id: IPcheck.c,v 1.11 2005/06/22 07:54:29 zolty Exp $ + * @version $Id: IPcheck.c,v 1.12 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" @@ -163,7 +163,7 @@ * For members that have a sensible default value, that is used. * @return Newly allocated registry entry. */ -static struct IPRegistryEntry* ip_registry_new_entry() +static struct IPRegistryEntry* ip_registry_new_entry(void) { struct IPRegistryEntry* entry = freeList; if (entry) Index: ircd-ircdev/ircd/channel.c diff -u ircd-ircdev/ircd/channel.c:1.24 ircd-ircdev/ircd/channel.c:1.25 --- ircd-ircdev/ircd/channel.c:1.24 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/ircd/channel.c Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Channel management and maintanance - * @version $Id: channel.c,v 1.24 2005/06/22 07:54:29 zolty Exp $ + * @version $Id: channel.c,v 1.25 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" @@ -267,23 +267,15 @@ #if defined(UNDERNET) chptr->users = 0; - /* - * Also channels without Apass set need to be kept alive, - * otherwise Bad Guys(tm) would be able to takeover - * existing channels too easily, and then set an Apass! - * However, if a channel without Apass becomes empty - * then we try to be kind to them and remove possible - * limiting modes. - */ - chptr->mode.mode &= ~MODE_INVITEONLY; - chptr->mode.limit = 0; - /* - * We do NOT reset a possible key or bans because when - * the 'channel owners' can't get in because of a key - * or ban then apparently there was a fight/takeover - * on the channel and we want them to contact IRC opers - * who then will educate them on the use of Apass/upass. - */ + /* There is a semantics problem here: Assuming no fragments across a + * split, a channel without Apass could be maliciously destroyed and + * recreated, and someone could set apass on the new instance. + * + * This could be fixed by preserving the empty non-Apass channel for + * the same time as if it had an Apass (but removing +i and +l), and + * reopping the first user to rejoin. However, preventing net rides + * requires a backwards-incompatible protocol change.. + */ if (!chptr->mode.apass[0]) /* If no Apass, destroy now. */ destruct_channel(chptr); @@ -477,7 +469,7 @@ member->user = who; member->channel = chptr; member->status = flags; - member->oplevel = oplevel; + SetOpLevel(member, oplevel); member->next_member = chptr->members; if (member->next_member) @@ -708,15 +700,16 @@ #if defined(UNDERNET) /* Discourage using the Apass to get op. They should use the upass. */ - if (IsChannelManager(member) && *member->channel->mode.upass) + if (IsChannelManager(member) && member->channel->mode.apass[0]) return 0; #endif if (IsVoicedOrOpped(member)) return 1; + /* * If it's moderated, and you aren't a privileged user, you can't - * speak. + * speak. */ if (member->channel->mode.mode & MODE_MODERATED) return 0; @@ -1255,9 +1248,10 @@ user = mask; host = ++ptr; } - else if (*ptr == '.') + else if (*ptr == '.' || *ptr == ':') { - /* Case 2: Found last '.' (without finding a '!' or '@' yet) */ + /* Case 2: Found character specific to IP or hostname (without + * finding a '!' or '@' yet) */ last_dot = ptr; continue; } @@ -1435,7 +1429,8 @@ int i; for (i = 0; cn[i]; i++) { - if (i >= CHANNELLEN || !IsChannelChar(cn[i])) { + if (i >= IRCD_MIN(CHANNELLEN, feature_int(FEAT_CHANNELLEN)) + || !IsChannelChar(cn[i])) { cn[i] = '\0'; return; } @@ -2588,14 +2583,24 @@ } } +/** Helper function to clean key-like parameters. */ +static void +clean_key(char *s) +{ + int t_len = KEYLEN; + + while (*s > ' ' && *s != ':' && *s != ',' && t_len--) + s++; + *s = '\0'; +} + /* * Helper function to convert keys */ static void mode_parse_key(struct ParseState *state, int *flag_p) { - char *t_str, *s; - int t_len; + char *t_str; if (MyUser(state->sptr) && state->max_args <= 0) /* drop if too many args */ return; @@ -2621,15 +2626,9 @@ return; state->done |= DONE_KEY; - t_len = KEYLEN; - /* clean up the key string */ - s = t_str; - while (*s > ' ' && *s != ':' && *s != ',' && t_len--) - s++; - *s = '\0'; - - if (!*t_str) { /* warn if empty */ + clean_key(t_str); + if (!*t_str || *t_str == ':') { /* warn if empty */ if (MyUser(state->sptr)) need_more_params(state->sptr, state->dir == MODE_ADD ? "MODE +k" : "MODE -k"); @@ -2683,8 +2682,7 @@ static void mode_parse_upass(struct ParseState *state, int *flag_p) { - char *t_str, *s; - int t_len; + char *t_str; if (MyUser(state->sptr) && state->max_args <= 0) /* drop if too many args */ return; @@ -2719,10 +2717,8 @@ if (*state->chptr->mode.apass) { send_reply(state->sptr, ERR_NOTMANAGER, state->chptr->chname, state->chptr->chname); - } else if (TStime() - state->chptr->creationtime >= 171000) { - send_reply(state->sptr, ERR_NOMANAGER_LONG, state->chptr->chname); } else { - send_reply(state->sptr, ERR_NOMANAGER_SHORT, state->chptr->chname); + send_reply(state->sptr, ERR_NOMANAGER, state->chptr->chname); } return; } @@ -2731,15 +2727,9 @@ return; state->done |= DONE_UPASS; - t_len = PASSLEN + 1; - /* clean up the upass string */ - s = t_str; - while (*++s > ' ' && *s != ':' && --t_len) - ; - *s = '\0'; - - if (!*t_str) { /* warn if empty */ + clean_key(t_str); + if (!*t_str || *t_str == ':') { /* warn if empty */ if (MyUser(state->sptr)) need_more_params(state->sptr, state->dir == MODE_ADD ? "MODE +U" : "MODE -U"); @@ -2784,7 +2774,7 @@ if (state->flags & MODE_PARSE_SET) { if (state->dir == MODE_ADD) /* set the new upass */ - ircd_strncpy(state->chptr->mode.upass, t_str, PASSLEN); + ircd_strncpy(state->chptr->mode.upass, t_str, KEYLEN); else /* remove the old upass */ *state->chptr->mode.upass = '\0'; } @@ -2796,8 +2786,8 @@ static void mode_parse_apass(struct ParseState *state, int *flag_p) { - char *t_str, *s; - int t_len; + struct Membership *memb; + char *t_str; if (MyUser(state->sptr) && state->max_args <= 0) /* drop if too many args */ return; @@ -2828,7 +2818,9 @@ } /* Don't allow to change the Apass if the channel is older than 48 hours. */ - if (TStime() - state->chptr->creationtime >= 172800 && !IsAnOper(state->sptr)) { + if (MyUser(state->sptr) + && TStime() - state->chptr->creationtime >= 172800 + && !IsAnOper(state->sptr)) { send_reply(state->sptr, ERR_CHANSECURED, state->chptr->chname); return; } @@ -2838,10 +2830,8 @@ if (*state->chptr->mode.apass) { send_reply(state->sptr, ERR_NOTMANAGER, state->chptr->chname, state->chptr->chname); - } else if (TStime() - state->chptr->creationtime >= 171000) { - send_reply(state->sptr, ERR_NOMANAGER_LONG, state->chptr->chname); } else { - send_reply(state->sptr, ERR_NOMANAGER_SHORT, state->chptr->chname); + send_reply(state->sptr, ERR_NOMANAGER, state->chptr->chname); } return; } @@ -2850,15 +2840,9 @@ return; state->done |= DONE_APASS; - t_len = PASSLEN + 1; - /* clean up the apass string */ - s = t_str; - while (*++s > ' ' && *s != ':' && --t_len) - ; - *s = '\0'; - - if (!*t_str) { /* warn if empty */ + clean_key(t_str); + if (!*t_str || *t_str == ':') { /* warn if empty */ if (MyUser(state->sptr)) need_more_params(state->sptr, state->dir == MODE_ADD ? "MODE +A" : "MODE -A"); @@ -2898,16 +2882,24 @@ if (state->flags & MODE_PARSE_SET) { if (state->dir == MODE_ADD) { /* set the new apass */ /* Make it VERY clear to the user that this is a one-time password */ - ircd_strncpy(state->chptr->mode.apass, t_str, PASSLEN); + ircd_strncpy(state->chptr->mode.apass, t_str, KEYLEN); if (MyUser(state->sptr)) { send_reply(state->sptr, RPL_APASSWARN_SET, state->chptr->mode.apass); send_reply(state->sptr, RPL_APASSWARN_SECRET, state->chptr->chname, state->chptr->mode.apass); } + /* Give the channel manager level 0 ops. */ + if (!(state->flags & MODE_PARSE_FORCE) && IsChannelManager(state->member)) + SetOpLevel(state->member, 0); } else { /* remove the old apass */ *state->chptr->mode.apass = '\0'; if (MyUser(state->sptr)) send_reply(state->sptr, RPL_APASSWARN_CLEAR); + /* Revert everyone to MAXOPLEVEL. */ + for (memb = state->chptr->members; memb; memb = memb->next_member) { + if (memb->status & MODE_CHANOP) + SetOpLevel(memb, MAXOPLEVEL); + } } } } @@ -3064,7 +3056,7 @@ newban->flags = ((state->dir == MODE_ADD) ? BAN_ADD : BAN_DEL) | (*flag_p == MODE_BAN ? 0 : BAN_EXCEPTION); set_ban_mask(newban, collapse(pretty_mask(t_str))); - ircd_strncpy(newban->who, cli_name(state->sptr), HOSTLEN); + ircd_strncpy(newban->who, IsUser(state->sptr) ? cli_name(state->sptr) : "*", NICKLEN); newban->when = TStime(); apply_ban(&state->chptr->banlist, newban, 0); } @@ -3294,14 +3286,14 @@ /* set op-level of member being opped */ if ((state->cli_change[i].flag & (MODE_ADD | MODE_CHANOP)) == (MODE_ADD | MODE_CHANOP)) { - /* If being opped by an outsider, get oplevel 0 for an apass + /* If being opped by an outsider, get oplevel 1 for an apass * channel, else MAXOPLEVEL. * Otherwise, if not an apass channel, or state->member has * MAXOPLEVEL, get oplevel MAXOPLEVEL. * Otherwise, get state->member's oplevel+1. */ if (!state->member) - SetOpLevel(member, state->chptr->mode.apass[0] ? 0 : MAXOPLEVEL); + SetOpLevel(member, state->chptr->mode.apass[0] ? 1 : MAXOPLEVEL); else if (!state->chptr->mode.apass[0] || OpLevel(state->member) == MAXOPLEVEL) SetOpLevel(member, MAXOPLEVEL); else @@ -3481,12 +3473,12 @@ #if defined(UNDERNET) case 'A': /* deal with Admin passes */ - if (feature_bool(FEAT_OPLEVELS)) + if (IsServer(cptr) || feature_bool(FEAT_OPLEVELS)) mode_parse_apass(&state, flag_p); break; case 'U': /* deal with user passes */ - if (feature_bool(FEAT_OPLEVELS)) + if (IsServer(cptr) || feature_bool(FEAT_OPLEVELS)) mode_parse_upass(&state, flag_p); break; #endif @@ -3703,10 +3695,11 @@ if (jbuf->jb_type != JOINBUF_TYPE_CREATE && !IsLocalChannel(chan->chname)) { #if defined(UNDERNET) - if (flags & CHFL_CHANOP) + if (flags & CHFL_CHANOP) { + assert(oplevel == 0 || oplevel == 1); sendcmdto_serv_butone(jbuf->jb_source, CMD_JOIN, jbuf->jb_connect, "%u:%H %Tu", oplevel, chan, chan->creationtime); - else + } else #elif defined(DDB) if (flags & CHFL_OWNER) sendcmdto_serv_butone(jbuf->jb_source, CMD_JOIN, jbuf->jb_connect, Index: ircd-ircdev/ircd/class.c diff -u ircd-ircdev/ircd/class.c:1.8 ircd-ircdev/ircd/class.c:1.9 --- ircd-ircdev/ircd/class.c:1.8 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/ircd/class.c Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Implementation of connection class handling functions. - * @version $Id: class.c,v 1.8 2005/06/22 07:54:29 zolty Exp $ + * @version $Id: class.c,v 1.9 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" @@ -104,7 +104,7 @@ MaxLinks(connClassList) = feature_int(FEAT_MAXIMUM_LINKS); MaxSendq(connClassList) = feature_int(FEAT_DEFAULTMAXSENDQLENGTH); connClassList->valid = 1; - Links(connClassList) = 0; + Links(connClassList) = 1; connClassList->next = 0; } @@ -260,7 +260,7 @@ for (cltmp = connClassList; cltmp; cltmp = cltmp->next) send_reply(sptr, RPL_STATSYLINE, 'Y', ConClass(cltmp), PingFreq(cltmp), ConFreq(cltmp), MaxLinks(cltmp), MaxSendq(cltmp), - Links(cltmp)); + Links(cltmp) - 1); } /** Return maximum SendQ length for a client. Index: ircd-ircdev/ircd/engine_epoll.c diff -u ircd-ircdev/ircd/engine_epoll.c:1.10 ircd-ircdev/ircd/engine_epoll.c:1.11 --- ircd-ircdev/ircd/engine_epoll.c:1.10 Sat May 7 15:23:40 2005 +++ ircd-ircdev/ircd/engine_epoll.c Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Linux epoll_*() event engine. - * @version $Id: engine_epoll.c,v 1.10 2005/05/07 22:23:40 zolty Exp $ + * @version $Id: engine_epoll.c,v 1.11 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" @@ -51,11 +51,7 @@ /* Oh, did we mention that some glibc releases do not even define the * syscall numbers? */ #if !defined(__NR_epoll_create) -#if defined(__i386__) -#define __NR_epoll_create 254 -#define __NR_epoll_ctl 255 -#define __NR_epoll_wait 256 -#elif defined(__ia64__) +#if defined(__ia64__) #define __NR_epoll_create 1243 #define __NR_epoll_ctl 1244 #define __NR_epoll_wait 1245 @@ -63,6 +59,34 @@ #define __NR_epoll_create 214 #define __NR_epoll_ctl 233 #define __NR_epoll_wait 232 +#elif defined(__sparc64__) || defined(__sparc__) +#define __NR_epoll_create 193 +#define __NR_epoll_ctl 194 +#define __NR_epoll_wait 195 +#elif defined(__s390__) || defined(__m68k__) +#define __NR_epoll_create 249 +#define __NR_epoll_ctl 250 +#define __NR_epoll_wait 251 +#elif defined(__ppc64__) || defined(__ppc__) +#define __NR_epoll_create 236 +#define __NR_epoll_ctl 237 +#define __NR_epoll_wait 238 +#elif defined(__parisc__) || defined(__arm26__) || defined(__arm__) +#define __NR_epoll_create 224 +#define __NR_epoll_ctl 225 +#define __NR_epoll_wait 226 +#elif defined(__alpha__) +#define __NR_epoll_create 407 +#define __NR_epoll_ctl 408 +#define __NR_epoll_wait 409 +#elif defined(__sh64__) +#define __NR_epoll_create 282 +#define __NR_epoll_ctl 283 +#define __NR_epoll_wait 284 +#elif defined(__i386__) || defined(__sh__) || defined(__m32r__) || defined(__h8300__) || defined(__frv__) +#define __NR_epoll_create 254 +#define __NR_epoll_ctl 255 +#define __NR_epoll_wait 256 #else /* cpu types */ #error No system call numbers defined for epoll family. #endif /* cpu types */ Index: ircd-ircdev/ircd/engine_select.c diff -u ircd-ircdev/ircd/engine_select.c:1.5 ircd-ircdev/ircd/engine_select.c:1.6 --- ircd-ircdev/ircd/engine_select.c:1.5 Mon Jan 10 04:22:58 2005 +++ ircd-ircdev/ircd/engine_select.c Thu Sep 1 04:25:42 2005 @@ -21,23 +21,23 @@ */ /** @file * @brief BSD sockets select() event engine. - * @version $Id: engine_select.c,v 1.5 2005/01/10 12:22:58 zolty Exp $ + * @version $Id: engine_select.c,v 1.6 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" -#include "ircd_events.h" - -#include "ircd.h" -#include "ircd_log.h" -#include "s_debug.h" - /* On BSD, define FD_SETSIZE to what we want before including sys/types.h */ #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__bsdi__) # if !defined(FD_SETSIZE) -# define FD_SETSIZE MAXCONNECTIONS +# define FD_SETSIZE ((MAXCONNECTIONS)+4) # endif #endif +#include "ircd_events.h" + +#include "ircd.h" +#include "ircd_log.h" +#include "s_debug.h" + /* #include <assert.h> -- Now using assert in ircd_log.h */ #include <errno.h> #include <string.h> /* needed for bzero() on OS X */ @@ -47,6 +47,20 @@ #include <time.h> #include <unistd.h> +#if FD_SETSIZE < (MAXCONNECTIONS + 4) +/* + * Sanity check + * + * All operating systems work when MAXCONNECTIONS <= 252. + * Most operating systems work when MAXCONNECTIONS <= 1020 and FD_SETSIZE is + * updated correctly in the system headers (on BSD systems sys/types.h might + * have abruptly redefined it so the check is still done), you might + * already need to recompile your kernel. + * For larger FD_SETSIZE your mileage may vary (kernel patches may be needed). + */ +# error FD_SETSIZE is too small or MAXCONNECTIONS too large. +#endif + #define SELECT_ERROR_THRESHOLD 20 /**< after 20 select errors, restart */ #define ERROR_EXPIRE_TIME 3600 /**< expire errors after an hour */ Index: ircd-ircdev/ircd/gline.c diff -u ircd-ircdev/ircd/gline.c:1.14 ircd-ircdev/ircd/gline.c:1.15 --- ircd-ircdev/ircd/gline.c:1.14 Fri Apr 22 09:22:13 2005 +++ ircd-ircdev/ircd/gline.c Thu Sep 1 04:25:42 2005 @@ -23,7 +23,7 @@ */ /** @file * @brief Implementation of Gline manipulation functions. - * @version $Id: gline.c,v 1.14 2005/04/22 16:22:13 zolty Exp $ + * @version $Id: gline.c,v 1.15 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" @@ -404,7 +404,12 @@ /* uh, what to do here? */ /* The answer, my dear Watson, is we throw a protocol_violation() -- hikari */ - return protocol_violation(sptr,"%s has been smoking the sweet leaf and sent me a whacky gline",cli_name(sptr)); + if (IsServer(cptr)) + return protocol_violation(sptr,"%s has been smoking the sweet leaf and sent me a whacky gline",cli_name(sptr)); + else { + sendto_opmask_butone(NULL, SNO_GLINE, "%s has been smoking the sweet leaf and sent me a whacky gline", cli_name(sptr)); + return 0; + } break; } user = (*userhost =='$' ? userhost : userhost+2); Index: ircd-ircdev/ircd/ircd.c diff -u ircd-ircdev/ircd/ircd.c:1.20 ircd-ircdev/ircd/ircd.c:1.21 --- ircd-ircdev/ircd/ircd.c:1.20 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/ircd/ircd.c Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Entry point and other initialization functions for the daemon. - * @version $Id: ircd.c,v 1.20 2005/06/22 07:54:29 zolty Exp $ + * @version $Id: ircd.c,v 1.21 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" @@ -495,6 +495,9 @@ #ifdef USE_DEVPOLL printf("/dev/poll "); #endif +#ifdef USE_EPOLL + printf("epoll_*() "); +#endif #ifdef USE_POLL printf("poll()"); #else Index: ircd-ircdev/ircd/ircd_auth.c diff -u ircd-ircdev/ircd/ircd_auth.c:1.7 ircd-ircdev/ircd/ircd_auth.c:1.8 --- ircd-ircdev/ircd/ircd_auth.c:1.7 Sun Jul 3 13:21:42 2005 +++ ircd-ircdev/ircd/ircd_auth.c Thu Sep 1 04:25:42 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief IAuth client implementation for an IRC server. - * @version $Id: ircd_auth.c,v 1.7 2005/07/03 20:21:42 zolty Exp $ + * @version $Id: ircd_auth.c,v 1.8 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" #include "client.h" @@ -367,7 +367,7 @@ assert(format != 0); vd.vd_format = format; va_start(vd.vd_args, format); - sendwallto_group_butone(&me, WALL_DESYNCH, NULL, "IAuth protocol violation: %v", &vd); + sendto_opmask_butone(NULL, SNO_CONNEXIT, "IAuth protocol violation: %v", &vd); va_end(vd.vd_args); } Index: ircd-ircdev/ircd/ircd_features.c diff -u ircd-ircdev/ircd/ircd_features.c:1.14 ircd-ircdev/ircd/ircd_features.c:1.15 --- ircd-ircdev/ircd/ircd_features.c:1.14 Sat Apr 2 11:47:35 2005 +++ ircd-ircdev/ircd/ircd_features.c Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Implementation of configurable feature support. - * @version $Id: ircd_features.c,v 1.14 2005/04/02 19:47:35 zolty Exp $ + * @version $Id: ircd_features.c,v 1.15 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" @@ -323,6 +323,7 @@ F_I(IPCHECK_CLONE_LIMIT, 0, 4, 0), F_I(IPCHECK_CLONE_PERIOD, 0, 40, 0), F_I(IPCHECK_CLONE_DELAY, 0, 600, 0), + F_I(CHANNELLEN, 0, 200, 0), /* Some misc. default paths */ F_S(MPATH, FEAT_CASE | FEAT_MYOPER, "ircd.motd", motd_init), Index: ircd-ircdev/ircd/ircd_log.c diff -u ircd-ircdev/ircd/ircd_log.c:1.11 ircd-ircdev/ircd/ircd_log.c:1.12 --- ircd-ircdev/ircd/ircd_log.c:1.11 Mon May 16 03:17:27 2005 +++ ircd-ircdev/ircd/ircd_log.c Thu Sep 1 04:25:42 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief IRC logging implementation. - * @version $Id: ircd_log.c,v 1.11 2005/05/16 10:17:27 zolty Exp $ + * @version $Id: ircd_log.c,v 1.12 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" @@ -198,10 +198,8 @@ { /* only open the file if we haven't already */ if (lf && lf->fd < 0) { - alarm(3); /* if NFS hangs, we hang only for 3 seconds */ lf->fd = open(lf->file, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR); - alarm(0); } } Index: ircd-ircdev/ircd/ircd_parser.y diff -u ircd-ircdev/ircd/ircd_parser.y:1.21 ircd-ircdev/ircd/ircd_parser.y:1.22 --- ircd-ircdev/ircd/ircd_parser.y:1.21 Mon May 16 04:22:50 2005 +++ ircd-ircdev/ircd/ircd_parser.y Thu Sep 1 04:25:42 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: ircd_parser.y,v 1.21 2005/05/16 11:22:50 zolty Exp $ + * $Id: ircd_parser.y,v 1.22 2005/09/01 11:25:42 zolty Exp $ * */ %{ @@ -262,11 +262,14 @@ jupenick: NICK '=' QSTRING ';' { addNickJupes($3); - MyFree($3); -}; + MyFree($3);}; -generalblock: GENERAL '{' generalitems '}' ';' +generalblock: GENERAL { + /* Zero out the vhost addresses, in case they were removed. */ + memset(&VirtualHost_v4.addr, 0, sizeof(VirtualHost_v4.addr)); + memset(&VirtualHost_v6.addr, 0, sizeof(VirtualHost_v6.addr)); +} '{' generalitems '}' ';' { if (localConf.name == NULL) parse_error("Your General block must contain a name."); if (localConf.numeric == 0) @@ -305,8 +308,11 @@ generalvhost: VHOST '=' QSTRING ';' { struct irc_in_addr addr; - if (!ircd_aton(&addr, $3)) - parse_error("Invalid virtual host '%s'.", $3); + if (!strcmp($3, "*")) { + /* This traditionally meant bind to all interfaces and connect + * from the default. */ + } else if (!ircd_aton(&addr, $3)) + parse_error("Invalid virtual host '%s'.", $3); else if (irc_in_addr_is_ipv4(&addr)) memcpy(&VirtualHost_v4.addr, &addr, sizeof(addr)); else @@ -955,16 +961,7 @@ } else { - struct nick_host *nh, *next; - for (nh = smap->services; nh; nh = next) - { - next = nh->next; - MyFree(nh); - } - MyFree(smap->name); - MyFree(smap->command); - MyFree(smap->prepend); - MyFree(smap); + free_mapping(smap); } smap = NULL; }; Index: ircd-ircdev/ircd/listener.c diff -u ircd-ircdev/ircd/listener.c:1.8 ircd-ircdev/ircd/listener.c:1.9 --- ircd-ircdev/ircd/listener.c:1.8 Mon Jan 10 04:23:01 2005 +++ ircd-ircdev/ircd/listener.c Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Implementation for handling listening sockets. - * @version $Id: listener.c,v 1.8 2005/01/10 12:23:01 zolty Exp $ + * @version $Id: listener.c,v 1.9 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" @@ -333,7 +333,7 @@ } /** Close all inactive listeners. */ -void close_listeners() +void close_listeners(void) { struct Listener* listener; struct Listener* listener_next = 0; Index: ircd-ircdev/ircd/m_burst.c diff -u ircd-ircdev/ircd/m_burst.c:1.12 ircd-ircdev/ircd/m_burst.c:1.13 --- ircd-ircdev/ircd/m_burst.c:1.12 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/ircd/m_burst.c Thu Sep 1 04:25:42 2005 @@ -19,7 +19,7 @@ * 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_burst.c,v 1.12 2005/06/22 07:54:29 zolty Exp $ + * $Id: m_burst.c,v 1.13 2005/09/01 11:25:42 zolty Exp $ * */ @@ -548,7 +548,7 @@ member->status |= CHFL_BURST_ALREADY_VOICED; /* Synchronize with the burst. */ member->status |= CHFL_BURST_JOINED | (current_mode & (CHFL_CHANOP|CHFL_VOICE)); - member->oplevel = oplevel; + SetOpLevel(member, oplevel); } Index: ircd-ircdev/ircd/m_join.c diff -u ircd-ircdev/ircd/m_join.c:1.12 irc... [truncated message content] |