Thread: [IRC-Dev CVS] [CVS] Module ircdh: Change committed
Brought to you by:
zolty
From: Zolty <zo...@us...> - 2002-10-24 09:59:52
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2002-10-24 09:59:51 UTC Added files: ircd/m_admin.c ircd/m_rename.c Log message: 2002-10-24 Toni Garcia <zo...@ir...> 1.0.alpha10 Faltaban 2 archivos :) ---------------------- diff included ---------------------- Index: ircdh/ircd/m_admin.c diff -u /dev/null ircdh/ircd/m_admin.c:1.1 --- /dev/null Thu Oct 24 02:59:51 2002 +++ ircdh/ircd/m_admin.c Thu Oct 24 02:59:41 2002 @@ -0,0 +1,170 @@ +/* + * IRC - Internet Relay Chat, ircd/m_admin.c + * Copyright (C) 1990 Jarkko Oikarinen and + * University of Oulu, Computing Center + * + * See file AUTHORS in IRC package for additional names of + * the programmers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 1, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * $Id: m_admin.c,v 1.1 2002/10/24 09:59:41 zolty Exp $ + */ + +/* + * m_functions execute protocol messages on this server: + * + * cptr is always NON-NULL, pointing to a *LOCAL* client + * structure (with an open socket connected!). This + * identifies the physical socket where the message + * originated (or which caused the m_function to be + * executed--some m_functions may call others...). + * + * sptr is the source of the message, defined by the + * prefix part of the message if present. If not + * or prefix not found, then sptr==cptr. + * + * (!IsServer(cptr)) => (cptr == sptr), because + * prefixes are taken *only* from servers... + * + * (IsServer(cptr)) + * (sptr == cptr) => the message didn't + * have the prefix. + * + * (sptr != cptr && IsServer(sptr) means + * the prefix specified servername. (?) + * + * (sptr != cptr && !IsServer(sptr) means + * that message originated from a remote + * user (not local). + * + * combining + * + * (!IsServer(sptr)) means that, sptr can safely + * taken as defining the target structure of the + * message in this server. + * + * *Always* true (if 'parse' and others are working correct): + * + * 1) sptr->from == cptr (note: cptr->from == cptr) + * + * 2) MyConnect(sptr) <=> sptr == cptr (e.g. sptr + * *cannot* be a local connection, unless it's + * actually cptr!). [MyConnect(x) should probably + * be defined as (x == x->from) --msa ] + * + * parc number of variable parameter strings (if zero, + * parv is allowed to be NULL) + * + * parv a NULL terminated list of parameter pointers, + * + * parv[0], sender (prefix string), if not present + * this points to an empty string. + * parv[1]...parv[parc-1] + * pointers to additional parameters + * parv[parc] == NULL, *always* + * + * note: it is guaranteed that parv[0]..parv[parc-1] are all + * non-NULL pointers. + */ +#include "client.h" +#include "ircd.h" +#include "ircd_reply.h" +#include "msg.h" +#include "numeric.h" +#include "numnicks.h" +#include "s_conf.h" +#include "s_user.h" +#include "send.h" + +#include <assert.h> + +/* + * m_admin - generic message handler + * + * parv[0] = sender prefix + * parv[1] = servername + */ +int m_admin(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) +{ + assert(0 != cptr); + assert(cptr == sptr); + + if (parc > 1) + { + sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, sptr->name); + return 0; + } + + return send_admin_info(sptr, find_admin()); +} + +#define HEAD_IN_SAND_REMOTE 0 /* Provisional */ +/* + * mo_admin - oper message handler + * + * parv[0] = sender prefix + * parv[1] = servername + */ +int mo_admin(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) +{ + assert(0 != cptr); + assert(cptr == sptr); + + if (parc > 1) + { + struct Client *acptr; + if (!(acptr = find_match_server(parv[1]))) + return send_error_to_client(sptr, ERR_NOSUCHSERVER, parv[1]); + + parv[1] = acptr->name; +#ifdef P09_SUPPORT + if (hunt_server(HEAD_IN_SAND_REMOTE, cptr, sptr, ":%s " MSG_ADMIN " :%s", + 1, parc, parv) != HUNTED_ISME) +#else + if (hunt_server(HEAD_IN_SAND_REMOTE, cptr, sptr, "%s%s " TOK_ADMIN " :%s", + 1, parc, parv) != HUNTED_ISME) +#endif + return 0; + } + return send_admin_info(sptr, find_admin()); +} + + +/* + * ms_admin - server message handler + * + * parv[0] = sender prefix + * parv[1] = servername + */ +int ms_admin(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) +{ + assert(0 != cptr); + assert(0 != sptr); + + if (parc < 2) + return 0; + +#ifdef P09_SUPPORT + if (hunt_server(0, cptr, sptr, ":%s " MSG_ADMIN " :%s", 1, parc, + parv) != HUNTED_ISME) +#else + if (hunt_server(0, cptr, sptr, "%s%s " TOK_ADMIN " :%s", 1, parc, + parv) != HUNTED_ISME) +#endif + return 0; + + return send_admin_info(sptr, find_admin()); +} Index: ircdh/ircd/m_rename.c diff -u /dev/null ircdh/ircd/m_rename.c:1.1 --- /dev/null Thu Oct 24 02:59:51 2002 +++ ircdh/ircd/m_rename.c Thu Oct 24 02:59:41 2002 @@ -0,0 +1,237 @@ +/* + * IRC - Internet Relay Chat, ircd/m_rename.c + * Copyright (C) 2000 IRC-Hispano.org - ESNET - jcea + * + * See file AUTHORS in IRC package for additional names of + * the programmers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 1, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * $Id: m_rename.c,v 1.1 2002/10/24 09:59:41 zolty Exp $ + */ + +/* + * m_functions execute protocol messages on this server: + * + * cptr is always NON-NULL, pointing to a *LOCAL* client + * structure (with an open socket connected!). This + * identifies the physical socket where the message + * originated (or which caused the m_function to be + * executed--some m_functions may call others...). + * + * sptr is the source of the message, defined by the + * prefix part of the message if present. If not + * or prefix not found, then sptr==cptr. + * + * (!IsServer(cptr)) => (cptr == sptr), because + * prefixes are taken *only* from servers... + * + * (IsServer(cptr)) + * (sptr == cptr) => the message didn't + * have the prefix. + * + * (sptr != cptr && IsServer(sptr) means + * the prefix specified servername. (?) + * + * (sptr != cptr && !IsServer(sptr) means + * that message originated from a remote + * user (not local). + * + * combining + * + * (!IsServer(sptr)) means that, sptr can safely + * taken as defining the target structure of the + * message in this server. + * + * *Always* true (if 'parse' and others are working correct): + * + * 1) sptr->from == cptr (note: cptr->from == cptr) + * + * 2) MyConnect(sptr) <=> sptr == cptr (e.g. sptr + * *cannot* be a local connection, unless it's + * actually cptr!). [MyConnect(x) should probably + * be defined as (x == x->from) --msa ] + * + * parc number of variable parameter strings (if zero, + * parv is allowed to be NULL) + * + * parv a NULL terminated list of parameter pointers, + * + * parv[0], sender (prefix string), if not present + * this points to an empty string. + * parv[1]...parv[parc-1] + * pointers to additional parameters + * parv[parc] == NULL, *always* + * + * note: it is guaranteed that parv[0]..parv[parc-1] are all + * non-NULL pointers. + */ +#include "client.h" + +#include <assert.h> + +#ifdef BDD +int m_rename(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) +{ + char buf[NICKLEN + 2]; + char buf2[NICKLEN + 1024]; + aClient *acptr; + aClient *bcptr; + char nick[NICKLEN + 2]; + + if (!IsServer(cptr) || !IsServer(sptr) || parc != 2) + return 0; + + if (!find_conf_host(cptr->confs, sptr->name, CONF_UWORLD) + || (sptr->from != cptr)) + { + sendto_serv_butone(cptr, + ":%s DESYNC :HACK(4): El nodo '%s' dice que '%s' solicita " + "cambio de nick para '%s'", me.name, cptr->name, sptr->name, parv[1]); + sendto_op_mask(SNO_HACK4 | SNO_SERVKILL | SNO_RENAME | SNO_RENAME2, + "HACK(4): El nodo '%s' dice que '%s' solicita " + "cambio de nick para '%s'", cptr->name, sptr->name, parv[1]); + return 0; + } + +#ifdef P09_SUPPORT + sendto_serv_butone(cptr, ":%s RENAME :%s", sptr->name, parv[1]); + sendto_serv_butone(cptr, ":%s RENAME :%s", sptr->name, parv[1]); +#else + sendto_serv_butone(cptr, ":%s RENAME :%s", sptr -, parv[1]); +#endif + + sendto_op_mask(SNO_RENAME, + "El nodo '%s' solicita un cambio de nick para '%s'", sptr->name, parv[1]); + + strncpy(buf, parv[1], sizeof(buf)); + buf[sizeof(buf) - 1] = '\0'; + + if (!do_nick_name(buf)) + return 0; + + if (FindServer(buf)) + return 0; + + acptr = FindClient(buf); + + if (!acptr || !MyConnect(acptr)) + return 0; + + { + unsigned int v[2], k[2], x[2]; + + k[0] = k[1] = x[0] = x[1] = 0; + + v[0] = base64toint(acptr->yxx); + v[1] = base64toint(me.yxx); + + bcptr = acptr; + + do + { + tea(v, k, x); + v[1] += 4096; +/* +** El 'if' que sigue lo necesitamos +** para que todos los valores tengan +** la misma probabilidad. +*/ + if (x[0] >= 4294000000ul) + continue; + sprintf_irc(nick, "inv%.6d", (int)(x[0] % 1000000)); + bcptr = FindClient(nick); + } + while (bcptr); + } + + sendto_op_mask(SNO_RENAME | SNO_RENAME2, + "Cambiamos el nick '%s' a '%s', a peticion del nodo '%s'", parv[1], nick, + sptr->name); + + { + static void send_umode_out(struct Client *a, struct Client *b, int c, int d, + int e); + int of, oh; + + of = acptr->flags; + oh = acptr->hmodes; + + if (IsNickRegistered(acptr) || IsNickSuspended(acptr)) + { /* Parche DB69 */ + ClearNickRegistered(acptr); + ClearNickSuspended(acptr); + ClearHelpOp(acptr); +#if defined(BDD) && defined(BDD_VIP) +#if !defined(BDD_VIP2) + if (MyConnect(acptr)) + { + if (!db_buscar_registro(BDD_IPVIRTUAL2DB, acptr->name) + && !db_buscar_registro(BDD_IPVIRTUALDB, acptr->name)) + { + ClearHidden(acptr); + } + } +#endif +#endif + if (!IsAnOper(acptr)) + ClearHiddenViewer(acptr); + send_umode_out(cptr, acptr, of, oh, IsRegistered(acptr)); + } + } + + acptr->lastnick = now; + + /* Esto manda una copia al propio usuario */ + sendto_common_channels(acptr, ":%s " MSG_NICK " :%s", acptr->name, nick); + add_history(acptr, 1); + +#ifdef P09_SUPPORT + sendto_lowprot_butone(cptr, 9, + ":%s " MSG_NICK " %s " TIME_T_FMT, acptr->name, nick, acptr->lastnick); + sendto_highprot_butone(cptr, 10, + "%s%s " MSG_NICK " %s " TIME_T_FMT, NumNick(acptr), nick, + acptr->lastnick); +#else + sendto_serv_butone(cptr, + "%s%s " TOK_NICK " %s " TIME_T_FMT, NumNick(acptr), nick, + acptr->lastnick); +#endif + + if (acptr->name[0]) + { + hRemClient(acptr); + /* + * Avisamos a sus contactos que el nick + * ha salido (ha cambiado de nick). + */ + chequea_estado_watch(acptr, RPL_LOGOFF, NULL, NULL); + + } + strcpy(acptr->name, nick); + hAddClient(acptr); + +#ifdef BDD_VIP + acptr->user->virtualhost[0] = '\0'; +#endif + /* + * Avisamos a sus contactos que el nick + * ha entrado (ha cambiado de nick). + */ + chequea_estado_watch(acptr, RPL_LOGON, NULL, NULL); + + return 0; +} +#endif ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2002-12-01 00:34:19
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2002-12-01 00:34:17 UTC Modified files: ChangeLog configure config/config-sh.in include/client.h include/ircd_xopen.h include/patchlevel.h include/s_bdd.h include/s_user.h include/struct.h include/whowas.h ircd/IPcheck.c ircd/Makefile.in ircd/channel.c ircd/hash.c ircd/ircd.c ircd/m_bmode.c ircd/m_db.c ircd/m_dbq.c ircd/m_ghost.c ircd/m_join.c ircd/m_kick.c ircd/m_kill.c ircd/m_mode.c ircd/m_nick.c ircd/m_oper.c ircd/m_rename.c ircd/m_server.c ircd/m_stats.c ircd/m_userhost.c ircd/m_userip.c ircd/m_watch.c ircd/m_who.c ircd/packet.c ircd/parse.c ircd/s_auth.c ircd/s_bdd.c ircd/s_bsd.c ircd/s_conf.c ircd/s_debug.c ircd/s_serv.c ircd/s_user.c ircd/watch.c Log message: 2001-12-01 Toni Garcia <zo...@ir...> 1.0.alpha11 * ircd/s_debug.c: Eliminadas opciones de version en desuso. * ircd/packet.c: Por un bug gordo encontrado, pongo el packet.c original mientras se arregla el bug. * ircd/m_{userhost|userip}.c: Ampliacion del user*_formatter, para que muestre una u otra cosa si tienes +X o no. * ircd/m_nick.c: Adaptacion del soporte autoghost nick!. * ircd/{channel|m_bmode|m_ghost|m_join|m_mode|m_rename}.c: Adaptacion y normalizacion de funciones BDD. * ircd/IPcheck.c: He dejado la adaptacion, sin acabar, del soporte de clones mediante BDD, por este causa, la dejo oculta en el make config. * {include|ircd}/s_user.{h|c}: Se reescribe y se adapta el codigo del sistema de autentificacion de nicks mediante la BDD. * ircd/m_{db|dbq}.c: Se adapta y normaliza todo el codigo y agregar soporte P09. * {include|ircd}/s_bdd.{h|c}: Se reescriben todas las funciones normalizando mas o menos el codigo con el tal de mantener una uniformidad del codigo. Agregado soporte P09. * {include|ircd}/ircd_tea.{h|c}: Se agregan funciones ircd_tea y ircd_untea de encriptacion/desencriptacion. ---------------------- diff included ---------------------- Index: ircdh/ChangeLog diff -u ircdh/ChangeLog:1.5 ircdh/ChangeLog:1.6 --- ircdh/ChangeLog:1.5 Thu Oct 24 02:57:49 2002 +++ ircdh/ChangeLog Sat Nov 30 16:34:06 2002 @@ -1,3 +1,33 @@ +2001-12-01 Toni Garcia <zo...@ir...> 1.0.alpha11 + * ircd/s_debug.c: Eliminadas opciones de version en desuso. + + * ircd/packet.c: Por un bug gordo encontrado, pongo el packet.c original + mientras se arregla el bug. + + * ircd/m_{userhost|userip}.c: Ampliacion del user*_formatter, para que + muestre una u otra cosa si tienes +X o no. + + * ircd/m_nick.c: Adaptacion del soporte autoghost nick!. + + * ircd/{channel|m_bmode|m_ghost|m_join|m_mode|m_rename}.c: Adaptacion y + normalizacion de funciones BDD. + + * ircd/IPcheck.c: He dejado la adaptacion, sin acabar, del soporte de clones + mediante BDD, por este causa, la dejo oculta en el make config. + + * {include|ircd}/s_user.{h|c}: Se reescribe y se adapta el codigo del sistema + de autentificacion de nicks mediante la BDD. + Hago que se meta a los helpers con HANDLER de Oper. Comprobar que funciona. + + * ircd/m_{db|dbq}.c: Se adapta y normaliza todo el codigo y agregar soporte P09. + + * {include|ircd}/s_bdd.{h|c}: Se reescriben todas las funciones normalizando + mas o menos el codigo con el tal de mantener una uniformidad del codigo. + Agregado soporte P09. + + * {include|ircd}/ircd_tea.{h|c}: Se agregan funciones ircd_tea y ircd_untea + de encriptacion/desencriptacion. + 2002-10-24 Toni Garcia <zo...@ir...> 1.0.alpha10 Completada la migracion al u2.10.10. Las preguntas en el makeconfig sobre BDD y P09_SUPPORT han sido ocultas al estar incompletas. En el proximo Index: ircdh/config/config-sh.in diff -u ircdh/config/config-sh.in:1.6 ircdh/config/config-sh.in:1.7 --- ircdh/config/config-sh.in:1.6 Thu Oct 24 02:57:51 2002 +++ ircdh/config/config-sh.in Sat Nov 30 16:34:06 2002 @@ -368,26 +368,25 @@ mainmenu_option next_comment comment 'Mandatory defines (you should leave these untouched)' -# bool 'HISPANO/ESNET: Distributed DataBase Support' BDD y - # if [ "$BDD" = "y" ]; then - # eval DBPATH_DEFAULT="database" - # string 'HISPANO/ESNET: Directory where distributed database resides' DBPATH $DBPATH_DEFAULT + bool 'HISPANO/ESNET: Distributed DataBase Support' BDD y + if [ "$BDD" = "y" ]; then + eval DBPATH_DEFAULT="database" + string 'HISPANO/ESNET: Directory where distributed database resides' DBPATH $DBPATH_DEFAULT # bool 'HISPANO/ESNET: Distributed Clone Control support' BDD_CLONES y - # bool 'HISPANO/ESNET: CHAN_DB features (join # FUNDADOR, modeX)' BDD_CHAN_HACK y - # bool 'HISPANO/ESNET: OPER_DB features (join # OPER, modeX)' BDD_OPER_HACK y - # if [ "$BDD_OPER_HACK" = "y" ]; then - # # bool 'HISPANO/ESNET: OPER_DB features only on registered (CHAN_DB) channels' BDD_OPER_HACK_ONLYREG n - # bool 'HISPANO/ESNET: OPER_DB members can be Chanserv (+k)' BDD_OPER_HACK_KMODE y - # fi - # bool 'HISPANO/ESNET: Soporte para la ocultacion de IPs' BDD_VIP y - # if [ "$BDD_VIP" = "y" ]; then - # bool 'HISPANO/ESNET: Ignorar el flag "+x" a menos que el usuario este en la tabla "v" o "w"' BDD_VIP3 n - # if [ "$BDD_VIP3" = "n" ]; then - # bool 'HISPANO/ESNET: Ocultación de IP de TODOS los usuarios' BDD_VIP2 y - # fi - # fi - # bool 'HISPANO/ESNET: Proteccion contra Wingates y Socks4 proxies' PROXY_PROTECTION y - # fi + bool 'HISPANO/ESNET: CHAN_DB features (join # FUNDADOR, modeX)' BDD_CHAN_HACK y + bool 'HISPANO/ESNET: OPER_DB features (join # OPER, modeX)' BDD_OPER_HACK y + if [ "$BDD_OPER_HACK" = "y" ]; then + # bool 'HISPANO/ESNET: OPER_DB features only on registered (CHAN_DB) channels' BDD_OPER_HACK_ONLYREG n + bool 'HISPANO/ESNET: OPER_DB members can be Chanserv (+k)' BDD_OPER_HACK_KMODE y + fi + bool 'HISPANO/ESNET: Soporte para la ocultacion de IPs' BDD_VIP y + if [ "$BDD_VIP" = "y" ]; then + bool 'HISPANO/ESNET: Ignorar el flag "+x" a menos que el usuario este en la tabla "v" o "w"' BDD_VIP3 n + if [ "$BDD_VIP3" = "n" ]; then + bool 'HISPANO/ESNET: Ocultación de IP de TODOS los usuarios' BDD_VIP2 y + fi + fi + fi bool 'HISPANO/ESNET: XMODE Networking' XMODE_ESNET y # bool 'HISPANO/ESNET: Dinamic Negotiation link-by-link' ESNET_NEG y # if [ "$ESNET_NEG" = "y" ]; then Index: ircdh/configure diff -u ircdh/configure:1.2 ircdh/configure:1.3 --- ircdh/configure:1.2 Sun Aug 18 15:49:41 2002 +++ ircdh/configure Sat Nov 30 16:34:06 2002 @@ -15,8 +15,12 @@ cd zlib ./configure echo -echo ATENCION: En este ircd se esta haciendo una limpieza de sources, con lo -echo que implica que puede que no se compile bajo ciertas maquinas o que se -echo compila pero sale "warnings". +echo ATENCION: Este IRCD es una version ALPHA con lo que implica +echo que puede que no se compile bajo ciertas maquinas o que se +echo compila pero sale "warnings". O que se surjan cosas raras +echo o bugs. +echo +echo Si encuentras bugs, se agradeceria mucho que lo avises al mail +echo zo...@ir... o en la lista irc...@li... echo echo Estamos trabajando en ello. IRC-Dev.Net 2002 Index: ircdh/include/client.h diff -u ircdh/include/client.h:1.1 ircdh/include/client.h:1.2 --- ircdh/include/client.h:1.1 Thu Oct 24 02:57:51 2002 +++ ircdh/include/client.h Sat Nov 30 16:34:06 2002 @@ -18,10 +18,13 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * - * $Id: client.h,v 1.1 2002/10/24 09:57:51 zolty Exp $ + * $Id: client.h,v 1.2 2002/12/01 00:34:06 zolty Exp $ */ #ifndef INCLUDED_client_h #define INCLUDED_client_h +#ifndef INCLUDED_config_h +#include "config.h" +#endif #ifndef INCLUDED_sys_types_h #include <sys/types.h> /* time_t, size_t */ #define INCLUDED_sys_types_h Index: ircdh/include/ircd_xopen.h diff -u ircdh/include/ircd_xopen.h:1.1 ircdh/include/ircd_xopen.h:1.2 --- ircdh/include/ircd_xopen.h:1.1 Thu Oct 24 02:57:51 2002 +++ ircdh/include/ircd_xopen.h Sat Nov 30 16:34:06 2002 @@ -1,12 +1,11 @@ /* * ircd_xopen.h * - * $Id: ircd_xopen.h,v 1.1 2002/10/24 09:57:51 zolty Exp $ + * $Id: ircd_xopen.h,v 1.2 2002/12/01 00:34:06 zolty Exp $ */ #ifndef INCLUDED_ircd_xopen_h #define INCLUDED_ircd_xopen_h extern const char *ircd_crypt(const char *key, const char *salt); -extern void ircd_tea(unsigned int v[], unsigned int k[], unsigned int x[]); #endif /* INCLUDED_ircd_xopen_h */ Index: ircdh/include/patchlevel.h diff -u ircdh/include/patchlevel.h:1.5 ircdh/include/patchlevel.h:1.6 --- ircdh/include/patchlevel.h:1.5 Thu Oct 24 02:57:51 2002 +++ ircdh/include/patchlevel.h Sat Nov 30 16:34:06 2002 @@ -15,11 +15,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: patchlevel.h,v 1.5 2002/10/24 09:57:51 zolty Exp $ + * $Id: patchlevel.h,v 1.6 2002/12/01 00:34:06 zolty Exp $ * */ -#define PATCHLEVEL ".alpha10" +#define PATCHLEVEL ".alpha11" #define RELEASE "1.0" Index: ircdh/include/s_bdd.h diff -u ircdh/include/s_bdd.h:1.2 ircdh/include/s_bdd.h:1.3 --- ircdh/include/s_bdd.h:1.2 Thu Oct 24 02:57:51 2002 +++ ircdh/include/s_bdd.h Sat Nov 30 16:34:06 2002 @@ -15,53 +15,99 @@ * 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: s_bdd.h,v 1.3 2002/12/01 00:34:06 zolty Exp $ */ +#ifndef INCLUDED_s_bdd_h +#define INCLUDED_s_bdd_h +#ifndef INCLUDED_config_h +#include "config.h" +#endif + +#ifdef BDD -#ifndef S_BDD_H -#define S_BDD_H +struct Client; +/* + * General defines + */ +/* + * Las tablas con los registros, serie, version ... + */ +#define BDD_TABLE_MAX 256 + +/* + * Defines de las tablas de la BDD + */ +#define BDD_INIT 'a' /* Primera Tabla */ +#define BDD_BOTSDB 'b' /* Tabla de bots */ +#define BDD_CHANDB 'c' /* Tabla de canales */ +#define BDD_CLONESDB 'i' /* Tabla de Ilines/clones */ +#define BDD_NICKDB 'n' /* Tabla de nicks */ +#define BDD_OPERDB 'o' /* Tabla de opers */ +#define BDD_VHOSTDB 'v' /* Tabla de vhosts */ +#define BDD_VHOSTDB2 'w' /* Tabla de vhosts 2 */ +#define BDD_END 'z' /* Ultima Tabla */ + +/* + * Para las features de los pseudoBOTS + */ +#define BDD_CHANSERV "ChanServ" /* Bots de canales */ +#define BDD_NICKSERV "NickServ" /* Bot de nicks */ -#include "struct.h" -#if defined(BDD) -#define ESNET_BDD 'a' -#define ESNET_BDD_END 'z' -#define ESNET_NICKDB 'n' -#define ESNET_CLONESDB 'i' - -#define BDD_OPERDB 'o' -#define BDD_CHANDB 'c' -#define BDD_BOTSDB 'b' -#define BDD_IPVIRTUALDB 'v' -#define BDD_IPVIRTUAL2DB 'w' - -/* Para las features de los pseudoBOTS */ -#define BDD_CHANSERV "ChanServ" -#define BDD_NICKSERV "NickServ" -#define BDD_CANAL_NOTIF_SOCKS "SocksChannel" - -struct db_reg { - char *clave; - char *valor; - struct db_reg *next; +/* + * Structures + */ +struct Bdd { + char *key; + char *content; + struct Bdd *next; }; -#endif /* BDD */ -#ifdef BDD -void reload_db(void); -void initdb(void); -struct DB_nick *find_db_nick(char *nick); -void tx_num_serie_dbs(aClient *cptr); +struct bdd_memory_table { + char *pos; + unsigned int len; + char *point_r; + char *point_w; +}; -void tea(unsigned int v[], unsigned int k[], unsigned int x[]); -struct db_reg *db_buscar_registro(char tabla, char *clave); -/* -int db_es_miembro(char tabla, char *clave, char *subcadena); -*/ -int db_es_residente(char tabla); -unsigned int db_num_serie(char tabla); -unsigned int db_cuantos(char tabla); -#endif +/* + * Prototypes + */ +extern struct Bdd **bdd_data_table[BDD_TABLE_MAX]; +extern int bdd_resident_table[BDD_TABLE_MAX]; +extern unsigned long int bdd_count_table[BDD_TABLE_MAX]; +extern unsigned long int bdd_id_table[BDD_TABLE_MAX]; +extern unsigned long int bdd_hashtable_hi[BDD_TABLE_MAX]; +extern unsigned long int bdd_hashtable_lo[BDD_TABLE_MAX]; + +extern int bdd_table_is_resident(unsigned char table); +extern unsigned long int bdd_id_in_table(unsigned char table); +extern unsigned long int bdd_count_in_table(unsigned char table); + +extern void bdd_init(void); +extern int bdd_open(unsigned int registry, char *buf, unsigned char table, + struct bdd_memory_table *dump); +extern int bdd_read(struct bdd_memory_table *dump, char *buf); +extern void bdd_add(char *registry, unsigned char table, int save_disk); +extern void bdd_del(char *registry, unsigned char table); +extern void bdd_drop(unsigned char table); +extern void bdd_close(struct bdd_memory_table *dump); +extern void bdd_hash_write(unsigned char table); +extern struct Bdd *bdd_find_reg(unsigned char table, char *key); +extern int bdd_is_member(unsigned char table, char *key, char *subcadena); +extern char *bdd_get_botname(char *bot); + +extern void bdd_reload(void); +extern void bdd_die(char *msg, unsigned char table); +extern void bdd_burst(struct Client *cptr); +extern void report_bdd(struct Client *sptr); + +extern void corta_si_multiples_hubs(struct Client *cptr, unsigned char table, + char *msg); + +#endif /* BDD */ /* -- mman.h no contiene algunas definicieones en plataformas antiguas -- */ #ifndef MAP_FAILED @@ -72,4 +118,4 @@ #endif /* -- savage 1999/11/19 -- */ -#endif /* S_BDD_H */ +#endif /* INCLUDED_s_bdd_h */ Index: ircdh/include/s_user.h diff -u ircdh/include/s_user.h:1.4 ircdh/include/s_user.h:1.5 --- ircdh/include/s_user.h:1.4 Thu Oct 24 02:57:51 2002 +++ ircdh/include/s_user.h Sat Nov 30 16:34:06 2002 @@ -1,10 +1,13 @@ /* * s_user.h * - * $Id: s_user.h,v 1.4 2002/10/24 09:57:51 zolty Exp $ + * $Id: s_user.h,v 1.5 2002/12/01 00:34:06 zolty Exp $ */ #ifndef INCLUDED_s_user_h #define INCLUDED_s_user_h +#ifndef INCLUDED_config_h +#include "config.h" +#endif #ifndef INCLUDED_sys_types_h #include <sys/types.h> #define INCLUDED_sys_types_h @@ -43,11 +46,26 @@ #define MATCH_SERVER 1 #define MATCH_HOST 2 +#ifdef BDD +/* used in set_nick_name */ +#define NICK_GHOST 0x01 /* Ha hecho un Ghost */ +#define NICK_IDENTIFY 0x02 /* Esta identificado */ +#define NICK_EQUIVALENT 0x04 /* Es un nick equivalente */ + +#define SetGhost(x) ((x) |= NICK_GHOST) +#define SetIdentify(x) ((x) |= NICK_IDENTIFY) +#define SetNickEquivalent(x) ((x) |= NICK_EQUIVALENT) +#define IsGhost(x) ((x) & NICK_GHOST) +#define IsIdentify(x) ((x) & NICK_IDENTIFY) +#define IsNickEquivalent(x) ((x) & NICK_EQUIVALENT) +#endif /* BDD */ + #define COOKIE_VERIFIED 0xffffffff extern struct SLink *opsarray[]; -typedef char *(*InfoFormatter) (struct Client * who, char *buf); +typedef char *(*InfoFormatter) (struct Client * who, struct Client * sptr, + char *buf); /* * Prototypes @@ -62,8 +80,13 @@ extern int user_set_away(struct User *user, char *message); extern int do_nick_name(char *nick); extern int set_nick_name(struct Client *cptr, struct Client *sptr, - const char *nick, int parc, char *parv[]); + const char *nick, int parc, char *parv[], int flags); +#ifdef BDD +extern void send_umode_out(struct Client *cptr, struct Client *sptr, int old, + int oldh, int registrado); +#else extern void send_umode_out(struct Client *cptr, struct Client *sptr, int old); +#endif extern int whisper(struct Client *source, const char *nick, const char *channel, const char *text, int is_notice); extern void send_user_info(struct Client *to, char *names, int rpl, @@ -95,13 +118,10 @@ extern int send_supported(struct Client *cptr); #if defined BDD_VIP -extern char *get_virtualhost(aClient *sptr); -extern char *get_visiblehost(aClient *sptr, aClient *acptr); +extern char *get_virtualhost(struct Client *sptr); +extern char *get_visiblehost(struct Client *sptr, struct Client *acptr); +extern void make_virtualhost(struct Client *acptr, int mostrar); +extern int verifica_clave_nick(char *nick, char *hash, char *clave); #endif - -#ifdef WATCH -extern int chequea_estado_watch(aClient *cptr, int raw); -extern int borra_lista_watch(aClient *cptr); -#endif /* WATCH */ #endif /* INCLUDED_s_user_h */ Index: ircdh/include/struct.h diff -u ircdh/include/struct.h:1.5 ircdh/include/struct.h:1.6 --- ircdh/include/struct.h:1.5 Thu Oct 24 02:57:51 2002 +++ ircdh/include/struct.h Sat Nov 30 16:34:06 2002 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: struct.h,v 1.5 2002/10/24 09:57:51 zolty Exp $ + * $Id: struct.h,v 1.6 2002/12/01 00:34:06 zolty Exp $ */ #ifndef INCLUDED_struct_h #define INCLUDED_struct_h @@ -55,7 +55,7 @@ unsigned int nn_mask; /* [Remote] FD_SETSIZE - 1 */ char nn_capacity[4]; /* numeric representation of server capacity */ #ifdef BDD - unsigned long esnet_db; /* Mascara de grifo abierto para cada BDD */ + unsigned long bdd_mask; /* Mascara de grifo abierto para cada BDD */ #endif char *last_error_msg; /* Allocated memory with last message receive with an ERROR */ char by[NICKLEN + 1]; Index: ircdh/include/whowas.h diff -u ircdh/include/whowas.h:1.6 ircdh/include/whowas.h:1.7 --- ircdh/include/whowas.h:1.6 Thu Oct 24 02:57:51 2002 +++ ircdh/include/whowas.h Sat Nov 30 16:34:06 2002 @@ -16,10 +16,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: whowas.h,v 1.6 2002/10/24 09:57:51 zolty Exp $ + * $Id: whowas.h,v 1.7 2002/12/01 00:34:06 zolty Exp $ */ #ifndef INCLUDED_whowas_h #define INCLUDED_whowas_h +#ifndef INCLUDED_config_h +#include "config.h" +#endif #ifndef INCLUDED_sys_types_h #include <sys/types.h> /* size_t */ #define INCLUDED_sys_types_h Index: ircdh/ircd/IPcheck.c diff -u ircdh/ircd/IPcheck.c:1.6 ircdh/ircd/IPcheck.c:1.7 --- ircdh/ircd/IPcheck.c:1.6 Thu Oct 24 02:57:52 2002 +++ ircdh/ircd/IPcheck.c Sat Nov 30 16:34:06 2002 @@ -16,25 +16,29 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: IPcheck.c,v 1.6 2002/10/24 09:57:52 zolty Exp $ + * $Id: IPcheck.c,v 1.7 2002/12/01 00:34:06 zolty Exp $ * * * * This file should be edited in a window with a width of 141 characters * ick */ +#include "s_debug.h" /* provisional */ #include "IPcheck.h" #include "client.h" +#include "config.h" #include "ircd.h" #include "msg.h" #include "numnicks.h" /* NumNick, NumServ (GODMODE) */ #include "ircd_alloc.h" +#include "s_bdd.h" #include "s_bsd.h" /* SetIPChecked */ #include "s_debug.h" /* Debug */ #include "s_user.h" /* TARGET_DELAY */ #include "send.h" #include <assert.h> +#include <stdlib.h> #include <string.h> @@ -233,16 +237,16 @@ int clones = 0; #endif - -#ifdef BDD_CLONES -/* - * Si lo que sigue no se verifica, Throttle. - * Si tiene Iline, no debe bloquearlo por throttle - */ + Debug((DEBUG_INFO, "Contenido del ADDR: %u", addr)); +#ifdef BDD_CLONES_1 + /* + * Si lo que sigue no se verifica, Throttle. + * Si tiene Iline, no debe bloquearlo por throttle + */ if (IPbusca_clones_cptr(cptr) != -1) clones = 1; #endif - + Debug((DEBUG_INFO, "CHEQUEO EN IPCHECK XDDDDDDD")); if (0 == entry) { entry = ip_registry_new_entry(); @@ -272,15 +276,19 @@ if (0 == ++entry->attempts) /* Check for overflow */ --entry->attempts; + Debug((DEBUG_INFO, "CHEQUEO EN IPCHECK XD")); + if (entry->attempts <= IPCHECK_CLONE_LIMIT) { if (next_target_out) #ifdef BDD_CLONES { +/* FIXME-ZOLTAN if (clones) *next_target_out = CurrentTime - (TARGET_DELAY * start_targets - 1); else - *next_target_out = CurrentTime - (TARGET_DELAY * free_targets - 1); +*/ + *next_target_out = CurrentTime - (TARGET_DELAY * free_targets - 1); } #else *next_target_out = CurrentTime - (TARGET_DELAY * free_targets - 1); @@ -295,12 +303,12 @@ return 1; #else #ifdef BDD_CLONES -/* - * Si lo que sigue no se verifica, Throttle. - * Si tiene Iline, no debe bloquearlo por throttle - */ + /* + * Si lo que sigue no se verifica, Throttle. + * Si tiene Iline, no debe bloquearlo por throttle + */ if (clones) - return 0; + return 1; #endif --entry->connected; return 0; @@ -631,17 +639,17 @@ } #ifdef BDD_CLONES +#if 0 int IPbusca_clones(char *host) { - struct db_reg *reg; + struct Bdd *bdd; - reg = db_buscar_registro(ESNET_CLONESDB, host); - if (reg == NULL) + bdd = bdd_find_reg(BDD_CLONESDB, host); + if (!bdd) return -1; - return atoi(reg->valor); + return atoi(bdd->content); } - -int IPbusca_clones_cptr(aClient *cptr) +int IPbusca_clones_cptr(unsigned int addr) { char host_buf[HOSTLEN + 1]; struct hostent *hp; @@ -670,5 +678,5 @@ } return -1; } - +#endif #endif Index: ircdh/ircd/Makefile.in diff -u ircdh/ircd/Makefile.in:1.7 ircdh/ircd/Makefile.in:1.8 --- ircdh/ircd/Makefile.in:1.7 Thu Oct 24 02:57:52 2002 +++ ircdh/ircd/Makefile.in Sat Nov 30 16:34:06 2002 @@ -80,6 +80,7 @@ ircd_reply.c \ ircd_signal.c \ ircd_string.c \ + ircd_tea.c \ ircd_xopen.c \ list.c \ listener.c \ @@ -333,8 +334,8 @@ # DO NOT DELETE THIS LINE -- make depend depends on it. IPcheck.o: IPcheck.c ../include/IPcheck.h ../include/client.h \ - ../include/dbuf.h ../include/ircd_defs.h ../include/ircd_handler.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ + ../config/config.h ../config/setup.h ../include/dbuf.h \ + ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ ../include/struct.h ../include/msg.h ../include/numnicks.h \ ../include/ircd_alloc.h ../include/fda.h ../include/s_bsd.h \ ../include/s_debug.h ../include/s_user.h ../include/send.h @@ -345,21 +346,21 @@ ../include/ircd_alloc.h ../include/fda.h ../include/ircd_chattr.h \ ../include/ircd_reply.h ../include/ircd_string.h ../include/list.h \ ../include/match.h ../include/msg.h ../include/numeric.h \ - ../include/numnicks.h ../include/querycmds.h ../include/s_bsd.h \ - ../include/s_conf.h ../include/s_debug.h ../include/s_misc.h \ - ../include/s_user.h ../include/send.h ../include/sprintf_irc.h \ - ../include/support.h ../include/whowas.h -class.o: class.c ../include/class.h ../include/client.h ../include/dbuf.h \ + ../include/numnicks.h ../include/querycmds.h ../include/s_bdd.h \ + ../include/s_bsd.h ../include/s_conf.h ../include/s_debug.h \ + ../include/s_misc.h ../include/s_user.h ../include/send.h \ + ../include/sprintf_irc.h ../include/support.h ../include/whowas.h +class.o: class.c ../include/class.h ../include/client.h \ + ../config/config.h ../config/setup.h ../include/dbuf.h \ ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ - ../config/config.h ../config/setup.h ../include/struct.h \ - ../include/list.h ../include/numeric.h ../include/s_conf.h \ - ../include/s_debug.h ../include/send.h -crule.o: crule.c ../include/crule.h ../include/client.h ../include/dbuf.h \ + ../include/struct.h ../include/list.h ../include/numeric.h \ + ../include/s_conf.h ../include/s_debug.h ../include/send.h +crule.o: crule.c ../include/crule.h ../include/client.h \ + ../config/config.h ../config/setup.h ../include/dbuf.h \ ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ - ../config/config.h ../config/setup.h ../include/struct.h \ - ../include/ircd_alloc.h ../include/fda.h ../include/ircd_chattr.h \ - ../include/ircd_string.h ../include/match.h ../include/s_bsd.h \ - ../include/s_debug.h + ../include/struct.h ../include/ircd_alloc.h ../include/fda.h \ + ../include/ircd_chattr.h ../include/ircd_string.h ../include/match.h \ + ../include/s_bsd.h ../include/s_debug.h dbuf.o: dbuf.c ../include/dbuf.h ../include/ircd_alloc.h ../include/fda.h \ ../include/ircd_chattr.h ../include/send.h ../include/sys.h \ ../config/config.h ../config/setup.h @@ -390,9 +391,9 @@ ../include/ircd_string.h ../config/config.h ../config/setup.h \ ../include/ircd_chattr.h ../include/s_debug.h ../include/ircd_defs.h ircd_log.o: ircd_log.c ../include/ircd_log.h ../include/client.h \ - ../include/dbuf.h ../include/ircd_defs.h ../include/ircd_handler.h \ - ../include/struct.h ../include/s_serv.h ../include/ircd_string.h \ - ../config/config.h ../config/setup.h ../include/ircd_chattr.h \ + ../config/config.h ../config/setup.h ../include/dbuf.h \ + ../include/ircd_defs.h ../include/ircd_handler.h ../include/struct.h \ + ../include/s_serv.h ../include/ircd_string.h ../include/ircd_chattr.h \ ../include/s_debug.h ircd_osdep.o: ircd_osdep.c ../include/ircd_osdep.h ircd_relay.o: ircd_relay.c ../include/ircd_relay.h ../include/channel.h \ @@ -404,8 +405,8 @@ ../include/numeric.h ../include/numnicks.h ../include/s_debug.h \ ../include/s_misc.h ../include/s_user.h ../include/send.h ircd_reply.o: ircd_reply.c ../include/ircd_reply.h ../include/client.h \ - ../include/dbuf.h ../include/ircd_defs.h ../include/ircd_handler.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ + ../config/config.h ../config/setup.h ../include/dbuf.h \ + ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ ../include/struct.h ../include/numeric.h ../include/s_conf.h \ ../include/s_debug.h ../include/send.h ircd_signal.o: ircd_signal.c ../include/ircd_signal.h ../include/ircd.h \ @@ -414,10 +415,11 @@ ircd_string.o: ircd_string.c ../include/ircd_string.h ../config/config.h \ ../config/setup.h ../include/ircd_chattr.h ../include/ircd_defs.h \ chattr.tab.c +ircd_tea.o: ircd_tea.c ircd_xopen.o: ircd_xopen.c ../include/ircd_xopen.h list.o: list.c ../include/list.h ../include/class.h ../include/client.h \ - ../include/dbuf.h ../include/ircd_defs.h ../include/ircd_handler.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ + ../config/config.h ../config/setup.h ../include/dbuf.h \ + ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ ../include/struct.h ../include/ircd_alloc.h ../include/fda.h \ ../include/ircd_string.h ../include/ircd_chattr.h ../include/listener.h \ ../include/match.h ../include/numeric.h ../include/res.h \ @@ -425,22 +427,22 @@ ../include/s_misc.h ../include/s_user.h ../include/send.h \ ../include/support.h ../include/watch.h ../include/whowas.h listener.o: listener.c ../include/listener.h ../include/ircd_defs.h \ - ../include/client.h ../include/dbuf.h ../include/ircd_handler.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ + ../include/client.h ../config/config.h ../config/setup.h \ + ../include/dbuf.h ../include/ircd_handler.h ../include/ircd.h \ ../include/struct.h ../include/ircd_alloc.h ../include/fda.h \ ../include/ircd_osdep.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/numeric.h ../include/s_bsd.h \ ../include/s_conf.h ../include/s_misc.h ../include/send.h \ ../include/sprintf_irc.h ../include/sys.h -m_admin.o: m_admin.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ - ../config/config.h ../config/setup.h ../include/struct.h \ +m_admin.o: m_admin.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/ircd.h ../include/struct.h \ ../include/ircd_reply.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/s_conf.h ../include/s_user.h \ ../include/send.h -m_away.o: m_away.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ - ../config/config.h ../config/setup.h ../include/struct.h \ +m_away.o: m_away.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/ircd.h ../include/struct.h \ ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/s_user.h ../include/send.h @@ -449,8 +451,8 @@ ../include/dbuf.h ../include/ircd_handler.h ../include/hash.h \ ../include/ircd.h ../include/struct.h ../include/ircd_reply.h \ ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ - ../include/numeric.h ../include/numnicks.h ../include/s_debug.h \ - ../include/s_user.h ../include/send.h + ../include/numeric.h ../include/numnicks.h ../include/s_bdd.h \ + ../include/s_debug.h ../include/s_user.h ../include/send.h m_burst.o: m_burst.c ../include/channel.h ../config/config.h \ ../config/setup.h ../include/ircd_defs.h ../include/client.h \ ../include/dbuf.h ../include/ircd_handler.h ../include/hash.h \ @@ -459,91 +461,100 @@ ../include/ircd_chattr.h ../include/list.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/s_conf.h \ ../include/s_misc.h ../include/send.h -m_close.o: m_close.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ - ../config/config.h ../config/setup.h ../include/struct.h \ +m_close.o: m_close.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/ircd.h ../include/struct.h \ ../include/ircd_reply.h ../include/numeric.h ../include/s_bsd.h \ ../include/send.h m_config.o: m_config.c ../include/sys.h ../config/config.h \ ../config/setup.h -m_connect.o: m_connect.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/crule.h \ - ../include/hash.h ../include/ircd.h ../config/config.h \ - ../config/setup.h ../include/struct.h ../include/ircd_log.h \ +m_connect.o: m_connect.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/crule.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_log.h \ ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/match.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/s_bsd.h \ ../include/s_conf.h ../include/s_user.h ../include/send.h -m_cnotice.o: m_cnotice.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h \ - ../include/ircd_reply.h ../include/ircd_string.h ../config/config.h \ - ../config/setup.h ../include/ircd_chattr.h ../include/s_user.h -m_cprivmsg.o: m_cprivmsg.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h \ - ../include/ircd_reply.h ../include/ircd_string.h ../config/config.h \ - ../config/setup.h ../include/ircd_chattr.h ../include/s_user.h +m_cnotice.o: m_cnotice.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/s_user.h +m_cprivmsg.o: m_cprivmsg.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/s_user.h m_create.o: m_create.c ../include/channel.h ../config/config.h \ ../config/setup.h ../include/ircd_defs.h ../include/client.h \ ../include/dbuf.h ../include/ircd_handler.h ../include/hash.h \ ../include/ircd.h ../include/struct.h ../include/ircd_reply.h \ ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/send.h -m_db.o: m_db.c -m_dbq.o: m_dbq.c -m_defaults.o: m_defaults.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ - ../config/config.h ../config/setup.h ../include/struct.h \ +m_db.o: m_db.c ../include/client.h ../config/config.h ../config/setup.h \ + ../include/dbuf.h ../include/ircd_defs.h ../include/ircd_handler.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/list.h ../include/match.h \ + ../include/msg.h ../include/numnicks.h ../include/s_bdd.h \ + ../include/s_conf.h ../include/send.h +m_dbq.o: m_dbq.c ../include/client.h ../config/config.h ../config/setup.h \ + ../include/dbuf.h ../include/ircd_defs.h ../include/ircd_handler.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \ + ../include/fda.h ../include/ircd_chattr.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_bdd.h \ + ../include/send.h +m_defaults.o: m_defaults.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/ircd.h ../include/struct.h \ ../include/ircd_reply.h ../include/numeric.h ../include/numnicks.h \ ../include/send.h ../include/version.h -m_destruct.o: m_destruct.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/hash.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ +m_destruct.o: m_destruct.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/send.h -m_desynch.o: m_desynch.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/hash.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ +m_desynch.o: m_desynch.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/numeric.h ../include/numnicks.h \ ../include/s_bsd.h ../include/send.h -m_die.o: m_die.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ - ../config/config.h ../config/setup.h ../include/struct.h \ - ../include/ircd_reply.h ../include/ircd_string.h \ - ../include/ircd_chattr.h ../include/numeric.h ../include/numnicks.h \ - ../include/s_bsd.h ../include/send.h -m_endburst.o: m_endburst.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/hash.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ +m_die.o: m_die.c ../include/client.h ../config/config.h ../config/setup.h \ + ../include/dbuf.h ../include/ircd_defs.h ../include/ircd_handler.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/numeric.h \ + ../include/numnicks.h ../include/s_bsd.h ../include/send.h +m_endburst.o: m_endburst.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/send.h -m_error.o: m_error.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/hash.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ +m_error.o: m_error.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ ../include/struct.h ../include/ircd_alloc.h ../include/fda.h \ ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/numeric.h ../include/numnicks.h \ ../include/s_debug.h ../include/s_misc.h ../include/send.h -m_gline.o: m_gline.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/gline.h \ - ../config/config.h ../config/setup.h ../include/hash.h \ +m_gline.o: m_gline.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/gline.h ../include/hash.h \ ../include/ircd.h ../include/struct.h ../include/ircd_reply.h \ ../include/ircd_string.h ../include/ircd_chattr.h ../include/match.h \ ../include/msg.h ../include/numeric.h ../include/numnicks.h \ ../include/s_conf.h ../include/s_misc.h ../include/send.h \ ../include/support.h m_ghost.o: m_ghost.c -m_help.o: m_help.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/hash.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ +m_help.o: m_help.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/send.h -m_info.o: m_info.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ - ../config/config.h ../config/setup.h ../include/struct.h \ +m_info.o: m_info.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/ircd.h ../include/struct.h \ ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/s_misc.h ../include/s_user.h \ @@ -555,9 +566,9 @@ ../include/ircd_string.h ../include/ircd_chattr.h ../include/list.h \ ../include/msg.h ../include/numeric.h ../include/numnicks.h \ ../include/s_user.h ../include/send.h -m_ison.o: m_ison.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/hash.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ +m_ison.o: m_ison.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/numeric.h ../include/send.h m_join.o: m_join.c ../include/channel.h ../config/config.h \ @@ -566,24 +577,24 @@ ../include/hash.h ../include/ircd.h ../include/struct.h \ ../include/ircd_chattr.h ../include/ircd_reply.h \ ../include/ircd_string.h ../include/msg.h ../include/numeric.h \ - ../include/numnicks.h ../include/s_user.h ../include/send.h \ - ../include/handlers.h + ../include/numnicks.h ../include/s_bdd.h ../include/s_user.h \ + ../include/send.h ../include/handlers.h m_kick.o: m_kick.c ../include/channel.h ../config/config.h \ ../config/setup.h ../include/ircd_defs.h ../include/client.h \ ../include/dbuf.h ../include/ircd_handler.h ../include/hash.h \ ../include/ircd.h ../include/struct.h ../include/ircd_reply.h \ ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/send.h -m_kill.o: m_kill.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/hash.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ +m_kill.o: m_kill.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ ../include/struct.h ../include/ircd_log.h ../include/ircd_reply.h \ ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/s_misc.h \ - ../include/send.h ../include/whowas.h -m_links.o: m_links.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ - ../config/config.h ../config/setup.h ../include/struct.h \ + ../include/s_user.h ../include/send.h ../include/whowas.h +m_links.o: m_links.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/ircd.h ../include/struct.h \ ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/match.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/s_user.h \ @@ -595,19 +606,18 @@ ../include/fda.h ../include/ircd_chattr.h ../include/ircd_reply.h \ ../include/ircd_string.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/send.h -m_lusers.o: m_lusers.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/handlers.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ +m_lusers.o: m_lusers.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/handlers.h ../include/ircd.h \ ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/querycmds.h ../include/s_user.h \ ../include/s_serv.h ../include/send.h -m_map.o: m_map.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ - ../config/config.h ../config/setup.h ../include/struct.h \ - ../include/ircd_reply.h ../include/ircd_string.h \ - ../include/ircd_chattr.h ../include/map.h ../include/numeric.h \ - ../include/send.h +m_map.o: m_map.c ../include/client.h ../config/config.h ../config/setup.h \ + ../include/dbuf.h ../include/ircd_defs.h ../include/ircd_handler.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/map.h \ + ../include/numeric.h ../include/send.h m_mode.o: m_mode.c ../include/handlers.h ../include/channel.h \ ../config/config.h ../config/setup.h ../include/ircd_defs.h \ ../include/client.h ../include/dbuf.h ../include/ircd_handler.h \ @@ -616,9 +626,9 @@ ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/s_debug.h ../include/s_user.h \ ../include/send.h -m_motd.o: m_motd.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ - ../config/config.h ../config/setup.h ../include/struct.h \ +m_motd.o: m_motd.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/ircd.h ../include/struct.h \ ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/match.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/s_conf.h \ @@ -631,21 +641,21 @@ ../include/numeric.h ../include/numnicks.h ../include/s_user.h \ ../include/send.h m_nick.o: m_nick.c ../include/IPcheck.h ../include/client.h \ - ../include/dbuf.h ../include/ircd_defs.h ../include/ircd_handler.h \ - ../include/hash.h ../include/ircd.h ../config/config.h \ - ../config/setup.h ../include/struct.h ../include/ircd_chattr.h \ + ../config/config.h ../config/setup.h ../include/dbuf.h \ + ../include/ircd_defs.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_chattr.h \ ../include/ircd_reply.h ../include/ircd_string.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/s_debug.h \ ../include/s_misc.h ../include/s_user.h ../include/send.h -m_notice.o: m_notice.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h \ - ../include/ircd_chattr.h ../include/ircd_relay.h \ - ../include/ircd_reply.h ../include/ircd_string.h ../config/config.h \ - ../config/setup.h ../include/match.h ../include/msg.h \ +m_notice.o: m_notice.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/ircd_chattr.h \ + ../include/ircd_relay.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/match.h ../include/msg.h \ ../include/numeric.h ../include/send.h ../include/handlers.h -m_oper.o: m_oper.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/hash.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ +m_oper.o: m_oper.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ ../include/struct.h ../include/ircd_log.h ../include/ircd_reply.h \ ../include/ircd_string.h ../include/ircd_chattr.h \ ../include/ircd_xopen.h ../include/msg.h ../include/numeric.h \ @@ -657,31 +667,31 @@ ../include/ircd.h ../include/struct.h ../include/ircd_reply.h \ ../include/ircd_string.h ../include/ircd_chattr.h ../include/numeric.h \ ../include/numnicks.h ../include/send.h -m_pass.o: m_pass.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h \ - ../include/ircd_reply.h ../include/ircd_string.h ../config/config.h \ - ../config/setup.h ../include/ircd_chattr.h ../include/send.h -m_ping.o: m_ping.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/hash.h \ - ../include/ircd_reply.h ../include/ircd_string.h ../config/config.h \ - ../config/setup.h ../include/ircd_chattr.h ../include/ircd.h \ +m_pass.o: m_pass.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/send.h +m_ping.o: m_ping.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/ircd.h \ ../include/struct.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/s_debug.h ../include/send.h -m_pong.o: m_pong.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/hash.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ +m_pong.o: m_pong.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ ../include/struct.h ../include/ircd_string.h ../include/ircd_chattr.h \ ../include/msg.h ../include/numeric.h ../include/numnicks.h \ ../include/s_user.h ../include/send.h -m_privmsg.o: m_privmsg.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ - ../config/config.h ../config/setup.h ../include/struct.h \ +m_privmsg.o: m_privmsg.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/ircd.h ../include/struct.h \ ../include/ircd_chattr.h ../include/ircd_relay.h \ ../include/ircd_reply.h ../include/ircd_string.h ../include/match.h \ ../include/msg.h ../include/numeric.h ../include/send.h -m_proto.o: m_proto.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ - ../config/config.h ../config/setup.h ../include/struct.h \ +m_proto.o: m_proto.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/ircd.h ../include/struct.h \ ../include/ircd_alloc.h ../include/fda.h ../include/ircd_chattr.h \ ../include/ircd_reply.h ../include/ircd_string.h ../include/numeric.h \ ../include/numnicks.h ../include/s_debug.h ../include/s_misc.h \ @@ -692,40 +702,46 @@ ../include/dbuf.h ../include/ircd_handler.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/sprintf_irc.h ../include/struct.h \ ../include/s_misc.h -m_rename.o: m_rename.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h -m_restart.o: m_restart.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ - ../config/config.h ../config/setup.h ../include/struct.h \ +m_rename.o: m_rename.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_string.h ../include/ircd_chattr.h \ + ../include/ircd_tea.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/s_bdd.h ../include/s_conf.h \ + ../include/s_user.h ../include/send.h ../include/watch.h \ + ../include/whowas.h +m_restart.o: m_restart.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/ircd.h ../include/struct.h \ ../include/ircd_log.h ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/numeric.h ../include/numnicks.h \ ../include/send.h -m_rping.o: m_rping.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/hash.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ +m_rping.o: m_rping.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/opercmds.h ../include/s_user.h \ ../include/send.h -m_rpong.o: m_rpong.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/hash.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ +m_rpong.o: m_rpong.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/opercmds.h ../include/send.h -m_server.o: m_server.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/crule.h \ - ../include/hash.h ../include/ircd.h ../config/config.h \ - ../config/setup.h ../include/struct.h ../include/ircd_log.h \ +m_server.o: m_server.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/crule.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_log.h \ ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/list.h ../include/match.h \ ../include/msg.h ../include/numeric.h ../include/numnicks.h \ ../include/querycmds.h ../include/s_bsd.h ../include/s_conf.h \ ../include/s_debug.h ../include/s_misc.h ../include/s_serv.h \ ../include/send.h ../include/userload.h -m_settime.o: m_settime.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/hash.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ +m_settime.o: m_settime.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/list.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/s_user.h \ @@ -737,9 +753,9 @@ ../include/ircd_string.h ../include/ircd_chattr.h ../include/list.h \ ../include/msg.h ../include/numeric.h ../include/numnicks.h \ ../include/s_user.h ../include/send.h -m_squit.o: m_squit.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/hash.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ +m_squit.o: m_squit.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ ../include/struct.h ../include/ircd_chattr.h ../include/ircd_reply.h \ ../include/ircd_string.h ../include/numeric.h ../include/numnicks.h \ ../include/match.h ../include/s_debug.h ../include/s_misc.h \ @@ -752,20 +768,20 @@ ../include/fda.h ../include/ircd_chattr.h ../include/ircd_reply.h \ ../include/ircd_string.h ../include/list.h ../include/listener.h \ ../include/match.h ../include/msg.h ../include/numeric.h \ - ../include/numnicks.h ../include/opercmds.h ../include/s_bsd.h \ - ../include/s_conf.h ../include/s_debug.h ../include/s_misc.h \ - ../include/s_serv.h ../include/s_user.h ../include/send.h \ - ../include/userload.h -m_time.o: m_time.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ - ../config/config.h ../config/setup.h ../include/struct.h \ + ../include/numnicks.h ../include/opercmds.h ../include/s_bdd.h \ + ../include/s_bsd.h ../include/s_conf.h ../include/s_debug.h \ + ../include/s_misc.h ../include/s_serv.h ../include/s_user.h \ + ../include/send.h ../include/userload.h +m_time.o: m_time.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/ircd.h ../include/struct.h \ ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/s_misc.h ../include/s_user.h \ ../include/send.h -m_tmpl.o: m_tmpl.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/hash.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ +m_tmpl.o: m_tmpl.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/numeric.h ../include/numnicks.h \ ../include/send.h @@ -776,47 +792,47 @@ ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/send.h m_trace.o: m_trace.c ../include/class.h ../include/client.h \ - ../include/dbuf.h ../include/ircd_defs.h ../include/ircd_handler.h \ - ../include/hash.h ../include/ircd.h ../config/config.h \ - ../config/setup.h ../include/struct.h ../include/ircd_reply.h \ + ../config/config.h ../config/setup.h ../include/dbuf.h \ + ../include/ircd_defs.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_reply.h \ ../include/ircd_string.h ../include/ircd_chattr.h ../include/match.h \ ../include/msg.h ../include/numeric.h ../include/numnicks.h \ ../include/s_bsd.h ../include/s_conf.h ../include/s_user.h \ ../include/send.h ../include/version.h -m_uping.o: m_uping.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/hash.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ +m_uping.o: m_uping.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/match.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/s_conf.h \ ../include/s_user.h ../include/send.h ../include/uping.h m_user.o: m_user.c ../include/handlers.h ../include/client.h \ - ../include/dbuf.h ../include/ircd_defs.h ../include/ircd_handler.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ + ../config/config.h ../config/setup.h ../include/dbuf.h \ + ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ ../include/struct.h ../include/ircd_chattr.h ../include/ircd_reply.h \ ../include/ircd_string.h ../include/numeric.h ../include/numnicks.h \ ../include/s_debug.h ../include/s_misc.h ../include/s_user.h \ ../include/send.h -m_users.o: m_users.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/ircd.h \ - ../config/config.h ../config/setup.h ../include/struct.h \ +m_users.o: m_users.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/ircd.h ../include/struct.h \ ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/querycmds.h ../include/s_misc.h \ ../include/s_user.h ../include/s_serv.h ../include/send.h -m_userhost.o: m_userhost.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h \ - ../include/ircd_reply.h ../include/ircd_string.h ../config/config.h \ - ../config/setup.h ../include/ircd_chattr.h ../include/numeric.h \ +m_userhost.o: m_userhost.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/numeric.h \ ../include/s_user.h ../include/struct.h -m_userip.o: m_userip.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h \ - ../include/ircd_reply.h ../include/ircd_string.h ../config/config.h \ - ../config/setup.h ../include/ircd_chattr.h ../include/numeric.h \ +m_userip.o: m_userip.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/numeric.h \ ../include/s_user.h ../include/struct.h -m_version.o: m_version.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h ../include/hash.h \ - ../include/ircd.h ../config/config.h ../config/setup.h \ +m_version.o: m_version.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/s_debug.h ../include/s_user.h \ @@ -828,31 +844,32 @@ ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/s_user.h \ ../include/send.h -m_wallops.o: m_wallops.c ../include/client.h ../include/dbuf.h \ - ../include/ircd_defs.h ../include/ircd_handler.h \ - ../include/ircd_reply.h ../include/ircd_string.h ../config/config.h \ - ../config/setup.h ../include/ircd_chattr.h ../include/numeric.h \ +m_wallops.o: m_wallops.c ../include/client.h ../config/config.h \ + ../config/setup.h ../include/dbuf.h ../include/ircd_defs.h \ + ../include/ircd_handler.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/numeric.h \ ../include/send.h ../include/msg.h ../include/s_bsd.h \ ../include... [truncated message content] |
From: Toni G. <zo...@us...> - 2002-12-01 00:35:35
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2002-12-01 00:35:34 UTC Added files: include/ircd_tea.h ircd/ircd_tea.c Log message: Ops! Faltaban 2 archivos. ---------------------- diff included ---------------------- Index: ircdh/include/ircd_tea.h diff -u /dev/null ircdh/include/ircd_tea.h:1.1 --- /dev/null Sat Nov 30 16:35:34 2002 +++ ircdh/include/ircd_tea.h Sat Nov 30 16:35:24 2002 @@ -0,0 +1,30 @@ +/* + * IRC - Internet Relay Chat, ircd/ircd_tea.h + * Copyright (C) 1999 IRC-Hispano.org - ESNET - jcea & savage + * + * See file AUTHORS in IRC package for additional names of + * the programmers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 1, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * $Id: ircd_tea.h,v 1.1 2002/12/01 00:35:24 zolty Exp $ + */ +#ifndef INCLUDED_ircd_tea_h +#define INCLUDED_ircd_tea_h + +extern void ircd_tea(unsigned int v[], unsigned int k[], unsigned int x[]); +extern void ircd_untea(unsigned int v[], unsigned int k[], unsigned int x[]); + +#endif /* INCLUDED_ircd_tea_h */ Index: ircdh/ircd/ircd_tea.c diff -u /dev/null ircdh/ircd/ircd_tea.c:1.1 --- /dev/null Sat Nov 30 16:35:34 2002 +++ ircdh/ircd/ircd_tea.c Sat Nov 30 16:35:24 2002 @@ -0,0 +1,86 @@ +/* + * IRC - Internet Relay Chat, ircd/ircd_tea.c + * Copyright (C) 1999 IRC-Hispano.org - ESNET - jcea & savage + * + * See file AUTHORS in IRC package for additional names of + * the programmers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 1, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * $Id: ircd_tea.c,v 1.1 2002/12/01 00:35:24 zolty Exp $ + */ + + +/* + * ircd_tea(cifrado) + * + * Cifra 64 bits de datos, usando clave de 64 bits (los 64 bits superiores son cero) + * Se cifra v[0]^x[0], v[1]^x[1], para poder hacer CBC facilmente. + * + */ +void ircd_tea(unsigned int v[], unsigned int k[], unsigned int x[]) +{ + unsigned int y = v[0] ^ x[0]; + unsigned int z = v[1] ^ x[1]; + unsigned int a = k[0]; + unsigned int b = k[1]; + unsigned int c = 0; + unsigned int d = 0; + unsigned int n = 32; + unsigned int sum = 0; + unsigned int delta = 0x9E3779B9; + + while (n-- > 0) + { + sum += delta; + y += ((z << 4) + a) ^ (z + sum) ^ ((z >> 5) + b); + z += ((y << 4) + c) ^ (y + sum) ^ ((y >> 5) + d); + } + + x[0] = y; + x[1] = z; +} + +/* + * ircd_untea(descifrado) + * + * Cifra 64 bits de datos, usando clave de 64 bits (los 64 bits superiores son cero) + * Se cifra v[0]^x[0], v[1]^x[1], para poder hacer CBC facilmente. + * + */ +void ircd_untea(unsigned int v[], unsigned int k[], unsigned int x[]) +{ + unsigned int y = v[0]; + unsigned int z = v[1]; + unsigned int a = k[0]; + unsigned int b = k[1]; + unsigned int c = 0; + unsigned int d = 0; + unsigned int n = 32; + unsigned int sum = 0xC6EF3720; + unsigned int delta = 0x9E3779B9; + + /* sum = delta << 5, in general sum = delta * n */ + + while (n-- > 0) + { + z -= ((y << 4) + c) ^ (y + sum) ^ ((y >> 5) + d); + y -= ((z << 4) + a) ^ (z + sum) ^ ((z >> 5) + b); + sum -= delta; + } + + x[0] = y; + x[1] = z; +} ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2003-01-18 19:54:08
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-18 19:53:59 UTC Modified files: ChangeLog include/handlers.h include/msg.h include/patchlevel.h ircd/Makefile.in ircd/ircd.c ircd/m_connect.c ircd/m_server.c ircd/parse.c ircd/s_debug.c ircd/s_serv.c Added files: include/jupe.h ircd/jupe.c ircd/m_account.c ircd/m_asll.c ircd/m_clearmode.c ircd/m_get.c ircd/m_jupe.c ircd/m_opmode.c ircd/m_privs.c ircd/m_reset.c ircd/m_set.c Log message: 2003-01-18 Toni Garcia <zo...@ir...> 1.0.alpha13 * Nuevos comandos: ACCOUNT, JUPE, CLEARMODE, OPMODE, SET, RESET, PRIV, ASLL. ---------------------- diff included ---------------------- Index: ircdh/ChangeLog diff -u ircdh/ChangeLog:1.7 ircdh/ChangeLog:1.8 --- ircdh/ChangeLog:1.7 Sat Jan 18 11:09:00 2003 +++ ircdh/ChangeLog Sat Jan 18 11:53:48 2003 @@ -1,3 +1,8 @@ +2003-01-18 Toni Garcia <zo...@ir...> 1.0.alpha13 + * Nuevos comandos: ACCOUNT, JUPE, CLEARMODE, OPMODE, SET, RESET, + PRIV, ASLL. + + 2003-01-18 Toni Garcia <zo...@ir...> 1.0.alpha12 * {*watch*}: Adapto el codigo del watch al ircd. Index: ircdh/include/handlers.h diff -u ircdh/include/handlers.h:1.2 ircdh/include/handlers.h:1.3 --- ircdh/include/handlers.h:1.2 Sat Jan 18 11:09:03 2003 +++ ircdh/include/handlers.h Sat Jan 18 11:53:48 2003 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: handlers.h,v 1.2 2003/01/18 19:09:03 zolty Exp $ + * $Id: handlers.h,v 1.3 2003/01/18 19:53:48 zolty Exp $ */ #ifndef INCLUDED_handlers_h #define INCLUDED_handlers_h @@ -103,6 +103,7 @@ extern int m_invite(struct Client *, struct Client *, int, char *[]); extern int m_ison(struct Client *, struct Client *, int, char *[]); extern int m_join(struct Client *, struct Client *, int, char *[]); +extern int m_jupe(struct Client *, struct Client *, int, char *[]); extern int m_kick(struct Client *, struct Client *, int, char *[]); extern int m_links(struct Client *, struct Client *, int, char *[]); extern int m_links_redirect(struct Client *, struct Client *, int, char *[]); @@ -147,22 +148,30 @@ * Comandos de usuario privilegiado (Ircop & Helper) */ extern int mo_admin(struct Client *, struct Client *, int, char *[]); +extern int mo_asll(struct Client *, struct Client *, int, char *[]); +extern int mo_clearmode(struct Client *, struct Client *, int, char *[]); extern int mo_close(struct Client *, struct Client *, int, char *[]); extern int mo_connect(struct Client *, struct Client *, int, char *[]); #ifdef BDD extern int mo_dbq(struct Client *, struct Client *, int, char *[]); #endif extern int mo_die(struct Client *, struct Client *, int, char *[]); +extern int mo_get(struct Client *, struct Client *, int, char *[]); extern int mo_gline(struct Client *, struct Client *, int, char *[]); extern int mo_info(struct Client *, struct Client *, int, char *[]); +extern int mo_jupe(struct Client *, struct Client *, int, char *[]); extern int mo_kill(struct Client *, struct Client *, int, char *[]); extern int mo_notice(struct Client *, struct Client *, int, char *[]); extern int mo_oper(struct Client *, struct Client *, int, char *[]); +extern int mo_opmode(struct Client *, struct Client *, int, char *[]); extern int mo_ping(struct Client *, struct Client *, int, char *[]); +extern int mo_privs(struct Client *, struct Client *, int, char *[]); extern int mo_privmsg(struct Client *, struct Client *, int, char *[]); extern int mo_rehash(struct Client *, struct Client *, int, char *[]); +extern int mo_reset(struct Client *, struct Client *, int, char *[]); extern int mo_restart(struct Client *, struct Client *, int, char *[]); extern int mo_rping(struct Client *, struct Client *, int, char *[]); +extern int mo_set(struct Client *, struct Client *, int, char *[]); extern int mo_settime(struct Client *, struct Client *, int, char *[]); extern int mo_squit(struct Client *, struct Client *, int, char *[]); extern int mo_stats(struct Client *, struct Client *, int, char *[]); @@ -183,12 +192,15 @@ /* * Comandos servidor <=> servidor */ +extern int ms_account(struct Client *, struct Client *, int, char *[]); extern int ms_admin(struct Client *, struct Client *, int, char *[]); +extern int ms_asll(struct Client *, struct Client *, int, char *[]); extern int ms_away(struct Client *, struct Client *, int, char *[]); #ifdef BDD extern int ms_bmode(struct Client *, struct Client *, int, char *[]); #endif extern int ms_burst(struct Client *, struct Client *, int, char *[]); +extern int ms_clearmode(struct Client *, struct Client *, int, char *[]); extern int ms_connect(struct Client *, struct Client *, int, char *[]); extern int ms_create(struct Client *, struct Client *, int, char *[]); #ifdef BDD @@ -204,6 +216,7 @@ extern int ms_info(struct Client *, struct Client *, int, char *[]); extern int ms_invite(struct Client *, struct Client *, int, char *[]); extern int ms_join(struct Client *, struct Client *, int, char *[]); +extern int ms_jupe(struct Client *, struct Client *, int, char *[]); extern int ms_kick(struct Client *, struct Client *, int, char *[]); extern int ms_kill(struct Client *, struct Client *, int, char *[]); extern int ms_links(struct Client *, struct Client *, int, char *[]); @@ -214,6 +227,7 @@ extern int ms_nick(struct Client *, struct Client *, int, char *[]); extern int ms_notice(struct Client *, struct Client *, int, char *[]); extern int ms_oper(struct Client *, struct Client *, int, char *[]); +extern int ms_opmode(struct Client *, struct Client *, int, char *[]); extern int ms_part(struct Client *, struct Client *, int, char *[]); extern int ms_ping(struct Client *, struct Client *, int, char *[]); extern int ms_pong(struct Client *, struct Client *, int, char *[]); Index: ircdh/include/jupe.h diff -u /dev/null ircdh/include/jupe.h:1.1 --- /dev/null Sat Jan 18 11:54:01 2003 +++ ircdh/include/jupe.h Sat Jan 18 11:53:48 2003 @@ -0,0 +1,73 @@ +/* + * IRC - Internet Relay Chat, include/jupe.h + * Copyright (C) 1990 Jarkko Oikarinen and + * University of Oulu, Computing Center + * Copyright (C) 2000 Kevin L. Mitchell <kl...@mi...> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * $Id: jupe.h,v 1.1 2003/01/18 19:53:48 zolty Exp $ + */ +#ifndef INCLUDED_jupe_h +#define INCLUDED_jupe_h +#ifndef INCLUDED_sys_types_h +#include <sys/types.h> +#define INCLUDED_sys_types_h +#endif + + +struct Client; + +#define JUPE_MAX_EXPIRE 604800 /* max expire: 7 days */ + +struct Jupe { + struct Jupe *ju_next; + struct Jupe **ju_prev_p; + char *ju_server; + char *ju_reason; + time_t ju_expire; + time_t ju_lastmod; + unsigned int ju_flags; +}; + +#define JUPE_ACTIVE 0x0001 +#define JUPE_LOCAL 0x0002 +#define JUPE_LDEACT 0x0004 /* locally deactivated */ + +#define JUPE_MASK (JUPE_ACTIVE | JUPE_LOCAL) +#define JUPE_ACTMASK (JUPE_ACTIVE | JUPE_LDEACT) + +#define JupeIsActive(j) (((j)->ju_flags & JUPE_ACTMASK) == JUPE_ACTIVE) +#define JupeIsRemActive(j) ((j)->ju_flags & JUPE_ACTIVE) +#define JupeIsLocal(j) ((j)->ju_flags & JUPE_LOCAL) + +#define JupeServer(j) ((j)->ju_server) +#define JupeReason(j) ((j)->ju_reason) +#define JupeLastMod(j) ((j)->ju_lastmod) + +extern int jupe_add(struct Client *cptr, struct Client *sptr, char *server, + char *reason, time_t expire, time_t lastmod, unsigned int flags); +extern int jupe_activate(struct Client *cptr, struct Client *sptr, + struct Jupe *jupe, time_t lastmod, unsigned int flags); +extern int jupe_deactivate(struct Client *cptr, struct Client *sptr, + struct Jupe *jupe, time_t lastmod, unsigned int flags); +extern struct Jupe *jupe_find(char *server); +extern void jupe_free(struct Jupe *jupe); +extern void jupe_burst(struct Client *cptr); +extern int jupe_resend(struct Client *cptr, struct Jupe *jupe); +extern int jupe_list(struct Client *sptr, char *server); +extern int jupe_memory_count(size_t *ju_size); + +#endif /* INCLUDED_jupe_h */ Index: ircdh/include/msg.h diff -u ircdh/include/msg.h:1.4 ircdh/include/msg.h:1.5 --- ircdh/include/msg.h:1.4 Sat Jan 18 11:09:03 2003 +++ ircdh/include/msg.h Sat Jan 18 11:53:48 2003 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: msg.h,v 1.4 2003/01/18 19:09:03 zolty Exp $ + * $Id: msg.h,v 1.5 2003/01/18 19:53:48 zolty Exp $ */ #ifndef INCLUDED_msg_h #define INCLUDED_msg_h @@ -318,12 +318,40 @@ #define TOK_PROTO "PROTO" #define CMD_PROTO MSG_PROTO, TOK_PROTO +#define MSG_JUPE "JUPE" /* JUPE */ +#define TOK_JUPE "JU" +#define CMD_JUPE MSG_JUPE, TOK_JUPE + #define MSG_OPMODE "OPMODE" /* OPMO */ #define TOK_OPMODE "OM" #define CMD_OPMODE MSG_OPMODE, TOK_OPMODE +#define MSG_CLEARMODE "CLEARMODE" /* CLMO */ +#define TOK_CLEARMODE "CM" +#define CMD_CLEARMODE MSG_CLEARMODE, TOK_CLEARMODE + +#define MSG_ACCOUNT "ACCOUNT" /* ACCO */ +#define TOK_ACCOUNT "AC" +#define CMD_ACCOUNT MSG_ACCOUNT, TOK_ACCOUNT + +#define MSG_ASLL "ASLL" /* ASLL */ +#define TOK_ASLL "LL" +#define CMD_ASLL MSG_ASLL, TOK_ASLL + #define MSG_POST "POST" /* POST */ #define TOK_POST "POST" + +#define MSG_SET "SET" /* SET */ +#define TOK_SET "SET" + +#define MSG_RESET "RESET" /* RESE */ +#define TOK_RESET "RESET" + +#define MSG_GET "GET" /* GET */ +#define TOK_GET "GET" + +#define MSG_PRIVS "PRIVS" /* PRIV */ +#define TOK_PRIVS "PRIVS" # if defined(BDD) #define MSG_DB "DB" /* Base de Datos ESNET */ Index: ircdh/include/patchlevel.h diff -u ircdh/include/patchlevel.h:1.7 ircdh/include/patchlevel.h:1.8 --- ircdh/include/patchlevel.h:1.7 Sat Jan 18 11:09:03 2003 +++ ircdh/include/patchlevel.h Sat Jan 18 11:53:48 2003 @@ -15,10 +15,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: patchlevel.h,v 1.7 2003/01/18 19:09:03 zolty Exp $ + * $Id: patchlevel.h,v 1.8 2003/01/18 19:53:48 zolty Exp $ * */ -#define PATCHLEVEL ".alpha12" +#define PATCHLEVEL ".alpha13" #define RELEASE "1.0" Index: ircdh/ircd/Makefile.in diff -u ircdh/ircd/Makefile.in:1.9 ircdh/ircd/Makefile.in:1.10 --- ircdh/ircd/Makefile.in:1.9 Sat Jan 18 11:09:04 2003 +++ ircdh/ircd/Makefile.in Sat Jan 18 11:53:48 2003 @@ -99,12 +99,16 @@ ircd_string.c \ ircd_tea.c \ ircd_xopen.c \ + jupe.c \ list.c \ listener.c \ + m_account.c \ m_admin.c \ + m_asll.c \ m_away.c \ m_bmode.c \ m_burst.c \ + m_clearmode.c \ m_close.c \ m_config.c \ m_connect.c \ @@ -119,13 +123,15 @@ m_die.c \ m_endburst.c \ m_error.c \ - m_gline.c \ + m_get.c \ m_ghost.c \ + m_gline.c \ m_help.c \ m_info.c \ m_invite.c \ m_ison.c \ m_join.c \ + m_jupe.c \ m_kick.c \ m_kill.c \ m_links.c \ @@ -138,19 +144,23 @@ m_nick.c \ m_notice.c \ m_oper.c \ + m_opmode.c \ m_part.c \ m_pass.c \ m_ping.c \ m_pong.c \ m_privmsg.c \ + m_privs.c \ m_proto.c \ m_quit.c \ m_rehash.c \ m_rename.c \ + m_reset.c \ m_restart.c \ m_rping.c \ m_rpong.c \ m_server.c \ + m_set.c \ m_settime.c \ m_silence.c \ m_squit.c \ Index: ircdh/ircd/ircd.c diff -u ircdh/ircd/ircd.c:1.7 ircdh/ircd/ircd.c:1.8 --- ircdh/ircd/ircd.c:1.7 Sat Jan 18 11:09:05 2003 +++ ircdh/ircd/ircd.c Sat Jan 18 11:53:49 2003 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: ircd.c,v 1.7 2003/01/18 19:09:05 zolty Exp $ + * $Id: ircd.c,v 1.8 2003/01/18 19:53:49 zolty Exp $ */ #include "config.h" @@ -34,7 +34,7 @@ #include "ircd_reply.h" #include "ircd_signal.h" #include "ircd_string.h" -//#include "jupe.h" +#include "jupe.h" #include "list.h" #include "match.h" #include "motd.h" @@ -247,7 +247,7 @@ time_t next = 0; struct ConnectionClass *cltmp; struct ConfItem *con_conf = 0; -// struct Jupe* ajupe; + struct Jupe *ajupe; unsigned int con_class = 0; assert(ET_EXPIRE == ev_type(ev)); @@ -261,12 +261,9 @@ if (!(aconf->status & CONF_SERVER) || aconf->port == 0) continue; -#if 0 -/* FIXME-ZOLTAN */ /* Also skip juped servers */ if ((ajupe = jupe_find(aconf->name)) && JupeIsActive(ajupe)) continue; -#endif /* Skip this entry if the use of it is still on hold until * future. Otherwise handle this entry (and set it on hold until next Index: ircdh/ircd/jupe.c diff -u /dev/null ircdh/ircd/jupe.c:1.1 --- /dev/null Sat Jan 18 11:54:01 2003 +++ ircdh/ircd/jupe.c Sat Jan 18 11:53:49 2003 @@ -0,0 +1,341 @@ +/* + * IRC - Internet Relay Chat, ircd/jupe.c + * Copyright (C) 1990 Jarkko Oikarinen and + * University of Oulu, Finland + * Copyright (C) 2000 Kevin L. Mitchell <kl...@mi...> + * + * 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: jupe.c,v 1.1 2003/01/18 19:53:49 zolty Exp $ + */ +#include "config.h" + +#include "jupe.h" +#include "client.h" +#include "hash.h" +#include "ircd.h" +#include "ircd_alloc.h" +#include "ircd_features.h" +#include "ircd_log.h" +#include "ircd_reply.h" +#include "ircd_string.h" +#include "match.h" +#include "msg.h" +#include "numeric.h" +#include "numnicks.h" +#include "s_bsd.h" +#include "s_misc.h" +#include "send.h" +#include "struct.h" +#include "support.h" +#include "sys.h" /* FALSE bleah */ + +#include <assert.h> +#include <string.h> + +static struct Jupe *GlobalJupeList = 0; + +static struct Jupe *make_jupe(char *server, char *reason, time_t expire, + time_t lastmod, unsigned int flags) +{ + struct Jupe *ajupe; + + ajupe = (struct Jupe *)MyMalloc(sizeof(struct Jupe)); /* alloc memory */ + assert(0 != ajupe); + + DupString(ajupe->ju_server, server); /* copy vital information */ + DupString(ajupe->ju_reason, reason); + ajupe->ju_expire = expire; + ajupe->ju_lastmod = lastmod; + ajupe->ju_flags = flags & JUPE_MASK; /* set jupe flags */ + + ajupe->ju_next = GlobalJupeList; /* link it into the list */ + ajupe->ju_prev_p = &GlobalJupeList; + if (GlobalJupeList) + GlobalJupeList->ju_prev_p = &ajupe->ju_next; + GlobalJupeList = ajupe; + + return ajupe; +} + +static int do_jupe(struct Client *cptr, struct Client *sptr, struct Jupe *jupe) +{ + struct Client *acptr; + + if (!JupeIsActive(jupe)) /* no action to be taken on inactive jupes */ + return 0; + + acptr = FindServer(jupe->ju_server); + + /* server isn't online or isn't local or is me */ + if (!acptr || !MyConnect(acptr) || IsMe(acptr)) + return 0; + + return exit_client_msg(cptr, acptr, &me, "Juped: %s", jupe->ju_reason); +} + +static void +propagate_jupe(struct Client *cptr, struct Client *sptr, struct Jupe *jupe) +{ + if (JupeIsLocal(jupe)) /* don't propagate local jupes */ + return; + + sendcmdto_serv_butone(sptr, CMD_JUPE, cptr, "* %c%s %Tu %Tu :%s", + JupeIsRemActive(jupe) ? '+' : '-', jupe->ju_server, + jupe->ju_expire - CurrentTime, jupe->ju_lastmod, jupe->ju_reason); +} + +int +jupe_add(struct Client *cptr, struct Client *sptr, char *server, char *reason, + time_t expire, time_t lastmod, unsigned int flags) +{ + struct Jupe *ajupe; + + assert(0 != server); + assert(0 != reason); + + /* + * You cannot set a negative (or zero) expire time, nor can you set an + * expiration time for greater than JUPE_MAX_EXPIRE. + */ + if (expire <= 0 || expire > JUPE_MAX_EXPIRE) + { + if (!IsServer(cptr) && MyConnect(cptr)) + send_reply(cptr, ERR_BADEXPIRE, expire); + return 0; + } + + expire += CurrentTime; /* convert from lifetime to timestamp */ + + /* Inform ops and log it */ + sendto_opmask_butone(0, SNO_NETWORK, "%s adding %sJUPE for %s, expiring at " + "%Tu: %s", + feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr) ? + cli_name(sptr) : cli_name((cli_user(sptr))->server), + flags & JUPE_LOCAL ? "local " : "", server, expire + TSoffset, reason); + + log_write(LS_JUPE, L_INFO, LOG_NOSNOTICE, + "%#C adding %sJUPE for %s, expiring at %Tu: %s", sptr, + flags & JUPE_LOCAL ? "local " : "", server, expire + TSoffset, reason); + + /* make the jupe */ + ajupe = make_jupe(server, reason, expire, lastmod, flags); + + propagate_jupe(cptr, sptr, ajupe); + + return do_jupe(cptr, sptr, ajupe); /* remove server if necessary */ +} + +int +jupe_activate(struct Client *cptr, struct Client *sptr, struct Jupe *jupe, + time_t lastmod, unsigned int flags) +{ + unsigned int saveflags = 0; + + assert(0 != jupe); + + saveflags = jupe->ju_flags; + + if (flags & JUPE_LOCAL) + jupe->ju_flags &= ~JUPE_LDEACT; + else + { + jupe->ju_flags |= JUPE_ACTIVE; + + if (jupe->ju_lastmod >= lastmod) /* force lastmod to increase */ + jupe->ju_lastmod++; + else + jupe->ju_lastmod = lastmod; + } + + if ((saveflags & JUPE_ACTMASK) == JUPE_ACTIVE) + return 0; /* was active to begin with */ + + /* Inform ops and log it */ + sendto_opmask_butone(0, SNO_NETWORK, "%s activating JUPE for %s, expiring " + "at %Tu: %s", + feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr) ? + cli_name(sptr) : cli_name((cli_user(sptr))->server), + jupe->ju_server, jupe->ju_expire + TSoffset, jupe->ju_reason); + + log_write(LS_JUPE, L_INFO, LOG_NOSNOTICE, + "%#C activating JUPE for %s, expiring at %Tu: %s", sptr, + jupe->ju_server, jupe->ju_expire + TSoffset, jupe->ju_reason); + + if (!(flags & JUPE_LOCAL)) /* don't propagate local changes */ + propagate_jupe(cptr, sptr, jupe); + + return do_jupe(cptr, sptr, jupe); +} + +int +jupe_deactivate(struct Client *cptr, struct Client *sptr, struct Jupe *jupe, + time_t lastmod, unsigned int flags) +{ + unsigned int saveflags = 0; + + assert(0 != jupe); + + saveflags = jupe->ju_flags; + + if (!JupeIsLocal(jupe)) + { + if (flags & JUPE_LOCAL) + jupe->ju_flags |= JUPE_LDEACT; + else + { + jupe->ju_flags &= ~JUPE_ACTIVE; + + if (jupe->ju_lastmod >= lastmod) /* force lastmod to increase */ + jupe->ju_lastmod++; + else + jupe->ju_lastmod = lastmod; + } + + if ((saveflags & JUPE_ACTMASK) != JUPE_ACTIVE) + return 0; /* was inactive to begin with */ + } + + /* Inform ops and log it */ + sendto_opmask_butone(0, SNO_NETWORK, "%s %s JUPE for %s, expiring at %Tu: " + "%s", + feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr) ? + cli_name(sptr) : cli_name((cli_user(sptr))->server), + JupeIsLocal(jupe) ? "removing local" : "deactivating", + jupe->ju_server, jupe->ju_expire + TSoffset, jupe->ju_reason); + + log_write(LS_JUPE, L_INFO, LOG_NOSNOTICE, + "%#C %s JUPE for %s, expiring at %Tu: %s", sptr, + JupeIsLocal(jupe) ? "removing local" : "deactivating", + jupe->ju_server, jupe->ju_expire + TSoffset, jupe->ju_reason); + + if (JupeIsLocal(jupe)) + jupe_free(jupe); + else if (!(flags & JUPE_LOCAL)) /* don't propagate local changes */ + propagate_jupe(cptr, sptr, jupe); + + return 0; +} + +struct Jupe *jupe_find(char *server) +{ + struct Jupe *jupe; + struct Jupe *sjupe; + + for (jupe = GlobalJupeList; jupe; jupe = sjupe) + { /* go through jupes */ + sjupe = jupe->ju_next; + + if (jupe->ju_expire <= CurrentTime) /* expire any that need expiring */ + jupe_free(jupe); + else if (0 == ircd_strcmp(server, jupe->ju_server)) /* found it yet? */ + return jupe; + } + + return 0; +} + +void jupe_free(struct Jupe *jupe) +{ + assert(0 != jupe); + + *jupe->ju_prev_p = jupe->ju_next; /* squeeze this jupe out */ + if (jupe->ju_next) + jupe->ju_next->ju_prev_p = jupe->ju_prev_p; + + MyFree(jupe->ju_server); /* and free up the memory */ + MyFree(jupe->ju_reason); + MyFree(jupe); +} + +void jupe_burst(struct Client *cptr) +{ + struct Jupe *jupe; + struct Jupe *sjupe; + + for (jupe = GlobalJupeList; jupe; jupe = sjupe) + { /* go through jupes */ + sjupe = jupe->ju_next; + + if (jupe->ju_expire <= CurrentTime) /* expire any that need expiring */ + jupe_free(jupe); + else if (!JupeIsLocal(jupe)) /* forward global jupes */ + sendcmdto_one(&me, CMD_JUPE, cptr, "* %c%s %Tu %Tu :%s", + JupeIsRemActive(jupe) ? '+' : '-', jupe->ju_server, + jupe->ju_expire - CurrentTime, jupe->ju_lastmod, jupe->ju_reason); + } +} + +int jupe_resend(struct Client *cptr, struct Jupe *jupe) +{ + if (JupeIsLocal(jupe)) /* don't propagate local jupes */ + return 0; + + sendcmdto_one(&me, CMD_JUPE, cptr, "* %c%s %Tu %Tu :%s", + JupeIsRemActive(jupe) ? '+' : '-', jupe->ju_server, + jupe->ju_expire - CurrentTime, jupe->ju_lastmod, jupe->ju_reason); + + return 0; +} + +int jupe_list(struct Client *sptr, char *server) +{ + struct Jupe *jupe; + struct Jupe *sjupe; + + if (server) + { + if (!(jupe = jupe_find(server))) /* no such jupe */ + return send_reply(sptr, ERR_NOSUCHJUPE, server); + + /* send jupe information along */ + send_reply(sptr, RPL_JUPELIST, jupe->ju_server, jupe->ju_expire + TSoffset, + JupeIsLocal(jupe) ? cli_name(&me) : "*", + JupeIsActive(jupe) ? '+' : '-', jupe->ju_reason); + } + else + { + for (jupe = GlobalJupeList; jupe; jupe = sjupe) + { /* go through jupes */ + sjupe = jupe->ju_next; + + if (jupe->ju_expire <= CurrentTime) /* expire any that need expiring */ + jupe_free(jupe); + else /* send jupe information along */ + send_reply(sptr, RPL_JUPELIST, jupe->ju_server, + jupe->ju_expire + TSoffset, + JupeIsLocal(jupe) ? cli_name(&me) : "*", + JupeIsActive(jupe) ? '+' : '-', jupe->ju_reason); + } + } + + /* end of jupe information */ + return send_reply(sptr, RPL_ENDOFJUPELIST); +} + +int jupe_memory_count(size_t *ju_size) +{ + struct Jupe *jupe; + unsigned int ju = 0; + + for (jupe = GlobalJupeList; jupe; jupe = jupe->ju_next) + { + ju++; + ju_size += sizeof(struct Jupe); + ju_size += jupe->ju_server ? (strlen(jupe->ju_server) + 1) : 0; + ju_size += jupe->ju_reason ? (strlen(jupe->ju_reason) + 1) : 0; + } + return ju; +} Index: ircdh/ircd/m_account.c diff -u /dev/null ircdh/ircd/m_account.c:1.1 --- /dev/null Sat Jan 18 11:54:01 2003 +++ ircdh/ircd/m_account.c Sat Jan 18 11:53:49 2003 @@ -0,0 +1,135 @@ +/* + * IRC - Internet Relay Chat, ircd/m_account.c + * Copyright (C) 2002 Kevin L. Mitchell <kl...@mi...> + * + * See file AUTHORS in IRC package for additional names of + * the programmers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 1, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * $Id: m_account.c,v 1.1 2003/01/18 19:53:49 zolty Exp $ + */ + +/* + * m_functions execute protocol messages on this server: + * + * cptr is always NON-NULL, pointing to a *LOCAL* client + * structure (with an open socket connected!). This + * identifies the physical socket where the message + * originated (or which caused the m_function to be + * executed--some m_functions may call others...). + * + * sptr is the source of the message, defined by the + * prefix part of the message if present. If not + * or prefix not found, then sptr==cptr. + * + * (!IsServer(cptr)) => (cptr == sptr), because + * prefixes are taken *only* from servers... + * + * (IsServer(cptr)) + * (sptr == cptr) => the message didn't + * have the prefix. + * + * (sptr != cptr && IsServer(sptr) means + * the prefix specified servername. (?) + * + * (sptr != cptr && !IsServer(sptr) means + * that message originated from a remote + * user (not local). + * + * combining + * + * (!IsServer(sptr)) means that, sptr can safely + * taken as defining the target structure of the + * message in this server. + * + * *Always* true (if 'parse' and others are working correct): + * + * 1) sptr->from == cptr (note: cptr->from == cptr) + * + * 2) MyConnect(sptr) <=> sptr == cptr (e.g. sptr + * *cannot* be a local connection, unless it's + * actually cptr!). [MyConnect(x) should probably + * be defined as (x == x->from) --msa ] + * + * parc number of variable parameter strings (if zero, + * parv is allowed to be NULL) + * + * parv a NULL terminated list of parameter pointers, + * + * parv[0], sender (prefix string), if not present + * this points to an empty string. + * parv[1]...parv[parc-1] + * pointers to additional parameters + * parv[parc] == NULL, *always* + * + * note: it is guaranteed that parv[0]..parv[parc-1] are all + * non-NULL pointers. + */ +#include "config.h" + +#include "client.h" +#include "ircd.h" +#include "ircd_reply.h" +#include "ircd_string.h" +#include "msg.h" +#include "numnicks.h" +#include "s_user.h" +#include "send.h" + +#include <assert.h> + +/* + * ms_account - server message handler + * + * parv[0] = sender prefix + * parv[1] = numeric of client to act on + * parv[2] = account name (12 characters or less) + */ +int ms_account(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) +{ + struct Client *acptr; + + if (parc < 3) + return need_more_params(sptr, "ACCOUNT"); + + if (!IsServer(sptr)) + return protocol_violation(cptr, "ACCOUNT from non-server %s", + cli_name(sptr)); + + if (!(acptr = findNUser(parv[1]))) + return 0; /* Ignore ACCOUNT for a user that QUIT; probably crossed */ + + if (IsAccount(acptr)) + return protocol_violation(cptr, "ACCOUNT for already registered user %s " + "(%s -> %s)", cli_name(acptr), cli_user(acptr)->account, parv[2]); + + assert(0 == cli_user(acptr)->account[0]); + + if (strlen(parv[2]) > ACCOUNTLEN) + { + return protocol_violation(cptr, + "Received account (%s) longer than %d for %s; ignoring.", parv[2], + ACCOUNTLEN, cli_name(acptr)); + } + + ircd_strncpy(cli_user(acptr)->account, parv[2], ACCOUNTLEN); + hide_hostmask(acptr, FLAGS_ACCOUNT); + + sendcmdto_serv_butone(sptr, CMD_ACCOUNT, cptr, "%C %s", acptr, + cli_user(acptr)->account); + + return 0; +} Index: ircdh/ircd/m_asll.c diff -u /dev/null ircdh/ircd/m_asll.c:1.1 --- /dev/null Sat Jan 18 11:54:01 2003 +++ ircdh/ircd/m_asll.c Sat Jan 18 11:53:49 2003 @@ -0,0 +1,183 @@ +/* + * IRC - Internet Relay Chat, ircd/m_asll.c + * Copyright (C) 2002 Alex Badea <va...@p1...> + * + * See file AUTHORS in IRC package for additional names of + * the programmers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 1, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * $Id: m_asll.c,v 1.1 2003/01/18 19:53:49 zolty Exp $ + */ + +/* + * m_functions execute protocol messages on this server: + * + * cptr is always NON-NULL, pointing to a *LOCAL* client + * structure (with an open socket connected!). This + * identifies the physical socket where the message + * originated (or which caused the m_function to be + * executed--some m_functions may call others...). + * + * sptr is the source of the message, defined by the + * prefix part of the message if present. If not + * or prefix not found, then sptr==cptr. + * + * (!IsServer(cptr)) => (cptr == sptr), because + * prefixes are taken *only* from servers... + * + * (IsServer(cptr)) + * (sptr == cptr) => the message didn't + * have the prefix. + * + * (sptr != cptr && IsServer(sptr) means + * the prefix specified servername. (?) + * + * (sptr != cptr && !IsServer(sptr) means + * that message originated from a remote + * user (not local). + * + * combining + * + * (!IsServer(sptr)) means that, sptr can safely + * taken as defining the target structure of the + * message in this server. + * + * *Always* true (if 'parse' and others are working correct): + * + * 1) sptr->from == cptr (note: cptr->from == cptr) + * + * 2) MyConnect(sptr) <=> sptr == cptr (e.g. sptr + * *cannot* be a local connection, unless it's + * actually cptr!). [MyConnect(x) should probably + * be defined as (x == x->from) --msa ] + * + * parc number of variable parameter strings (if zero, + * parv is allowed to be NULL) + * + * parv a NULL terminated list of parameter pointers, + * + * parv[0], sender (prefix string), if not present + * this points to an empty string. + * parv[1]...parv[parc-1] + * pointers to additional parameters + * parv[parc] == NULL, *always* + * + * note: it is guaranteed that parv[0]..parv[parc-1] are all + * non-NULL pointers. + */ +#include "config.h" + +#include "client.h" +#include "hash.h" +#include "ircd.h" +#include "ircd_reply.h" +#include "ircd_string.h" +#include "numeric.h" +#include "numnicks.h" +#include "match.h" +#include "msg.h" +#include "send.h" +#include "s_bsd.h" +#include "s_user.h" + +#include <assert.h> +#include <stdlib.h> + +static int send_asll_reply(struct Client *from, struct Client *to, char *server, + int rtt, int up, int down) +{ + sendcmdto_one(from, CMD_NOTICE, to, + (up + || down) ? "%C :AsLL for %s -- RTT: %ims Upstream: %ims Downstream: %ims" + : rtt ? "%C :AsLL for %s -- RTT: %ims [no asymm info]" : + "%C :AsLL for %s -- [unknown]", to, server, rtt, up, down); + return 0; +} + +/* + * ms_asll - server message handler + */ +int ms_asll(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) +{ + char *mask; + struct Client *acptr; + int i; + + if (parc < 2) + return need_more_params(sptr, "ASLL"); + + if (parc > 5) + { + if (!(acptr = findNUser(parv[1]))) + return 0; + if (MyUser(acptr)) + send_asll_reply(sptr, acptr, parv[2], atoi(parv[3]), atoi(parv[4]), + atoi(parv[5])); + else + sendcmdto_prio_one(sptr, CMD_ASLL, acptr, "%C %s %s %s %s", + acptr, parv[2], parv[3], parv[4], parv[5]); + return 0; + } + + if (hunt_server_prio_cmd(sptr, CMD_ASLL, cptr, 1, "%s %C", 2, parc, + parv) != HUNTED_ISME) + return 0; + mask = parv[1]; + + for (i = 0; i <= HighestFd; i++) + { + acptr = LocalClientArray[i]; + if (!acptr || !IsServer(acptr) || !MyConnect(acptr) + || match(mask, cli_name(acptr))) + continue; + sendcmdto_prio_one(&me, CMD_ASLL, sptr, "%C %s %i %i %i", sptr, + cli_name(acptr), cli_serv(acptr)->asll_rtt, + cli_serv(acptr)->asll_to, cli_serv(acptr)->asll_from); + } + return 0; +} + +/* + * mo_asll - oper message handler + */ +int mo_asll(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) +{ + char *mask; + struct Client *acptr; + int i; + + if (parc < 2) + return need_more_params(sptr, "ASLL"); + + if (parc == 2 && MyUser(sptr)) + parv[parc++] = cli_name(&me); + + if (hunt_server_prio_cmd(sptr, CMD_ASLL, cptr, 1, "%s %C", 2, parc, + parv) != HUNTED_ISME) + return 0; + mask = parv[1]; + + for (i = 0; i <= HighestFd; i++) + { + acptr = LocalClientArray[i]; + if (!acptr || !IsServer(acptr) || !MyConnect(acptr) + || match(mask, cli_name(acptr))) + continue; + send_asll_reply(&me, sptr, cli_name(acptr), cli_serv(acptr)->asll_rtt, + cli_serv(acptr)->asll_to, cli_serv(acptr)->asll_from); + } + return 0; +} Index: ircdh/ircd/m_clearmode.c diff -u /dev/null ircdh/ircd/m_clearmode.c:1.1 --- /dev/null Sat Jan 18 11:54:01 2003 +++ ircdh/ircd/m_clearmode.c Sat Jan 18 11:53:49 2003 @@ -0,0 +1,323 @@ +/* + * IRC - Internet Relay Chat, ircd/m_tmpl.c + * Copyright (C) 1990 Jarkko Oikarinen and + * University of Oulu, Computing Center + * Copyright (C) 2000 Kevin L. Mitchell <kl...@mi...> + * + * See file AUTHORS in IRC package for additional names of + * the programmers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 1, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * $Id: m_clearmode.c,v 1.1 2003/01/18 19:53:49 zolty Exp $ + */ + +/* + * m_functions execute protocol messages on this server: + * + * cptr is always NON-NULL, pointing to a *LOCAL* client + * structure (with an open socket connected!). This + * identifies the physical socket where the message + * originated (or which caused the m_function to be + * executed--some m_functions may call others...). + * + * sptr is the source of the message, defined by the + * prefix part of the message if present. If not + * or prefix not found, then sptr==cptr. + * + * (!IsServer(cptr)) => (cptr == sptr), because + * prefixes are taken *only* from servers... + * + * (IsServer(cptr)) + * (sptr == cptr) => the message didn't + * have the prefix. + * + * (sptr != cptr && IsServer(sptr) means + * the prefix specified servername. (?) + * + * (sptr != cptr && !IsServer(sptr) means + * that message originated from a remote + * user (not local). + * + * combining + * + * (!IsServer(sptr)) means that, sptr can safely + * taken as defining the target structure of the + * message in this server. + * + * *Always* true (if 'parse' and others are working correct): + * + * 1) sptr->from == cptr (note: cptr->from == cptr) + * + * 2) MyConnect(sptr) <=> sptr == cptr (e.g. sptr + * *cannot* be a local connection, unless it's + * actually cptr!). [MyConnect(x) should probably + * be defined as (x == x->from) --msa ] + * + * parc number of variable parameter strings (if zero, + * parv is allowed to be NULL) + * + * parv a NULL terminated list of parameter pointers, + * + * parv[0], sender (prefix string), if not present + * this points to an empty string. + * parv[1]...parv[parc-1] + * pointers to additional parameters + * parv[parc] == NULL, *always* + * + * note: it is guaranteed that parv[0]..parv[parc-1] are all + * non-NULL pointers. + */ +#include "config.h" + +#include "client.h" +#include "channel.h" +#include "hash.h" +#include "ircd.h" +#include "ircd_alloc.h" +#include "ircd_features.h" +#include "ircd_log.h" +#include "ircd_reply.h" +#include "ircd_string.h" +#include "list.h" +#include "msg.h" +#include "numeric.h" +#include "numnicks.h" +#include "s_conf.h" +#include "send.h" +#include "support.h" + +#include <assert.h> + +/* + * do_clearmode(struct Client *cptr, struct Client *sptr, + * struct Channel *chptr, char *control) + * + * This is the function that actually clears the channel modes. + */ +static int +do_clearmode(struct Client *cptr, struct Client *sptr, struct Channel *chptr, + char *control) +{ + static int flags[] = { + MODE_CHANOP, 'o', + MODE_VOICE, 'v', + MODE_PRIVATE, 'p', + MODE_SECRET, 's', + MODE_MODERATED, 'm', + MODE_TOPICLIMIT, 't', + MODE_INVITEONLY, 'i', + MODE_NOPRIVMSGS, 'n', + MODE_KEY, 'k', + MODE_BAN, 'b', + MODE_LIMIT, 'l', + MODE_REGONLY, 'r', + 0x0, 0x0 + }; + int *flag_p; + unsigned int del_mode = 0; + char control_buf[20]; + int control_buf_i = 0; + struct ModeBuf mbuf; + struct SLink *link, *next; + struct Membership *member; + + /* Um...yeah, like it's supposed to have any modes at all. */ + if (IsModelessChannel(chptr->chname)) + return 0; + + /* Ok, so what are we supposed to get rid of? */ + for (; *control; control++) + { + for (flag_p = flags; flag_p[0]; flag_p += 2) + if (*control == flag_p[1]) + { + del_mode |= flag_p[0]; + break; + } + } + + if (!del_mode) + return 0; /* nothing to remove; ho hum. */ + + modebuf_init(&mbuf, sptr, cptr, chptr, (MODEBUF_DEST_CHANNEL | /* Send MODE to channel */ + MODEBUF_DEST_OPMODE | /* Treat it like an OPMODE */ + MODEBUF_DEST_HACK4)); /* Generate a HACK(4) notice */ + + modebuf_mode(&mbuf, MODE_DEL | (del_mode & chptr->mode.mode)); + chptr->mode.mode &= ~del_mode; /* and of course actually delete them */ + + /* If we're removing invite, remove all the invites */ + if (del_mode & MODE_INVITEONLY) + mode_invite_clear(chptr); + + /* + * If we're removing the key, note that; note that we can't clear + * the key until after modebuf_* are done with it + */ + if (del_mode & MODE_KEY && *chptr->mode.key) + modebuf_mode_string(&mbuf, MODE_DEL | MODE_KEY, chptr->mode.key, 0); + + /* If we're removing the limit, note that and clear the limit */ + if (del_mode & MODE_LIMIT && chptr->mode.limit) + { + modebuf_mode_uint(&mbuf, MODE_DEL | MODE_LIMIT, chptr->mode.limit); + chptr->mode.limit = 0; /* not referenced, so safe */ + } + + /* + * Go through and mark the bans for deletion; note that we can't + * free them until after modebuf_* are done with them + */ + if (del_mode & MODE_BAN) + { + for (link = chptr->banlist; link; link = next) + { + next = link->next; + + modebuf_mode_string(&mbuf, MODE_DEL | MODE_BAN, /* delete ban */ + link->value.ban.banstr, 1); + + MyFree(link->value.ban.who); /* free up who string */ + free_link(link); /* and of course the link itself */ + } + + chptr->banlist = 0; + } + + /* Deal with users on the channel */ + if (del_mode & (MODE_BAN | MODE_CHANOP | MODE_VOICE)) + for (member = chptr->members; member; member = member->next_member) + { + if (IsZombie(member)) /* we ignore zombies */ + continue; + + if (del_mode & MODE_BAN) /* If we cleared bans, clear the valid flags */ + ClearBanValid(member); + + /* Drop channel operator status */ + if (IsChanOp(member) && del_mode & MODE_CHANOP) + { + modebuf_mode_client(&mbuf, MODE_DEL | MODE_CHANOP, member->user); + member->status &= ~CHFL_CHANOP; + } + + /* Drop voice */ + if (HasVoice(member) && del_mode & MODE_VOICE) + { + modebuf_mode_client(&mbuf, MODE_DEL | MODE_VOICE, member->user); + member->status &= ~CHFL_VOICE; + } + } + + /* And flush the modes to the channel */ + modebuf_flush(&mbuf); + + /* Finally, we can clear the key... */ + if (del_mode & MODE_KEY) + chptr->mode.key[0] = '\0'; + + /* Ok, build control string again */ + for (flag_p = flags; flag_p[0]; flag_p += 2) + if (del_mode & flag_p[0]) + control_buf[control_buf_i++] = flag_p[1]; + + control_buf[control_buf_i] = '\0'; + + /* Log it... */ + log_write(LS_OPERMODE, L_INFO, LOG_NOSNOTICE, "%#C CLEARMODE %H %s", sptr, + chptr, control_buf); + + /* Then send it */ + if (!IsLocalChannel(chptr->chname)) + sendcmdto_serv_butone(sptr, CMD_CLEARMODE, cptr, "%H %s", chptr, + control_buf); + + return 0; +} + +/* + * ms_clearmode - server message handler + * + * parv[0] = Send prefix + * parv[1] = Channel name + * parv[2] = Control string + */ +int +ms_clearmode(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) +{ + struct Channel *chptr; + + if (parc < 3) + return need_more_params(sptr, "CLEARMODE"); + + if (!IsPrivileged(sptr)) + { + protocol_violation(sptr, "No priviledges on source for CLEARMODE, desync?"); + return send_reply(sptr, ERR_NOPRIVILEGES); + } + + if (!IsChannelName(parv[1]) || IsLocalChannel(parv[1]) || + !(chptr = FindChannel(parv[1]))) + return send_reply(sptr, ERR_NOSUCHCHANNEL, parv[1]); + + return do_clearmode(cptr, sptr, chptr, parv[2]); +} + +/* + * mo_clearmode - oper message handler + * + * parv[0] = Send prefix + * parv[1] = Channel name + * parv[2] = Control string + */ +int +mo_clearmode(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) +{ + struct Channel *chptr; + char *control = "ovpsmikbl"; /* default control string */ + char *chname, *qreason; + int force = 0; + + if (!feature_bool(FEAT_CONFIG_OPERCMDS)) + return send_reply(sptr, ERR_DISABLED, "CLEARMODE"); + + if (parc < 2) + return need_more_params(sptr, "CLEARMODE"); + + if (parc > 2) + control = parv[2]; + + chname = parv[1]; + if (*chname == '!') + { + chname++; + if (!HasPriv(sptr, + IsLocalChannel(chname) ? PRIV_FORCE_LOCAL_OPMODE : PRIV_FORCE_OPMODE)) + return send_reply(sptr, ERR_NOPRIVILEGES); + force = 1; + } + + if (!HasPriv(sptr, IsLocalChannel(chname) ? PRIV_LOCAL_OPMODE : PRIV_OPMODE)) + return send_reply(sptr, ERR_NOPRIVILEGES); + + if (('#' != *chname && '&' != *chname) || !(chptr = FindChannel(chname))) + return send_reply(sptr, ERR_NOSUCHCHANNEL, chname); + + if (!force && (qreason = find_quarantine(chptr->chname))) + return send_reply(sptr, ERR_QUARANTINED, chptr->chname, qreason); + + return do_clearmode(cptr, sptr, chptr, control); +} Index: ircdh/ircd/m_connect.c diff -u ircdh/ircd/m_connect.c:1.2 ircdh/ircd/m_connect.c:1.3 --- ircdh/ircd/m_connect.c:1.2 Sat Jan 18 11:09:06 2003 +++ ircdh/ircd/m_connect.c Sat Jan 18 11:53:49 2003 @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: m_connect.c,v 1.2 2003/01/18 19:09:06 zolty Exp $ + * $Id: m_connect.c,v 1.3 2003/01/18 19:53:49 zolty Exp $ */ /* @@ -89,7 +89,7 @@ #include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" -//#include "jupe.h" +#include "jupe.h" #include "match.h" #include "msg.h" #include "numeric.h" @@ -118,7 +118,7 @@ const char *rule; struct ConfItem *aconf; struct Client *acptr; -// struct Jupe *ajupe; + struct Jupe *ajupe; assert(0 != cptr); assert(0 != sptr); @@ -176,15 +176,12 @@ /* * Check to see if the server is juped; if it is, disallow the connect */ -#if 0 -/* FIXME-ZOLTAN */ if ((ajupe = jupe_find(aconf->name)) && JupeIsActive(ajupe)) { sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Connect: Server %s is juped: %s", sptr, JupeServer(ajupe), JupeReason(ajupe)); return 0; } -#endif /* * Allow opers to /connect foo.* 0 bah.* to connect foo and bah @@ -242,7 +239,7 @@ const char *rule; struct ConfItem *aconf; struct Client *acptr; -// struct Jupe* ajupe; + struct Jupe *ajupe; assert(0 != cptr); assert(cptr == sptr); @@ -324,15 +321,13 @@ /* * Check to see if the server is juped; if it is, disallow the connect */ -#if 0 -/* FIXME-ZOLTAN */ if ((ajupe = jupe_find(aconf->name)) && JupeIsActive(ajupe)) { sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Connect: Server %s is juped: %s", sptr, JupeServer(ajupe), JupeReason(ajupe)); return 0; } -#endif + /* * Get port number from user, if given. If not specified, * use the default from configuration structure. If missing Index: ircdh/ircd/m_get.c diff -u /dev/null ircdh/ircd/m_get.c:1.1 --- /dev/null Sat Jan 18 11:54:01 2003 +++ ircdh/ircd/m_get.c Sat Jan 18 11:53:49 2003 @@ -0,0 +1,102 @@ +/* + * IRC - Internet Relay Chat, ircd/m_get.c + * Copyright (C) 1990 Jarkko Oikarinen and + * University of Oulu, Computing Center + * + * See file AUTHORS in IRC package for additional names of + * the programmers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 1, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * $Id: m_get.c,v 1.1 2003/01/18 19:53:49 zolty Exp $ + */ + +/* + * m_functions execute protocol messages on this server: + * + * cptr is always NON-NULL, pointing to a *LOCAL* client + * structure (with an open socket connected!). This + * identifies the physical socket where the message + * originated (or which caused the m_function to be + * executed--some m_functions may call others...). + * + * sptr is the source of the message, defined by the + * prefix part of the message if present. If not + * or prefix not found, then sptr==cptr. + * + * (!IsServer(cptr)) => (cptr == sptr), because + * prefixes are taken *only* from servers... + * + * (IsServer(cptr)) + * (sptr == cptr) => the message didn't + * have the prefix. + * + * (sptr != cptr && IsServer(sptr) means + * the prefix specified servername. (?) + * + * (sptr != cptr && !IsServer(sptr) means + * that message originated from a remote + * user (not local). + * + * combining + * + * (!IsServer(sptr)) means that, sptr can safely + * taken as defining the target structure of the + * message in this server. + * + * *Always* true (if 'parse' and others are working correct): + * + * 1) sptr->from == cptr (note: cptr->from == cptr) + * + * 2) MyConnect(sptr) <=> sptr == cptr (e.g. sptr + * *cannot* be a local connection, unless it's + * actually cptr!). [MyConnect(x) should probably + * be defined as (x == x->from) --msa ] + * + * parc number of variable parameter strings (if zero, + * parv is allowed to be NULL) + * + * parv a NULL terminated list of parameter pointers, + * + * parv[0], sender (prefix string), if not present + * this points to an empty string. + * parv[1]...parv[parc-1] + * pointers to additional parameters + * parv[parc] == NULL, *always* + * + * note: it is guaranteed that parv[0]..parv[parc-1] are all + * non-NULL pointers. + */ +#include "config.h" + +#include "client.h" +#include "hash.h" +#include "ircd.h" +#include "ircd_features.h" +#include "ircd_reply.h" +#include "ircd_string.h" +#include "numeric.h" +#include "numnicks.h" +#include "send.h" + +#include <assert.h> + +/* + * mo_get - oper message handler + */ +int mo_get(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) +{ + return feature_get(sptr, (const char *const *)parv + 1, parc - 1); +} Index: ircdh/ircd/m_jupe.c diff -u /dev/null ircdh/ircd/m_jupe.c:1.1 --- /dev/null Sat Jan 18 11:54:01 2003 +++ ircdh/ircd/m_jupe.c Sat Jan 18 11:53:49 2003 @@ -0,0 +1,294 @@ +/* + * IRC - Internet Relay Chat, ircd/m_jupe.c + * Copyright (C) 1990 Jarkko Oikarinen and + * University of Oulu, Computing Center + * Copyright (C) 2000 Kevin L. Mitchell <kl...@mi...> + * + * See file AUTHORS in IRC package for additional names of + * the programmers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 1, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * $Id: m_jupe.c,v 1.1 2003/01/18 19:53:49 zolty Exp $ + */ + +/* + * m_functions execute protocol messages on this server: + * + * cptr is always NON-NULL, pointing to a *LOCAL* client + * structure (with an open socket connected!). This + * identifies the physical socket where the message + * originated (or which caused the m_function to be + * executed--some m_functions may call others...). + * + * sptr is the source of the message, defined by the + * prefix part of the message if present. If not + * or prefix not found, then sptr==cptr. + * + * (!IsServer(cptr)) => (cptr == sptr), because + * prefixes are taken *only* from servers... + * + * (IsServer(cptr)) + * (sptr == cptr) => the message didn't + * have the prefix. + * + * (sptr != cptr && IsServer(sptr) means + * the prefix specified servername. (?) + * + * (sptr != cptr && !IsServer(sptr) means + * that message originated from a remote + * user (not local). + * + * combining + * + * (!IsServer(sptr)) means that, sptr can safely + * taken as defining the target structure of the + * message in this server. + * + * *Always* true (if 'parse' and others are working correct): + * + * 1) sptr->from == cptr (note: cptr->from == cptr) + * + * 2) MyConnect(sptr) <=> sptr == cptr (e.g. sptr + * *cannot* be a local connection, unless it's + * actually cptr!). [MyConnect(x) should probably + * be defined as (x == x->from) --msa ] + * + * parc number of variable parameter strings (if zero, + * parv is allowed to be NULL) + * + * parv a NULL terminated list of parameter pointers, + * + * parv[0], sender (prefix string), if not present + * this points to an empty string. + * parv[1]...parv[parc-1] + * pointers to additional parameters + * parv[parc] == NULL, *always* + * + * note: it is guaranteed that parv[0]..parv[parc-1] are all + * non-NULL pointers. + */ +#include "config.h" + +#include "client.h" +#include "jupe.h" +#include "hash.h" +#include "ircd.h" +#include "ircd_features.h" +#include "ircd_reply.h" +#include "ircd_string.h" +#include "match.h" +#include "msg.h" +#include "numeric.h" +#include "numnicks.h" +#include "s_conf.h" +#include "s_misc.h" +#include "send.h" +#include "support.h" + +#include <assert.h> +#include <stdlib.h> +#include <string.h> + +/* + * ms_jupe - server message handler + * + * parv[0] = Send prefix + * + * From server: + * + * parv[1] = Target: server numeric or * + * parv[2] = (+|-)<server name> + * parv[3] = Expiration offset + * parv[4] = Last modification time + * parv[5] = Comment + * + */ +int ms_jupe(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) +{ + struct Client *acptr = 0; + struct Jupe *ajupe; + unsigned int flags = 0; + time_t expire_off, lastmod; + char *server = parv[2], *target = parv[1], *reason = parv[5]; + + if (parc < 6) + return need_more_params(sptr, "JUPE"); + + if (!(target[0] == '*' && target[1] == '\0')) + { + if (!(acptr = FindNServer(target))) + return 0; /* no such server */ + + if (!IsMe(acptr)) + { /* manually propagate, since we don't set it */ + sendcmdto_one(sptr, CMD_JUPE, acptr, "%s %s %s %s :%s", target, server, + parv[3], parv[4], reason); + return 0; + } + + flags |= JUPE_LOCAL; + } + + if (*server == '-') + server++; + else if (*server == '+') + { + flags |= JUPE_ACTIVE; + server++; + } + + expire_off = atoi(parv[3]); + lastmod = atoi(parv[4]); + + ajupe = jupe_find(server); + + if (ajupe) + { + if (JupeIsLocal(ajupe) && !(flags & JUPE_LOCAL)) /* global over local */ + jupe_free(ajupe); + else if (JupeLastMod(ajupe) < lastmod) + { /* new modification */ + if (flags & JUPE_ACTIVE) + return jupe_activate(cptr, sptr, ajupe, lastmod, flags); + else + return jupe_deactivate(cptr, sptr, ajupe, lastmod, flags); + } + else if (JupeLastMod(ajupe) == lastmod || IsBurstOrBurstAck(cptr)) + return 0; + else + return jupe_resend(cptr, ajupe); /* other server desynched WRT jupes */ + } + + return jupe_add(cptr, sptr, server, reason, expire_off, lastmod, flags); +} + +/* + * mo_jupe - oper message handler + * + * parv[0] = Send prefix + * parv[1] = [[+|-]<server name>] + * + * Local (to me) style: + * + * parv[2] = [Expiration offset] + * parv[3] = [Comment] + * + * Global (or remote local) style: + * + * parv[2] = [target] + * parv[3] = [Expiration offset] + * parv[4] = [Comment] + * + */ +int mo_jupe(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) +{ + struct Client *acptr = 0; + struct Jupe *ajupe; + unsigned int flags = 0; + time_t expire_off; + char *server = parv[1], *target = 0, *reason; + + if (parc < 2) + return jupe_list(sptr, 0); + + if (*server == '+') + { + flags |= JUPE_ACTIVE; + server++; + } + else if (*server == '-') + server++; + else + return jupe_list(sptr, server); + + if (!feature_bool(FEAT_CONFIG_OPERCMDS)) + return send_reply(sptr, ERR_DISABLED, "JUPE"); + + if (parc == 4) + { + expire_off = atoi(parv[2]); + reason = parv[3]; + flags |= JUPE_LOCAL; + } + else if (parc > 4) + { + target = parv[2]; + expire_off = atoi(parv[3]); + reason = parv[4]; + } + else + return need_more_params(sptr, "JUPE"); + + if (target) + { + if (!(target[0] == '*' && target[1] == '\0')) + { + if (!(acptr = find_match_server(target))) + return send_reply(sptr, ERR_NOSUCHSERVER, target); + + if (!IsMe(acptr)) + { /* manually propagate, since we don't set it */ + if (!HasPriv(sptr, PRIV_GLINE)) + return send_reply(sptr, ERR_NOPRIVILEGES); + + sendcmdto_one(sptr, CMD_JUPE, acptr, "%C %c%s %s %Tu :%s", acptr, + flags & JUPE_ACTIVE ? '+' : '-', server, parv[3], TStime(), reason); + return 0; + } + else if (!HasPriv(sptr, PRIV_LOCAL_GLINE)) + return send_reply(sptr, ERR_NOPRIVILEGES); + + flags |= JUPE_LOCAL; + } + else if (!HasPriv(sptr, PRIV_GLINE)) + return send_reply(sptr, ERR_NOPRIVILEGES); + } + + ajupe = jupe_find(server); + + if (ajupe) + { + if (JupeIsLocal(ajupe) && !(flags & JUPE_LOCAL)) /* global over local */ + jupe_free(ajupe); + else + { + if (flags & JUPE_ACTIVE) + return jupe_activate(cptr, sptr, ajupe, TStime(), flags); + else + return jupe_deactivate(cptr, sptr, ajupe, TStime(), flags); + } + } + + return jupe_add(cptr, sptr, server, reason, expire_off, TStime(), flags); +} + +/* + * m_jupe - user message handler + * + * parv[0] = Send prefix + * + * From user: + * + * parv[1] = [<server name>] + * + */ +int m_jupe(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) +{ + if (parc < 2) + return jupe_list(sptr, 0); + + return jupe_list(sptr, parv[1]); +} Index: ircdh/ircd/m_opmode.c diff -u /dev/null ircdh/ircd/m_opmode.c:1.1 --- /dev/null Sat Jan 18 11:54:01 2003 +++ ircdh/ircd/m_opmode.c Sat Jan 18 11:53:49 2003 @@ -0,0 +1,180 @@ +/* + * IRC - Internet Relay Chat, ircd/m_tmpl.c + * Copyright (C) 1990 Jarkko Oikarinen and + * University of Oulu, Computing Center + * Copyright (C) 2000 Kevin L. Mitchell <kl...@mi...> + * + * See file AUTHORS in IRC package for additional names of + * the programmers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 1, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * $Id: m_opmode.c,v 1.1 2003/01/18 19:53:49 zolty Exp $ + */ + +/* + * m_functions execute protocol messages on this server: + * + * cptr is always NON-NULL, pointing to a *LOCAL* client + * structure (with an open socket connected!). This + * identifies the physical socket where the message + * originated (or which caused the m_function to be + * executed--some m_functions may call others...). + * + * sptr is the source of the message, defined by the + * prefix part of the message if present. If not + * or prefix not found, then sptr==cptr. + * + * (!IsServer(cptr)) => (cptr == sptr), because + * prefixes are ... [truncated message content] |
From: Toni G. <zo...@us...> - 2003-01-18 22:54:46
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-18 22:54:44 UTC Modified files: ChangeLog configure include/channel.h include/client.h include/handlers.h include/ircd_alloc.h include/ircd_features.h include/msg.h include/numeric.h include/patchlevel.h include/s_user.h include/send.h include/supported.h ircd/IPcheck.c ircd/Makefile.in ircd/channel.c ircd/client.c ircd/ircd.c ircd/ircd_alloc.c ircd/ircd_features.c ircd/list.c ircd/m_account.c ircd/m_admin.c ircd/m_away.c ircd/m_burst.c ircd/m_create.c ircd/m_error.c ircd/m_gline.c ircd/m_join.c ircd/m_kick.c ircd/m_kill.c ircd/m_map.c ircd/m_mode.c ircd/m_nick.c ircd/m_notice.c ircd/m_oper.c ircd/m_part.c ircd/m_pong.c ircd/m_privmsg.c ircd/m_server.c ircd/m_settime.c ircd/m_userhost.c ircd/m_version.c ircd/m_wallchops.c ircd/m_who.c ircd/m_whois.c ircd/map.c ircd/numnicks.c ircd/parse.c ircd/s_bsd.c ircd/s_conf.c ircd/s_err.c ircd/s_misc.c ircd/s_stats.c ircd/s_user.c ircd/send.c ircd/whocmds.c Log message: 2003-01-18 Toni Garcia <zo...@ir...> 1.0.alpha14 * ircd/s_user.c: Fusion de los modos normales y hispano. * include/client.h: Fusiono los modos normales y de hispano bajo Flags *flags. * ircd/wallvoices.c: Nuevo comando, manda notices a @ y + del canal. * Nuevos parches Undernet, hasta el u2.10.11.04. ---------------------- diff included ---------------------- Index: ircdh/ChangeLog diff -u ircdh/ChangeLog:1.8 ircdh/ChangeLog:1.9 --- ircdh/ChangeLog:1.8 Sat Jan 18 11:53:48 2003 +++ ircdh/ChangeLog Sat Jan 18 14:54:26 2003 @@ -1,3 +1,13 @@ +2003-01-18 Toni Garcia <zo...@ir...> 1.0.alpha14 + * ircd/s_user.c: Fusion de los modos normales y hispano. + + * include/client.h: Fusiono los modos normales y de hispano bajo Flags *flags. + + * ircd/wallvoices.c: Nuevo comando, manda notices a @ y + del canal. + + * Nuevos parches Undernet, hasta el u2.10.11.04. + + 2003-01-18 Toni Garcia <zo...@ir...> 1.0.alpha13 * Nuevos comandos: ACCOUNT, JUPE, CLEARMODE, OPMODE, SET, RESET, PRIV, ASLL. Index: ircdh/configure diff -u ircdh/configure:1.4 ircdh/configure:1.5 --- ircdh/configure:1.4 Sat Jan 18 11:09:00 2003 +++ ircdh/configure Sat Jan 18 14:54:26 2003 @@ -4050,6 +4050,15 @@ rm -f $ac_file mv conftest.h $ac_file fi +echo ATENCION: Este IRCD es una version ALPHA con lo que implica +echo que puede que no se compile bajo ciertas maquinas o que se +echo compila pero sale "warnings". O que se surjan cosas raras +echo o bugs. +echo +echo Si encuentras bugs, se agradeceria mucho que lo avises al mail +echo zo...@ir... o en la lista irc...@li... +echo +echo Estamos trabajando en ello. IRC-Dev.Net 2003 fi; done EOF Index: ircdh/include/channel.h diff -u ircdh/include/channel.h:1.8 ircdh/include/channel.h:1.9 --- ircdh/include/channel.h:1.8 Sat Jan 18 11:09:02 2003 +++ ircdh/include/channel.h Sat Jan 18 14:54:26 2003 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: channel.h,v 1.8 2003/01/18 19:09:02 zolty Exp $ + * $Id: channel.h,v 1.9 2003/01/18 22:54:26 zolty Exp $ */ #ifndef INCLUDED_channel_h #define INCLUDED_channel_h @@ -123,7 +123,6 @@ #define IsModelessChannel(name) (*(name) == '+') #define IsChannelName(name) (*(name) == '#' || \ IsModelessChannel(name) || IsLocalChannel(name)) - typedef enum ChannelGetType { CGT_NO_CREATE, Index: ircdh/include/client.h diff -u ircdh/include/client.h:1.3 ircdh/include/client.h:1.4 --- ircdh/include/client.h:1.3 Sat Jan 18 11:09:02 2003 +++ ircdh/include/client.h Sat Jan 18 14:54:26 2003 @@ -18,7 +18,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * - * $Id: client.h,v 1.3 2003/01/18 19:09:02 zolty Exp $ + * $Id: client.h,v 1.4 2003/01/18 22:54:26 zolty Exp $ */ #ifndef INCLUDED_client_h #define INCLUDED_client_h @@ -77,41 +77,43 @@ * source file, or in the source file itself (when only used in that file). */ -#define PRIV_CHAN_LIMIT 1 /* no channel limit on oper */ -#define PRIV_MODE_LCHAN 2 /* oper can mode local chans */ -#define PRIV_WALK_LCHAN 3 /* oper can walk thru local modes */ -#define PRIV_DEOP_LCHAN 4 /* no deop oper on local chans */ -#define PRIV_SHOW_INVIS 5 /* show local invisible users */ -#define PRIV_SHOW_ALL_INVIS 6 /* show all invisible users */ -#define PRIV_UNLIMIT_QUERY 7 /* unlimit who queries */ - -#define PRIV_KILL 8 /* oper can KILL */ -#define PRIV_LOCAL_KILL 9 /* oper can local KILL */ -#define PRIV_REHASH 10 /* oper can REHASH */ -#define PRIV_RESTART 11 /* oper can RESTART */ -#define PRIV_DIE 12 /* oper can DIE */ -#define PRIV_GLINE 13 /* oper can GLINE */ -#define PRIV_LOCAL_GLINE 14 /* oper can local GLINE */ -#define PRIV_JUPE 15 /* oper can JUPE */ -#define PRIV_LOCAL_JUPE 16 /* oper can local JUPE */ -#define PRIV_OPMODE 17 /* oper can OP/CLEARMODE */ -#define PRIV_LOCAL_OPMODE 18 /* oper can local OP/CLEARMODE */ -#define PRIV_SET 19 /* oper can SET */ -#define PRIV_WHOX 20 /* oper can use /who x */ -#define PRIV_BADCHAN 21 /* oper can BADCHAN */ -#define PRIV_LOCAL_BADCHAN 22 /* oper can local BADCHAN */ -#define PRIV_SEE_CHAN 23 /* oper can see in secret chans */ - -#define PRIV_PROPAGATE 24 /* propagate oper status */ -#define PRIV_DISPLAY 25 /* "Is an oper" displayed */ -#define PRIV_SEE_OPERS 26 /* display hidden opers */ +enum Priv { + PRIV_CHAN_LIMIT, /* no channel limit on oper */ + PRIV_MODE_LCHAN, /* oper can mode local chans */ + PRIV_WALK_LCHAN, /* oper can walk thru local modes */ + PRIV_DEOP_LCHAN, /* no deop oper on local chans */ + PRIV_SHOW_INVIS, /* show local invisible users */ + PRIV_SHOW_ALL_INVIS, /* show all invisible users */ + PRIV_UNLIMIT_QUERY, /* unlimit who queries */ + + PRIV_KILL, /* oper can KILL */ + PRIV_LOCAL_KILL, /* oper can local KILL */ + PRIV_REHASH, /* oper can REHASH */ + PRIV_RESTART, /* oper can RESTART */ + PRIV_DIE, /* oper can DIE */ + PRIV_GLINE, /* oper can GLINE */ + PRIV_LOCAL_GLINE, /* oper can local GLINE */ + PRIV_JUPE, /* oper can JUPE */ + PRIV_LOCAL_JUPE, /* oper can local JUPE */ + PRIV_OPMODE, /* oper can OP/CLEARMODE */ + PRIV_LOCAL_OPMODE, /* oper can local OP/CLEARMODE */ + PRIV_SET, /* oper can SET */ + PRIV_WHOX, /* oper can use /who x */ + PRIV_BADCHAN, /* oper can BADCHAN */ + PRIV_LOCAL_BADCHAN, /* oper can local BADCHAN */ + PRIV_SEE_CHAN, /* oper can see in secret chans */ + + PRIV_PROPAGATE, /* propagate oper status */ + PRIV_DISPLAY, /* "Is an oper" displayed */ + PRIV_SEE_OPERS, /* display hidden opers */ -#define PRIV_WIDE_GLINE 27 /* oper can set wider G-lines */ + PRIV_WIDE_GLINE, /* oper can set wider G-lines */ -#define PRIV_FORCE_OPMODE 28 /* oper can override a Q-line */ -#define PRIV_FORCE_LOCAL_OPMODE 29 /* oper can override a local channel Q-line */ + PRIV_FORCE_OPMODE, /* oper can override a Q-line */ + PRIV_FORCE_LOCAL_OPMODE, /* oper can override a local channel Q-line */ -#define PRIV_LAST_PRIV 29 /* must be the same as the last priv */ + PRIV_LAST_PRIV /* must be the same as the last priv */ +}; #define _PRIV_NBITS (8 * sizeof(unsigned long)) @@ -119,7 +121,57 @@ #define _PRIV_BIT(priv) (1 << ((priv) % _PRIV_NBITS)) struct Privs { - unsigned long priv_mask[(PRIV_LAST_PRIV / _PRIV_NBITS) + 1]; + unsigned long priv_mask[(PRIV_LAST_PRIV + _PRIV_NBITS - 1) / _PRIV_NBITS]; +}; + +enum Flag { + FLAG_PINGSENT, /* Unreplied ping sent */ + FLAG_DEADSOCKET, /* Local socket is dead--Exiting soon */ + FLAG_KILLED, /* Prevents "QUIT" from being sent for this */ + FLAG_BLOCKED, /* socket is in a blocked condition */ + FLAG_CLOSING, /* set when closing to suppress errors */ + FLAG_UPING, /* has active UDP ping request */ + FLAG_CHKACCESS, /* ok to check clients access if set */ + FLAG_HUB, /* server is a hub */ + FLAG_SERVICE, /* server is a service */ + FLAG_LOCAL, /* set for local clients */ + FLAG_GOTID, /* successful ident lookup achieved */ + FLAG_DOID, /* I-lines say must use ident return */ + FLAG_NONL, /* No \n in buffer */ + FLAG_TS8, /* Why do you want to know? */ + FLAG_MAP, /* Show server on the map */ + FLAG_JUNCTION, /* Junction causing the net.burst */ + FLAG_BURST, /* Server is receiving a net.burst */ + FLAG_BURST_ACK, /* Server is waiting for eob ack */ + FLAG_IPCHECK, /* Added or updated IPregistry data */ + + FLAG_LOCOP, /* Local operator -- SRB */ + FLAG_SERVNOTICE, /* server notices such as kill */ + FLAG_OPER, /* Operator */ + FLAG_INVISIBLE, /* makes user invisible */ + FLAG_WALLOP, /* send wallops to them */ + FLAG_DEAF, /* Makes user deaf */ + FLAG_CHSERV, /* Disallow KICK or MODE -o on the user; + don't display channels in /whois */ + FLAG_DEBUG, /* send global debug/anti-hack info */ + FLAG_ACCOUNT, /* account name has been set */ + FLAG_HIDDENHOST, /* user's host is hidden */ +#if defined(BDD) +/* Flags de los modos Hispano */ + FLAG_NICKREGISTERED, /* Nick Registrado */ + FLAG_NICKSUSPENDED, /* Nick Suspendido */ + FLAG_HELPOP, /* Es un oper con modo +h */ + FLAG_BOT, /* Es un bot */ + FLAG_HIDDENVIEWER, /* Ver ips reales */ + FLAG_MSGONLYREG, /* Solo recibir mensajes de usuarios con +r */ +#endif /* BDD */ + _FLAG_COUNT, + FLAG_LOCAL_UMODES = FLAG_LOCOP, /* First local mode flag */ + FLAG_GLOBAL_UMODES = FLAG_OPER /* First global mode flag */ +}; + +struct Flags { + unsigned long flag_bits[((_FLAG_COUNT + _PRIV_NBITS - 1) / _PRIV_NBITS)]; }; struct Connection { @@ -213,10 +265,7 @@ time_t cli_firsttime; /* time client was created */ time_t cli_lastnick; /* TimeStamp on nick */ int cli_marker; /* /who processing marker */ - unsigned int cli_flags; /* client flags */ -#if defined(BDD) - unsigned int cli_hmodes; /* HISPANO user modes (flag extensions) */ -#endif + struct Flags cli_flags; /* client flags */ unsigned int cli_hopcount; /* number of servers to this 0 = local */ struct in_addr cli_ip; /* Real ip# NOT defined for remote servers! */ short cli_status; /* Client type */ @@ -246,9 +295,6 @@ #define cli_lastnick(cli) ((cli)->cli_lastnick) #define cli_marker(cli) ((cli)->cli_marker) #define cli_flags(cli) ((cli)->cli_flags) -#ifdef BDD -#define cli_hmodes(cli) ((cli->cli_hmodes) -#endif #define cli_hopcount(cli) ((cli)->cli_hopcount) #define cli_ip(cli) ((cli)->cli_ip) #define cli_status(cli) ((cli)->cli_status) @@ -378,172 +424,112 @@ (STAT_SERVER | STAT_CONNECTING | STAT_HANDSHAKE)) /* - * FLAGS macros - */ -#define FLAGS_PINGSENT 0x0001 /* Unreplied ping sent */ -#define FLAGS_DEADSOCKET 0x0002 /* Local socket is dead--Exiting soon */ -#define FLAGS_KILLED 0x0004 /* Prevents "QUIT" from being sent for this */ -#define FLAGS_OPER 0x0008 /* Operator */ -#define FLAGS_LOCOP 0x0010 /* Local operator -- SRB */ -#define FLAGS_INVISIBLE 0x0020 /* makes user invisible */ -#define FLAGS_WALLOP 0x0040 /* send wallops to them */ -#define FLAGS_SERVNOTICE 0x0080 /* server notices such as kill */ -#define FLAGS_BLOCKED 0x0100 /* socket is in a blocked condition */ -#define FLAGS_ACCOUNT 0x0200 /* account name has been set */ -#define FLAGS_CLOSING 0x0400 /* set when closing to suppress errors */ -#define FLAGS_UPING 0x0800 /* has active UDP ping request */ -#define FLAGS_CHKACCESS 0x1000 /* ok to check clients access if set */ -#define FLAGS_HUB 0x2000 /* server is a hub */ -#define FLAGS_SERVICE 0x4000 /* server is a service */ -#define FLAGS_HIDDENHOST 0x8000 /* user's host is hidden */ -#define FLAGS_LOCAL 0x00010000 /* set for local clients */ -#define FLAGS_GOTID 0x00020000 /* successful ident lookup achieved */ -#define FLAGS_DOID 0x00040000 /* I-lines say must use ident return */ -#define FLAGS_NONL 0x00080000 /* No \n in buffer */ -#define FLAGS_TS8 0x00100000 /* Why do you want to know? */ -#define FLAGS_MAP 0x00800000 /* Show server on the map */ -#define FLAGS_JUNCTION 0x01000000 /* Junction causing the net.burst */ -#define FLAGS_DEAF 0x02000000 /* Makes user deaf */ -#define FLAGS_CHSERV 0x04000000 /* Disallow KICK or MODE -o on the user; - don't display channels in /whois */ -#define FLAGS_BURST 0x08000000 /* Server is receiving a net.burst */ -#define FLAGS_BURST_ACK 0x10000000 /* Server is waiting for eob ack */ -#define FLAGS_DEBUG 0x20000000 /* send global debug/anti-hack info */ -#define FLAGS_IPCHECK 0x40000000 /* Added or updated IPregistry data */ - -#define SEND_UMODES \ - (FLAGS_INVISIBLE|FLAGS_OPER|FLAGS_WALLOP|FLAGS_DEAF|FLAGS_CHSERV|FLAGS_DEBUG|FLAGS_ACCOUNT|FLAGS_HIDDENHOST) -#define ALL_UMODES (SEND_UMODES|FLAGS_SERVNOTICE|FLAGS_LOCOP) -#define FLAGS_ID (FLAGS_DOID|FLAGS_GOTID) - -/* * flags macros. */ -#define DoAccess(x) (cli_flags(x) & FLAGS_CHKACCESS) -#define IsAnOper(x) (cli_flags(x) & (FLAGS_OPER|FLAGS_LOCOP)) -#define IsBlocked(x) (cli_flags(x) & FLAGS_BLOCKED) -#define IsBurst(x) (cli_flags(x) & FLAGS_BURST) -#define IsBurstAck(x) (cli_flags(x) & FLAGS_BURST_ACK) -#define IsBurstOrBurstAck(x) (cli_flags(x) & (FLAGS_BURST|FLAGS_BURST_ACK)) -#define IsChannelService(x) (cli_flags(x) & FLAGS_CHSERV) -#define IsDead(x) (cli_flags(x) & FLAGS_DEADSOCKET) -#define IsDeaf(x) (cli_flags(x) & FLAGS_DEAF) -#define IsIPChecked(x) (cli_flags(x) & FLAGS_IPCHECK) -#define IsIdented(x) (cli_flags(x) & FLAGS_GOTID) -#define IsInvisible(x) (cli_flags(x) & FLAGS_INVISIBLE) -#define IsJunction(x) (cli_flags(x) & FLAGS_JUNCTION) -#define IsLocOp(x) (cli_flags(x) & FLAGS_LOCOP) -#define IsLocal(x) (cli_flags(x) & FLAGS_LOCAL) -#define IsOper(x) (cli_flags(x) & FLAGS_OPER) -#define IsUPing(x) (cli_flags(x) & FLAGS_UPING) -#define NoNewLine(x) (cli_flags(x) & FLAGS_NONL) -#define SendDebug(x) (cli_flags(x) & FLAGS_DEBUG) -#define SendServNotice(x) (cli_flags(x) & FLAGS_SERVNOTICE) -#define SendWallops(x) (cli_flags(x) & FLAGS_WALLOP) -#define IsHub(x) (cli_flags(x) & FLAGS_HUB) -#define IsService(x) (cli_flags(x) & FLAGS_SERVICE) -#define IsAccount(x) (cli_flags(x) & FLAGS_ACCOUNT) -#define IsHiddenHost(x) (cli_flags(x) & FLAGS_HIDDENHOST) +#define FlagSet(fset, flag) ((fset)->flag_bits[_PRIV_IDX(flag)] |= \ + _PRIV_BIT(flag)) +#define FlagClr(fset, flag) ((fset)->flag_bits[_PRIV_IDX(flag)] &= \ + ~(_PRIV_BIT(flag))) +#define FlagHas(fset, flag) ((fset)->flag_bits[_PRIV_IDX(flag)] & \ + _PRIV_BIT(flag)) +#define SetFlag(cli, flag) FlagSet(&cli_flags(cli), flag) +#define ClrFlag(cli, flag) FlagClr(&cli_flags(cli), flag) +#define HasFlag(cli, flag) FlagHas(&cli_flags(cli), flag) + +#define DoAccess(x) HasFlag(x, FLAG_CHKACCESS) +#define IsAnOper(x) (HasFlag(x, FLAG_OPER) || HasFlag(x, FLAG_LOCOP)) +#define IsBlocked(x) HasFlag(x, FLAG_BLOCKED) +#define IsBurst(x) HasFlag(x, FLAG_BURST) +#define IsBurstAck(x) HasFlag(x, FLAG_BURST_ACK) +#define IsBurstOrBurstAck(x) (HasFlag(x, FLAG_BURST) || HasFlag(x, FLAG_BURST_ACK)) +#define IsChannelService(x) HasFlag(x, FLAG_CHSERV) +#define IsDead(x) HasFlag(x, FLAG_DEADSOCKET) +#define IsDeaf(x) HasFlag(x, FLAG_DEAF) +#define IsIPChecked(x) HasFlag(x, FLAG_IPCHECK) +#define IsIdented(x) HasFlag(x, FLAG_GOTID) +#define IsInvisible(x) HasFlag(x, FLAG_INVISIBLE) +#define IsJunction(x) HasFlag(x, FLAG_JUNCTION) +#define IsLocOp(x) HasFlag(x, FLAG_LOCOP) +#define IsLocal(x) HasFlag(x, FLAG_LOCAL) +#define IsOper(x) HasFlag(x, FLAG_OPER) +#define IsUPing(x) HasFlag(x, FLAG_UPING) +#define NoNewLine(x) HasFlag(x, FLAG_NONL) +#define SendDebug(x) HasFlag(x, FLAG_DEBUG) +#define SendServNotice(x) HasFlag(x, FLAG_SERVNOTICE) +#define SendWallops(x) HasFlag(x, FLAG_WALLOP) +#define IsHub(x) HasFlag(x, FLAG_HUB) +#define IsService(x) HasFlag(x, FLAG_SERVICE) +#define IsAccount(x) HasFlag(x, FLAG_ACCOUNT) +#define IsHiddenHost(x) HasFlag(x, FLAG_HIDDENHOST) #define HasHiddenHost(x) (IsAccount(x) && IsHiddenHost(x)) +#if defined(BDD) +/* Macros comprobacion modos hispano */ +#define IsNickRegistered(x) HasFlag(x, FLAG_NICKREGISTERED) +#define IsNickSuspended(x) HasFlag(x, FLAG_NICKSUSPENDED) +#define IsHelpOp(x) HasFlag(x, FLAG_HELPOP) +#define IsBot(x) HasFlag(x, FLAG_BOT) +#define IsHiddenViewer(x) HasFlag(x, FLAG_HIDDENVIEWER) +#define IsMsgOnlyReg(x) HasFlag(x, FLAG_MSGONLYREG) +#endif /* BDD */ #define IsPrivileged(x) (IsAnOper(x) || IsServer(x)) -#define SetAccess(x) (cli_flags(x) |= FLAGS_CHKACCESS) -#define SetBurst(x) (cli_flags(x) |= FLAGS_BURST) -#define SetBurstAck(x) (cli_flags(x) |= FLAGS_BURST_ACK) -#define SetChannelService(x) (cli_flags(x) |= FLAGS_CHSERV) -#define SetDeaf(x) (cli_flags(x) |= FLAGS_DEAF) -#define SetDebug(x) (cli_flags(x) |= FLAGS_DEBUG) -#define SetGotId(x) (cli_flags(x) |= FLAGS_GOTID) -#define SetIPChecked(x) (cli_flags(x) |= FLAGS_IPCHECK) -#define SetInvisible(x) (cli_flags(x) |= FLAGS_INVISIBLE) -#define SetJunction(x) (cli_flags(x) |= FLAGS_JUNCTION) -#define SetLocOp(x) (cli_flags(x) |= FLAGS_LOCOP) -#define SetOper(x) (cli_flags(x) |= FLAGS_OPER) -#define SetUPing(x) (cli_flags(x) |= FLAGS_UPING) -#define SetWallops(x) (cli_flags(x) |= FLAGS_WALLOP) -#define SetServNotice(x) (cli_flags(x) |= FLAGS_SERVNOTICE) -#define SetHub(x) (cli_flags(x) |= FLAGS_HUB) -#define SetService(x) (cli_flags(x) |= FLAGS_SERVICE) -#define SetAccount(x) (cli_flags(x) |= FLAGS_ACCOUNT) -#define SetHiddenHost(x) (cli_flags(x) |= FLAGS_HIDDENHOST) - -#define ClearAccess(x) (cli_flags(x) &= ~FLAGS_CHKACCESS) -#define ClearBurst(x) (cli_flags(x) &= ~FLAGS_BURST) -#define ClearBurstAck(x) (cli_flags(x) &= ~FLAGS_BURST_ACK) -#define ClearChannelService(x) (cli_flags(x) &= ~FLAGS_CHSERV) -#define ClearDeaf(x) (cli_flags(x) &= ~FLAGS_DEAF) -#define ClearDebug(x) (cli_flags(x) &= ~FLAGS_DEBUG) -#define ClearIPChecked(x) (cli_flags(x) &= ~FLAGS_IPCHECK) -#define ClearInvisible(x) (cli_flags(x) &= ~FLAGS_INVISIBLE) -#define ClearLocOp(x) (cli_flags(x) &= ~FLAGS_LOCOP) -#define ClearOper(x) (cli_flags(x) &= ~FLAGS_OPER) -#define ClearUPing(x) (cli_flags(x) &= ~FLAGS_UPING) -#define ClearWallops(x) (cli_flags(x) &= ~FLAGS_WALLOP) -#define ClearServNotice(x) (cli_flags(x) &= ~FLAGS_SERVNOTICE) -#define ClearHiddenHost(x) (cli_flags(x) &= ~FLAGS_HIDDENHOST) - -/* free flags */ -#define FREEFLAG_SOCKET 0x0001 /* socket needs to be freed */ -#define FREEFLAG_TIMER 0x0002 /* timer needs to be freed */ - +#define SetAccess(x) SetFlag(x, FLAG_CHKACCESS) +#define SetBurst(x) SetFlag(x, FLAG_BURST) +#define SetBurstAck(x) SetFlag(x, FLAG_BURST_ACK) +#define SetChannelService(x) SetFlag(x, FLAG_CHSERV) +#define SetDeaf(x) SetFlag(x, FLAG_DEAF) +#define SetDebug(x) SetFlag(x, FLAG_DEBUG) +#define SetGotId(x) SetFlag(x, FLAG_GOTID) +#define SetIPChecked(x) SetFlag(x, FLAG_IPCHECK) +#define SetInvisible(x) SetFlag(x, FLAG_INVISIBLE) +#define SetJunction(x) SetFlag(x, FLAG_JUNCTION) +#define SetLocOp(x) SetFlag(x, FLAG_LOCOP) +#define SetOper(x) SetFlag(x, FLAG_OPER) +#define SetUPing(x) SetFlag(x, FLAG_UPING) +#define SetWallops(x) SetFlag(x, FLAG_WALLOP) +#define SetServNotice(x) SetFlag(x, FLAG_SERVNOTICE) +#define SetHub(x) SetFlag(x, FLAG_HUB) +#define SetService(x) SetFlag(x, FLAG_SERVICE) +#define SetAccount(x) SetFlag(x, FLAG_ACCOUNT) +#define SetHiddenHost(x) SetFlag(x, FLAG_HIDDENHOST) #if defined(BDD) - -/* Bits de los modos hispano */ -#define HMODE_NICKREGISTERED 0x00000001 /* Nick is registered (HISPANO/ESNET) */ -#define HMODE_SOCKS 0x00000004 /* se esta chekeando socks */ -#define HMODE_WRSOCKS 0x00000008 /* se tiene ke escribir en socks */ -#define HMODE_HELPOP 0x00000010 /* Es un oper con modo +h */ -#define HMODE_SERVICESBOT 0x00000020 /* Es un bot de canales */ -#define HMODE_HIDDEN 0x00000040 /* Ip Oculta */ -#define HMODE_HIDDENVIEWER 0x00000080 /* Ip Oculta */ -#define HMODE_NICKSUSPENDED 0x00000100 /* Nick Suspendido */ -#define HMODE_MSGONLYREG 0x00000200 /* Solo recibir mensajes de usuarios con +r */ - -/* Modos hispano a propagar */ -#define SEND_HMODES \ - (HMODE_NICKREGISTERED | HMODE_HELPOP | HMODE_SERVICESBOT | HMODE_HIDDEN | HMODE_HIDDENVIEWER \ - | HMODE_NICKSUSPENDED | HMODE_MSGONLYREG) - -/* Modos hispano TODOS */ -#define ALL_HMODES \ - (SEND_HMODES) - -/* Macros comprobacion modos hispano */ -#define IsNickRegistered(x) ((x)->hmodes & HMODE_NICKREGISTERED) -#define DoingSocks(x) ((x)->hmodes & HMODE_SOCKS) -#define DoingWrSocks(x) ((x)->hmodes & HMODE_WRSOCKS) -#define IsHelpOp(x) ((x)->hmodes & HMODE_HELPOP) -#define IsServicesBot(x) ((x)->hmodes & HMODE_SERVICESBOT) -#define IsHidden(x) ((x)->hmodes & HMODE_HIDDEN) -#define IsHiddenViewer(x) ((x)->hmodes & HMODE_HIDDENVIEWER) -#define IsNickSuspended(x) ((x)->hmodes & HMODE_NICKSUSPENDED) -#define IsMsgOnlyReg(x) ((x)->hmodes & HMODE_MSGONLYREG) - /* Macros para poner modos hispano */ -#define SetNickRegistered(x) ((x)->hmodes |= HMODE_NICKREGISTERED) -#define SetSocks(x) ((x)->hmodes |= HMODE_SOCKS) -#define SetWrSocks(x) ((x)->hmodes |= HMODE_WRSOCKS) -#define SetHelpOp(x) ((x)->hmodes |= HMODE_HELPOP) -#define SetServicesBot(x) ((x)->hmodes |= HMODE_SERVICESBOT) -#define SetHidden(x) ((x)->hmodes |= HMODE_HIDDEN) -#define SetHiddenViewer(x) ((x)->hmodes |= HMODE_HIDDENVIEWER) -#define SetNickSuspended(x) ((x)->hmodes |= HMODE_NICKSUSPENDED) -#define SetMsgOnlyReg(x) ((x)->hmodes |= HMODE_MSGONLYREG) +#define SetNickRegistered(x) SetFlag(x, FLAG_NICKREGISTERED) +#define SetNickSuspended(x) SetFlag(x, FLAG_NICKSUSPENDED) +#define SetHelpOp(x) SetFlag(x, FLAG_HELPOP) +#define SetBot(x) SetFlag(x, FLAG_BOT) +#define SetHiddenViewer(x) SetFlag(x, FLAG_HIDDENVIEWER) +#define SetMsgOnlyReg(x) SetFlag(x, FLAG_MSGONLYREG) +#endif /* BDD */ +#define ClearAccess(x) ClrFlag(x, FLAG_CHKACCESS) +#define ClearBurst(x) ClrFlag(x, FLAG_BURST) +#define ClearBurstAck(x) ClrFlag(x, FLAG_BURST_ACK) +#define ClearChannelService(x) ClrFlag(x, FLAG_CHSERV) +#define ClearDeaf(x) ClrFlag(x, FLAG_DEAF) +#define ClearDebug(x) ClrFlag(x, FLAG_DEBUG) +#define ClearIPChecked(x) ClrFlag(x, FLAG_IPCHECK) +#define ClearInvisible(x) ClrFlag(x, FLAG_INVISIBLE) +#define ClearLocOp(x) ClrFlag(x, FLAG_LOCOP) +#define ClearOper(x) ClrFlag(x, FLAG_OPER) +#define ClearUPing(x) ClrFlag(x, FLAG_UPING) +#define ClearWallops(x) ClrFlag(x, FLAG_WALLOP) +#define ClearServNotice(x) ClrFlag(x, FLAG_SERVNOTICE) +#define ClearHiddenHost(x) ClrFlag(x, FLAG_HIDDENHOST) +#if defined (BDD) /* Macros para borrar modos hispano */ -#define ClearNickRegistered(x) ((x)->hmodes &= ~HMODE_NICKREGISTERED) -#define ClearSocks(x) ((x)->hmodes &= ~HMODE_SOCKS) -#define ClearWrSocks(x) ((x)->hmodes &= ~HMODE_WRSOCKS) -#define ClearHelpOp(x) ((x)->hmodes &= ~HMODE_HELPOP) -#define ClearServicesBot(x) ((x)->hmodes &= ~HMODE_SERVICESBOT) -#define ClearHidden(x) ((x)->hmodes &= ~HMODE_HIDDEN) -#define ClearHiddenViewer(x) ((x)->hmodes &= ~HMODE_HIDDENVIEWER) -#define ClearNickSuspended(x) ((x)->hmodes &= ~HMODE_NICKSUSPENDED) -#define ClearMsgOnlyReg(x) ((x)->hmodes &= ~HMODE_MSGONLYREG) - +#define ClearNickRegistered(x) ClrFlag(x, FLAG_NICKREGISTERED) +#define ClearNickSuspended(x) ClrFlag(x, FLAG_NICKSUSPENDED) +#define ClearHelpOp(x) ClrFlag(x, FLAG_HELPOP) +#define ClearBot(x) ClrFlag(x, FLAG_BOT) +#define ClearHiddenViewer(x) ClrFlag(x, FLAG_HIDDENVIEWER) +#define ClearMsgOnlyReg(x) ClrFlag(x, FLAG_MSGONLYREG) #endif /* BDD */ +/* free flags */ +#define FREEFLAG_SOCKET 0x0001 /* socket needs to be freed */ +#define FREEFLAG_TIMER 0x0002 /* timer needs to be freed */ /* server notice stuff */ Index: ircdh/include/handlers.h diff -u ircdh/include/handlers.h:1.3 ircdh/include/handlers.h:1.4 --- ircdh/include/handlers.h:1.3 Sat Jan 18 11:53:48 2003 +++ ircdh/include/handlers.h Sat Jan 18 14:54:26 2003 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: handlers.h,v 1.3 2003/01/18 19:53:48 zolty Exp $ + * $Id: handlers.h,v 1.4 2003/01/18 22:54:26 zolty Exp $ */ #ifndef INCLUDED_handlers_h #define INCLUDED_handlers_h @@ -139,6 +139,7 @@ extern int m_userip(struct Client *, struct Client *, int, char *[]); extern int m_version(struct Client *, struct Client *, int, char *[]); extern int m_wallchops(struct Client *, struct Client *, int, char *[]); +extern int m_wallvoices(struct Client *, struct Client *, int, char *[]); extern int m_watch(struct Client *, struct Client *, int, char *[]); extern int m_who(struct Client *, struct Client *, int, char *[]); extern int m_whois(struct Client *, struct Client *, int, char *[]); @@ -248,6 +249,7 @@ extern int ms_version(struct Client *, struct Client *, int, char *[]); extern int ms_wallchops(struct Client *, struct Client *, int, char *[]); extern int ms_wallops(struct Client *, struct Client *, int, char *[]); +extern int ms_wallvoices(struct Client *, struct Client *, int, char *[]); extern int ms_wallusers(struct Client *, struct Client *, int, char *[]); extern int ms_whois(struct Client *, struct Client *, int, char *[]); Index: ircdh/include/ircd_alloc.h diff -u ircdh/include/ircd_alloc.h:1.2 ircdh/include/ircd_alloc.h:1.3 --- ircdh/include/ircd_alloc.h:1.2 Sat Jan 18 11:09:03 2003 +++ ircdh/include/ircd_alloc.h Sat Jan 18 14:54:26 2003 @@ -19,11 +19,14 @@ * * Commentary by Bleep (Thomas Helvey) * - * $Id: ircd_alloc.h,v 1.2 2003/01/18 19:09:03 zolty Exp $ + * $Id: ircd_alloc.h,v 1.3 2003/01/18 22:54:26 zolty Exp $ */ #ifndef INCLUDED_ircd_alloc_h #define INCLUDED_ircd_alloc_h +#undef FROBONMALLOC +#undef FROBONFREE + /* * memory resource allocation and test functions */ @@ -39,7 +42,12 @@ #define INCLUDED_stdlib_h #endif +#ifdef FROBONFREE +extern void MyFrobulatingFree(void *x); +#define MyFree(x) do { MyFrobulatingFree((x)); (x) = 0; } while(0) +#else #define MyFree(x) do { free((x)); (x) = 0; } while(0) +#endif extern void *MyMalloc(size_t size); extern void *MyCalloc(size_t nelem, size_t size); Index: ircdh/include/ircd_features.h diff -u ircdh/include/ircd_features.h:1.1 ircdh/include/ircd_features.h:1.2 --- ircdh/include/ircd_features.h:1.1 Sat Jan 18 11:09:03 2003 +++ ircdh/include/ircd_features.h Sat Jan 18 14:54:27 2003 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: ircd_features.h,v 1.1 2003/01/18 19:09:03 zolty Exp $ + * $Id: ircd_features.h,v 1.2 2003/01/18 22:54:27 zolty Exp $ */ #ifndef INCLUDED_features_h #define INCLUDED_features_h @@ -46,6 +46,7 @@ FEAT_HOST_HIDING, FEAT_HIDDEN_HOST, FEAT_HIDDEN_IP, + FEAT_AUTOHIDE, FEAT_CONNEXIT_NOTICES, /* features that probably should not be touched */ Index: ircdh/include/msg.h diff -u ircdh/include/msg.h:1.5 ircdh/include/msg.h:1.6 --- ircdh/include/msg.h:1.5 Sat Jan 18 11:53:48 2003 +++ ircdh/include/msg.h Sat Jan 18 14:54:27 2003 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: msg.h,v 1.5 2003/01/18 19:53:48 zolty Exp $ + * $Id: msg.h,v 1.6 2003/01/18 22:54:27 zolty Exp $ */ #ifndef INCLUDED_msg_h #define INCLUDED_msg_h @@ -197,6 +197,10 @@ #define MSG_WALLCHOPS "WALLCHOPS" /* WC */ #define TOK_WALLCHOPS "WC" #define CMD_WALLCHOPS MSG_WALLCHOPS, TOK_WALLCHOPS + +#define MSG_WALLVOICES "WALLVOICES" /* WV */ +#define TOK_WALLVOICES "WV" +#define CMD_WALLVOICES MSG_WALLVOICES, TOK_WALLVOICES #define MSG_CPRIVMSG "CPRIVMSG" /* CPRI */ #define TOK_CPRIVMSG "CP" Index: ircdh/include/numeric.h diff -u ircdh/include/numeric.h:1.6 ircdh/include/numeric.h:1.7 --- ircdh/include/numeric.h:1.6 Sat Jan 18 11:09:03 2003 +++ ircdh/include/numeric.h Sat Jan 18 14:54:27 2003 @@ -305,6 +305,7 @@ /* RPL_USERS 393 Dalnet,EFNet,IRCnet */ /* RPL_END_USERS 394 Dalnet,EFNet,IRCnet */ /* RPL_NOUSERS 395 Dalnet,EFNet,IRCnet */ +#define RPL_HOSTHIDDEN 396 /* UMODE +x completed succesfuly */ /* * Errors are in the range from 400-599 currently and are grouped by what Index: ircdh/include/patchlevel.h diff -u ircdh/include/patchlevel.h:1.8 ircdh/include/patchlevel.h:1.9 --- ircdh/include/patchlevel.h:1.8 Sat Jan 18 11:53:48 2003 +++ ircdh/include/patchlevel.h Sat Jan 18 14:54:27 2003 @@ -15,10 +15,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: patchlevel.h,v 1.8 2003/01/18 19:53:48 zolty Exp $ + * $Id: patchlevel.h,v 1.9 2003/01/18 22:54:27 zolty Exp $ * */ -#define PATCHLEVEL ".alpha13" +#define PATCHLEVEL ".alpha14" #define RELEASE "1.0" Index: ircdh/include/s_user.h diff -u ircdh/include/s_user.h:1.6 ircdh/include/s_user.h:1.7 --- ircdh/include/s_user.h:1.6 Sat Jan 18 11:09:04 2003 +++ ircdh/include/s_user.h Sat Jan 18 14:54:28 2003 @@ -1,7 +1,7 @@ /* * s_user.h * - * $Id: s_user.h,v 1.6 2003/01/18 19:09:04 zolty Exp $ + * $Id: s_user.h,v 1.7 2003/01/18 22:54:28 zolty Exp $ */ #ifndef INCLUDED_s_user_h #define INCLUDED_s_user_h @@ -17,6 +17,7 @@ struct User; struct Channel; struct MsgBuf; +struct Flags; /* * Macros @@ -43,6 +44,11 @@ #define HUNTED_ISME 0 /* if this server should execute the command */ #define HUNTED_PASS 1 /* if message passed onwards successfully */ +/* send sets for send_umode() */ +#define ALL_UMODES 0 /* both local and global user modes */ +#define SEND_UMODES 1 /* global user modes only */ +#define SEND_UMODES_BUT_OPER 2 /* global user modes except for FLAG_OPER */ + /* used when sending to #mask or $mask */ #define MATCH_SERVER 1 @@ -79,23 +85,17 @@ extern void user_count_memory(size_t *count_out, size_t *bytes_out); -extern int do_nick_name(char *nick); extern int set_nick_name(struct Client *cptr, struct Client *sptr, const char *nick, int parc, char *parv[], int flags); -#ifdef BDD -extern void send_umode_out(struct Client *cptr, struct Client *sptr, int old, - int oldh, int registrado, int prop); -#else -extern void send_umode_out(struct Client *cptr, struct Client *sptr, int old, - int prop); -#endif -extern int whisper(struct Client *source, const char *nick, - const char *channel, const char *text, int is_notice); +extern void send_umode_out(struct Client *cptr, struct Client *sptr, + struct Flags *old, int prop); +extern int whisper(struct Client *source, const char *nick, const char *channel, + const char *text, int is_notice); extern void send_user_info(struct Client *to, char *names, int rpl, InfoFormatter fmt); extern int add_silence(struct Client *sptr, const char *mask); -extern int hide_hostmask(struct Client *cptr, unsigned int flags); +extern int hide_hostmask(struct Client *cptr, unsigned int flag); extern int set_user_mode(struct Client *cptr, struct Client *sptr, int parc, char *parv[]); extern int is_silenced(struct Client *sptr, struct Client *acptr); @@ -109,13 +109,8 @@ int MustBeOper, const char *pattern, int server, int parc, char *parv[]); extern struct Client *next_client(struct Client *next, const char *ch); extern char *umode_str(struct Client *cptr); -#if defined(BDD) -extern void send_umode(struct Client *cptr, struct Client *sptr, int old, - int sendmask, int oldh, int sendhmask); -#else -extern void send_umode(struct Client *cptr, struct Client *sptr, int old, - int sendmask); -#endif +extern void send_umode(struct Client *cptr, struct Client *sptr, + struct Flags *old, int sendset); extern int del_silence(struct Client *sptr, char *mask); extern void set_snomask(struct Client *, unsigned int, int); extern int is_snomask(char *); Index: ircdh/include/send.h diff -u ircdh/include/send.h:1.6 ircdh/include/send.h:1.7 --- ircdh/include/send.h:1.6 Sat Jan 18 11:09:04 2003 +++ ircdh/include/send.h Sat Jan 18 14:54:28 2003 @@ -1,7 +1,7 @@ /* * send.h * - * $Id: send.h,v 1.6 2003/01/18 19:09:04 zolty Exp $ + * $Id: send.h,v 1.7 2003/01/18 22:54:28 zolty Exp $ */ #ifndef INCLUDED_send_h #define INCLUDED_send_h @@ -65,6 +65,7 @@ #define SKIP_DEAF 0x01 /* skip users that are +d */ #define SKIP_BURST 0x02 /* skip users that are bursting */ #define SKIP_NONOPS 0x04 /* skip users that aren't chanops */ +#define SKIP_NONVOICES 0x08 /* skip users that aren't voiced (includes chanops) */ /* Send command to all users having a particular flag set */ extern void sendwallto_group_butone(struct Client *from, int type, Index: ircdh/include/supported.h diff -u ircdh/include/supported.h:1.2 ircdh/include/supported.h:1.3 --- ircdh/include/supported.h:1.2 Sat Jan 18 11:09:04 2003 +++ ircdh/include/supported.h Sat Jan 18 14:54:29 2003 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: supported.h,v 1.2 2003/01/18 19:09:04 zolty Exp $ + * $Id: supported.h,v 1.3 2003/01/18 22:54:29 zolty Exp $ * * Description: This file has the featureset that ircu announces on connecting * a client. It's in this .h because it's likely to be appended @@ -71,6 +71,7 @@ " MAP" \ " USERIP" \ " WALLCHOPS" \ + " WALLVOICES" \ " WHOX" /* Index: ircdh/ircd/IPcheck.c diff -u ircdh/ircd/IPcheck.c:1.8 ircdh/ircd/IPcheck.c:1.9 --- ircdh/ircd/IPcheck.c:1.8 Sat Jan 18 11:09:04 2003 +++ ircdh/ircd/IPcheck.c Sat Jan 18 14:54:29 2003 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: IPcheck.c,v 1.8 2003/01/18 19:09:04 zolty Exp $ + * $Id: IPcheck.c,v 1.9 2003/01/18 22:54:29 zolty Exp $ * * * @@ -450,7 +450,7 @@ { /* * trying to find an entry for a server causes this to happen, - * servers should never have FLAGS_IPCHECK set + * servers should never have FLAG_IPCHECK set */ return; } Index: ircdh/ircd/Makefile.in diff -u ircdh/ircd/Makefile.in:1.10 ircdh/ircd/Makefile.in:1.11 --- ircdh/ircd/Makefile.in:1.10 Sat Jan 18 11:53:48 2003 +++ ircdh/ircd/Makefile.in Sat Jan 18 14:54:30 2003 @@ -176,6 +176,7 @@ m_userip.c \ m_version.c \ m_wallchops.c \ + m_wallvoices.c \ m_wallops.c \ m_wallusers.c \ m_watch.c \ Index: ircdh/ircd/channel.c diff -u ircdh/ircd/channel.c:1.8 ircdh/ircd/channel.c:1.9 --- ircdh/ircd/channel.c:1.8 Sat Jan 18 11:09:04 2003 +++ ircdh/ircd/channel.c Sat Jan 18 14:54:31 2003 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: channel.c,v 1.8 2003/01/18 19:09:04 zolty Exp $ + * $Id: channel.c,v 1.9 2003/01/18 22:54:31 zolty Exp $ */ #include "config.h" @@ -417,6 +417,7 @@ struct Membership *member) { struct SLink *tmp; + char tmphost[HOSTLEN + 1]; char nu_host[NUH_BUFSIZE]; char nu_realhost[NUH_BUFSIZE]; char nu_ip[NUI_BUFSIZE]; @@ -435,9 +436,19 @@ (cli_user(cptr))->host); #endif - if (HasHiddenHost(cptr)) - sr = make_nick_user_host(nu_realhost, cli_name(cptr), - (cli_user(cptr))->username, cli_user(cptr)->realhost); + if (IsAccount(cptr)) + { + if (HasHiddenHost(cptr)) + sr = make_nick_user_host(nu_realhost, cli_name(cptr), + cli_user(cptr)->username, cli_user(cptr)->realhost); + else + { + ircd_snprintf(0, tmphost, HOSTLEN, "%s.%s", + cli_user(cptr)->account, feature_str(FEAT_HIDDEN_HOST)); + sr = make_nick_user_host(nu_realhost, cli_name(cptr), + cli_user(cptr)->username, tmphost); + } + } for (tmp = chptr->banlist; tmp; tmp = tmp->next) { @@ -1118,7 +1129,8 @@ a HACK(4) notice will be sent if he would not have been supposed to join normally. */ if (IsLocalChannel(chptr->chname) && HasPriv(sptr, PRIV_WALK_LCHAN) && - !BadPtr(key) && compall("OVERRIDE", key) == 0) + !BadPtr(key) && compall("OVERRIDE", key) == 0 + && compall("OVERRIDE", chptr->mode.key) != 0) overrideJoin = MAGIC_OPER_OVERRIDE; if (chptr->mode.mode & MODE_INVITEONLY) @@ -2080,6 +2092,9 @@ state->parc--; state->max_args--; + if ((int)t_limit < 0) /* don't permit a negative limit */ + return; + if (!(state->flags & MODE_PARSE_WIPEOUT) && (!t_limit || t_limit == state->chptr->mode.limit)) return; @@ -2094,6 +2109,10 @@ return; } + /* Can't remove a limit that's not there */ + if (state->dir == MODE_DEL && !state->chptr->mode.limit) + return; + if (state->done & DONE_LIMIT) /* allow limit to be set only once */ return; state->done |= DONE_LIMIT; @@ -2152,7 +2171,7 @@ return; state->done |= DONE_KEY; - t_len = KEYLEN + 1; + t_len = KEYLEN; /* clean up the key string */ s = t_str; @@ -2410,7 +2429,7 @@ { if (state->flags & MODE_PARSE_SET && MyUser(state->sptr) && (len > (feature_int(FEAT_AVBANLEN) * feature_int(FEAT_MAXBANS)) || - count >= feature_int(FEAT_MAXBANS))) + count > feature_int(FEAT_MAXBANS))) { send_reply(state->sptr, ERR_BANLISTFULL, state->chptr->chname, ban->value.ban.banstr); @@ -2848,6 +2867,7 @@ joinbuf_join(struct JoinBuf *jbuf, struct Channel *chan, unsigned int flags) { unsigned int len; + int is_local; assert(0 != jbuf); @@ -2859,6 +2879,8 @@ return; } + is_local = IsLocalChannel(chan->chname); + if (jbuf->jb_type == JOINBUF_TYPE_PART || jbuf->jb_type == JOINBUF_TYPE_PARTALL) { @@ -2878,7 +2900,8 @@ * exactly the same logic, albeit somewhat more concise, as was in * the original m_part.c */ - if (jbuf->jb_type == JOINBUF_TYPE_PARTALL || IsLocalChannel(chan->chname)) /* got to remove user here */ + /* got to remove user here */ + if (jbuf->jb_type == JOINBUF_TYPE_PARTALL || is_local) remove_user_from_channel(jbuf->jb_source, chan); } else @@ -2903,7 +2926,7 @@ } if (jbuf->jb_type == JOINBUF_TYPE_PARTALL || - jbuf->jb_type == JOINBUF_TYPE_JOIN || IsLocalChannel(chan->chname)) + jbuf->jb_type == JOINBUF_TYPE_JOIN || is_local) return; /* don't send to remote */ /* figure out if channel name will cause buffer to be overflowed */ Index: ircdh/ircd/client.c diff -u ircdh/ircd/client.c:1.1 ircdh/ircd/client.c:1.2 --- ircdh/ircd/client.c:1.1 Sat Jan 18 11:09:04 2003 +++ ircdh/ircd/client.c Sat Jan 18 14:54:31 2003 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: client.c,v 1.1 2003/01/18 19:09:04 zolty Exp $ + * $Id: client.c,v 1.2 2003/01/18 22:54:31 zolty Exp $ */ #include "config.h" @@ -106,109 +106,115 @@ } static struct { - unsigned int priv; + enum Priv priv; enum Feature feat; - unsigned int flag; + enum { + FEATFLAG_DISABLES_PRIV, + FEATFLAG_ENABLES_PRIV, + FEATFLAG_GLOBAL_OPERS, + FEATFLAG_LOCAL_OPERS, + FEATFLAG_ALL_OPERS + } flag; } feattab[] = { { - PRIV_WHOX, FEAT_LAST_F, (FLAGS_OPER | FLAGS_LOCOP)}, + PRIV_WHOX, FEAT_LAST_F, FEATFLAG_ALL_OPERS}, { - PRIV_DISPLAY, FEAT_LAST_F, (FLAGS_OPER | FLAGS_LOCOP)}, + PRIV_DISPLAY, FEAT_LAST_F, FEATFLAG_ALL_OPERS}, { - PRIV_CHAN_LIMIT, FEAT_OPER_NO_CHAN_LIMIT, (FLAGS_OPER | FLAGS_LOCOP)}, + PRIV_CHAN_LIMIT, FEAT_OPER_NO_CHAN_LIMIT, FEATFLAG_ALL_OPERS}, { - PRIV_MODE_LCHAN, FEAT_OPER_MODE_LCHAN, (FLAGS_OPER | FLAGS_LOCOP)}, + PRIV_MODE_LCHAN, FEAT_OPER_MODE_LCHAN, FEATFLAG_ALL_OPERS}, { - PRIV_LOCAL_OPMODE, FEAT_OPER_MODE_LCHAN, (FLAGS_OPER | FLAGS_LOCOP)}, + PRIV_LOCAL_OPMODE, FEAT_OPER_MODE_LCHAN, FEATFLAG_ALL_OPERS}, { - PRIV_WALK_LCHAN, FEAT_OPER_WALK_THROUGH_LMODES, (FLAGS_OPER | FLAGS_LOCOP)}, + PRIV_WALK_LCHAN, FEAT_OPER_WALK_THROUGH_LMODES, FEATFLAG_ALL_OPERS}, { - PRIV_DEOP_LCHAN, FEAT_NO_OPER_DEOP_LCHAN, (FLAGS_OPER | FLAGS_LOCOP)}, + PRIV_DEOP_LCHAN, FEAT_NO_OPER_DEOP_LCHAN, FEATFLAG_ALL_OPERS}, { - PRIV_SHOW_INVIS, FEAT_SHOW_INVISIBLE_USERS, (FLAGS_OPER | FLAGS_LOCOP)}, + PRIV_SHOW_INVIS, FEAT_SHOW_INVISIBLE_USERS, FEATFLAG_ALL_OPERS}, { - PRIV_SHOW_ALL_INVIS, FEAT_SHOW_ALL_INVISIBLE_USERS, - (FLAGS_OPER | FLAGS_LOCOP)}, + PRIV_SHOW_ALL_INVIS, FEAT_SHOW_ALL_INVISIBLE_USERS, FEATFLAG_ALL_OPERS}, { - PRIV_UNLIMIT_QUERY, FEAT_UNLIMIT_OPER_QUERY, (FLAGS_OPER | FLAGS_LOCOP)}, + PRIV_UNLIMIT_QUERY, FEAT_UNLIMIT_OPER_QUERY, FEATFLAG_ALL_OPERS}, { - PRIV_KILL, FEAT_LOCAL_KILL_ONLY, 0}, + PRIV_KILL, FEAT_LOCAL_KILL_ONLY, FEATFLAG_DISABLES_PRIV}, { - PRIV_GLINE, FEAT_CONFIG_OPERCMDS, ~0}, + PRIV_GLINE, FEAT_CONFIG_OPERCMDS, FEATFLAG_ENABLES_PRIV}, { - PRIV_JUPE, FEAT_CONFIG_OPERCMDS, ~0}, + PRIV_JUPE, FEAT_CONFIG_OPERCMDS, FEATFLAG_ENABLES_PRIV}, { - PRIV_OPMODE, FEAT_CONFIG_OPERCMDS, ~0}, + PRIV_OPMODE, FEAT_CONFIG_OPERCMDS, FEATFLAG_ENABLES_PRIV}, { - PRIV_BADCHAN, FEAT_CONFIG_OPERCMDS, ~0}, + PRIV_BADCHAN, FEAT_CONFIG_OPERCMDS, FEATFLAG_ENABLES_PRIV}, { - PRIV_PROPAGATE, FEAT_LAST_F, FLAGS_OPER}, + PRIV_PROPAGATE, FEAT_LAST_F, FEATFLAG_GLOBAL_OPERS}, { - PRIV_SEE_OPERS, FEAT_LAST_F, FLAGS_OPER}, + PRIV_SEE_OPERS, FEAT_LAST_F, FEATFLAG_GLOBAL_OPERS}, { - PRIV_KILL, FEAT_OPER_KILL, FLAGS_OPER}, + PRIV_KILL, FEAT_OPER_KILL, FEATFLAG_GLOBAL_OPERS}, { - PRIV_LOCAL_KILL, FEAT_OPER_KILL, FLAGS_OPER}, + PRIV_LOCAL_KILL, FEAT_OPER_KILL, FEATFLAG_GLOBAL_OPERS}, { - PRIV_REHASH, FEAT_OPER_REHASH, FLAGS_OPER}, + PRIV_REHASH, FEAT_OPER_REHASH, FEATFLAG_GLOBAL_OPERS}, { - PRIV_RESTART, FEAT_OPER_RESTART, FLAGS_OPER}, + PRIV_RESTART, FEAT_OPER_RESTART, FEATFLAG_GLOBAL_OPERS}, { - PRIV_DIE, FEAT_OPER_DIE, FLAGS_OPER}, + PRIV_DIE, FEAT_OPER_DIE, FEATFLAG_GLOBAL_OPERS}, { - PRIV_GLINE, FEAT_OPER_GLINE, FLAGS_OPER}, + PRIV_GLINE, FEAT_OPER_GLINE, FEATFLAG_GLOBAL_OPERS}, { - PRIV_LOCAL_GLINE, FEAT_OPER_LGLINE, FLAGS_OPER}, + PRIV_LOCAL_GLINE, FEAT_OPER_LGLINE, FEATFLAG_GLOBAL_OPERS}, { - PRIV_JUPE, FEAT_OPER_JUPE, FLAGS_OPER}, + PRIV_JUPE, FEAT_OPER_JUPE, FEATFLAG_GLOBAL_OPERS}, { - PRIV_LOCAL_JUPE, FEAT_OPER_LJUPE, FLAGS_OPER}, + PRIV_LOCAL_JUPE, FEAT_OPER_LJUPE, FEATFLAG_GLOBAL_OPERS}, { - PRIV_OPMODE, FEAT_OPER_OPMODE, FLAGS_OPER}, + PRIV_OPMODE, FEAT_OPER_OPMODE, FEATFLAG_GLOBAL_OPERS}, { - PRIV_LOCAL_OPMODE, FEAT_OPER_LOPMODE, FLAGS_OPER}, + PRIV_LOCAL_OPMODE, FEAT_OPER_LOPMODE, FEATFLAG_GLOBAL_OPERS}, { - PRIV_FORCE_OPMODE, FEAT_OPER_FORCE_OPMODE, FLAGS_OPER}, + PRIV_FORCE_OPMODE, FEAT_OPER_FORCE_OPMODE, FEATFLAG_GLOBAL_OPERS}, { - PRIV_FORCE_LOCAL_OPMODE, FEAT_OPER_FORCE_LOPMODE, FLAGS_OPER}, + PRIV_FORCE_LOCAL_OPMODE, FEAT_OPER_FORCE_LOPMODE, FEATFLAG_GLOBAL_OPERS}, { - PRIV_BADCHAN, FEAT_OPER_BADCHAN, FLAGS_OPER}, + PRIV_BADCHAN, FEAT_OPER_BADCHAN, FEATFLAG_GLOBAL_OPERS}, { - PRIV_LOCAL_BADCHAN, FEAT_OPER_LBADCHAN, FLAGS_OPER}, + PRIV_LOCAL_BADCHAN, FEAT_OPER_LBADCHAN, FEATFLAG_GLOBAL_OPERS}, { - PRIV_SET, FEAT_OPER_SET, FLAGS_OPER}, + PRIV_SET, FEAT_OPER_SET, FEATFLAG_GLOBAL_OPERS}, { - PRIV_SEE_CHAN, FEAT_OPERS_SEE_IN_SECRET_CHANNELS, FLAGS_OPER}, + PRIV_SEE_CHAN, FEAT_OPERS_SEE_IN_SECRET_CHANNELS, FEATFLAG_GLOBAL_OPERS}, { - PRIV_WIDE_GLINE, FEAT_OPER_WIDE_GLINE, FLAGS_OPER}, + PRIV_WIDE_GLINE, FEAT_OPER_WIDE_GLINE, FEATFLAG_GLOBAL_OPERS}, { - PRIV_LOCAL_KILL, FEAT_LOCOP_KILL, FLAGS_LOCOP}, + PRIV_LOCAL_KILL, FEAT_LOCOP_KILL, FEATFLAG_LOCAL_OPERS}, { - PRIV_REHASH, FEAT_LOCOP_REHASH, FLAGS_LOCOP}, + PRIV_REHASH, FEAT_LOCOP_REHASH, FEATFLAG_LOCAL_OPERS}, { - PRIV_RESTART, FEAT_LOCOP_RESTART, FLAGS_LOCOP}, + PRIV_RESTART, FEAT_LOCOP_RESTART, FEATFLAG_LOCAL_OPERS}, { - PRIV_DIE, FEAT_LOCOP_DIE, FLAGS_LOCOP}, + PRIV_DIE, FEAT_LOCOP_DIE, FEATFLAG_LOCAL_OPERS}, { - PRIV_LOCAL_GLINE, FEAT_LOCOP_LGLINE, FLAGS_LOCOP}, + PRIV_LOCAL_GLINE, FEAT_LOCOP_LGLINE, FEATFLAG_LOCAL_OPERS}, { - PRIV_LOCAL_JUPE, FEAT_LOCOP_LJUPE, FLAGS_LOCOP}, + PRIV_LOCAL_JUPE, FEAT_LOCOP_LJUPE, FEATFLAG_LOCAL_OPERS}, { - PRIV_LOCAL_OPMODE, FEAT_LOCOP_LOPMODE, FLAGS_LOCOP}, + PRIV_LOCAL_OPMODE, FEAT_LOCOP_LOPMODE, FEATFLAG_LOCAL_OPERS}, { - PRIV_FORCE_LOCAL_OPMODE, FEAT_LOCOP_FORCE_LOPMODE, FLAGS_LOCOP}, + PRIV_FORCE_LOCAL_OPMODE, FEAT_LOCOP_FORCE_LOPMODE, FEATFLAG_LOCAL_OPERS}, { - PRIV_LOCAL_BADCHAN, FEAT_LOCOP_LBADCHAN, FLAGS_LOCOP}, + PRIV_LOCAL_BADCHAN, FEAT_LOCOP_LBADCHAN, FEATFLAG_LOCAL_OPERS}, { - PRIV_SET, FEAT_LOCOP_SET, FLAGS_LOCOP}, + PRIV_SET, FEAT_LOCOP_SET, FEATFLAG_LOCAL_OPERS}, { - PRIV_SEE_CHAN, FEAT_LOCOP_SEE_IN_SECRET_CHANNELS, FLAGS_LOCOP}, + PRIV_SEE_CHAN, FEAT_LOCOP_SEE_IN_SECRET_CHANNELS, FEATFLAG_LOCAL_OPERS}, { - PRIV_WIDE_GLINE, FEAT_LOCOP_WIDE_GLINE, FLAGS_LOCOP}, + PRIV_WIDE_GLINE, FEAT_LOCOP_WIDE_GLINE, FEATFLAG_LOCAL_OPERS}, { - 0, FEAT_LAST_F, 0} + PRIV_LAST_PRIV, FEAT_LAST_F, 0} }; + /* client_set_privs(struct Client* client) * * Sets the privileges for opers. @@ -236,22 +242,34 @@ /* This sequence is temporary until the .conf is carefully rewritten */ - for (i = 0; feattab[i].priv; i++) + for (i = 0; feattab[i].priv != PRIV_LAST_PRIV; i++) { - if (feattab[i].flag == 0) - { - if (feature_bool(feattab[i].feat)) - PrivSet(&antiprivs, feattab[i].priv); - } - else if (feattab[i].flag == ~0) + if (feattab[i].flag == FEATFLAG_ENABLES_PRIV) { if (!feature_bool(feattab[i].feat)) PrivSet(&antiprivs, feattab[i].priv); } - else if (cli_flags(client) & feattab[i].flag) + else if (feattab[i].feat == FEAT_LAST_F || feature_bool(feattab[i].feat)) { - if (feattab[i].feat == FEAT_LAST_F || feature_bool(feattab[i].feat)) - PrivSet(&privs, feattab[i].priv); + if (feattab[i].flag == FEATFLAG_DISABLES_PRIV) + { + PrivSet(&antiprivs, feattab[i].priv); + } + else if (feattab[i].flag == FEATFLAG_ALL_OPERS) + { + if (IsAnOper(client)) + PrivSet(&privs, feattab[i].priv); + } + else if (feattab[i].flag == FEATFLAG_GLOBAL_OPERS) + { + if (IsOper(client)) + PrivSet(&privs, feattab[i].priv); + } + else if (feattab[i].flag == FEATFLAG_LOCAL_OPERS) + { + if (IsLocOp(client)) + PrivSet(&privs, feattab[i].priv); + } } } Index: ircdh/ircd/ircd.c diff -u ircdh/ircd/ircd.c:1.8 ircdh/ircd/ircd.c:1.9 --- ircdh/ircd/ircd.c:1.8 Sat Jan 18 11:53:49 2003 +++ ircdh/ircd/ircd.c Sat Jan 18 14:54:31 2003 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: ircd.c,v 1.8 2003/01/18 19:53:49 zolty Exp $ + * $Id: ircd.c,v 1.9 2003/01/18 22:54:31 zolty Exp $ */ #include "config.h" @@ -372,7 +372,7 @@ Debug((DEBUG_DEBUG, "check_pings(%s)=status:%s limit: %d current: %d", cli_name(cptr), - (cli_flags(cptr) & FLAGS_PINGSENT) ? "[Ping Sent]" : "[]", + HasFlag(cptr, FLAG_PINGSENT) ? "[Ping Sent]" : "[]", max_ping, (int)(CurrentTime - cli_lasttime(cptr)))); @@ -420,12 +420,12 @@ continue; } - if (!(cli_flags(cptr) & FLAGS_PINGSENT)) + if (!HasFlag(cptr, FLAG_PINGSENT)) { /* If we havent PINGed the connection and we havent heard from it in a * while, PING it to make sure it is still alive. */ - cli_flags(cptr) |= FLAGS_PINGSENT; + SetFlag(cptr, FLAG_PINGSENT); /* If we're late in noticing don't hold it against them :) */ cli_lasttime(cptr) = CurrentTime - max_ping; @@ -435,14 +435,8 @@ else { char *asll_ts = militime_float(NULL); -#ifdef P09_SUPPORT - if (Protocol(cptr) < 10) - sendcmdto_one(&me, CMD_PING, cptr, "!%s %s %s", asll_ts, - cli_name(cptr), asll_ts); - else -#endif - sendcmdto_one(&me, CMD_PING, cptr, "!%s %s %s", asll_ts, - cli_name(cptr), asll_ts); + sendcmdto_one(&me, CMD_PING, cptr, "!%s %s %s", asll_ts, + cli_name(cptr), asll_ts); } } Index: ircdh/ircd/ircd_alloc.c diff -u ircdh/ircd/ircd_alloc.c:1.2 ircdh/ircd/ircd_alloc.c:1.3 --- ircdh/ircd/ircd_alloc.c:1.2 Sat Jan 18 11:09:05 2003 +++ ircdh/ircd/ircd_alloc.c Sat Jan 18 14:54:31 2003 @@ -19,13 +19,14 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: ircd_alloc.c,v 1.2 2003/01/18 19:09:05 zolty Exp $ + * $Id: ircd_alloc.c,v 1.3 2003/01/18 22:54:31 zolty Exp $ */ #include "config.h" #include "ircd_alloc.h" #include "ircd_string.h" #include "s_debug.h" +#include <string.h> #include <assert.h> @@ -47,29 +48,104 @@ noMemHandler = handler; } +#if defined(FROBONFREE) || defined(FROBONMALLOC) +static void memfrob(void *ptr, size_t size) +{ + unsigned char *p = ptr, *ep = p + size - 4; + while (p <= ep) + { + *(unsigned long *)p = 0xDEADBEEF; + p += 4; + } + switch (ep - p) + { + case 3: + *(unsigned short *)p = 0xDEAD; + p[2] = 0xBE; + return; + case 2: + *(unsigned short *)p = 0xDEAD; + return; + case 1: + *p++ = 0xDE; + return; + } + return; +} +#endif + void *MyMalloc(size_t size) { - void *p = malloc(size); + void *p = +#ifdef FROBONFREE + malloc(size + sizeof(size_t)); +#else + malloc(size); +#endif if (!p) (*noMemHandler) (); +#ifdef FROBONFREE + *(size_t *)p = size; + p = ((size_t *)p) + 1; +#endif +#ifdef FROBONMALLOC + memfrob(p, size); +#endif return p; } -void *MyRealloc(void *p, size_t size) +void *MyRealloc(void *x, size_t size) { - void *x = realloc(p, size); +#ifdef FROBONFREE + size_t old_size = ((size_t *)x)[-1]; + if (old_size > size) + memfrob(((char *)x) + size, old_size - size); + x = realloc(((size_t *)x) - 1, size + sizeof(size_t)); +#else + x = realloc(x, size); +#endif if (!x) (*noMemHandler) (); + /* Both are needed in all cases to work with realloc... */ +#if defined(FROBONMALLOC) && defined(FROBONFREE) + if (old_size < size) + memfrob(((char *)x) + old_size, size - old_size); +#endif +#ifdef FROBONFREE + *(size_t *)x = size; + x = ((size_t *)x) + 1; +#endif return x; } void *MyCalloc(size_t nelem, size_t size) { - void *p = calloc(nelem, size); + void *p = +#ifdef FROBONFREE + malloc(nelem * size + sizeof(size_t)); +#else + malloc(nelem * size); +#endif if (!p) (*noMemHandler) (); +#ifdef FROBONFREE + *((size_t *)p) = nelem * size; + p = ((size_t *)p) + 1; +#endif + memset(p, 0, size * nelem); return p; } + +#ifdef FROBONFREE +void MyFrobulatingFree(void *p) +{ + size_t *stp = (size_t *)p; + if (p == NULL) + return; + memfrob(p, stp[-1]); + free(stp - 1); +} +#endif #else /* defined(MDEBUG) */ /* Index: ircdh/ircd/ircd_features.c diff -u ircdh/ircd/ircd_features.c:1.1 ircdh/ircd/ircd_features.c:1.2 --- ircdh/ircd/ircd_features.c:1.1 Sat Jan 18 11:09:05 2003 +++ ircdh/ircd/ircd_features.c Sat Jan 18 14:54:31 2003 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: ircd_features.c,v 1.1 2003/01/18 19:09:05 zolty Exp $ + * $Id: ircd_features.c,v 1.2 2003/01/18 22:54:31 zolty Exp $ */ #include "config.h" @@ -31,7 +31,7 @@ #include "ircd_reply.h" #include "ircd_string.h" #include "match.h" -//#include "motd.h" +#include "motd.h" #include "msg.h" #include "numeric.h" #include "numnicks.h" @@ -39,7 +39,7 @@ #include "s_bsd.h" #include "s_debug.h" #include "s_misc.h" -//#include "s_stats.h" +#include "s_stats.h" #include "send.h" #include "struct.h" #include "support.h" @@ -266,20 +266,21 @@ F_B(WALLOPS_OPER_ONLY, 0, 0, 0), F_B(NODNS, 0, 0, 0), F_N(RANDOM_SEED, FEAT_NODISP, random_seed_set, 0, 0, 0, 0, 0, 0), -// F_S(DEFAULT_LIST_PARAM, FEAT_NULL, 0, list_set_default), + F_S(DEFAULT_LIST_PARAM, FEAT_NULL, 0, list_set_default), F_I(NICKNAMEHISTORYLENGTH, 0, 800, whowas_realloc), - F_B(HOST_HIDING, 0, 0, 0), + F_B(HOST_HIDING, 0, 1, 0), F_S(HIDDEN_HOST, FEAT_CASE, "users.undernet.org", 0), F_S(HIDDEN_IP, 0, "127.0.0.1", 0), F_B(CONNEXIT_NOTICES, 0, 0, 0), + F_B(AUTOHIDE, 0, 1, 0), /* features that probably should not be touched */ - F_I(KILLCHASETIMELIMIT, 0, 30, 0), F_I(MAXCHANNELSPERUSER, 0, 10, 0), F_I(AVBANLEN, 0, 40, 0), F_I(MAXBANS, 0, 30, 0), F_I(MAXSILES, 0, 15, 0), F_I(HANGONGOODLINK, 0, 300, 0), F_I(HANGONRETRYDELAY, 0, 10, 0), F_I(CONNECTTIMEOUT, 0, 90, 0), F_I(TIMESEC, 0, 60, 0), F_I(MAXIMUM_LINKS, 0, 1, init_class), /* reinit class 0 as needed */ + F_I(KILLCHASETIMELIMIT, 0, 30, 0), F_I(MAXCHANNELSPERUSER, 0, 10, 0), F_I(AVBANLEN, 0, 40, 0), F_I(MAXBANS, 0, 45, 0), F_I(MAXSILES, 0, 15, 0), F_I(HANGONGOODLINK, 0, 300, 0), F_I(HANGONRETRYDELAY, 0, 10, 0), F_I(CONNECTTIMEOUT, 0, 90, 0), F_I(TIMESEC, 0, 60, 0), F_I(MAXIMUM_LINKS, 0, 1, init_class), /* reinit class 0 as needed */ F_I(PINGFREQUENCY, 0, 120, init_class), F_I(CONNECTFREQUENCY, 0, 600, init_class), F_I(DEFAULTMAXSENDQLENGTH, 0, 40000, init_class), F_I(GLINEMAXUSERCOUNT, 0, 20, 0), /* Some misc. default paths */ -// F_S(MPATH, FEAT_CASE | FEAT_MYOPER, "ircd.motd", motd_init), -// F_S(RPATH, FEAT_CASE | FEAT_MYOPER, "remote.motd", motd_init), + F_S(MPATH, FEAT_CASE | FEAT_MYOPER, "ircd.motd", motd_init), + F_S(RPATH, FEAT_CASE | FEAT_MYOPER, "remote.motd", motd_init), F_S(PPATH, FEAT_CASE | FEAT_MYOPER | FEAT_READ, "ircd.pid", 0), /* Networking features */ F_B(VIRTUAL_HOST, 0, 0, 0), Index: ircdh/ircd/list.c diff -u ircdh/ircd/list.c:1.7 ircdh/ircd/list.c:1.8 --- ircdh/ircd/list.c:1.7 Sat Jan 18 11:09:06 2003 +++ ircdh/ircd/list.c Sat Jan 18 14:54:31 2003 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: list.c,v 1.7 2003/01/18 19:09:06 zolty Exp $ + * $Id: list.c,v 1.8 2003/01/18 22:54:31 zolty Exp $ */ #include "config.h" @@ -533,8 +533,8 @@ watchs.inuse, tmp = watchs.inuse * sizeof(struct Watch)); mem += tmp; inuse += watchs.inuse, - sendto_one(cptr, ":%s %d %s :Totals: inuse %d %d", - me.name, RPL_STATSDEBUG, name, inuse, mem); + send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Totals: inuse %d %d", + inuse, mem); } #endif Index: ircdh/ircd/m_account.c diff -u ircdh/ircd/m_account.c:1.1 ircdh/ircd/m_account.c:1.2 --- ircdh/ircd/m_account.c:1.1 Sat Jan 18 11:53:49 2003 +++ ircdh/ircd/m_account.c Sat Jan 18 14:54:31 2003 @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: m_account.c,v 1.1 2003/01/18 19:53:49 zolty Exp $ + * $Id: m_account.c,v 1.2 2003/01/18 22:54:31 zolty Exp $ */ /* @@ -126,7 +126,7 @@ } ircd_strncpy(cli_user(acptr)->account, parv[2], ACCOUNTLEN); - hide_hostmask(acptr, FLAGS_ACCOUNT); + hide_hostmask(acptr, FLAG_ACCOUNT); sendcmdto_serv_butone(sptr, CMD_ACCOUNT, cptr, "%C %s", acptr, cli_user(acptr)->account); Index: ircdh/ircd/m_admin.c diff -u ircdh/ircd/m_admin.c:1.2 ircdh/ircd/m_admin.c:1.3 --- ircdh/ircd/m_admin.c:1.2 Sat Jan 18 11:09:06 2003 +++ ircdh/ircd/m_admin.c Sat Jan 18 14:54:31 2003 @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: m_admin.c,v 1.2 2003/01/18 19:09:06 zolty Exp $ + * $Id: m_admin.c,v 1.3 2003/01/18 22:54:31 zolty Exp $ */ /* @@ -114,10 +114,12 @@ */ int m_admin(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) { + struct Client *acptr; + assert(0 != cptr); assert(cptr == sptr); - if (parc > 1) + if (parc > 1 && (!(acptr = find_match_server(parv[1])) || !IsMe(acptr))) return send_reply(sptr, ERR_NOPRIVILEGES); return send_admin_info(sptr); Index: ircdh/ircd/m_away.c diff -u ircdh/ircd/m_away.c:1.2 ircdh/ircd/m_away.c:1.3 --- ircdh/ircd/m_away.c:1.2 Sat Jan 18 11:09:06 2003 +++ ircdh/ircd/m_away.c Sat Jan 18 14:54:31 2003 @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: m_away.c,v 1.2 2003/01/18 19:09:06 zolty Exp $ + * $Id: m_away.c,v 1.3 2003/01/18 22:54:31 zolty Exp $ */ /* @@ -158,13 +158,15 @@ int m_away(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) { char *away_message = parv[1]; + int was_away = cli_user(sptr)->away != 0; assert(0 != cptr); assert(cptr == sptr); if (user_set_away(cli_user(sptr), away_message)) { - sendcmdto_serv_butone(sptr, CMD_AWAY, cptr, ":%s", away_message); + if (!was_away) + sendcmdto_serv_butone(sptr, CMD_AWAY, cptr, ":%s", away_message); send_reply(sptr, RPL_NOWAWAY); } else Index: ircdh/ircd/m_burst.c diff -u ircdh/ircd/m_burst.c:1.2 ircdh/ircd/m_burst.c:1.3 --- ircdh/ircd/m_burst.c:1.2 Sat Jan 18 11:09:06 2003 +++ ircdh/ircd/m_burst.c Sat Jan 18 14:54:31 2003 @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: m_burst.c,v 1.2 2003/01/18 19:09:06 zolty Exp $ + * $Id: m_burst.c,v 1.3 2003/01/18 22:54:31 zolty Exp $ */ /* @@ -144,9 +144,6 @@ unsigned int parse_flags = (MODE_PARSE_FORCE | MODE_PARSE_BURST); int param, nickpos = 0, banpos = 0; char modestr[BUFSIZE], nickstr[BUFSIZE], banstr[BUFSIZE]; -#ifdef P09_SUPPORT - int ts_sent = 0; -#endif if (parc < 3) return protocol_violation(sptr, "Too few parameters for BURST"); @@ -173,6 +170,8 @@ continue; if (strchr(parv[param], 'i') || strchr(parv[param], 'k')) { + /* Clear any outstanding rogue invites */ + mode_invite_clear(chptr); for (member = chptr->members; member; member = nmember) { nmember = member->next_member; Index: ircdh/ircd/m_create.c diff -u ircdh/ircd/m_create.c:1.2 ircdh/ircd/m_create.c:1.3 --- ircdh/ircd/m_create.c:1.2 Sat Jan 18 11:09:06 2003 +++ ircdh/ircd/m_create.c Sat Jan 18 14:54:31 2003 @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: m_create.c,v 1.2 2003/01/18 19:09:06 zolty Exp $ + * $Id: m_create.c,v 1.3 2003/01/18 22:54:31 zolty Exp $ */ /* @@ -127,9 +127,6 @@ chanTS = atoi(parv[2]); - joinbuf_init(&join, sptr, cptr, JOINBUF_TYPE_JOIN, 0, 0); - joinbuf_init(&create, sptr, cptr, JOINBUF_TYPE_CREATE, 0, chanTS); - /* A create that didn't appear during a burst has that servers idea of * the current time. Use it for lag calculations. */ @@ -141,13 +138,17 @@ { static time_t rate; sendto_opmask_butone_ratelimited(0, SNO_NETWORK, &rate, - "Timestamp drift from %C (%is)", - cli_user(sptr)->server, chanTS - TStime()); - - /* If this server is >5 minutes fast, squit it */ - if (TStime() - chanTS < -5 * 60 * 60) - ... [truncated message content] |
From: Toni G. <zo...@us...> - 2003-01-18 22:55:32
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-18 22:55:31 UTC Added files: ircd/m_wallvoices.c Log message: Se me olvido el archivo ;) ---------------------- diff included ---------------------- Index: ircdh/ircd/m_wallvoices.c diff -u /dev/null ircdh/ircd/m_wallvoices.c:1.1 --- /dev/null Sat Jan 18 14:55:31 2003 +++ ircdh/ircd/m_wallvoices.c Sat Jan 18 14:55:21 2003 @@ -0,0 +1,161 @@ +/* + * IRC - Internet Relay Chat, ircd/m_wallvoices.c + * Copyright (c) 2002 hikari + * + * See file AUTHORS in IRC package for additional names of + * the programmers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 1, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * $Id: m_wallvoices.c,v 1.1 2003/01/18 22:55:21 zolty Exp $ + */ + +/* + * m_functions execute protocol messages on this server: + * + * cptr is always NON-NULL, pointing to a *LOCAL* client + * structure (with an open socket connected!). This + * identifies the physical socket where the message + * originated (or which caused the m_function to be + * executed--some m_functions may call others...). + * + * sptr is the source of the message, defined by the + * prefix part of the message if present. If not + * or prefix not found, then sptr==cptr. + * + * (!IsServer(cptr)) => (cptr == sptr), because + * prefixes are taken *only* from servers... + * + * (IsServer(cptr)) + * (sptr == cptr) => the message didn't + * have the prefix. + * + * (sptr != cptr && IsServer(sptr) means + * the prefix specified servername. (?) + * + * (sptr != cptr && !IsServer(sptr) means + * that message originated from a remote + * user (not local). + * + * combining + * + * (!IsServer(sptr)) means that, sptr can safely + * taken as defining the target structure of the + * message in this server. + * + * *Always* true (if 'parse' and others are working correct): + * + * 1) sptr->from == cptr (note: cptr->from == cptr) + * + * 2) MyConnect(sptr) <=> sptr == cptr (e.g. sptr + * *cannot* be a local connection, unless it's + * actually cptr!). [MyConnect(x) should probably + * be defined as (x == x->from) --msa ] + * + * parc number of variable parameter strings (if zero, + * parv is allowed to be NULL) + * + * parv a NULL terminated list of parameter pointers, + * + * parv[0], sender (prefix string), if not present + * this points to an empty string. + * parv[1]...parv[parc-1] + * pointers to additional parameters + * parv[parc] == NULL, *always* + * + * note: it is guaranteed that parv[0]..parv[parc-1] are all + * non-NULL pointers. + */ +#include "config.h" + +#include "channel.h" +#include "client.h" +#include "hash.h" +#include "ircd.h" +#include "ircd_reply.h" +#include "ircd_string.h" +#include "msg.h" +#include "numeric.h" +#include "numnicks.h" +#include "s_user.h" +#include "send.h" + +#include <assert.h> + +/* + * m_wallvoices - local generic message handler + */ +int m_wallvoices(struct Client *cptr, struct Client *sptr, int parc, + char *parv[]) +{ + struct Channel *chptr; + + assert(0 != cptr); + assert(cptr == sptr); + + ClrFlag(sptr, FLAG_TS8); + + if (parc < 2 || EmptyString(parv[1])) + return send_reply(sptr, ERR_NORECIPIENT, "WALLVOICES"); + + if (parc < 3 || EmptyString(parv[parc - 1])) + return send_reply(sptr, ERR_NOTEXTTOSEND); + + if (IsChannelName(parv[1]) && (chptr = FindChannel(parv[1]))) + { + if (client_can_send_to_channel(sptr, chptr)) + { + if ((chptr->mode.mode & MODE_NOPRIVMSGS) && + check_target_limit(sptr, chptr, chptr->chname, 0)) + return 0; + sendcmdto_channel_butone(sptr, CMD_WALLVOICES, chptr, cptr, + SKIP_DEAF | SKIP_BURST | SKIP_NONVOICES, + "%H :+ %s", chptr, parv[parc - 1]); + } + else + send_reply(sptr, ERR_CANNOTSENDTOCHAN, parv[1]); + } + else + send_reply(sptr, ERR_NOSUCHCHANNEL, parv[1]); + + return 0; +} + +/* + * ms_wallvoices - server message handler + */ +int ms_wallvoices(struct Client *cptr, struct Client *sptr, int parc, + char *parv[]) +{ + struct Channel *chptr; + assert(0 != cptr); + assert(0 != sptr); + + if (parc < 3 || !IsUser(sptr)) + return 0; + + if ((chptr = FindChannel(parv[1]))) + { + if (client_can_send_to_channel(sptr, chptr)) + { + sendcmdto_channel_butone(sptr, CMD_WALLVOICES, chptr, cptr, + SKIP_DEAF | SKIP_BURST | SKIP_NONVOICES, + "%H :%s", chptr, parv[parc - 1]); + } + else + send_reply(sptr, ERR_CANNOTSENDTOCHAN, parv[1]); + } + return 0; +} ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2003-01-18 23:16:21
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-18 23:16:19 UTC Modified files: doc/Makefile.in doc/example.conf doc/history/ChangeLog.07 doc/history/ChangeLog.10 Log message: Documentacion ---------------------- diff included ---------------------- Index: ircdh/doc/Makefile.in diff -u ircdh/doc/Makefile.in:1.2 ircdh/doc/Makefile.in:1.3 --- ircdh/doc/Makefile.in:1.2 Sat Jan 18 11:09:01 2003 +++ ircdh/doc/Makefile.in Sat Jan 18 15:16:08 2003 @@ -18,40 +18,48 @@ #### Start of system configuration section. #### -prefix=@prefix@ -INSTALL=@INSTALL@ -SHELL=@SHPROG@ -RM=@RMPROG@ +prefix = @prefix@ +top_srcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ +INSTALL = @INSTALL@ +SHELL = @SHPROG@ +RM = @RMPROG@ @SET_MAKE@ -# The following variables are replaced by what you give during configuration : -MANDIR= +MANDIR = @mandir@ #### End of system configuration section. #### all: +build: + +clean: + distclean: ${RM} -f Makefile stamp-m maintainer-clean: distclean +depend: + install: - cd ${srcdir} && (test -d ${MANDIR}/man8 || mkdir ${MANDIR}/man8 || mkdir -p ${MANDIR}/man8) 2> /dev/null && ${INSTALL} -m 644 ircd.8 ${MANDIR}/man8 + cd ${srcdir} && (test -d ${MANDIR}/man8 || mkdir ${MANDIR}/man8 || mkdir -p ${MANDIR}/man8) 2> /dev/null && ${INSTALL} -m 644 en/ircd.8 ${MANDIR}/man8 uninstall: ${RM} -f ${MANDIR}/man8/ircd.8 # You need GNU make for this to work. -#Makefile: ../config/config.status Makefile.in ../config/gen.doc.Makefile \ -# ../config/.config stamp-m -# @echo "recreating doc/Makefile" -# @cd ../config; \ -# CONFIG_FILES=../doc/Makefile CONFIG_HEADERS= ./config.status > /dev/null; \ -# RM=${RM} ${SHELL} ./gen.doc.Makefile +# Makefile: ../config/config.status Makefile.in ../config/gen.doc.Makefile \ +# ../config/.config stamp-m +# @echo "recreating doc/Makefile" +# @cd ../config; \ +# CONFIG_FILES=../doc/Makefile CONFIG_HEADERS= ./config.status > /dev/null; \ +# RM=${RM} ${SHELL} ./gen.doc.Makefile -#stamp-m: -# echo timestamp > stamp-m +# stamp-m: +# echo timestamp > stamp-m -#../config/config.status: -# @cd ../config; ${MAKE} config.status +# ../config/config.status: +# @cd ../config; ${MAKE} config.status Index: ircdh/doc/example.conf diff -u ircdh/doc/example.conf:1.1 ircdh/doc/example.conf:1.2 --- ircdh/doc/example.conf:1.1 Sat Jul 27 08:09:19 2002 +++ ircdh/doc/example.conf Sat Jan 18 15:16:08 2003 @@ -1,13 +1,17 @@ # ircd.conf configuration file for ircd version ircu2.9.mu and ircu2.10 # +# Last Updated: 26, June 2001. +# # Written by Niels <ni...@un...>, based on the original example.conf, # server code and some real-life (ahem) experience. # +# Updated and heavily modified by Braden <db...@ya...>. +# # Thanks and credits to: Run, Trillian, Cym, Morrissey, Chaos, Flynn, # Xorath, WildThang, Mmmm, SeKs, Ghostwolf and # all other Undernet IRC Admins and Operators, # and programmers working on the Undernet ircd. - +# # This is an example of the configuration file used by the Undernet ircd. # # This document is based on a (fictious) server in Europe with a @@ -16,85 +20,98 @@ # to one in the US by itself. # # All configuration options start with a letter identifying the option, -# and a colon separated list of options. An asterisk indicates an -# unused field. +# and a colon separated list of options. Unused fields should be left +# blank. # # Please note that when ircd puts the configuration lines into practice, # it parses them exactly the other way round than they are listed here. +# It reads the lines in reverse order. +# # This means that you should start your I: lines with the "fall through", # most vanilla one and end with the most detailed. # -# There is a difference between the ``hostname'' and the ``server name'' +# There is a difference between the "hostname" and the "server name" # of the machine that the server is run on. For example, the host can -# have ``veer.cs.vu.nl'' as FQDN, and ``Amsterdam.NL.EU.undernet.org'' as +# have "veer.cs.vu.nl" as FQDN, and "Amsterdam.NL.EU.undernet.org" as # server name. -# A ``server mask'' is something like '*.EU.UnderNet.org'', which is -# matched by 'Amsterdam.NL.EU.undernet.org' but not by -# 'Manhattan.KS.US.undernet.org'. +# A "server mask" is something like "*.EU.UnderNet.org", which is +# matched by "Amsterdam.NL.EU.undernet.org" but not by +# "Manhattan.KS.US.undernet.org". +# +# Please do NOT just rename the example.conf to ircd.conf and expect +# it to work. + +# [M:line] # # First some information about the server. -# M:<server name>:<virtual ip>:<description>:<server port>:<server numeric> +# M:<server name>:<virtual host>:<description>:<not used>:<server numeric> # -# The <virtual ip> must be either be empty, contain a "*", or contain -# the IP address of an interface on your system. If it contains an address, -# the address will be bound to if you have specified virtual hosting. -# -# The <server port> is the port that other servers can connect to. -# Client ports need to be specified with a P: line, see below. +# <virtual host> must contain either a * or a valid IPv4 address in +# dotted quad notation. (127.0.0.1) The address MUST be the address +# of a physical interface on the host. This address is used for outgoing +# connections only, see P:lines for listener virtual hosting. +# If in doubt put a * or the IP of your primary interface here. +# The server must be compiled with virtual hosting turned on to get this +# to work correctly. # # Note that <server numeric> has to be unique on the network your server -# is running on, must be between 1 and 64, and is not updated on a rehash. +# is running on, must be between 0 and 4095, and is not updated on a rehash. +M:London.UK.Eu.UnderNet.org::University of London, England::1 -# M:London.UK.Eu.UnderNet.org:127.0.0.1:University of London, England:4400:1 -M:London.UK.Eu.UnderNet.org:*:University of London, England:4400:1 +# [A:line] # # This sets information that can be retrieved with the /ADMIN command. # It should contain at least an admin Email contact address. # A:<line 1>:<line 2>:<line 3> - A:The University of London:Undernet IRC server:IRC Admins <ir...@lo...> + +# [Y:lines] # -# All connections to the server are associated with a certain ``connection -# class'', be they incoming or outgoing (initiated by the server), be they +# All connections to the server are associated with a certain "connection +# class", be they incoming or outgoing (initiated by the server), be they # clients, servers or Martians. (Note that ircd doesn't have direct support # for Martians (yet?); they will have to register as normal users. ;-) # Take the following Y: lines only as a guide. # Y:<class>:<ping freq>:<connect freq>:<maximum links>:<sendq size> - +# +# <connect freq> applies only to servers, and specifies the frequency +# that the server tries to autoconnect. setting this to 0 will cause +# the server to attempt to connect repeatedly with no delay until the +# <maximum links> condition is satisfied. This is a Bad Thing(tm). +# +# <maximum links> should be set at either 0 or 1. +# # Server classes: 90 = all your uplinks for who you do not wish to hub; -# else in classes 80 and/or 70. -# 50 = leaf servers (only used if your server is a hub) - -Y:90:90:300:1:1700000 -Y:80:90:300:1:1700000 -Y:70:90:300:1:1700000 -Y:50:90:300:10:1700000 +# 80 = leaf servers (only used if your server is a hub) +Y:90:90:300:1:9000000 +Y:80:90:300:0:9000000 # Client classes. 10 = locals; 2 = for all .net and .com that are not # in Europe; 1 = for everybody. - Y:10:90:0:100:160000 Y:2:90:0:5:80000 Y:1:90:0:400:160000 + +# [I:lines] # # To allow clients to connect, they need authorization. This can be # done based on hostmask, address mask, and/or with a password. # With intelligent use of classes and the maxconnections field in the # Y: lines, you can let in a specific domain, but get rid of all other -# domains in the same toplevel, thus setting up some sort of 'reverse -# K: line'. +# domains in the same toplevel, thus setting up some sort of "reverse +# K: line". # I:<IP mask or crap to force resolving>:<opt passwd>:<hostmask>::<class> - +# # Technical description (for examples, see below): -# For every connecting client, the IP-number is know. A reverse lookup +# For every connecting client, the IP address is known. A reverse lookup # on this IP-number is done to get the (/all) hostname(s). # Each hostname that belongs to this IP-number is matched to <hostmask>, # and the I: line is used when any matches; the client will then show -# with this particular hostname. If none of the hostnames matches, then +# with this particular hostname. If none of the hostnames match, then # the IP-number is matched against the <IP mask ...> field, if this matches # then the I: line is used nevertheless and the client will show with the # first (main) hostname if any; if the IP-number did not resolve then the @@ -109,20 +126,19 @@ # match this I: line: # I:jolan.ppro::foobar::1 # Finally, I: lines with empty <IP mask ..> or <hostmask> fields are skipped. - -# This is the 'fallback' entry. All .uk, .nl, and all unresolved are +# +# This is the "fallback" entry. All .uk, .nl, and all unresolved are # in these two lines. # By using two different lines, multiple connections from a single IP # are only allowed from hostnames which have both valid forward and # reverse DNS mappings. - I:*@*:1:Unresolved::1 I:Resolved::*@*::1 # If you don't want unresolved dudes to be able to connect to your # server, use just: # I:NotMatchingCrap::*@*::1 - +# # Here, take care of all American ISPs. I:Resolved::*@*.com::2 I:Resolved::*@*.net::2 @@ -143,7 +159,7 @@ # You can request a more complete listing, including the "list of standard # K-lines" from the Routing Committee; it will also be sent to you if # you apply for a server and get accepted. - +# # Ourselves - this makes sure that we can get in, no matter how full # the server is (hopefully). I:*@193.37.*::*@*.london.ac.uk::10 @@ -156,44 +172,67 @@ # that have "dial??.*" as host mask: # I:Resolved:1:*@*.swipnet.se::1 # I:Resolved:2:*@dial??.*::1 +# +# If you are not worried about who connects, this line will allow everyone +# to connect. +I:*::*::1 + +# [T:lines] # # It is possible to show a different Message of the Day to a connecting # client depending on its origin. # T:<hostmask>:<path to motd file> - +# or: +# T:<classnumber>:<path to motd file> +# # DPATH/net_com.motd contains a special MOTD where users are encouraged # to register their domains and get their own I: lines if they're in # Europe, or move to US.UnderNet.org if they're in the USA. T:*.net:net_com.motd T:*.com:net_com.motd +T:2:net_com.motd # A different MOTD for ourselves, where we point out that the helpdesk # better not be bothered with questions regarding irc... T:*.london.ac.uk:london.motd + +# [U:lines] # -# One of the many nice features of Undernet is ``Uworld'', a program +# One of the many nice features of Undernet is "Uworld", a program # connected to the net as a server. This allows it to broadcast any mode -# change, thus allowing opers to, for example, 'unlock' a channel that +# change, thus allowing opers to, for example, "unlock" a channel that # has been taken over. # There is only one slight problem: the TimeStamp protocol prevents this. # So there is a configuration option to allow them anyway from a certain # server. +# U:<Server Name>:<Juped Nicks>:* +# # Note: (1) These lines are agreed on by every server admin on Undernet; # (2) These lines must be the same on every single server, or results # will be disasterous; (3) This is a useful feature, not something that # is a liability and abused regularly (well... :-) # If you're on Undernet, you MUST have these lines. I cannnot stress -# this enough. +# this enough. If all of the servers don't have the same lines, the +# servers will try to undo the mode hacks that Uworld does. Make SURE that +# all of the servers have the EXACT same Ulines. +# # As of ircu2.10.05 is it possible to Jupe nicks. Juped nicks need to be # added to U: lines. As per CFV-0095, the following nicks must be juped, # it is not allowed to jupe others as well. +U:Uworld.EU.undernet.org:EuWorld,E,StatServ,NoteServ:* +U:Uworld2.undernet.org:UWorld2,ChanSvr,ChanSaver,ChanServ:* +U:Uworld.undernet.org:Uworld,NickSvr,NickSaver,NickServ:* +U:channels.undernet.org:LPT1,X,login:* +U:channels2.undernet.org:LPT2,W,Undernet:* +U:channels3.undernet.org:COM1,V,protocol:* +U:channels4.undernet.org:COM2,U,pass:* +U:channels5.undernet.org:COM3,Y,AUX:* +U:channels6.undernet.org:COM4,Z,newpass:* -U:Uworld.EU.undernet.org:EuWorld,E,protocol,StatServ,NoteServ,Undernet:* -U:Uworld2.undernet.org:UWorld2,W,ChanSvr,ChanSaver,ChanServ,COM1,COM2,COM3,COM4:* -U:Uworld.undernet.org:Uworld,X,NickSvr,NickSaver,NickServ,LPT1,LPT2,AUX:* +# [K:lines] # # While running your server, you will most probably encounter individuals # or groups of persons that you do not wish to have access to your server. @@ -208,7 +247,7 @@ # Note that K: lines 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). - +# # With a simple comment, using quotes: K:*.au:"Please use a nearer server":* K:*.edu:"Please use a nearer server":* @@ -224,16 +263,13 @@ # even if an IP address has a properly resolving host name. k:192.168.*:!klines/martians:* -# -# A more flexible way of restricting access to your server is the use -# of "restriction lines". These tell the server to start up an (external) -# program, upon whose output is decided whether the client is allowed -# access. The program should print "Y" or "N <reason>" on its stdout. -# Note that the use of R: lines is discouraged and deprecated, needs a -# compile-time define, eats CPU cycles and may well be taken out in -# future releases of ircd. -# R:<host/IP mask>:<program name>:<username mask> +# Additionally, you may specify a hostmask prefixed with $R to indicate +# a match should be performed against the "real-name" / "info" field +# instead of the host/IP. +K:$R*sub7*:"You are infected with a Trojan":* + +# [C:lines] # # You probably want your server connected to other servers, so your users # have other users to chat with. @@ -246,54 +282,52 @@ # server links is provided for ircd to decide what links to allow, what # to let humans do themselves, and what links to (forcefully) disallow. # -# The Connection and Allowing connection lines (also known as C/N lines) +# The Connection lines (also known as C lines) # define what servers the server connect to, and which servers are -# allowed to connect. Note that they come in pairs; they do not work if -# one if present and the other is absent. +# allowed to connect. # C:<remote hostname or IP>:<password>:<remote server name>:<port>:<class> -# N:<remote hostname or IP>:<password>:<remote server name>:<hostmask>:<class> # -# If you wish to use ident, prepend "username@" to the hostname or IP -# address (the first field). -# If the "port" field is omitted, the server will not attempt to -# establish a link with that server ("not autoconnecting"). -# The (optional) "host mask" field tells the server to represent itself -# with "hostmask" dot-seperateed fields stripped from its servername -# and replace it with "*.". -# For example, if hostmask == 2 and the local server name is -# "irc.sub.domain.com" it would be sent as "*.domain.com". This allows -# for easier routing and linking of new servers. -# This feature is not used on Undernet. - +# The "port" field defines the default port the server tries to connect +# to if an operator uses /connect without specifying a port. This is also +# the port used when the server attempts to auto-connect to the remote +# server. (See Y:lines for more informationa about auto-connects). +# # Our primary uplink. C:1.2.3.4:passwd:Amsterdam.NL.Eu.UnderNet.org:4400:90 -N:1.2.3.4:passwd:Amsterdam.NL.Eu.UnderNet.org::90 + +# [H:lines] # # If your server starts on a bit larger network, you'll probably get # assigned one or two uplinks to which your server can connect. # If your uplink(s) also connect to other servers than yours (which is # probable), you need to define your uplink as being allowed to "hub". -# H:<allowed hostmask>::<server name> +# H:<allowed hostmask>::<server name>:<maximum hops that can be introduced> H:*.*::Amsterdam.NL.Eu.UnderNet.org + +# [L:lines] # # Of course, the opposite is also possible: forcing a server to be # a leaf. L: lines follow Murphy's Law: if you use them, there's a big # chance that routing will be screwed up afterwards. # L:<opt disallowed hostmask>::<server mask>:<opt max depth> + +# [D:lines] # # For an advanced, real-time rule-based routing decision making system # you can use Disallow lines. For more information, see doc/readme.crules. # D:<server mask that ircd will refuse to connect to>::<rule> # d:<server mask that ircd will not autoconnect to>::<rule> -D:*.US.UnderNet.org::connected(*.US.UnderNet.org) -d:*.EU.UnderNet.org::connected(Amsterdam.NL.EU.*) - +# D:*.US.UnderNet.org::connected(*.US.UnderNet.org) +# d:*.EU.UnderNet.org::connected(Amsterdam.NL.EU.*) +# # The following line is recommended for leaf servers: -d:*::directcon(*) +# d:*::directcon(*) + +# [O:lines] # # Inevitably, you have reached the part about "IRC Operators". Oper status # grants some special privileges to a user, like the power to make the @@ -313,44 +347,251 @@ # Local operators are designated with a lowercase 'o' # O:<host/IP mask>:<encrypted password>:<Nick>::<connection class> # o:<host/IP mask>:<encrypted password>:<Nick>::<connection class> - +# +# The encrypted password is optional. If you wish to encrypt your password, +# there is a utility in the ircd. Please read the file tools/README. O:*@*.cs.vu.nl:VRKLKuGKn0jLs:Niels::10 +o:*@*.uu.net:noncryptedpass:Braden::10 # Note that the <connection class> is optional, but leaving it away # puts the O: lines in class 0, which usually only accepts one connection # at a time. If you want users to Oper up more then once per O: line, # then use a connection class that allows more then one connection, # for example (using class 10 as in the example above): -# Y:10:90:0:100:160000 # -# When your server gets fuller, you will notice delays when trying to -# connect to your server's primary listening port. Via the Port lines -# it is possible to specify additional ports (both AF_UNIX and AF_INET) -# for ircd to listen to. +# Once you OPER your connection class changes no matter where you are or +# your previous connection classes. If the defined connection class is 10 +# for the O:line, then your new connection class is 10. +# Y:10:90:0:100:160000 + + +# [P:lines] +# When your server gets more full, you will notice delays when trying to +# connect to your server's primary listening port. It is possible via the +# Port lines to specify additional ports for the ircd to listen to. # De facto ports are: 6667 - standard; 6660-6669 - additional client # ports; -# +# Undernet uses 4400 for server listener ports. # These are just hints, they are in no way official IANA or IETF policies. +# IANA says we should use port 194, but that requires us to run as root, so +# we don't do that. # -# On a side note, the /UPING command uses port 7007/udp. If your server -# is located behind a firewall, you may want to make another hole in it -# for this port. +# P:<hostmask>:<interface>:<[CS][H]>:<port number> # -# P:<hostmask, or path>:::<client port number> +# The hostmask setting allows you to specify a range of IP addresses that +# you will allow connections from. This should only contain IP addresses +# and '*' if used. This field only uses IP addresses. This does not use +# DNS in any way so you can't use it to allow *.nl or *.uk. Attempting +# to specify anything other than numbers, dots and stars [0-9.*] will result +# in the port allowing connections from anyone. +# +# The interface setting allows multiply homed hosts to specify which +# interface to use on a port by port basis, if an interface is not specified +# the default interface will be used. The interface MUST be the complete +# IP address for a real hardware interface on the machine running ircd. +# If you want to use virtual hosting *YOU* *MUST* *USE* *THIS* otherwise it +# WILL bind to all interfaces - not what most people seem to expect. +# +# The [CS][H] field is an optional field to specify that a port is a +# server port or a client port and whether it's hidden or not. +# If used the first character MUST be either a C or S. +# If you want to hide a port from /stats p from non-opers follow the C +# or S with an H +# +# C = Client (Ports 6660-6669) +# S = Server (Port 4400) +# +# P:<hostmask>:<interface>:<[CS][H]>:<port number> +# +# This is a normal server port, you need to have at least one server +# port defined if you want to connect your server to other servers. +P:::S:4400 + +# This is a Server port that is Hidden +#P:::SH:4401 -P::::6667 +# The following are normal client ports +P:::C:6667 P::::6668 -P:*.nl:::6666 -P:/tmp/.ircd:::6667 +P:192.168.*:::6666 -# -# Well, you have now reached the end of this sample configuration file -# If you have any questions, feel free to mail <doc...@un...> -# or <was...@un...>. -# If you are interested in linking your server to the Undernet IRC network -# visit http://www.routing-com.undernet.org/, and if there are any problems -# then contact <rou...@un...> asking for information. -# Upgrades of the Undernet ircd can be found on http://coder-com.undernet.org/. +# This is a hidden client port, listening on the interface associated +# with the IP address 168.8.21.107 +#P:*:168.8.21.107:CH:7000 + + +# [Q:lines] +# +# This allows you (the admin) to disallow the usage of /OPMODE and +# /CLEARMODE on certain sensitive channels. Opers trying to do that +# will receive a short notice. Depending on the setting of +# OPER_FORCE_OPMODE, OPER_FORCE_LOPMODE and LOCOP_FORCE_LOPMODE, +# global/local opers may override these lines by prefixing the +# channel name with an exclamation mark ('!') +# +# Q:<channel>:<reason> +# +# Note that since the hash mark ('#') is used to start a comment, +# you will have to escape it in the channel name (see below). + +# Q:\#shells:"Thou shalt not support the h4><0rz" +# Q:&kiddies:"They can take care of themselves" + + +# [F:lines] +# +# IRC servers have a large number of options and features. Most of these +# are set at compile time through the use of #define's--see "make config" +# for more details--but we are working to move many of these into the +# configuration file. Feature lines are the hook we're using for this. +# F:<Option>:<Value> +# +# The entire purpose of F:lines are so that you do not have to recompile +# the IRCD everytime you want to change a feature. All of the features +# are listed below, and at the bottom is how to set logging. +# +# A Special Thanks to Kev for writing the documentation of F:lines. It can +# be found at doc/readme.features and the logging documentation can be +# found at doc/readme.log. The defaults used by the Undernet network are +# below. +# +# F:DOMAINNAME:<obtained from /etc/resolv.conf by ./configure> +# F:RELIABLE_CLOCK:FALSE +# F:BUFFERPOOL:27000000 +# F:HAS_FERGUSON_FLUSHER:FALSE +# F:CLIENT_FLOOD:1024 +# F:SERVER_PORT:4400 +# F:NODEFAULTMOTD:TRUE +# F:MOTD_BANNER +# F:KILL_IPMISMATCH:FALSE +# F:IDLE_FROM_MSG:TRUE +# F:HUB:FALSE +# F:WALLOPS_OPER_ONLY:FALSE +# F:NODNS:FALSE +# F:RANDOM_SEED:<you should set one explicitly> +# F:DEFAULT_LIST_PARAM +# F:NICKNAMEHISTORYLENGTH:800 +# F:HOST_HIDING:TRUE +# F:HIDDEN_HOST:users.undernet.org +# F:HIDDEN_IP:127.0.0.1 +# F:CONNEXIT_NOTICES:FALSE +# F:KILLCHASETIMELIMIT:30 +# F:MAXCHANNELSPERUSER:10 +# F:AVBANLEN:40 +# F:MAXBANS:45 +# F:MAXSILES:15 +# F:HANGONGOODLINK:300 +# F:HANGONRETRYDELAY:10 +# F:CONNECTTIMEOUT:90 +# F:TIMESEC:60 +# F:MAXIMUM_LINKS:1 +# F:PINGFREQUENCY:120 +# F:CONNECTFREQUENCY:600 +# F:DEFAULTMAXSENDQLENGTH:40000 +# F:GLINEMAXUSERCOUNT:20 +# F:MPATH:ircd.motd +# F:RPATH:remote.motd +# F:PPATH:ircd.pid +# F:VIRTUAL_HOST:FALSE +# F:TOS_SERVER:0x08 +# F:TOS_CLIENT:0x08 +# F:POLLS_PER_LOOP:200 +# F:CRYPT_OPER_PASSWORD:TRUE +# F:OPER_NO_CHAN_LIMIT:TRUE +# F:OPER_MODE_LCHAN:TRUE +# F:OPER_WALK_THROUGH_LMODES:FALSE +# F:NO_OPER_DEOP_LCHAN:FALSE +# F:SHOW_INVISIBLE_USERS:TRUE +# F:SHOW_ALL_INVISIBLE_USERS:TRUE +# F:UNLIMIT_OPER_QUERY:FALSE +# F:LOCAL_KILL_ONLY:FALSE +# F:CONFIG_OPERCMDS:FALSE +# F:OPER_KILL:TRUE +# F:OPER_REHASH:TRUE +# F:OPER_RESTART:TRUE +# F:OPER_DIE:TRUE +# F:OPER_GLINE:TRUE +# F:OPER_LGLINE:TRUE +# F:OPER_JUPE:TRUE +# F:OPER_LJUPE:TRUE +# F:OPER_OPMODE:TRUE +# F:OPER_LOPMODE:TRUE +# F:OPER_FORCE_OPMODE:TRUE +# F:OPER_FORCE_LOPMODE:TRUE +# F:OPER_BADCHAN:FALSE +# F:OPER_LBADCHAN:FALSE +# F:OPER_SET:FALSE +# F:OPERS_SEE_IN_SECRET_CHANNELS:TRUE +# F:OPER_WIDE_GLINE:TRUE +# F:LOCOP_KILL:TRUE +# F:LOCOP_REHASH:TRUE +# F:LOCOP_RESTART:FALSE +# F:LOCOP_DIE:FALSE +# F:LOCOP_LGLINE:TRUE +# F:LOCOP_LJUPE:TRUE +# F:LOCOP_LOPMODE:TRUE +# F:LOCOP_FORCE_LOPMODE:TRUE +# F:LOCOP_LBADCHAN:FALSE +# F:LOCOP_SET:FALSE +# F:LOCOP_SEE_IN_SECRET_CHANNELS:FALSE +# F:LOCOP_WIDE_GLINE:FALSE +# F:HIS_MAP:TRUE +# F:HIS_SNOTICES:TRUE +# F:HIS_SNOTICES_OPER_ONLY:TRUE +# F:HIS_DESYNCS:TRUE +# F:HIS_DEBUG_OPER_ONLY:TRUE +# F:HIS_WALLOPS:TRUE +# F:HIS_LINKS:TRUE +# F:HIS_TRACE:TRUE +# F:HIS_STATS_l:TRUE +# F:HIS_STATS_c:TRUE +# F:HIS_STATS_g:TRUE +# F:HIS_STATS_h:TRUE +# F:HIS_STATS_k:TRUE +# F:HIS_STATS_f:TRUE +# F:HIS_STATS_i:TRUE +# F:HIS_STATS_j:TRUE +# F:HIS_STATS_M:TRUE +# F:HIS_STATS_m:TRUE +# F:HIS_STATS_o:TRUE +# F:HIS_STATS_p:TRUE +# F:HIS_STATS_q:TRUE +# F:HIS_STATS_r:TRUE +# F:HIS_STATS_d:TRUE +# F:HIS_STATS_e:TRUE +# F:HIS_STATS_t:TRUE +# F:HIS_STATS_T:TRUE +# F:HIS_STATS_u:FALSE +# F:HIS_STATS_U:TRUE +# F:HIS_STATS_v:TRUE +# F:HIS_STATS_w:FALSE +# F:HIS_STATS_x:TRUE +# F:HIS_STATS_y:TRUE +# F:HIS_STATS_z:TRUE +# F:HIS_WHOIS_SERVERNAME:TRUE +# F:HIS_WHOIS_IDLETIME:TRUE +# F:HIS_WHO_SERVERNAME:TRUE +# F:HIS_WHO_HOPCOUNT:TRUE +# F:HIS_BANWHO:TRUE +# F:HIS_KILLWHO:TRUE +# F:HIS_REWRITE:TRUE +# F:HIS_REMOTE:1 +# F:HIS_NETSPLIT:TRUE +# F:HIS_SERVERNAME:"*.undernet.org" +# F:HIS_SERVERINFO:"The Undernet Underworld" +# F:HIS_URLSERVERS:"http://www.undernet.org/servers.php" +# F:NETWORK:"UnderNet" +# F:URL_CLIENTS:"ftp://ftp.undernet.org/pub/irc/clients" + + +# Well, you have now reached the end of this sample configuration +# file. If you have any questions, feel free to mail +# <cod...@un...>. If you are interested in linking your +# server to the Undernet IRC network visit +# http://www.routing-com.undernet.org/, and if there are any +# problems then contact <rou...@un...> asking for +# information. Upgrades of the Undernet ircd can be found on +# http://coder-com.undernet.org/. # # For the rest: Good Luck! # Index: ircdh/doc/history/ChangeLog.07 diff -u ircdh/doc/history/ChangeLog.07:1.1 ircdh/doc/history/ChangeLog.07:1.2 --- ircdh/doc/history/ChangeLog.07:1.1 Wed Aug 21 10:59:40 2002 +++ ircdh/doc/history/ChangeLog.07 Sat Jan 18 15:16:09 2003 @@ -1,7 +1,7 @@ # # ChangeLog for Undernet ircu Servers # -# $Id: ChangeLog.07,v 1.1 2002/08/21 17:59:40 zolty Exp $ +# $Id: ChangeLog.07,v 1.2 2003/01/18 23:16:09 zolty Exp $ # # Please insert new entries on the top of the list, a one or two line comment # is sufficient. Please include your name on the entries we know who to blame. Index: ircdh/doc/history/ChangeLog.10 diff -u ircdh/doc/history/ChangeLog.10:1.1 ircdh/doc/history/ChangeLog.10:1.2 --- ircdh/doc/history/ChangeLog.10:1.1 Wed Aug 21 10:59:40 2002 +++ ircdh/doc/history/ChangeLog.10 Sat Jan 18 15:16:09 2003 @@ -1,48 +1,10 @@ # # ChangeLog for ircu2.10.10 # -# $Id: ChangeLog.10,v 1.1 2002/08/21 17:59:40 zolty Exp $ +# $Id: ChangeLog.10,v 1.2 2003/01/18 23:16:09 zolty Exp $ # # Insert new changes at beginning of the change list. # --------------------------- Released 2.10.10.pl20 -* protocol_violation doesn't exist in this version *sigh*. --------------------------- Released 2.10.10.pl19 -* Fix parse_server() so it doesn't core on an invalid prefix --------------------------- Released 2.10.10.pl18 (dammit) -* Fix ping so that users can't tell who they're pinging -- Isomer -* Use sendto_one() method of sending numeric replies, rather than u2.10.11's - send_reply--since it hasn't been back-ported to u2.10.10 and since I'm too - lazy to do so. -Kev -* Fix the cores and other interesting behavior as a result of the breakage of - "/mode <nick> -os" -Kev --------------------------- Released 2.10.10.pl17 -* Admin's complaining that users can't see that their carefully written MOTD - -- Isomer --------------------------- Released 2.10.10.pl16 -* Oops, missed a "* " in ms_wallops -- Isomer -* Fix typo in ircd.c -- Isomer -* Add prefixes to things before they are sent to clients -- Isomer -* Make ircd.c compile on gcc 3.0 -- mbuna -* fix core in s_user.c, thanks to mbuna -- Isomer -* Make ircd.c compile again :) -* Attempt fixing core with +s, the memory leak etc. Thanks to [Tri]! -- Isomer -* More hub hiding stuff -- Isomer -* Fix bug in unique_name_vector -- Vampire -* Don't send errors on directed privmsgs (suggested by Vampire-) -- Isomer -* Don't core for invalid modes in burst -- Isomer -* Cleanup to m_names.c, thanks to net -- Isomer -* After a long battle, we lost to the superior strength of res.c. - res.c replaced with the original -- Isomer -* Don't report "No such server" on remote commands. oops -- Isomer -* Changed Undernet -> NETWORK, *.undernet.org -> HEAD_IN_SAND_SERVERNAME, - "The Undernet Underworld" -> HEAD_IN_SAND_SERVERINFO -- Isomer -* Remove servernames from /who, someones clinically blind, or stupid. Sigh - -- Isomer -* You now can't /msg a -n but +m or +b'd channel -- Isomer -* Hacked DNS -- Isomer -* Rewrote hop count for /who. -- Isomer -* Removed DNS caching. If it breaks, blame Mr RIP. -- Isomer -------------------------- Released 2.10.10.pl15 * Fiddle with /KILL and various exits to make the user experience uniform, no matter who's doing the killing or where. Previously, differences in ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2003-01-18 23:25:09
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-18 23:25:08 UTC Removed files: doc/Authors doc/Configure.help doc/irc.1 doc/ircd.8 doc/readme.crules doc/readme.indent doc/readme.who doc/readme.www Log message: Documentacion ---------------------- diff included ---------------------- Index: ircdh/doc/Authors diff -u ircdh/doc/Authors:1.1.1.1 ircdh/doc/Authors:removed --- ircdh/doc/Authors:1.1.1.1 Fri Jul 26 14:58:23 2002 +++ ircdh/doc/Authors Sat Jan 18 15:25:08 2003 @@ -1,171 +0,0 @@ -/************************************************************************ - * IRC - Internet Relay Chat, doc/AUTHORS - * Copyright (C) 1990 - * - * AUTHORS FILE: - * This file attempts to remember all contributors to the IRC - * developement. Names can be only added this file, no name - * should never be removed. This file must be included into all - * distributions of IRC and derived works. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 1, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -IRC was conceived of and written by Jarkko Oikarinen <jt...@to...>. -IRC was originally written in University of Oulu, Computing Center. -Jan 1991 - IRC 2.6 jt...@to... - - Multiple Channels and protocol changes - -Contributions were made by a cast of dozens, including the following: - -Markku Jarvinen <mt...@tu...>: Emacs-like editing facility for the client - -Kimmo Suominen <ki...@ka...>: HP-UX port - -Jeff Trim <jt...@or...>: enhancements and advice - -Vijay Subramaniam <vi...@ll...>: advice and ruthless publicity - -Karl Kleinpaste <ka...@ci...>: user's manual - -Greg Lindahl <gl...@vi...>: AUTOMATON code, the Wumpus GM automaton, -myriad bug fixes - -Bill Wisner <wi...@ha...>: numerous bug fixes and code -enhancements - -Tom Davis <con...@ze...> and Tim Russell <ru...@ze...>: -VMS modifications - -Markku Savela <ms...@te...>: advice, support, and being the -incentive to do some of our *own* coding. :) - -Tom Hopkins <ho...@bu...>: bug fixes, quarantine lines, -consolidation of various patches. - -Christopher Davis <ck...@cs...>: EFnet/Anet gateway coding, -many automata ;), documentation fixing. - -Helen Rose <hr...@cs...>: documentation updating, and fixing. - -Tom Hinds <ro...@bu...>: emacs client updating. - -Tim Miller <ce...@bu...>: various server and client-breaking -features. - -Darren Reed <av...@co...>: various bug fixes and enhancements. -Introduced nickname and channelname hash tables into the server. - -The version 2.2 release was coordinated by Mike Bolotski -<mi...@sa...>. - -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 <ph...@co...> -Chuck Kane <ck...@ec...> -Matt Lyle <ma...@oc...> -Vesa Ruokonen <ruo...@lu...> - -Markku Savela <Mar...@vt...> / 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 <ch...@ea...> / April 1990 -Rewrote the Makefiles, restructuring of source tree. Added libIrcd.a to -the Makefile macros, numerous reformatting of server text messages, and -added mkversion.sh to keep track of compilation statistics. Numerous -bug fixes and enhancements, and co-coordinator of the 2.4 release. - -Jarle Lyngaas (nm...@al...) added Note functions to ircd. - -Armin Gruner <gr...@in...> / 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 <ho...@bu...> / 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 <hu...@uc...> -Bo Adler <ad...@cs...> -Michael Sandrof <ms...@an...> -Jon Solomon <js...@cs...> -Jan Peterson <jl...@ha...> -Nathan Glasser <na...@br...> -Helen Rose <hr...@ef...> -Mike Pelletier <st...@ca...> -Basalat Ali Raja <gw...@ta...> -Eric P. Scott <ep...@to...> -Dan Goodwin <fo...@wp...> -Noah Friedman <fri...@ai...> - - -UNDERNET (1991 - 1999) --------- - -The Undernet versions (TSpre8, u2.9 and u2.10) are based on ircd-2.8.10 and -contain thousands of hours of work by Carlo Wood <ca...@ru...> -(Run on IRC). The number of protocol enhancements, changes and additions that -have been added are too many to summarize. All patches are kept in the patch -repository at http://www.xs4all.nl/~carlo17/ircd-dev/ - -Various additions and bugfixes have been contributed by: - -Aaron <agi...@sc...> -CapVideo <ma...@pu...> -Chaos <si...@tr...> -Cym <cy...@ac...> -Derrick <di...@se...> -Ensor <dh...@ra...> -flux <cml...@uc...> -Ghostwolf <fo...@wo...> -Jamey <wo...@du...> -Jarle <ja...@II...> -Kev <kl...@mi...> -Nemesi <co...@ti...> -Niels <ni...@ho...> -record <jeg...@cl...> -smg <sm...@lm...> -SeKs <in...@st...> -Simon- <si...@pe...> -Starfox <st...@qu...> -Trio <tr...@b6...> -WildThang <dvm...@an...> -Xorath <vo...@wh...> Index: ircdh/doc/Configure.help diff -u ircdh/doc/Configure.help:1.2 ircdh/doc/Configure.help:removed --- ircdh/doc/Configure.help:1.2 Sat Jul 27 02:55:54 2002 +++ ircdh/doc/Configure.help Sat Jan 18 15:25:08 2003 @@ -1,1230 +0,0 @@ -# Format of this file: description<nl>variable<nl>helptext<nl><nl>. -# If the question being documented is of type "choice", we list -# only the first occurring config variable. The help texts -# must not contain empty lines. No variable should occur twice; if it -# does, only the first occurrence will be used by Configure. The lines -# in a help text should be indented two positions. Lines starting with -# `#' are ignored. Limit your lines to 78 characters. -# -# If you add a help text to this file, please try to be as gentle as -# possible. Don't use unexplained acronyms and generally write for the -# hypothetical admin who has just downloaded ircu for the first time. -# Tell them what to do if they're unsure. Technical information -# should go in a README in the Documentation directory. Mention all -# the relevant READMEs and HOWTOs in the help text. -# -# All this was shamelessly stolen from several different sources. Many -# thanks to all the contributors. The texts are copyrighted # (c) 1997 -# by Carlo Wood and governed by the GNU Public License. -# - -Do you want to change your previous configuration -CHANGE_CONFIG - You will be presented a series of questions that you have to answer - in order to configure the IRC daemon, prior to compilation. - If you went through this before, then your choices have been stored - in a file '.config'. If you want to use the same stored configuration - now, specify 'n'; this will quickly skip through all questions that - you already answered previously, only prompting you for NEW questions. - Note that NEW questions only can occur when you just upgraded to a - new version. Note also that if you abort by pressing ^C (control-C) - anywhere, then all answers are lost; you must finish it before the - answers are stored. - Pressing a 'c' or 'C' (followed by a return) on any question will - Continue the script in "use_defaults mode", that means that it will - take all default values unless it finds a NEW question (like when you - specify a 'n' here). 'C' will finish everything, but a 'c' will - only finish the current paragraph. - If you are unsure, or if you want to change a previously entered - configuration, specify 'y'. - -Which compiler do you want to use -CC - Here you need to specify the C compiler you want to use. - Using 'gcc' is highly recommended, you might even want to install it - on your machine first. Note that you can specify the full path if you - are not sure if the compiler is in your PATH (or whether or not the right - compiler will be used). An example is: "/usr/ucb/cc". - The package needs an ANSI compiler. Some compilers need an extra option - to compile ANSI C. In those cases you can add these options also here. - For example, on a HPUX-8.x you would use (if you don't have gcc): - "cc -Aa -D_HPUX_SOURCE". - Note that you should not use quotes. - -What flags should I pass to $CC -CFLAGS - These are the compiler flags, used for CC when compiling. - If you are not using gcc, it might be possible that your compiler is not - supporting -g and -O at the same time. The -g option is necessary to be - able to debug the daemon in the case it contains a bug that makes the - ircd core dump. Unless you use a version that is proven to be VERY stable, - it is highly recommended to use this option. All Undernet production servers - are expected to use it in order to help coder-com to track down bugs. - The -O3 will optimize the code - it also makes debugging harder. - If you have plenty of cpu cycles then you can use -O2 instead of -O3: - it will disable inlining which makes it easier to debug or core dump, - the daemon will use a few percent more cpu however. - If you are not running a production server you should remove the -Ox. - Ircd developers can optionally use more options to turn on extra warnings. - Developers (which are using gcc of course ;), should use: - "-g -Wall -pedantic -DGODMODE" - Note that you should not use quotes. - Note that the server uses several non-ANSI (though POSIX.1) function calls. - -Do you need extra include directories -EXTRA_INCLUDEDIRS - If your compiler needs extra include directories, you can specify them - here as a space separated list of directories. Do not use quotes and do - not specify the '-I' prefix. Usually you don't have to specify any - extra include directory, in that case you should specify "none" here. - If unsure, try "none" (without quotes) and see if all the '#include' - header files are found during compilation. - -Which linker flags do you need -LDFLAGS - Here you can specify extra flags that will be passed to the linker. - Usually you will not need to pass any flags and you can therefore - specify "none" here (without the quotes). - SunOS users may want to add "-Bstatic" (but only if you need it). - You can also specify any "-L..." flags here if you need those for - extra libraries. - -Which extra libraries do you need -IRCDLIBS - Some Operating Systems need linking with extra libraries for some of the - functions used by the daemon. In some cases, it is not known which - libraries are needed, even when the Operating System is known. This is - for instance the case with SunOS, some need -lresolv, while others don't. - If you forget to add a library then this will result in 'undefined variables' - during linking. If you do not know which library to add, it might be - helpful to use the unix command `nm', which lists the variables of a - library. For instance, if you get "unknown variable '_res_mkquery'", and you - wonder if this is in /usr/lib/libresolv.so, you can do: - nm /usr/lib/libresolv.so | grep res_mkquery - Do not use the leading '_' in the grep, this underscore is added by the - assembler but is not part of the original variable name and does not show - up in the output of nm. - Most libraries are in /lib or /usr/lib, which are scanned by default. In - some cases you will need to tell the linker where to search for a library. - You can do this by adding an -L... option to IRCDLIBS. For instance: - "-L/usr/ucblib -lucb" will look for 'libucb.so' in /usr/ucblib too. - Here is a list of what you MAYBE need to specify depending on your - Operating System: - OS Specify here - NeXT != 2.0 -lsys_s - Dynix/ptx -lsocket -linet -lnsl -lseq - Dell SVR4 -lsocket -lnsl -lucb - All others Default provided by autoconf - If unsure use the default provided by autoconf. - -Where should I install the ircd binary -BINDIR - After compilation (by typing 'make'), you can install the server with - the command 'make install'. This will install the ircd in the directory - you specify here. The package tries to use a meaningful name by naming - the binary "ircd.<tag>", where <tag> is the name of the last patch that - was applied by the maintainer. A symbolic link (to be specified next) - will be used to point to this binary. This allows a /RESTART to - immediately start the new version, while keeping the old binary. - Note that you need to have write permissions in this directory during - the install. Please re-check the permissions/owner and group after - installation. - -What should the name of the installed symbolic link to the executable be -SYMLINK - 'make install' installs the binary with an unique name, however it makes - a symbolic link to this newly installed executable which always has the - same name, so you can use /RESTART and/or use this name in scripts that - automatically restart the ircd after a reboot or crash. - Here you can specify the name of that symbolic link. Note that it may - not contain a '/'; it is just the name if the symbolic link and will be - installed in BINDIR. - -Which permissions do you want the binary to have -IRCDMODE - Here you need to specify the octal file mode of the ircd binary. - Recommended is 711 - but you might need setuid or something. - Note that using a setuid and starting the daemon as another user - does prohibit the daemon from core dumping in case of a crash on some - Operating Systems. - -Which owner do you want the binary to have -IRCDOWN -This will be the owner of the ircd binary after installation. - -Which group do you want the binary to have -IRCDGRP -This will be the group of the ircd binary after installation. - -Where should I install the man page -MANDIR - This is the base directory where the manual page of the ircd is installed. - If you are not root on your system, you can change it to your personal - manpath directory (which of course should be in your MANPATH environment - variable then). - -Use inlining for a few crucial functions -FORCEINLINE - This will increases the size of the executable with 7 kb, but it also - speeds up execution a bit :). Your compiler needs to understand the - keyword __inline__ (GNU gcc and egcs do). - If unsure, try if `y' compiles. If it doesn't, you can try using a - C++ compiler (ie, configure CC to be 'g++' instead 'gcc'). - -You have poll(), but do you want to use it -USE_POLL - Some Operating Systems implement select() by calling poll(), others - implement poll() by calling select(). The best performance will be - achieved by calling the lowest (sys)call ourselves of course. - The Undernet Daemon allows you to use select() or poll(). - If you specify 'y' here, the daemon will use poll() directly, otherwise - it will use select(). If you don't know what your Operating System - uses as syscall, you can compile the server with USE_POLL and detach - the running process with 'strace -p <pid>', 'truss -p <pid>' or - 'trace -p <pid>' depending on your Operating System, these UNIX commands - will show you the syscalls and therefore show if you use poll() or select(). - The advantage of using poll() is that you are not bothered by the limits - of select() and fd_set size (ie, the number of clients that connect). - The following Operating Systems seem to use poll(): - Solaris 2.x, SunOS 4.x, AIX, Digital UNIX, and NetBSD. - linux-2.2.x use poll(), but only of your glibc was compiled with that - kernel (and it won't unless you compile it yourself). - The following Operating Systems use select(): - linux-2.0.x. - If unsure, test it (a ./configure check will be added in ircu2.10.06). - -What is the domain name of your network -DOMAINNAME - This define allows you to specify what you consider to be 'local'. - It is only used for statistics. When you issue the IRC command /stats w, - the server will respond with statistics of how many clients have been - connecting to your server in the last minute, hour and day. It will - give these statistics for all connections (including the servers), all - clients (from anywhere) and also for clients whose hostname ends on - the domain you specify here. So if you are an ISP and you want to know - specifically the client load from your own domain, specify that domain - here. If you are unsure what to do, then it isn't really important what - you give here, just don't give an empty string. A good guess is the last - two parts of your own hostname (ie, if your hostname is foo.bar.nowhere.org, - specify 'nowhere.org'). Note that the string you give should NOT start - with a '.' and you should not use quotes. - -What is the network name of your network -NETWORK_NAME - Especifica el nombre de la red, lo muestra en los raws 001 y 005. - -Please give a random seed of eight characters -RANDOM_SEED - You should specify exactly eight characters (0-9A-Za-z) here. Do not use - quotes or any other special characters. This value is used to initialize - the random generator of the server which is used to generate PING/PONG - cookies in order to stop spoofing IP-numbers (a PING with a random number is - sent to this IP-number and if the client doesn't respond with the - exact same number, access is denied). In order to make the random - number impossible to guess, it is important that you use your own random - seed here. - -Does your host have a reliable clock -RELIABLE_CLOCK - You should really ONLY specify 'y' here when your system clock is - stable and accurate at all times (within a few seconds). - If you are running ntpdate on a regular basis, or an equivalent - like xntpd, to keep your system clock synchronized over the network, - then you might have an accurate clock. However, this is not guaranteed, - for example, it is known that xntpd gives unstable results on linux - in some cases. Note that an unstable clock is worse then an clock that - has a constant offset, because the servers attempt to correct for a - constant offset, but do not correct jumps of your system clock ! - In general you SHOULD be running ntpdate or equivalent AND make sure it - works when you run a production server on Undernet. Otherwise leave - your clock alone and specify 'n' here. - If unsure specify 'n' ! - -Change root (/) after start of daemon -CHROOTDIR - If you are a security freak and you want to the daemon to run in - its own environment, then you can specify 'y' here. The daemon will - change '/' to 'DPATH' (which you will have to specify later). - If this confuses you or if you are uncertain, specify 'n'. - -Do you want the daemon set its own uid/gid -CONFIG_SETUGID - If you specify 'y' here, then the daemon will attempt to set its - User ID (uid) and Group ID (gid) to the numeric values that you will - have to specify next. This only makes sense if you (have to) start - the server as root. The most secure operation of the server is to - not use setuid stuff (here or by means of setting the file mode) - and to run the server as a special user only (ie 'irc'). Of course - this user must have access to all log and configuration files. - Note that using a setuid and starting the daemon as another user - does prohibit the daemon from core dumping in case of a crash on some - Operating Systems. - This option is actually only necessary when you use the Change Root - option, because otherwise you can use the file mode to set the uid - and gid. Note that the server refuses to run as root. - If unsure, specify 'n'. - -UID of irc daemon -IRC_UID - Ok, if you insist on using this option: Here you must specify the - numeric value of the uid that you want the server to run as. - Note that you need to look in the right /etc/passwd file, which isn't - the same file when you used the Change Root option. - -GID of irc daemon -IRC_GID - Ok, if you insist on using this option: Here you must specify the - numeric value of the gid that you want the server to run as. - Note that you need to look in the right /etc/group file, which isn't - the same file when you used the Change Root option. - -Allow to specify configuration file on command line -CMDLINE_CONFIG - If you specify 'y' here, you will be allowed to specify the ircd.conf - path (the ircd daemon configuration file) on the command line when - starting the daemon (with the -f <ircd.conf file> option). - Note that defining this and installing ircd SUID or SGID is a MAJOR - security problem - they can use the '-f' option to read any files - that the 'new' access lets them. Note also that defining this is - a major security hole if other users have accounts on the same machine; - when your ircd goes down and some other user starts up the server with - a new conf file that has some extra O-lines. So don't use this unless - you're debugging. - -Set up a Unix domain socket to connect clients/servers -UNIXPORT - If there are lots of users having an account on the same machine - (which is very unlikely because the server needs all cpu ;), then - using a UNIX domain socket to connect these clients to is more - efficient then letting them connect via TCP/IP. A UNIX domain - socket is a special device that will be created in your File System. - Your client must also support connecting to a UNIX domain socket. - The name of the special device must be specified in the "ircd.conf" - file by means of an extra 'P: line', see doc/example.conf for the - syntax. - If you don't have many IRC-ing users on the same host as the server, - or when your local IRC client doesn't support UNIX domain sockets, - specify 'n' here. Otherwise specify 'y'. - -Do you need virtual hosting -VIRTUAL_HOST - This is only needed when you want to run two or more servers on the - same machine and on the same port (but different devices). - In general you will only need this if you have at least two ethernet - cards in your machine with a different IP-number. - If you specify 'y' here, then you can "bind" a server to one of your - interfaces. You should use the command line option '-w' to tell the - server to which interface to bind to. No error is reported if this - fails, the server will simply not run. - If no '-w' option is given then the server name specified in the - 'M: line' of the "ircd.conf" file of the server is used, provided it - resolves to an IP-number of one of your interfaces. Note that - normally the name does not have to resolve, but when you define this, - it MUST resolve or you must use the -w command line option, or the - "bind" will fail. - If you are unsure, specify 'n'. - -Will you connect to more then one server at a time -HUB - All servers of one IRC "network" are connected in a "tree" (no loops). - Servers that are only connected to one other server (called the - 'uplink') are called "leafs", servers that are connected to more then - one other server are called HUBs. - If you specify 'n' here then your server will prevent itself from acciden- - tally connecting to two servers at once, which is good because this is - generally bad for servers in "leaf" positions (they are net.wise located - too bad to route traffic). Note that on Undernet all newly linked servers - are linked as leafs during their test phase, and should specify 'n' here. - -Do you want support for the old I:*:ONE:*:: construct -USEONE - Server versions prior to ircu2.10.05 used to use the string "ONE" - as password in an I: line to indicate that only one connection was - allowed for any given IP number that matched that I: line. - This method only counted the *local* connections though. - As of ircu2.10.05 you can specifiy a single(!) digit as password - which then will allow that many connections from the same IP number. - However, now the IP numbers of ALL clients are counted, also those - that are connected to other servers. - If you do not use the depricated "ONE" password in your ircd.conf, - specify 'n' here. Note that if you you DO use the "ONE" password - and you specify 'n' here, then you should change all occurances of - "ONE" to "1" (this is the recommended procedure). - If you are lazy and you don't want to change the "ONE" passwords - into a "1", then specify 'y' here. - -Send a short message instead of the MOTD to connecting clients -NODEFAULTMOTD - Every time a client connects to your server, the full Message Of - The Day (as specified in its file MPATH) is sent to the client. - Even while many clients allow the user to ignore the message of - the day: the server still sends it. Many users never read the - message of the day anyway, making it a huge waste of bandwidth. - If you specify 'y' here than the server won't send the MOTD by - default to the client, but rather tell the client when the MOTD - was last changed and how to receive the MOTD by typing /MOTD. - If unsure specify 'n'. - -Do you want to enable debugging output -DEBUGMODE - Sometimes things just don't work. This doesn't have to be a crash, - but it is also possible that your server just doesn't want to start - at all, or disallows clients to connect at all, etc. - With all such drastic and REPRODUCIBLE problems, it makes sense to - recompile the server with this option set and then running the - ircd (irc daemon) with the (extra) command line options: -t -x9 - This will make the server run in the foreground and write debug output - to the terminal; in a lot of cases this can give a clue on what is - wrong (although more often it doesn't). - Because defining DEBUGMODE uses a LOT of cpu and is never useful - unless you are debugging a reproducible test case, you should never - specify 'y' here except for the reason just mentioned. - You should certainly NEVER specify 'y' for a server that runs on a - production net. - -Do you want memory- allocation and/or leak checking -DEBUGMALLOC - If you specify 'y' here, then the server will start to do book keeping - on the allocated memory blocks. This uses extra cpu and memory, - so normally you do not want this - unless you are debugging. - This option uses 8 bytes extra per allocated memory block. - The main purpose of this option is to check if a call to free(2) is done - with a valid pointer - if the pointer was not previously returned by - malloc(2), calloc(2) or realloc(2), the server will core dump in a place - that allows the maintainer to get an idea of what went wrong - but only - when the server was compiled with the -g flag of course. - You also need to specify 'y' here if you want to search for memory leaks. - On a production server, specify 'n' - unless you have lots of cpu to - spare and you volunteer to search for memory leaks - contact the - maintainer in this case. - If unsure, specify 'n'. - -Do you want to have boundary checking -MEMMAGICNUMS - One of the most nasty bugs are those where buffer overruns are involved. - In an attempt to catch those in an early stage, this option will add - so called "magic numbers" to the beginning and end of each allocated - memory block. When a block is freed or reallocated, the magic numbers - are checked and the server core dumps when they were corrupted. - This option uses 12 bytes extra per allocated memory block. - It doesn't really use much extra cpu compared to defining DEBUGMALLOC, so - you might as well specify 'y' here, just in case. It only makes sense - though if you compiled the server with compiler option '-g'. - If unsure, specify 'n'. - -Do you want memory leak testing (stats M) -MEMLEAKSTATS - If you specify 'y' here then the server will start to do extra book keeping - on the allocated memory blocks, counting the number of currently allocated - blocks per source code location (file and line number). You will be able - to retrieve these statistics with the command /stats M. - When there is a memory leak, then allocated memory blocks that were allocated - under certain conditions are never freed (however the contents of those - memory blocks are never used anymore); this would result in a (slow?) - increase of the count of allocated memory blocks. This option allows to - find where these blocks were allocated which might give a clue on the memory - leak problem. - This option uses 4 bytes extra per allocated memory block. - If you want to look for memory leaks, specify 'y' - otherwise specify 'n'. - -Do you want extra info on allocated sizes -MEMSIZESTATS - If you specify 'y' here then the server will start to do extra book keeping - on the sizes of the allocated memory blocks. /stats M will not only return - the number of allocated blocks, but also the total number of allocated - bytes involved. If you defined MEMLEAKSTATS to look for memory leaks, it - will give the total number of allocated memory per source code location - (file and line number). - This option uses 4 bytes extra per allocated memory block, unless you already - specified 'y' for MEMMAGICNUMS (boundary checking), because in that case - it was already included (and it doesn't matter what you specify here). - I think you should specify 'y' here, its more fun to see the sizes :). - -Do you want support for a time interval with /stats M -MEMTIMESTATS - If you specify 'y' here then the server will start to do extra book keeping - on the allocated memory blocks, storing the time at which the memory block - was allocated. This especially slows down /stats M (but unless you use - that command frequently, it shouldn't really matter) and uses again 4 bytes - of extra memory per allocated memory block. - This option is especially useful if you are looking for memory leaks - because it allows you to specify a time window with /stats M for which - counted blocks must be returned. This allows to ignore recently allocated - blocks and permanently allocated blocks (since the start of the server). - -Are you testing on a host without DNS -NODNS - If you are playing with the server off-line, and no DNS is available, then - long delays occur before the server starts up because it tries to resolv - the name given on the M:line (which usually isn't given in /etc/hosts) and - for each connecting client. - If you specify 'y' here, then a call to gethostbyname() will be done only - for the real hostname, and the server will not try to resolv clients that - connect to `localhost'. - Note that other calls to gethostbyname() are still done anyway if you - use VIRTUAL_HOST and that the server still tries to resolv clients - that connect to the real IP-number of the server. - -Directory where all ircd stuff sits -DPATH - DPATH is provided so that the other path names may be provided in just - filename form. It is the Default PATH. When the server starts, it - chdir's to DPATH before chroot or any other file operation, making - it the "current directory" for the server. This is where core files - will go if the server core dumps. - Note that you should not include quotes here. - Note also that the command line option "-d <dir>" overrides the DPATH - you give here, except for the chroot (if you use that). - -Server configuration file -CPATH - This is the IRC daemon Configuration filename, mostly called "ircd.conf". - If you just specify the filename, the server will read its configuration - file from the Default Path "DPATH", which you specified above. However, - you are also allowed to specify a full path. - Note that you should not include quotes here. - -Server MOTD file -MPATH - MPATH is the filename, relative to DPATH, or the full path, of the - "Message Of The Day" file; mostly called "ircd.motd". The contents - of this file will be sent to every client that connects to the server, - after registration. - Note that you should not include quotes here. - -Server remote MOTD file (3 lines max) -RPATH - RPATH is the filename, relative to DPATH, or the full path, of the - "Remote Message Of The Day" file; mostly called "remote.motd". The - contents of this file will be sent to every remote client that issues - a /MOTD <your server name>. Only the first three lines are sent, so - you might want to keep it that short ;). - Note that you should not include quotes here. - -File for server pid -PPATH - PPATH is the filename, relative to DPATH, or the full path, of the - "PID file", mostly called "ircd.pid". It is used for storing the - server's PID so a ps(1) isn't necessary. - Note that you should not include quotes here. - -Do you want to log the use of /WHO x% (recommended) -CONFIG_LOG_WHOX - Specify 'y' here if you want to log the use of /WHO ... x%... by your - Opers (see doc/readme.who). This is highly recommended since it will - reduce the abuse of this `spy' function. Note: You can disable this - spy function completely below, in which case you can give 'n' here. - If unsure specify 'y'. - -Give the path and(or) filename of this log file -WPATH - WPATH is the filename, relative to DPATH, or the full path, of the - log file where the use of /WHO ... x% ... by your Opers will be logged - (see doc/readme.who), mostly called "whox.log". - Note that you should not include quotes here. - -Do you want to log G-lines to a separate file -CONFIG_LOG_GLINES - Specify 'y' here if you want to log G-lines (Global access bans) - to a local file. - -Give the path and(or) filename of this log file -GPATH - GPATH is the filename, relative to DPATH, or the full path, of the - log file where the G-lines will be stored, mostly called "gline.log". - Note that you should not include quotes here. - -Do you want to log connecting users to a separate file -CONFIG_LOG_USERS - Specify 'y' here if you want to log who is connecting to your server. - This file can grow VERY fast on a large net work, so you probably - want to specify 'n' here. - -Give the path and(or) filename of this log file -FNAME_USERLOG - Here you need to specify the name of the log file where the server - should write the data about connecting users to. You can also specify - a full path. Note that you should not include quotes here. - -Do you want to log Opers to a separate file -CONFIG_LOG_OPERS - Specify 'y' here if you want to log who is successfully becoming an - IRC Operator on your server. - -Give the path and(or) filename of this log file -FNAME_OPERLOG - Here you need to specify the name of the log file where the server - should write the data about Opering users. You can also specify a - full path. Note that you should not include quotes here. - -Do you want to use syslog -USE_SYSLOG - If you are the sys admin of this machine, or if you have permission - of the sys admin to do so, you can let the server write data about - certain events to the syslog. You will be prompted for the events - that you want to log being one or more of: KILL's, SQUIT's, CONNECT's, - OPERing, Connecting Users and finally the log facility. - If you are unsure, specify 'n'. It is probably not a good idea to use - this on a large IRC net work. - -Log all operator kills to syslog -SYSLOG_KILL - Specify 'y' here if you want all KILLs to be written to syslog. - Note that on a large IRC net work this is a LOT of data. - -Log all remote squits for all servers to syslog -SYSLOG_SQUIT - Specify 'y' here if you want all SQUITs to be written to syslog. - Note that on a large IRC net work this is a LOT of data. - -Log remote connect messages for other all servers -SYSLOG_CONNECT - Specify 'y' here if you want all CONNECTs to be written to syslog. - Note that on a large IRC net work this is a LOT of data. - -Log all users who successfully become an Oper -SYSLOG_OPER - Specify 'y' here if you want all OPERs to be written to syslog. - Note that on a large IRC net work this is a LOT of data. - -Send userlog stuff to syslog -SYSLOG_USERS - Specify 'y' here if you want all connecting users to be written to syslog. - Note that on a large IRC net work this is EXTREMELY MUCH data. - You really want to specify 'n' here. - -Log facility (daemon, user, local0-7) -CONFIG_DAEMON - Well if you got this far and still need help, then I think you should - go back and specify 'n' at the question "Do you want to use syslog". - -Which local facility (0-7) -INT_LOCAL - Well if you got this far and still need help, then I think you should - go back and specify 'n' at the question "Do you want to use syslog". - -Use m4 as a preprocessor on CPATH -M4_PREPROC - If you use m4 macro's in your "ircd.conf" file, then you need to specify 'y', - which will enable m4 preprocessing of the "ircd.conf" file. - If you are unsure specify 'n'. Note using m4 macros has often lead to - problems (passwords or server names that match a macro name for instance), - while the benefits of using m4 are highly doubtful. Unless you are - already a m4 wizard and insist on using it I recommend to specify 'n' here. - -Use crypted passwords for N: lines -CRYPT_LINK_PASSWORD - In order to allow other servers to connect to you, you need to specify - two configuration lines in the "ircd.conf" configuration file (CPATH). - Each of these lines contains a password; the C: line is used for connecting - to a remote server and contains the password that is sent to the remote - server for authentication, thus this password must be in plain text. - The other is the N: line and contains the password that the remote server - is sending to you. For security reasons it is advised to store this - password in DES encrypted form. If you specify 'y' here, you will be - allowed to use the DES encrypted password in the password field of the - N: line, see doc/example.conf for more details. Note that you should - use *different* passwords in the C: and N: lines respectively for obvious - reasons. - -Use crypted passwords for operators -CRYPT_OPER_PASSWORD - In order to allow certain users to become IRC OPERators, they must - authenticate themselves with a password. This password is matched - against an 'O: line' in the "ircd.conf" configuration file, see - doc/example.conf for more details. If you specify 'y' here, you are - allowed to use the DES encrypted form of these passwords in your - "ircd.conf" file (even more, your Opers don't have to tell you their - real password, they can provide the DES encrypted form themselves). - Since it has happened often in the past that the "ircd.conf" file - was compromised somehow, you are highly encouraged to specify 'y' here - and use the DES encrypted form. You can find a program 'mkpasswd' in - the ircd/crypt directory that will allow you to generate the encrypted - form. - -Max size of the total of of all sendqs (bytes) -BUFFERPOOL - This specifies the maximum amount of RAM that your server will allocate - for buffering sendQ's. Small leafs can use a value as little as 1000000, - while large HUBs need to specify a value as high as 20000000. - If you run out of memory, clients and/or servers are dropped with the - error "Buffer allocation error". Then you will have to up this number - (and install more RAM if appropriate). - If you want a more educated guess for this value then realize that any - value is good if you _really_ rather want to drop servers and clients - then allocate more memory; this will be the case when there is the - danger to run out memory for other allocations. - Even if you run the daemon on a dedicated machine, then specifying the - maximum of the RAM you have is a Bad Thing because really running out - of memory is a lot worse then dropping clients in a controlled way: - if possible you should have memory left for all the internal structures - (channels, clients, banlists, receive buffers) at all times. - On average, clients seem to use 150 bytes of sendQ, but at peak moments - this can easily increase to 2032 bytes per client (sendQs are allocated - in chunks of 2032 bytes). - The maximum possible ammount that can be allocated for sendQs is the - number of connected clients times whatever you specified as maximum - sendQ in your Y: lines in the ircd.conf file. Likely, that value will - be larger then the ammount of RAM you have. - The educated guess I talked about earlier would be 'number of clients' - times * 2048 bytes + 'size of net.burst' * n, where `n' is 1 for leafs - and up till 5 for HUB's. The 'size of net.burst' is about 125 bytes - per online client (on the total network). - For large HUBs with 4000 clients on undernet (30,000 users), this results - in 27 Mb. Leafs could use 12 Mb. Of course you can use less when you - have less than 4000 local clients. - Don't forget to specify this value in bytes. - -Max receive queue for clients (bytes) -CLIENT_FLOOD - Currently, everything that a client sends to a server is read by the server - and stored in a buffer (the clients receive queue). The server will - process messages from this queue one by one (running over all clients - each time). When a client sends new messages faster they get processed, - and the size of its receive buffer reaches this value, the client is - dropped with the error "Excess flood". A reasonable value is 1024 bytes. - The maximum size is 8000 bytes. - -Maximum number of network connections (23 - (FD_SETSIZE-4)) -MAXCONNECTIONS - This specifies the maximum number of network connections the server - will use. You also need some non-network connects (log files etc), so - the maximum value is "FD_SETSIZE-4". The minimum value is 23. - The only benefit of using a small value is that your server uses less - memory - but *only* when you really have a small (client) load. - Routing server that hardly take clients can use 128 here for instance. - Servers that are always full should just specify the maximum amount - that still works (which might be less then FD_SETSIZE-4, some OS need - kernel hacking to allow more then 1024 fds per process). The only max. - value that is guaranteed to work is 252 ;). Note that if the value of - FD_SETSIZE is for instance 1024, then that doesn't mean you can't - connect MORE clients - but in this case you certainly need kernel - hacking. Find an experienced admin with the same Operating System and - ask him what the maximum is and how to achieve it. - -Default client listen port -PORTNUM - This is the default listen port. You can specify more listen ports - in the "ircd.conf" file with 'P: lines'; see doc/example.conf for more - details on P: lines. Note that /stats p currently only shows P: lines, - which might be a reason for you to use a less often used value here. - Note that there is actually no difference between client and server - listen ports, but it is good practice to separate them for statistical - purpose (bandwidth usage statistics). - -Nickname history length -NICKNAMEHISTORYLENGTH - This value specifies the length of the nick name history list, which - is only used for /WHOWAS. It uses about 300 to 400 bytes per entry. - Note that at a net.break so many client disappear that the whole - "whowas" list refreshed a few times (unless you make it as big as - 20,000 of course - but you shouldn't because thats a waste of ram - and cpu). A reasonable value is 'total number of clients' / 25. - -Allow Opers to see (dis)connects of local clients -ALLOW_SNO_CONNEXIT - If you specify 'y' here, you will be allowed to see all client connects and - disconnects as a server notice. The historical reason for adding this - option was to detect clone bots that connected to your server. However, - on a large IRC network like Undernet, the number of clients that connect - are so huge that it is not possible to keep an eye on this and everyone - has been filtering these notices out anyway. Next to that it turned out - to use no less then 10% of the total cpu usage last time I measured it - (this has been improved after that, but still). - Unless you insist on seeing those notices you should specify 'n' here. - Note that in the meantime Undernet has a LOT of other (semi- and fully- - automated) ways to detect clone bots, which work a LOT better for this - purpose. - -Show IP address in client connection notices -SNO_CONNEXIT_IP - Usually when showing a client connection, a nick, userid and hostname are - displayed. Selecting 'y' here will also display the numeric IP and connection - class of the connecting client. This can be useful for detecting spoofed DNS and - virtual hosted clones. This does use extra CPU though and is generally not needed, - however if a connection monitor bot is the only client that looks at these - notices, it is more efficient than sending USERIP for every connection. This - option makes the server compatible with Hybrid tcm bots. - -Do you want to use R: lines in your configuration file -R_LINES - If you specify 'y' here you will be allowed to use R:lines in the "ircd.conf". - This allows more freedom in restricting connections to your server by - calling an external program to determine whether to allow the connection. - It also uses a lot of overhead however, and can bog things down, so you should - consider whether you really need them, and if you can handle the extra load. - If unsure, specify 'n'. - -Process R: lines every rehash -R_LINES_REHASH - You may not want to have the R: lines checks everywhere since this can - cost a lot of time and delays. If you specify 'y' here, then R: lines are - checked whenever the "ircd.conf" file is reloaded (when the REHASH command - is used, or a signal SIGHUP is received by the daemon). This shouldn't be - too much of a drain on the system if the R:lines programs are short. - -Process R: lines always -R_LINES_OFTEN - If you specify 'y' here then R: lines will be checked as often as K: lines. - Note that this is -very- likely to cause a severe drain on your resources. - Use at your own risk, specify 'n' unless your really sure. - -Allow (local) Opers to see all local invisible users -SHOW_INVISIBLE_USERS - If you specify 'y' here, then your (local) IRC Operators will be able to - see all local invisible users (clients connected to your own server). - The reason for this is to hunt for clone bots, make sure your Operators do - not use this "feature" for spying on individuals and respect the user that - wishes to be invisible (mostly meaning that they don't want to be found when - on certain channels). - Note: If you answer 'n' here, then you will also not be able to see remote - invisible users (if you specify 'y' you will also get a configuration - question that asks you to specify whether or not you want your Opers to see - remote invisible users or not). - -Allow Opers to see all invisible users -SHOW_ALL_INVISIBLE_USERS - If you specify 'y' here, then your global IRC Operators (O:) will be able - to see ALL invisible users. The reason for this is to hunt for clone bots, - make sure your Operators do not use this "feature" for spying on individuals - and respect the user that wishes to be invisible (mostly meaning that they - don't want to be found when on certain channels). - -Allow HELPERS to see all invisible users' -WHOX_HELPERS - If you specify 'y', any HELPER will be able to see ALL invisible users. - The reason for this is to hunt for clone bots, - make sure your Operators do not use this "feature" for spying on individuals - and respect the user that wishes to be invisible (mostly meaning that they - don't want to be found when on certain channels). - -Allow global Opers (O:) to see inside secret channels -OPERS_SEE_IN_SECRET_CHANNELS - If you specify 'y' here, then your global IRC Operators (O:) will be able - to see who is on a specified, secret channel, without joining themselfs. - This can be needed to make a reasonable judgement in the case of a "channel - takeover" being reported, while the channel is set invite only. - See doc/readme.who for more details. - -Allow local Opers (o:) to see inside secret channels -LOCOP_SEE_IN_SECRET_CHANNELS - If you specify 'y' here, then your local IRC Operators (o:) will be able - to see who is on a specified, secret channel, without joining themselfs. - This can be needed to make a reasonable judgement in the case of a "channel - takeover" being reported, while the channel is set invite only. - See doc/readme.who for more details. - If unsure, specify 'n'. - -Don't truncate obnoxiously long /who output for opers -UNLIMIT_OPER_QUERY - A /who command can sometimes return several hundred lines of info. To - reduce flooding and sending too much, the output is truncated. By - answering 'y' to this, when an IRC Operator uses /who, the output will - not be truncated, no matter how much data is returned. - -Allow Opers to use the KILL command -OPER_KILL - You can select 'n' if you don't think operators should be able - to use the KILL command, and wish to prevent your operators from - using it. This will not, however, prevent operators on other - servers from issuing KILLs to your clients. You probably want to - select 'y' for this unless you really really don't think KILL - should -ever- be used by an operator. - -Allow Opers to use the REHASH command -OPER_REHASH - Allows operators to use the REHASH command to reload the servers - configuration file (ircd.conf) if you select 'n', you can still - reload the configuration file with a unix command, - kill -HUP `cat ircd.pid`. If unsure, select 'y'. - -Allow Opers to use the RESTART command -OPER_RESTART - Allows an operator to use the RESTART command to cause the server - to restart, using the ircd executable in SPATH. If unsure, select 'y'. - -Allow Opers to use the DIE command -OPER_DIE - Allows an operator to use the DIE command to shutdown the server - online. If you select 'n' you will need to send the server a kill - signal to shutdown the server. If unsure, select 'y'. - -Allow Opers to add local G-lines -OPER_LGLINE - Allows operators to add local G-lines with the GLINE command. This is - like a *local* KILL, except that the user being killed can't immediately - reconnect: He will have to wait for the G-line to expire. - The reason for adding this is that a KILL is rather useless for removing - (or 'warning') abusers (it is still THE command to remove ghosts and - a-like, the reason KILL was added in the first place). However, adding - G-lines for a dynamic IP with expire times larger then 10 minutes is highly - discouraged: The user will already have dialed in via another IP or account - and the G-line would only harm other, innocent, users. - -Allow Opers to connect from a remote site -OPER_REMOTE - If you select 'n' for this, clients must be on the 'same network' as - the server in order to gain oper privledges. If you're not sure, just - select 'y'. - -Allow Opers to join channels using a master key - ESNET -OPER_JOIN_GOD_ESNET - If you choose "yes", an OPER can join any channel writing - a master key "GOD". She can join through keys, invite, bans, and so on. - Useful to run local Channel Services. - -Allow Opers to join channels using a master key - ESNET -OPER_CHANNEL_SERVICE_ESNET - If you choose "yes", an OPER can set mode "+k" on himself. That is, - nobody will can kick or deop him. Useful to run local Channel Services. - -Local Channel Services has no Flood Control - ESNET -CS_NO_FLOOD_ESNET - If you choose "yes", a local channel service (user with mode +k) won't - have flood control. Useful if you are running local bots as ChServ. - -Allow Opers to bypass UWorld mode changes - ESNET -OPER_XMODE_ESNET - If you choose "yes", an oper can make channel mode changes - without being OP in that channel. He only need to include - the "extended mode" (flag "x") in his mode command. - -ESNET Distributed DataBase Support -BDD - If you choose "yes", your server will can manage - Distributed DataBases. A "database" directory will be - created into IRCd home directory to support nick - and channel registration, etc. - -Directory where distributed database resides - ESNET -DBPATH - Path to the Distributed Database directory. This path can be - absolute, or relative to the configuration directory (DPATH). - -Distributed Clone Control support - ESNET -BDD_CLONES - Control clones locally using ESNET Distributed DataBases. - -Dinamic Negotiation link-by-link - ESNET -ESNET_NEG - The server<->server links negotiates nonstandard - features, like compression or encryption. - -ZLIB compression between servers - ESNET -ZLIB_ESNET - Compress the server<->server links. - -Allow local opers to use the REHASH command -LOCOP_REHASH - Allows a local operator (defined by a lowercase o:line in ircd.conf) - to cause the server to reload its configuration file (ircd.conf) with - the REHASH command. If unsure, select 'n'. - -Allow local opers to use the RESTART command -LOCOP_RESTART - Allows a local operator (defined by a lowercase o:line in ircd.conf) - to use the RESTART command. If unsure, select 'n'. - -Allow local opers to use the DIE command -LOCOP_DIE - Allows a local operator (defined by a lowercase o:line in ircd.conf) - to use the DIE command. If unsure, select 'n'. - -Allow local opers to add local G-lines -LOCOP_LGLINE - Allows a local operator (defined by a lowercase o:line in ircd.conf) - to add local G-lines with the GLINE command. This is like a *local* KILL, - except that the user being killed can't immediately reconnect: He will - have to wait for the G-line to expire. - -Do you want to have a default LIST parameter -CONFIG_LIST - Pre-Undernet, the LIST command could either be given with one channel - name, or without any parameter. In the last case it would simply list - all channels. In time the IRC networks grew big, until the output of - the LIST command always filled up the sendQ of the client (and dis- - connected it). This was fixed by Carlo Wood (Run@IRC) on request of a - Dutch ISP whose users complained about this: The LIST output is now - generated in small chunks, generating more each time when there is room - in the clients sendQ. However, then it turned out that LIST (now it - worked) used 50% of all cpu (not even mentioning the bandwidth)... - This was unacceptable and the mentioned patch was disabled. On the - other hand we wanted LIST to work at least partly, so a few new - parameters have been added to LIST: <,>,C<,C>,T<,T> each followed by - a number they filter respectively the number of users on the channel, - the creation time of the channel (or age, depended on the value of - the number) and the topic set time. - If you specify 'y' here, then each time a "/LIST" (without parameter) - is issued by a client, a default parameter is used. Note that when - a parameter is used, the client can still max. sendq out - the send - flood control only works without any parameter. - If you specify 'n' here then a "/LIST" without parameters will list - all channels (and work), but as just said: it uses a LOT of cpu and - bandwidth on a large net.work. - If you specify 'y' you will be prompted for the default parameter. - -Give default LIST parameter -DEFAULT_LIST - Here you need to specify the default LIST parameter which is used - when the server receives a LIST without any parameter. - You should use something that limits the output to a maximum of a - few hundred channels; for instance "T<10" (topic is set less then - 10 seconds ago) or ">10" (more then 10 users on the channel) or even - a combination of this. Note that you should not include quotes here. - -K: line comments treated as a file -COMMENT_IS_FILE - If you specify 'y' here, then K: line comments (see doc/example.conf - for more details on the K: line syntax) will be treated as a filename - by default. The file needs to exist and will be written to clients - that match that K: line. - If you specify 'n' here, then K: line comments will be treated as - a comments by default. - In both cases you can override the default by prepending a filename - with a '!' or enclose a comment between double quotes. - If unsure, use the default. - -Only nullify idle-time on PRIVMSG -IDLE_FROM_MSG - The IRC command WHOIS gives an idle time for clients. If you want that - this idle time is set to zero only when the clients send a PRIVMSG, - then you should specify a 'y' here. - If you specify a 'n' then the idle time will be nullified on all messages - except the server PING/PONG. - -XMODE Networking - ESNET -XMODE_ESNET - This mode allows the use of "extended modes" in the network. - Extended modes can change channel modes without UWorld intervention. - -Check clone limit (2!) -CHECK_CLONE_LIMIT - Set this to 2. - -Check clone period (20!) -CHECK_CLONE_PERIOD - Set this to 20. - -Check clone delay (600!) -CHECK_CLONE_DELAY - Set this to 600. - -Max auto connects per class (1!) -MAXIMUM_LINKS - Set this to 1. - -Enable message logging -MSGLOG_ENABLED - Define this if you want the server to log received messages in static memory - at parsing time. -This is for debugging purposes only-. You might want to - redefine LOG_MASK_TYPE in s_debug.h and LOG_MASK_LEVEL in s_debug.c too. - The default is to log all messages that change some status in server's data - structures. Select 'n' unless you are debugging the server code. - DO NOT SELECT THIS ON PRODUCTION SERVERS! - -Message log size -MSGLOG_SIZE - Number of messages to log. Keep this low as raising it to 1024 will use 800k - of _static_ memory! Recommended value is 128. You must include this even if - you selected 'n' for MSGLOG_ENABLED. - -Only allow KILLs of local clients -LOCAL_KILL_ONLY - This only allows operators of this server to KILL clients directly connected - to this server. Operators will not be able to issue KILLs for clients on - other servers. Some networks (not Undernet) require that this be defined - for newly linking servers, but if you haven't been told to do otherwise, - specify 'n' here. - -Max server idle time (60) -TIMESEC - This is the maximum idle time for the server. If no messages are received - in TIMSEC seconds, PINGFREQUENCY and CONNECTFREQUENCY are checked. - Recommended value is 60 seconds. - -KILL nick chase time limit (30) -KILLCHASETIMELIMIT - This is the maximum amount of time a KILL command will automatically change - to the current nick of a user that has just changed nicks from the one given - with the original KILL. Don't change th... [truncated message content] |
From: Toni G. <zo...@us...> - 2003-01-18 23:28:25
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-18 23:28:24 UTC Added files: doc/en/api/api.txt doc/en/api/events.txt doc/en/api/features.txt doc/en/api/gline.txt doc/en/api/ircd_snprintf.txt doc/en/api/joinbuf.txt doc/en/api/jupe.txt doc/en/api/log.txt doc/en/api/modebuf.txt doc/en/api/motd.txt doc/en/api/msgq.txt doc/en/api/privileges.txt doc/en/api/send.txt Log message: Documentacion ---------------------- diff included ---------------------- Index: ircdh/doc/en/api/api.txt diff -u /dev/null ircdh/doc/en/api/api.txt:1.1 --- /dev/null Sat Jan 18 15:28:24 2003 +++ ircdh/doc/en/api/api.txt Sat Jan 18 15:28:14 2003 @@ -0,0 +1,105 @@ +This directory is intended for documents describing programming +interfaces within ircu, including such things as modebuf's and the +features interface. Please write these documents as plain text; if we +want HTML, we can write a script to convert the text versions into +HTML versions. Toward that end, I respectfully suggest everyone +conform to a common format, which I will describe here: + +Every .txt file should begin with a couple of paragraphs giving an +overview of the API, its purpose, and how to use it. Paragraphs +should be separated by blank lines, as shown here. Paragraphs that do +not end in some form of punctuation, such as a period, will be treated +as section headings. The introduction ends when the first API element +appears. API element documentation is introduced with "<" followed by +the element type--"struct", "typedef", "function", "macro", or (heaven +forbid) "global", followed by ">", all on a line by itself. The next +line should contain a declaration of the element as it would appear in +a header file; this may spread across multiple lines and contain +comments and blank lines. The declaration ends for most elements when +a ";" is encountered; for macros, the declaration ends on the last +line not ending in "\". + +The documentation for the API element should immediately follow the +declaration of that element, and should be separated from it by a +single blank line. This documentation should explain the purpose of +the element and describe what each of its fields mean. The +documentation ends when the corresponding "</" tag is reached, just as +in HTML or XML. (I don't intend for the files to be either HTML or +XML, I just want them to be easy to parse so they could be turned into +either, as occasion warrants.) An example follows: + +<struct> +struct FooBar; /* a sample structure with no definition */ + +The comment, since it's on the same line as the ";", is associated +with the declaration for struct FooBar. +</struct> + +<struct> +struct FooBar { + long fb_magic; /* a magic number */ + char *fb_string; /* a string of some sort */ +}; + +The sequence "};" ends the struct declaration. +</struct> + +<typedef> +typedef FooBar_t; /* a simple typedef */ + +This element shows how to hide the inner workings of typedefs. +</typedef> + +<typedef> +typedef struct FooBar FooBar_t; /* a more complex typedef */ + +Here we show the full typedef declaration. +</typedef> + +<global> +extern int fooBarFreeList; /* global variables should be avoided */ + +You should avoid global variables, but if you must have one for alloc +counts or whatever, here's how to specify documentation for them. +</global> + +<macro> +#define HAVE_FOOBAR /* We have FOOBAR, whatever it may be */ + +This could be used for boolean macros (macros used in #ifdef's, for +instance) or for simple value macros where you're hiding the values. +Since there are so many variations on macros, I'll only show one other +variation below: +</macro> + +<macro> +#define FooBarVerify(foobar) ((foobar) && \ + (foobar)->fb_magic == FOOBAR_STRUCT_MAGIC) + +This macro takes arguments. Again, we could leave out the actual +definition, or even treat the macro as a function rather than a +macro. This also shows how to do multi-line macros. +</macro> + +<function> +void *foobar(struct FooBar *blah, int flag); + +Since function definitions never appear in header files anyway, we +don't have to worry about hiding information. You should leave off +"extern" in the function declaration, and please include names for the +variables, so you can refer to them in the function documentation. +</function> + +The API document may then end in some summary information, if you +wish, or a ChangeLog of some form, such as follows. + +<authors> +Kev <kl...@mi...> +</authors> + +<changelog> +[2000-12-18 Kev] Initial definition of how API documents should look. +Further entries in the changelog should *precede* this one and should +be separated from it by a blank line. Also specify your name, as +listed in the "<authors>" section, so we know who to blame ;) +</changelog> Index: ircdh/doc/en/api/events.txt diff -u /dev/null ircdh/doc/en/api/events.txt:1.1 --- /dev/null Sat Jan 18 15:28:24 2003 +++ ircdh/doc/en/api/events.txt Sat Jan 18 15:28:14 2003 @@ -0,0 +1,816 @@ +The IRC server is built around an event loop. Until the u2.10.11 +release, this event loop has been rather ad-hoc; timed events are +hard-coded in, signals are handled inside the signal handler, etc. +All of this has changed with u2.10.11. A new subsystem, the events +subsystem, has been introduced; the new subsystem contains a +generalization of the concept of an event. An event is a signal, the +expiration of a timer, or some form of activity on a network socket. +This new subsystem has the potential to vastly simplify the code that +is arguably the core of any network program, and makes it much simpler +to support more exotic forms of network activity monitoring than the +conventional select() and poll() calls. + +The primary concepts that the events subsystem works with are the +"event," represented by a struct Event, and the "generator." There +are three types of generators: sockets, represented by struct Socket; +signals, represented by struct Signal; and timers, represented by +struct Timer. Each of these generators will be described in turn. + +Signals + +The signal is perhaps the simplest generator in the entire events +subsystem. Basically, instead of setting a signal handler, the +function signal_add() is called, specifying a function to be called +when a given signal is detected. Most importantly, that call-back +function is called _outside_ the context of a signal handler, +permitting the call-back to use more exotic functions that are +anathema within a signal handler, such as MyMalloc(). Once a +call-back for a signal has been established, it cannot be deleted; +this design decision was driven by the fact that ircd never changes +its signal handlers. + +Whenever a signal is received, an event of type ET_SIGNAL is +generated, and that event is passed to the event call-back function +specified in the signal_add() call. + +Timers + +Execution of the call-back functions for a timer occur when that timer +_expires_; when a timer expires depends on the type of timer and the +expiration time that was used for that timer. A TT_ABSOLUTE timer, +for instance, expires at exactly the time given as the expiration +time. This time is a standard UNIX time_t value, measuring seconds +since the UNIX epoch. The TT_ABSOLUTE timer type is complemented by +the TT_RELATIVE timer; the time passed as its expiration time is +relative to the current time. If a TT_RELATIVE timer is given an +expiration time of 5, for instance, it will expire 5 seconds after the +present time. Internally, TT_RELATIVE timers are converted into +TT_ABSOLUTE timers, with the expiration time adjusted by addition of +the current time. + +Those two types of timers, TT_ABSOLUTE and TT_RELATIVE, are +single-shot timers. Once they expire, they are removed from the timer +list unless re-added by the event call-back or through some other +mechanism. There is another type of timer, however, the TT_PERIODIC +timer, that is not removed from the timer list. TT_PERIODIC timers +are similar to TT_RELATIVE timers, in that one passes in the expire +time as a relative number of seconds, but when they expire, they are +re-added to the timer list with the same relative expire time. This +means that a TT_PERIODIC timer with an expire time of 5 seconds that +is set at 11:50:00 will have its call-back called at 11:50:05, +11:50:10, 11:50:15, and so on. + +Timers have to be run by the event engines explicitly by calling +timer_run() on the generator list passed to the engine event loop. +In addition, engines may determine the next (absolute) time that a +timer needs to be run by calling the timer_next() macro; this may be +used to set a timeout on the engine's network activity monitoring +function. Engines are described in detail below. + +When a timer expires, an event of ET_EXPIRE is generated, and the +call-back function is called. When a timer is destroyed, either as +the result of an expiration or as a result of an explicit timer_del() +call, an event of ET_DESTROY is generated, notifying the call-back +that the struct Timer can be deallocated. + +Sockets + +Perhaps the most complicated event generator in all of the event +system is the socket, as described by struct Socket. This single +classification covers datagram sockets and stream sockets. To +differentiate the different kinds of sockets, there is a socket state +associated with each socket. The available states are SS_CONNECTING, +which indicates that a particular socket is in the process of +completing a non-blocking connect(); SS_LISTENING, which indicates +that a particular socket is a listening socket; SS_CONNECTED, which is +the state of every other stream socket; SS_DATAGRAM, which is an +ordinary datagram socket, and SS_CONNECTDG, which describes a +connected datagram socket. (The SS_NOTSOCK state is for the internal +use of the events system and will not be described here.) + +In addition to the socket states, there's also an event mask for each +socket; this set of flags is used to tell the events subsystem what +events the application is interested in for the socket. For +SS_CONNECTING and SS_LISTENING sockets, this events mask has no +meaning, but on the other socket states, the event mask is used to +determine if the application is interested in readable +(SOCK_EVENT_READABLE) or writable (SOCK_EVENT_WRITABLE) indications. + +Most of the defined event types have to do with socket generators. +When a socket turns up readable, for instance, an event of type +ET_READ is generated. Similarly, ET_WRITE is generated when a socket +can be written to. The ET_ACCEPT event is generated when a listening +socket indicates that there is a connection to be accepted; ET_CONNECT +is generated when a non-blocking connect is completed. Finally, if an +end-of-file indication is detected, ET_EOF is generated, whereas if an +error has occurred on the socket, ET_ERROR is generated. Of course, +when a socket has been deleted by the socket_del() function, an event +of ET_DESTROY is generated when it is safe for the memory used by the +struct Socket to be reclaimed. + +Events + +An event, represented by a struct Event, describes in detail all of +the particulars of an event. Each event has a type, and an optional +integer piece of data may be passed with some events--in particular, +ET_SIGNAL events pass the signal number, and ET_ERROR events pass the +errno value. The struct Event also contains a pointer to the +structure describing the generated event--although it should be noted +that the only way to disambiguate which type of generator is contained +within the struct Event is by which call-back function has been +called. + +All generators have a void pointer which can be used to pass important +information to the call-back, such as a pointer to a struct Client. +Additionally, generators have a reference count, and a union of a void +pointer and an integer that should only be utilized by the event +engine. Finally, there is also a field for flags, although the only +flag of concern to the application (or the engine) is the active flag, +which may be tested using the test macros described below. + +Whatever the generator, the call-back function is a function returning +nothing (void) and taking as its sole argument a pointer to struct +Event. This call-back function may be implemented as a single switch +statement that calls out to appropriate external functions as needed. + +Engines + +Engines implement the actual socket event loop, and may also have some +means of receiving signal events. Each engine has a name, which +should describe what its core function is; for instance, the engine +based on the standard select() function is named, simply, "select()." +Each engine must implement several call-backs which are used to +initialize the engine, notify the engine of sockets the application is +interested in, etc. All of this data is described by a single struct +Engine, which should be the only non-static variable or function in +the engine's source file. + +The engine's event loop, pointed to by the eng_loop field of the +struct Engine, must consist of a single while loop predicated on the +global variable _running_. Additionally, this loop's final statement +must be a call to timer_run(), to execute all timers that have become +due. Ideally, this construction should be pulled out of each engine's +eng_loop and put in the event_loop() function of the events +subsystem. + +Reference Counts + +As mentioned previously, all generators keep a reference count. +Should timer_del() or socket_del() be called on a generator with a +non-zero reference count, for whatever reason, the actual destruction +of the generator will be delayed until the reference count again +reaches zero. This is used by the event loop to keep sockets that it +is currently referencing from being deallocated before it is done +checking all pending events on them. To increment the reference count +by one, call gen_ref_inc() on the generator; the corresponding macro +gen_ref_dec() decrements the reference counts, and will automatically +destroy the generator if the appropriate conditions are met. + +Debugging Functions + +It can be difficult to debug an engines if, say, a socket state can +only be expressed as a meaningless number. Therefore, when DEBUGMODE +is #define'd, five number-to-name functions are also defined to make +the debugging data more meaningful. These functions must only be +called when DEBUGMODE is #define'd. Calling them from within Debug() +macro calls is safe; calling them from log_write() calls is not. + +<typedef> +typedef void (*EventCallBack)(struct Event*); + +The _EventCallBack_ type is used to simplify declaration of event +call-back functions. It is used in timer_add(), signal_add(), and +socket_add(). The event call-back should process the event, taking +whatever actions are necessary. The function should be declared as +returning void. +</typedef> + +<typedef> +typedef int (*EngineInit)(int); + +The _EngineInit_ function takes an integer specifying the maximum +number of sockets the event system is expecting to handle. This +number may be used by the engine initialization function for memory +allocation computations. If initialization succeeds, this function +must return 1. If initialization fails, the function should clean up +after itself and return 0. The events subsystem has the ability to +fall back upon another engine, should an engine initialization fail. +Needless to say, the engines based upon poll() and select() should +never fail in this way. +</typedef> + +<typedef> +typedef void (*EngineSignal)(struct Signal*); + +If an engine has the capability to directly detect signals, it should +set the eng_signal field of struct Engine non-zero. When the +application indicates interest in a particular signal, the +_EngineSignal_ function will be called with the filled-in struct +Signal, in order to register interest in that signal with the engine. +</typedef> + +<typedef> +typedef int (*EngineAdd)(struct Socket*); + +All engines must define an _EngineAdd_ function, which is used to +inform the engine of the application's interest in the socket. If the +new socket cannot be accommodated by the engine for whatever reason, +this function must return 0. Otherwise, the function must return 1, +informing the events subsystem that the interest has been noted. +</typedef> + +<typedef> +typedef void (*EngineState)(struct Socket*, enum SocketState new_state); + +Sockets can change state. SS_CONNECTING sockets, for instance, can +become SS_CONNECTED. Whenever a socket state changes, the engine is +informed, since some states require different notification procedures +than others. This is accomplished by calling the _EngineState_ +function with the new state. The struct Socket passed to the engine +will still have the old state, if the engine must reference that. +</typedef> + +<typedef> +typedef void (*EngineEvents)(struct Socket*, unsigned int new_events); + +Applications may only be interested in given events on a socket for a +limited time. When the application's interest shifts, a new events +mask is set for the socket. The engine is informed of this change by +a call to its _EngineEvents_ function. +</typedef> + +<typedef> +typedef void (*EngineDelete)(struct Socket*); + +Eventually, an application will close all the sockets it has opened. +When a socket is closed, and the corresponding struct Socket deleted +with a call to socket_del(), the _EngineDelete_ function will be +called to notify the engine of the change. +</typedef> + +<typedef> +typedef void (*EngineLoop)(struct Generators*); + +The workhorse of the entire events subsystem is the event loop, +implemented by each engine as the _EngineLoop_ function. This +function is called with a single argument that may be passed to +timer_next() to calculate the next time a timer will expire. +</typedef> + +<enum> +enum SocketState { + SS_CONNECTING, /* Connection in progress on socket */ + SS_LISTENING, /* Socket is a listening socket */ + SS_CONNECTED, /* Socket is a connected socket */ + SS_DATAGRAM, /* Socket is a datagram socket */ + SS_CONNECTDG, /* Socket is a connected datagram socket */ + SS_NOTSOCK /* Socket isn't a socket at all */ +}; + +This enumeration contains a list of all possible states a socket can +be in. Applications should not use SS_NOTSOCK; engines should treat +it as a special socket state for non-sockets. The only event that +should be watched for on a struct Socket in the SS_NOTSOCK state is +readability. This socket state is used to implement the fall-back +signal event generation. +</enum> + +<enum> +enum TimerType { + TT_ABSOLUTE, /* timer that runs at a specific time */ + TT_RELATIVE, /* timer that runs so many seconds in the future */ + TT_PERIODIC /* timer that runs periodically */ +}; + +The three possible timer types are defined by the TimerType +enumeration. More details can be found in the "Timers" sub-section. +</enum> + +<enum> +enum EventType { + ET_READ, /* Readable event detected */ + ET_WRITE, /* Writable event detected */ + ET_ACCEPT, /* Connection can be accepted */ + ET_CONNECT, /* Connection completed */ + ET_EOF, /* End-of-file on connection */ + ET_ERROR, /* Error condition detected */ + ET_SIGNAL, /* A signal was received */ + ET_EXPIRE, /* A timer expired */ + ET_DESTROY /* The generator is being destroyed */ +}; + +This enumeration contains all the types of events that can be +generated by the events subsystem. The first 6 are generated by +socket generators, the next by signal generators, and the next by +timer generators. ET_DESTROY is generated by both socket and timer +generators when the events subsystem is finished with the memory +allocated by both. +</enum> + +<struct> +struct Socket; + +This structure describes everything the events subsystem knows about a +given socket. All of its fields may be accessed through the s_* +macros described below. +</struct> + +<struct> +struct Timer; + +The struct Timer structure describes everything the events subsystem +knows about a given timer. Again, all of its fields may be accessed +through the t_* macros described below. +</struct> + +<struct> +struct Signal; + +Signal generators are described by a struct Signal. All of the fields +of a struct Signal may be accessed by the sig_* macros described +below. +</struct> + +<struct> +struct Event; + +Each event is described by a struct Event. Its fields may be examined +using the ev_* macros described below. +</struct> + +<struct> +struct Generators; + +Each engine is passed a list of all generators when the engine's +_EngineLoop_ function is called. The only valid way to access this +structure is via the timer_next() function described below. +</struct> + +<struct> +struct Engine { + const char* eng_name; /* a name for the engine */ + EngineInit eng_init; /* initialize engine */ + EngineSignal eng_signal; /* express interest in a signal */ + EngineAdd eng_add; /* express interest in a socket */ + EngineState eng_state; /* mention a change in state to engine */ + EngineEvents eng_events; /* express interest in socket events */ + EngineDelete eng_closing; /* socket is being closed */ + EngineLoop eng_loop; /* actual event loop */ +}; + +Each engine is described by the struct Engine structure. Each engine +must define all of the functions described above except for the +_EngineSignal_ function, which is optional. +</struct> + +<macro> +#define SOCK_EVENT_READABLE 0x0001 /* interested in readable */ + +The SOCK_EVENT_READABLE flag indicates to the engine that the +application is interested in readability on this particular socket. +</macro> + +<macro> +#define SOCK_EVENT_WRITABLE 0x0002 /* interested in writable */ + +The SOCK_EVENT_WRITABLE flag indicates to the engine that the +application is interested in this socket being writable. +</macro> + +<macro> +#define SOCK_EVENT_MASK (SOCK_EVENT_READABLE | SOCK_EVENT_WRITABLE) + +SOCK_EVENT_MASK may be used to extract only the event interest flags +from an event interest set. +</macro> + +<macro> +#define SOCK_ACTION_SET 0x0000 /* set interest set as follows */ + +When socket_events() is called with a set of event interest flags and +SOCK_ACTION_SET, the socket's event interest flags are set to those +passed into socket_events(). +</macro> + +<macro> +#define SOCK_ACTION_ADD 0x1000 /* add to interest set */ + +When SOCK_ACTION_ADD is used in a call to socket_events(), the event +interest flags passed in are added to the existing event interest +flags for the socket. +</macro> + +<macro> +#define SOCK_ACTION_DEL 0x2000 /* remove from interest set */ + +When SOCK_ACTION_DEL is used in a call to socket_events(), the event +interest flags passed in are removed from the existing event interest +flags for the socket. +</macro> + +<macro> +#define SOCK_ACTION_MASK 0x3000 /* mask out the actions */ + +SOCK_ACTION_MASK is used to isolate the socket action desired. +</macro> + +<function> +enum SocketState s_state(struct Socket* sock); + +This macro returns the state of the given socket. +</function> + +<function> +unsigned int s_events(struct Socket* sock); + +This macro returns the current event interest mask for a given +socket. Note that if the socket is in the SS_CONNECTING or +SS_LISTENING states, this mask has no meaning. +</function> + +<function> +int s_fd(struct Socket* sock); + +This macro simply returns the file descriptor for the given socket. +</function> + +<function> +void* s_data(struct Socket* sock); + +When a struct Socket is initialized, data that the call-back function +may find useful, such as a pointer to a struct Connection, is stored +in the struct Socket. This macro returns that pointer. +</function> + +<function> +int s_ed_int(struct Socket* sock); + +Engines may find it convenient to associate an integer with a struct +Socket. This macro may be used to retrieve that integer or, when used +as an lvalue, to assign a value to it. Engine data must be either an +int or a void*; use of both is prohibited. +</function> + +<function> +void* s_ed_ptr(struct Socket* sock); + +Engines may find it convenient to associate a void* pointer with a +struct Socket. This macro may be used to retrieve that pointer or, +when used as an lvalue, to assign a value to it. Engine data must be +either an int or a void*; use of both is prohibited. +</function> + +<function> +int s_active(struct Socket* sock); + +A socket's active flag is set when initialized by socket_add(), and is +cleared immediately prior to generating an event of type ET_DESTROY. +This may be used by the application to determine whether or not the +socket is still in use by the events subsystem. If it is, s_active() +returns a non-zero value; otherwise, its value is 0. +</function> + +<function> +int socket_add(struct Socket* sock, EventCallBack call, void* data, + enum SocketState state, unsigned int events, int fd); + +This function is called to add a socket to the list of sockets to be +monitored. The _sock_ parameter is a pointer to a struct Socket that +is allocated by the application. The _call_ parameter is a pointer to +a function to process any events on the socket. The _data_ parameter +is for use of the socket call-back and may be zero. The _state_ +parameter must be one of the valid socket states. The _events_ +parameter must be a valid events interest mask--0, or the binary OR of +SOCK_EVENT_READABLE or SOCK_EVENT_WRITABLE. Finally, the _fd_ +parameter specifies the socket's file descriptor. This function +returns 1 if successful or 0 otherwise. +</function> + +<function> +void socket_del(struct Socket* sock); + +When the application is no longer interested in a particular socket, +it should call the socket_del() function. This function must be +called no later than when the socket has been closed, to avoid +attempting to call select() or similar functions on closed sockets. +</function> + +<function> +void socket_state(struct Socket* sock, enum SocketState state); + +Occasionally, a socket's state will change. This function is used to +inform the events subsystem of that change. Only certain state +transitions are valid--a socket in the SS_LISTENING or SS_CONNECTED +states cannot change states, nor can an SS_CONNECTING socket change to +some state other than SS_CONNECTED. Of course, SS_DATAGRAM sockets +may change state only to SS_CONNECTDG, and SS_CONNECTDG sockets may +only change states to SS_DATAGRAM. +</function> + +<function> +void socket_events(struct Socket* sock, unsigned int events); + +When the application changes the events it is interested in, it uses +socket_events() to notify the events subsystem of that change. The +_events_ parameter is the binary OR of one of SOCK_ACTION_SET, +SOCK_ACTION_ADD, or SOCK_ACTION_DEL with an events mask. See the +documentation for the SOCK_* macros for more information. +</function> + +<function> +const char* state_to_name(enum SocketState state); + +This function is defined only when DEBUGMODE is #define'd. It takes +the given _state_ and returns a string giving that state's name. This +function may safely be called from Debug() macros. +</function> + +<function> +const char* sock_flags(unsigned int flags); + +This function is defined only when DEBUGMODE is #define'd. It takes +the given event interest flags and returns a string naming each of +those flags. This function may safely be called from Debug() macros, +but may only be called once, since it uses function static storage to +store the flag strings. +</function> + +<function> +int sig_signal(struct Signal* sig); + +This macro returns the signal number for the given struct Signal. +</function> + +<function> +void* sig_data(struct Signal* sig); + +When a struct Signal is initialized, data that the call-back function +may find useful is stored in the struct Signal. This macro returns +that pointer. +</function> + +<function> +int sig_ed_int(struct Signal* sig); + +Engines may find it convenient to associate an integer with a struct +Signal. This macro may be used to retrieve that integer or, when used +as an lvalue, to assign a value to it. Engine data must be either an +int or a void*; use of both is prohibited. +</function> + +<function> +void* sig_ed_ptr(struct Signal* sig); + +Engines may find it convenient to associate a void* pointer with a +struct Signal. This macro may be used to retrieve that pointer or, +when used as an lvalue, to assign a value to it. Engine data must be +either an int or a void*; use of both is prohibited. +</function> + +<function> +int sig_active(struct Signal* sig); + +A signal's active flag is set when initialized by signal_add(). This +may be used by the application to determine whether or not the signal +has been initialized yet. If it is, sig_active() returns a non-zero +value; otherwise, its value is 0. +</function> + +<function> +void signal_add(struct Signal* signal, EventCallBack call, void* data, + int sig); + +This function is called to add a signal to the list of signals to be +monitored. The _signal_ parameter is a pointer is a pointer to a +struct Signal that is allocated by the application. The _call_ +parameter is a pointer to a function to process any signal events. +The _data_ parameter is for use of the signal call-back and may be +zero. The _sig_ parameter is the integer value of the signal to be +monitored. +</function> + +<function> +enum TimerType t_type(struct Timer* tim); + +This macro returns the type of the given timer. +</function> + +<function> +time_t t_value(struct Timer* tim); + +This macro returns the value that was used when the given timer was +initialized by the events subsystem. It will contain an absolute time +if the timer type is TT_ABSOLUTE, and a relative time otherwise. +</function> + +<function> +time_t t_expire(struct Timer* tim); + +This macro returns the absolute time at which the timer will next +expire. +</function> + +<function> +void* t_data(struct Timer* tim); + +When a struct Timer is initialized, data that the call-back function +may find useful is stored in the struct Socket. This macro returns +that pointer. +</function> + +<function> +int t_ed_int(struct Timer *tim); + +Engines may find it convenient to associate an integer with a struct +Timer. This macro may be used to retrieve that integer or, when used +as an lvalue, to assign a value to it. Engine data must be either an +int or a void*; use of both is prohibited. +</function> + +<function> +void* t_ed_ptr(struct Timer *tim); + +Engines may find it convenient to associate a void* pointer with a +struct Timer. This macro may be used to retrieve that pointer or, +when used as an lvalue, to assign a value to it. Engine data must be +either an int or a void*; use of both is prohibited. +</function> + +<function> +int t_active(struct Timer *tim); + +A timer's active flag is set when initialized by timer_add(), and is +cleared immediately prior to generating an event of type ET_DESTROY. +This may be used by the application to determine whether or not the +timer is still in use by the events subsystem. If it is, s_active() +returns a non-zero value; otherwise, its value is 0. +</function> + +<function> +void timer_add(struct Timer* timer, EventCallBack call, void* data, + enum TimerType type, time_t value); + +This function is called to initialize and queue a timer. The _timer_ +parameter is a pointer to a struct Timer that is allocated by the +application. The _call_ parameter is a pointer to a function to +process the timer's expiration. The _data_ parameter is for use of +the timer call-back and may be zero. The _type_ parameter must be one +of the valid timer types--TT_ABSOLUTE, TT_RELATIVE, or TT_PERIODIC. +Finally, _value_ is the value for the timer's expiration. +</function> + +<function> +void timer_del(struct Timer* timer); + +When the application no longer needs a TT_PERIODIC timer, or when it +wishes to stop a TT_ABSOLUTE or TT_RELATIVE timer before its +expiration, it should call the timer_del() function. +</function> + +<function> +void timer_chg(struct Timer* timer, enum TimerType type, time_t value); + +Occasionally, an application may wish to delay an existing TT_ABSOLUTE +or TT_RELATIVE timer; this may be done with the timer_chg() function. +The _type_ parameter must be one of TT_ABSOLUTE or +TT_RELATIVE--changing the values of TT_PERIODIC timers is not +supported. The _value_ parameter is the same as would be given to +timer_add() for that particular type of timer. +</function> + +<function> +void timer_run(void); + +When an engine has finished processing the results of its socket and +signal checks--just before it loops around to test for more events--it +should call the timer_run() function to expire any waiting timers. +</function> + +<function> +time_t timer_next(struct Generators* gen); + +Most engines will use a blocking call with a timeout to check for +socket activity. To determine when the next timer needs to be run, +and thus to calculate how long the call should block, the engine +should call timer_next() with the _gen_ parameter passed to the +_EngineLoop_ function. The timer_next() function returns an absolute +time, which may have to be massaged into a relative time before the +engine may use it. +</function> + +<function> +const char* timer_to_name(enum TimerType type); + +This function is defined only when DEBUGMODE is #define'd. It takes +the given _type_ and returns a string giving that type's name. This +function may safely be called from Debug() macros. +</function> + +<function> +enum EventType ev_type(struct Event* ev); + +This macro simply returns the type of the event _ev_. +</function> + +<function> +int ev_data(struct Event* ev); + +When an event is generated, a single integer can be passed along as a +piece of extra information. This can be used, for instance, to carry +an errno value when an ET_ERROR is generated. This macro simply +returns that integer. +</function> + +<function> +struct Socket* ev_socket(struct Event* ev); + +If the event was generated by a socket, this macro returns a pointer +to the struct Socket that generated the event. The results are +undefined if the event was not generated by a socket. +</function> + +<function> +struct Signal* ev_signal(struct Event* ev); + +If the event was generated by a signal, this macro returns a pointer +to the struct Signal that generated the event. The results are +undefined if the event was not generated by a signal. +</function> + +<function> +struct Timer* ev_timer(struct Event* ev); + +If the event was generated by a timer, this macro returns a pointer to +the struct Timer that generated the event. The results are undefined +if the event was not generated by a timer. +</function> + +<function> +void event_init(int max_sockets); + +Before any of the functions or macros described here can be called, +the events subsystem must be initialized by calling event_init(). The +_max_sockets_ parameter specifies to the events subsystem how many +sockets it must be able to support; this figure may be used for memory +allocation by the engines. +</function> + +<function> +void event_loop(void); + +Once the initial sockets are open, signals added, and timers queued, +the application must call the event_loop() function in order to +actually begin monitoring those sockets, signals, and timers. +</function> + +<function> +void event_generate(enum EventType type, void* arg, int data); + +This is the function called by the events subsystem to generate +particular events. The _type_ parameter specifies the type of event +to generate, and the _arg_ parameter must be a pointer to the event's +generator. The _data_ parameter may be used for passing such things +as signal numbers or errno values. +</function> + +<function> +const char* event_to_name(enum EventType type); + +This function is defined only when DEBUGMODE is #define'd. It takes +the given _type_ and returns a string giving that event type's name. +This function may safely be called from Debug() macros. +</function> + +<function> +const char* engine_name(void); + +This function is used to retrieve the name of the engine presently +being used by the events subsystem. +</function> + +<function> +void gen_ref_inc(void* gen); + +This macro increments the reference count of the generator _gen_, +preventing it from simply disappearing without warning. +</function> + +<function> +void gen_ref_dec(void* gen); + +This macro decrements the reference count of the generator _gen_, and +releases the memory associated with it by generating at ET_DESTROY +event if the reference count falls to zero and the generator is marked +for destruction. No references should be made to the generator after +calling this macro. +</function> + +<authors> +Kev <kl...@mi...> +</authors> + +<changelog> +[2001-6-14 Kev] Finished initial description of the events subsystem. + +[2001-6-13 Kev] Initial description of the events subsystem. +</changelog> Index: ircdh/doc/en/api/features.txt diff -u /dev/null ircdh/doc/en/api/features.txt:1.1 --- /dev/null Sat Jan 18 15:28:24 2003 +++ ircdh/doc/en/api/features.txt Sat Jan 18 15:28:14 2003 @@ -0,0 +1,230 @@ +As of u2.10.11, most of the compile-time configuration options present +in previous versions of ircu have been provided via the configuration +file as "features." This document is intended not only to give an +explanation of how to use the features subsystem in new code, but also +how to define new features. + +In the ircd_features.h header file is an enum Feature that lists all +the features known to the features subsystem. The order of entries in +this list must match precisely the order of features as listed in the +features[] table in ircd_features.c. There are four kinds of +features, seven different flags that can be set for features, and +seven different call-backs for more complex features. + +Types of Features + +There are at present four different types of features: NONE, INT, +BOOL, and STR. Features of type "NONE" are complex features, such as +the logging subsystem, that have complicated behavior that's managed +through the use of call-backs. The call-backs available are set, +which is called to set the value of the feature; reset, which is +called to reset the value of the feature back to its default; get, +which is called to send the user a RPL_FEATURE to describe the feature +setting; unmark, which is called prior to reading the configuration +file; mark, which is called after reading the configuration file; and +report, which is used to send a user a list of RPL_STATSFLINE +replies. + +In comparison to type "NONE," the other types are very simple. Type +"INT" is used for features that take an integer value; "BOOL" is for +those features that are boolean types; and "STR" is for those features +that take simple string values. The values for these feature types +are handled directly by the features subsystem, and can be examined +from code with the feature_int(), feature_bool(), and feature_str() +functions, described below. These features have a notify callback, +which is used to warn subsystems that use the values of particular +features that the value has changed. + +Feature Flags + +There are seven feature flags, one of which is used internally by the +feature subsystem. Three of these flags, FEAT_OPER, FEAT_MYOPER, and +FEAT_NODISP, are used to select who can see the settings of those +features; FEAT_OPER permits any operator anywhere on the network to +examine the settings of a particular feature, whereas FEAT_MYOPER only +permits operators local to a server to examine feature values, and +FEAT_NODISP prohibits display of the feature value altogether. If +none of these three flags are specified, then any user may examine +that feature's value. + +Two other flags only have any meaning for string values; they are +FEAT_NULL, which is used to specify that a feature of type "STR" may +have a NULL value, and FEAT_CASE, which specifies that the feature is +case sensitive--this may be used on file names, for example. Note +that if you give "0" as the default value for a feature, you must also +set the FEAT_NULL flag. + +The remaining non-internal flag is FEAT_READ, which simply sets the +feature to be read-only; a feature so marked may only be changed +through the configuration file. + +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 +features are reset to their default values (and all "mark" call-backs +are called). + +Adding New Features + +To add a new feature, first determine the feature's name (which must +begin with the string "FEAT_") and its type ("NONE," "INT," "BOOL," or +"STR"). Then add the feature to the enum Feature in an appropriate +place (i.e., it's good to group all features affecting operators +separate from those features affecting networking code), and a +corresponding entry in the features[] table in ircd_features.c. It +will be best to use one of the F_?() macros, which are documented +below. Then, whenever you need to refer to the value of a specific +feature, call the appropriate feature_<type>() function, as documented +below. + +<enum> +enum Feature; + +The "Feature" enum lists all of the features known to the feature +subsystem. Each feature name *must* begin with "FEAT_"; the portion +of the name following "FEAT_" will be what you use to set the feature +from the configuration file or with the "set" or "reset" commands. +</enum> + +<function> +int feature_set(struct Client* from, const char* const* fields, int count); + +The feature_set() function takes an array of strings and a count of +the number of strings in the array. The first string is a feature +name, and, for most features, the second string will be that feature's +value. The _from_ parameter is the struct Client describing the user +that issued the "set" command. This parameter may be NULL if +feature_set() is being called from the configuration file subsystem. +</function> + +<function> +int feature_reset(struct Client* from, const char* const* fields, int count); + +The feature_reset() function is very similar in arguments to the +feature_set() function, except that it may not be called from the +configuration file subsystem. It resets the named feature to its +default value. +</function> + +<function> +int feature_get(struct Client* from, const char* const* fields, int count); + +Again, feature_get() is very similar in arguments to the feature_set() +function, except that again it may not be called from the +configuration file subsystem. It reports the value of the named +feature to the user that issued the "get" command. +</function> + +<function> +void feature_unmark(void); + +This function is used to unmark all feature values, as described in +the subsection "Marking Features." It takes no arguments and returns +nothing. +</function> + +<function> +void feature_mark(void); + +The complement to feature_unmark(), feature_mark() resets all +unchanged feature settings to their defaults. See the subsection on +"Marking Features." +</function> + +<function> +void feature_init(void); + +This function initializes the feature interface by setting the default +values for all features correctly. +</function> + +<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. +</function> + +<function> +int feature_int(enum Feature feat); + +To retrieve the values of integer features, call this function. +Calling this function on a different type of feature, such as a "BOOL" +feature, will result in an assertion failure. +</function> + +<function> +int feature_bool(enum Feature feat); + +This function is the complement of feature_int() for features of type +"BOOL." +</function> + +<function> +const char *feature_str(enum Feature feat); + +Use this function to retrieve strings values for features of type +"STR"; you may not modify nor free the string value. +</function> + +<macro> +#define F_N(type, flags, set, reset, get, notify, unmark, mark, report) + +This macro is used in the features[] table to simplify defining a +feature of type "NONE." The _type_ parameter is the name of the +feature excluding the "FEAT_" prefix, and MUST NOT be in +double-quotes. The _flags_ parameter may be 0, FEAT_OPER, or +FEAT_MYOPER--the bitwise OR of these two flags is permissible but +would not make sense. The rest of the arguments are pointers to +functions implementing the named call-back. +</macro> + +<macro> +#define F_I(type, flags, v_int, notify) + +To define integer features, use the F_I() macro. The _type_ and +_flags_ parameters are as for F_N(), and the _v_int_ parameter +specifies the default value of the feature. The _notify_ parameter, +if non-zero, will be called whenever the value of the feature changes. +</macro> + +<macro> +#define F_B(type, flags, v_int, notify) + +This macro is used for defining features of type "BOOL"; it is very +similar to F_I(), but _v_int_ should either 0 (for a "FALSE" value) or +1 (for a "TRUE" value). The _notify_ parameter, if non-zero, will be +called whenever the value of the feature changes. +</macro> + +<macro> +#define F_S(type, flags, v_str, notify) + +Also similar to F_I(), F_S() defines features of type "STR." The +_flags_ argument may be the bitwise OR of one of FEAT_OPER or +FEAT_MYOPER with the special string flags FEAT_NULL and FEAT_CASE, +which are described above in the section "Feature Flags." The +_notify_ parameter, if non-zero, will be called whenever the value of +the feature changes. Note that FEAT_NULL *must* be set if the default +string _v_str_ is set to NULL. +</macro> + +<authors> +Kev <kl...@mi...> +</authors> + +<changelog> +[2001-06-13 Kev] Mention notify with the other callbacks + +[2001-01-02 Kev] Add documentation for new flags and for the notify +mechanism + +[2000-12-18 Kev] Document the features API +</changelog> Index: ircdh/doc/en/api/gline.txt diff -u /dev/null ircdh/doc/en/api/gline.txt:1.1 --- /dev/null Sat Jan 18 15:28:24 2003 +++ ircdh/doc/en/api/gline.txt Sat Jan 18 15:28:14 2003 @@ -0,0 +1,283 @@ +Some users can be very annoying, as any IRC operator can attest. Some +can in fact be downright abusive. Sometimes the best way of dealing +with these users is to ban them from the entire network. The G-line +system permits this. + +G-lines are fairly complicated. A G-line can be active or inactive, +either locally or globally. It can be a purely local G-line, or +global. It could be based on IP address or on host name. In short, +there are many variations on the basic G-line. Worse, there is also +the concept of a "bad channel," or BADCHAN, that has been tacked onto +the G-line subsystem, when it should have been a separate command in +the first place. + +Different types of G-lines are differentiated from each other through +the use of various flags. Some of these flags are maintained solely +by the G-line subsystem, where as others are passed to various +functions in the API. + +<macro> +#define GLINE_MAX_EXPIRE 604800 /* max expire: 7 days */ + +This macro lists the maximum expire time a G-line is permitted to +have. This value is limited to 7 days to prevent abuse of the system. +</macro> + +<macro> +#define GLINE_ACTIVE 0x0001 + +This flag is used to indicate that a given G-line is globally active. +</macro> + +<macro> +#define GLINE_IPMASK 0x0002 + +This flag is used to indicate that a given G-line is an IP mask. This +flag is maintained internally by the G-line subsystem. +</macro> + +<macro> +#define GLINE_BADCHAN 0x0004 + +This flag is used to indicate that a given G-line specifies a BADCHAN, +a channel that users are not permitted to join. This flag is +maintained internally, but is also used in gline_find() to search for +a BADCHAN for a particular channel. +</macro> + +<macro> +#define GLINE_LOCAL 0x0008 + +This flag is used to indicate that a given G-line is a local G-line. +Local G-lines do not affect users on other servers. +</macro> + +<macro> +#define GLINE_ANY 0x0010 + +This flag is passed to gline_find() to signal that function to return +any G-line or BADCHAN that matches the passed mask string. It is +never set on a real G-line. +</macro> + +<macro> +#define GLINE_FORCE 0x0020 + +This flag is passed to gline_add() to force the server to accept an +expire time that might be out of bounds. It is never set on a real +G-line. +</macro> + +<macro> +#define GLINE_EXACT 0x0040 + +This flag is passed to gline_find() to signal that function to return +only G-lines that exactly match the passed mask string. That is, the +ircd_strcmp() function is called to compare the G-line to the mask, +rather than the match() function. This flag is never set on a real +G-line. +</macro> + +<macro> +#define GLINE_LDEACT 0x0080 /* locally deactivated */ + +This flag is set on global G-lines that have been locally +deactivated. This flag is maintained internally by the G-line +subsystem. +</macro> + +<macro> +#define GLINE_GLOBAL 0x0100 /* find only global glines */ + +This flag is passed to gline_find() or gline_lookup() to specify that +the caller is only interested in global G-lines. This flag is never +set on a real G-line. +</macro> + +<macro> +#define GLINE_LASTMOD 0x0200 /* find only glines with non-zero lastmod */ + +This flag is passed to gline_find() or gline_lookup() to specify that +the caller is only interested in G-lines with a non-zero lastmod time, +that is, G-lines that were not set by a U-lined service. This flag is +never set on a real G-line. +</macro> + +<struct> +struct Gline; + +The struct Gline describes everything about a given G-line. None of +its fields may be directly accessed by the application; use the +functions and macros described below instead. +</struct> + +<function> +int GlineIsActive(struct Gline* g); + +This macro returns a non-zero value if the G-line is active, or 0 +otherwise. If a G-line is locally deactivated, this macro will always +return 0. +</function> + +<function> +int GlineIsRemActive(struct Gline* g); + +This macro returns a non-zero value if the G-line is active, ignoring +whether or not it is locally deactivated. +</function> + +<function> +int GlineIsIpMask(struct Gline* g); + +This macro returns a non-zero value if the G-line is an IP mask. +</function> + +<function> +int GlineIsBadChan(struct Gline* g); + +This macro returns a non-zero value if a G-line actually represents a +BADCHAN. +</function> + +<function> +int GlineIsLocal(struct Gline* g); + +This macro returns a non-zero value if a G-line is local only. +</function> + +<function> +char* GlineUser(struct Gline* g); + +This macro returns the user name associated with the G-line. If the +G-line represents a BADCHAN, this will contain the channel name. +</function> + +<function> +char* GlineHost(struct Gline* g); + +This macro returns the host name associated with the G-line. If the +G-line represents a BADCHAN, this will be a NULL pointer. +</function> + +<function> +char* GlineReason(struct Gline* g); + +This macro returns the reason that was given when the G-line was set. +</function> + +<function> +time_t GlineLastMod(struct Gline* g); + +G-lines that were not set by a U-lined service have a modification +time that must be monotonically increasing. This macro simply returns +that modification time. +</function> + +<function> +int gline_propagate(struct Client *cptr, struct Client *sptr, + struct Gline *gline); + +When a global G-line is set or modified, all other servers must be +notified of the new G-line. This function takes care of propagating +the G-line specified by _gline_, originated by the client _sptr_, to +all servers except _cptr_ (which may be a NULL pointer). +</function> + +<function> +int gline_add(struct Client *cptr, struct Client *sptr, char *userhost, + char *reason, time_t expire, time_t lastmod, unsigned int flags); + +This function simply adds a G-line, set by _sptr_ and with a +_userhost_, _reason_, _expire_, and _lastmod_ as specified. The +_flags_ parameter is a bit mask consisting of the binary OR of +GLINE_FORCE, GLINE_LOCAL, or GLINE_ACTIVE, as appropriate. The +gline_add() function also calls gline_propagate() to propagate the +G-line, and kills off any local users matching the G-line if it is +active. +</function> + +<function> +int gline_activate(struct Client *cptr, struct Client *sptr, + struct Gline *gline, time_t lastmod, unsigned int flags); + +This function activates the G-line specified by _gline_, setting its +_lastmod_ time as specified. If _flags_ is GLINE_LOCAL and if the +G-line is locally deactivated, this function will turn off the local +deactivation flag, but will not modify _lastmod_. If the G-line is +globally deactivated, passing this function the GLINE_LOCAL flag will +have no effect. +</function> + +<function> +int gline_deactivate(struct Client *cptr, struct Client *sptr, + struct Gline *gline, time_t lastmod, unsigned int flags); + +This function is similar to gline_activate() except that it +deactivates the G-line. If the given G-line is local, or if it was +set by a U-lined service (and GLINE_LOCAL was not passed via _flags_), +then the G-line is deleted from memory. In all other cases, the +G-line is simply deactivated, either locally (if GLINE_LOCAL was +passed via _flags_) or globally. Global deactivation will update the +_lastmod_ time. +</function> + +<function> +struct Gline *gline_find(char *userhost, unsigned int flags); + +This function looks up a G-line matching the given _userhost_ value, +under control of the _flags_ parameter. Valid _flags_ that may be +passed are: GLINE_BADCHAN, GLINE_ANY, GLINE_GLOBAL, GLINE_LASTMOD, or +GLINE_EXACT, each described above. +</function> + +<function> +struct Gline *gline_lookup(struct Client *cptr, unsigned int flags); + +This function looks up a G-line matching the given client, specified +by _cptr_, under the control of the _flags_. Valid values for _flags_ +are GLINE_GLOBAL and GLINE_LASTMOD, as described above. +</function> + +<function> +void gline_free(struct Gline *gline); + +This function releases all storage associated with a given G-line. +</function> + +<function> +void gline_burst(struct Client *cptr); + +This function generates a burst of all existing global G-lines and +BADCHANs and sends them to the server specified by _cptr_. +</function> + +<function> +int gline_resend(struct Client *cptr, struct Gline *gline); + +This function resends the _gline_ to a server specified by _cptr_. +This may be used if, for instance, it is discovered that a server is +not synchronized with respect to a particular G-line. +</function> + +<function> +int gline_list(struct Client *sptr, char *userhost); + +This function sends the information about a G-line matching _userhost_ +to the client specified by _sptr_. If _userhost_ is a NULL pointer, a +list of all G-lines is sent. +</function> + +<function> +void gline_stats(struct Client *sptr); + +This function generates a list of all G-lines, sending them to the +user _sptr_ by a /STATS G response. +</function> + +<authors> +Kev <kl...@mi...> +</authors> + +<changelog> +[2001-6-15 Kev] Initial documentation for the G-line API. +</changelog> Index: ircdh/doc/en/api/ircd_snprintf.txt diff -u /dev/null ircdh/doc/en/api/ircd_snprintf.txt:1.1 --- /dev/null Sat Jan 18 15:28:24 2003 +++ ircdh/doc/en/api/ircd_snprintf.txt Sat Jan 18 15:28:14 2003 @@ -0,0 +1,268 @@ +These functions are intended to be a complete replacement for sprintf +and sprintf_irc. They are a (nearly) complete reimplementation, and +of course they're snprintf clones, making it more difficult for +accidental buffer overflows to crop up. + +First off, what's missing? These functions support all ANSI C +conversion specifiers and selected ones from ISO 9x, with the +exception of all floating-point conversions. The floating-point +conversions are tricky, and will likely be dependent on the +representation of a floating-point number on a particular +architecture. While that representation is likely to conform to some +standard, it is not currently used in ircu, so seemed like a good +thing to omit, given the difficulty of implementing it. + +There are two more things missing from this implementation that would +be required by ANSI; the first is support for multibyte character +strings, and the second is support for locales, neither of which have +any relevance for ircu, so again omission seemed to be a good policy. +Additionally, %#x always causes '0x' (or '0X') to be printed, even if +the number is zero. + +These functions also have some extensions not seen in a +standards-compliant implementation; technically, the ISO 9x extensions +fall into this category, for instance. The ISO 9x extensions +supported are type extensions--%ju, %tu, and %zu, for instance; %qu +and %hhu are also supported. The extensions added for use in ircu are +%Tu, which takes a time_t, and the new %C conversion, which inserts +either a numeric or a nick, dependent on the <dest> parameter. The +GNU %m extension, which inserts the strerror() string corresponding to +the current value of errno, is also supported, as is a special %v +extension, which essentially does a recursive call to ircd_snprintf. + +The following description is descended from the Linux man page for the +printf family of functions. + +The format string is composed of zero or more directives: ordinary +characters (not %), which are copied unchanged to the output stream; +and conversion specifications, each of which results in fetching zero +or more subsequent arguments. Each conversion specification is +introduced by the character %. The arguments must correspond properly +(after type promotion) with the conversion specifier. After the %, +the following appear in sequence: + +* Zero or more of the following flags: + + # specifying that the value should be converted to an "alternate + form." For c, d, i, n, p, s, and u conversions, this option + has no effect. For o conversions, the precision of the number + is increased to force the first character of the output string + to a zero (except if a zero value is printed with an explicit + precision of zero). For x and X conversions, the string '0x' + (or '0X' for X conversions) is prepended to it. For e, E, f, + g, and G conversions, the result will always contain a decimal + point, even if no digits follow it (normally, a decimal point + appears in the results of those conversions only if a digit + follows). For g and G conversions, trailing zeros are not + removed from the result as they would otherwise be. For C + conversions, if the destination is local and the origin is a + user, the nick!user@host form is used. + + 0 specifying zero padding. For all conversions except n, the + converted value is padded on the left with zeros rather than + blanks. If a precision is given with a numeric conversion (d, + i, o, u, i, x, and X), the 0 flag is ignored. + + - (a negative field width flag) indicates the converted value is + to be left adjusted on the field boundary. Except for n + conversions, the converted value is padded on the right with + blanks, rather than on the left with blanks or zeros. A - + overrides a 0 if both are given. + + ' ' (a space) specifying that a blank should be left before a + positive number produced by a signed conversion (d, e, E, f, + g, G, or i). + + + specifying that a sign always be placed before a number + produced by a signed conversion. A + overrides a space if + both are used. + + : specifying that a struct Client name should be preceded by a + ':' character if the destination is a user + +* An optional decimal digit string specifying a minimum field width. + If the converted value has fewer characters than the field width, it + will be padded with spaces on the left (or right, if the + left-adjustment flag has been given) to fill out the field width. + +* An optional precision, in the form of a period (`.') followed by an + opt... [truncated message content] |
From: Toni G. <zo...@us...> - 2003-01-18 23:33:36
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-18 23:33:35 UTC Added files: ircd/test/Makefile ircd/test/ircd_chattr.0.dat ircd/test/ircd_chattr_t.c ircd/test/ircd_string_t.c Log message: Archivos de test ---------------------- diff included ---------------------- Index: ircdh/ircd/test/Makefile diff -u /dev/null ircdh/ircd/test/Makefile:1.1 --- /dev/null Sat Jan 18 15:33:35 2003 +++ ircdh/ircd/test/Makefile Sat Jan 18 15:33:25 2003 @@ -0,0 +1,20 @@ + +CPPFLAGS = -I../../include -I../../config +CFLAGS = -g -Wall + +TESTPROGS = \ + ircd_chattr_t \ + ircd_string_t + +all: ${TESTPROGS} + +ircd_chattr_t: ircd_chattr_t.o ../ircd_string.o + ${CC} -o $@ $^ + +ircd_string_t: ircd_string_t.o ../ircd_string.o + ${CC} -o $@ $^ + +.PHONY: clean + +clean: + rm -f core *.o ${TESTPROGS} Index: ircdh/ircd/test/ircd_chattr.0.dat diff -u /dev/null ircdh/ircd/test/ircd_chattr.0.dat:1.1 --- /dev/null Sat Jan 18 15:33:35 2003 +++ ircdh/ircd/test/ircd_chattr.0.dat Sat Jan 18 15:33:25 2003 @@ -0,0 +1,16 @@ +IsAlnum: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^abcdefghijklmnopqrstuvwxyz{|}~ +IsAlpha: ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^abcdefghijklmnopqrstuvwxyz{|}~ +IsDigit: 0123456789 +IsLower: abcdefghijklmnopqrstuvwxyz{|}~ +IsSpace: \t\n\v\f\r +IsUpper: ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^ +IsCntrl: \0\1\2\3\4\5\6\a\b\t\n\v\f\r\e\f\10\11\12\13\14\15\16\17\18\19\1a\1b\1c\1d\1e\1f +IsChannelChar: \0\1\2\3\4\5\6\b\t\n\v\f\r\e\f\10\11\12\13\14\15\16\17\18\19\1a\1b\1c\1d\1e\1f!"#$%&'()*+-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~\7f\80\81\82\83\84\85\86\87\88\89\8a\8b\8c\8d\8e\8f\90\91\92\93\94\95\96\97\98\99\9a\9b\9c\9d\9e\9f\a1\a2\a3\a4\a5\a6\a7\a8\a9\aa\ab\ac\ad\ae\af\b0\b1\b2\b3\b4\b5\b6\b7\b8\b9\ba\bb\bc\bd\be\bf\c0\c1\c2\c3\c4\c5\c6\c7\c8\c9\ca\cb\cc\cd\ce\cf\d0\d1\d2\d3\d4\d5\d6\d7\d8\d9\da\db\dc\dd\de\df\e0\e1\e2\e3\e4\e5\e6\e7\e8\e9\ea\eb\ec\ed\ee\ef\f0\f1\f2\f3\f4\f5\f6\f7\f8\f9\fa\fb\fc\fd\fe\ff +IsChannelLower: \c0\c1\c2\c3\c4\c5\c6\c7\c8\c9\ca\cb\cc\cd\ce\cf\d0\d1\d2\d3\d4\d5\d6\d8\d9\da\db\dc\dd\de +IsChannelPrefix: #&+ +IsNickChar: -0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ +IsUserChar: '-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~\c0\c1\c2\c3\c4\c5\c6\c7\c8\c9\ca\cb\cc\cd\ce\cf\d0\d1\d2\d3\d4\d5\d6\d8\d9\da\db\dc\dd\de\e0\e1\e2\e3\e4\e5\e6\e7\e8\e9\ea\eb\ec\ed\ee\ef\f0\f1\f2\f3\f4\f5\f6\f8\f9\fa\fb\fc\fd\fe +IsHostChar: -.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_abcdefghijklmnopqrstuvwxyz{|}~ +IsIPChar: .0123456789 +IsEol: \n\r +IsKTimeChar: ,-0123456789 Index: ircdh/ircd/test/ircd_chattr_t.c diff -u /dev/null ircdh/ircd/test/ircd_chattr_t.c:1.1 --- /dev/null Sat Jan 18 15:33:35 2003 +++ ircdh/ircd/test/ircd_chattr_t.c Sat Jan 18 15:33:25 2003 @@ -0,0 +1,160 @@ +/* + * ircd_chattr_t.c - Test file for character attributes + */ +#include "ircd_chattr.h" +#include <assert.h> +#include <stdio.h> + +typedef int (*EvalFn)(char); + +int eval_alnum(char c) +{ + return (0 != IsAlnum(c)); +} + +int eval_alpha(char c) +{ + return (0 != IsAlpha(c)); +} + +int eval_digit(char c) +{ + return (0 != IsDigit(c)); +} + +int eval_lower(char c) +{ + return (0 != IsLower(c)); +} + +int eval_space(char c) +{ + return (0 != IsSpace(c)); +} + +int eval_upper(char c) +{ + return (0 != IsUpper(c)); +} + +int eval_cntrl(char c) +{ + return (0 != IsCntrl(c)); +} + +int eval_channel_char(char c) +{ + return (0 != IsChannelChar(c)); +} + +int eval_channel_lower(char c) +{ + return (0 != IsChannelLower(c)); +} + +int eval_channel_prefix(char c) +{ + return (0 != IsChannelPrefix(c)); +} + +int eval_nick_char(char c) +{ + return (0 != IsNickChar(c)); +} + +int eval_user_char(char c) +{ + return (0 != IsUserChar(c)); +} + +int eval_host_char(char c) +{ + return (0 != IsHostChar(c)); +} + +int eval_ip_char(char c) +{ + return (0 != IsIPChar(c)); +} + +int eval_eol(char c) +{ + return (0 != IsEol(c)); +} + +int eval_ktime_char(char c) +{ + return (0 != IsKTimeChar(c)); +} + +struct CharTest { + const char* name; + EvalFn evaluator; +} testList[] = { + { "IsAlnum: ", eval_alnum }, + { "IsAlpha: ", eval_alpha }, + { "IsDigit: ", eval_digit }, + { "IsLower: ", eval_lower }, + { "IsSpace: ", eval_space }, + { "IsUpper: ", eval_upper }, + { "IsCntrl: ", eval_cntrl }, + { "IsChannelChar: ", eval_channel_char }, + { "IsChannelLower: ", eval_channel_lower }, + { "IsChannelPrefix: ", eval_channel_prefix }, + { "IsNickChar: ", eval_nick_char }, + { "IsUserChar: ", eval_user_char }, + { "IsHostChar: ", eval_host_char }, + { "IsIPChar: ", eval_ip_char }, + { "IsEol: ", eval_eol }, + { "IsKTimeChar: ", eval_ktime_char } +}; + +#define TESTLIST_SIZE sizeof(testList) / sizeof(struct CharTest) + +void print_char(unsigned char c) +{ + if (c < 0x20) { + switch (c) { + case '\a': printf("\\a"); break; + case '\b': printf("\\b"); break; + case '\f': printf("\\f"); break; + case '\n': printf("\\n"); break; + case '\r': printf("\\r"); break; + case '\t': printf("\\t"); break; + case '\v': printf("\\v"); break; + default: + printf("\\%x", c); break; + } + } + else if (c < 0x7F) { + printf("%c", c); + } + else { + printf("\\%x", c); + } +} + +void print_char_attr(struct CharTest* test) +{ + int i; + + printf("%s", test->name); + + for (i = 0; i < 256; ++i) { + if ((*test->evaluator)(i)) + print_char(i); + } + printf("\n"); +} + + +int main(void) +{ + int i; + + for (i = 0; i < TESTLIST_SIZE; ++i) + print_char_attr(&testList[i]); + + return 0; +} + Index: ircdh/ircd/test/ircd_string_t.c diff -u /dev/null ircdh/ircd/test/ircd_string_t.c:1.1 --- /dev/null Sat Jan 18 15:33:35 2003 +++ ircdh/ircd/test/ircd_string_t.c Sat Jan 18 15:33:25 2003 @@ -0,0 +1,58 @@ +/* + * ircd_string_t.c - string test program + */ +#include "ircd_string.h" +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +int main(void) +{ + char* vector[20]; + char* names; + int count; + int i; + + names = strdup(",,,a,b,a,X,ne,blah,A,z,#foo,&Bar,foo,,crud,Foo,z,x,bzet,,"); + printf("input: %s\n", names); + count = unique_name_vector(names, ',', vector, 20); + printf("count: %d\n", count); + printf("output:"); + for (i = 0; i < count; ++i) + printf(" %s", vector[i]); + printf("\n"); + free(names); + + names = strdup("foo"); + printf("input: %s\n", names); + count = unique_name_vector(names, ',', vector, 20); + printf("count: %d\n", count); + printf("output:"); + for (i = 0; i < count; ++i) + printf(" %s", vector[i]); + printf("\n"); + free(names); + + names = strdup(""); + printf("input: %s\n", names); + count = unique_name_vector(names, ',', vector, 20); + printf("count: %d\n", count); + printf("output:"); + for (i = 0; i < count; ++i) + printf(" %s", vector[i]); + printf("\n"); + free(names); + + names = strdup("a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"); + printf("input: %s\n", names); + count = unique_name_vector(names, ',', vector, 20); + printf("count: %d\n", count); + printf("output:"); + for (i = 0; i < count; ++i) + printf(" %s", vector[i]); + printf("\n"); + free(names); + + return 0; +} + ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2003-01-18 23:36:53
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-18 23:36:52 UTC Added files: tools/Makefile.crypt tools/README tools/autodoc.py tools/crypter tools/hashtoy tools/mkchroot tools/mkpasswd.c tools/ringlog.c tools/ringlog.pl tools/sums tools/transition tools/untabify tools/wrapper.c Log message: Directorio de tools con diversas herramientas. ---------------------- diff included ---------------------- Index: ircdh/tools/Makefile.crypt diff -u /dev/null ircdh/tools/Makefile.crypt:1.1 --- /dev/null Sat Jan 18 15:36:52 2003 +++ ircdh/tools/Makefile.crypt Sat Jan 18 15:36:42 2003 @@ -0,0 +1,37 @@ +#************************************************************************ +#* IRC - Internet Relay Chat, ircd/crypt/Makefile +#* Copyright (C) 1991 Darren Reed +#* +#* This program is free software; you can redistribute it and/or modify +#* it under the terms of the GNU General Public License as published by +#* the Free Software Foundation; either version 1, or (at your option) +#* any later version. +#* +#* This program is distributed in the hope that it will be useful, +#* but WITHOUT ANY WARRANTY; without even the implied warranty of +#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +#* GNU General Public License for more details. +#* +#* You should have received a copy of the GNU General Public License +#* along with this program; if not, write to the Free Software +#* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +#*/ +# +# Change this to the path of your local ircd.conf file +# +IRCDCONF = /usr/local/lib/irc/ircd.conf + +LIBS = -lcrypt + +all: mkpasswd +crypt: install + +mkpasswd: mkpasswd.c + gcc -Wall -O2 mkpasswd.c -o mkpasswd ${LIBS} + +install: + crypter ${IRCDCONF} + @echo 'done.' + +clean: + /bin/rm -f mkpasswd Index: ircdh/tools/README diff -u /dev/null ircdh/tools/README:1.1 --- /dev/null Sat Jan 18 15:36:52 2003 +++ ircdh/tools/README Sat Jan 18 15:36:42 2003 @@ -0,0 +1,61 @@ +/************************************************************************ + * IRC - Internet Relay Chat, ircd/crypt/README + * Copyright (C) 1991 Nelson Minar + * + * 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. + */ + +The change implemented here is that the operator password in irc.conf +is no longer stored in plaintext form, but is encrypted the same way +that user passwords are encrypted on normal UNIX systems. Ie, instead +of having + + O:*:goodboy:Nelson + +in your ircd.conf file, you have + + O:*:sCnvYRmbFJ7oI:Nelson + +You still type "/oper Nelson goodboy" to become operator. However, if +someone gets ahold of your irc.conf file, they can no longer figure +out what the password is from reading it. There are still other +security holes, namely server-server passwords, but this closes one +obvious problem. + +So how do you generate these icky looking strings for passwords? +There's a simple program called mkpasswd to do that for you. Just run +mkpasswd, and at the prompt type in your plaintext password. It will +spit out the encrypted password, which you should then just copy into +the irc.conf file. This should be done only when adding new passwords +to your irc.conf file. To change over your irc.conf file to use +encrypted passwords, define CRYPT_OPER_PASSWORD in config.h. You will +need to recompile your server if you already compiled it with this +feature disabled. Once compiled, edit the Makefile in this directory +and chang "IRCDCONF" to your irc.conf file. Then "make install" in this +directory to replace all the operator passwords in your irc.conf file +with the encrypted format. + +Choose your passwords carefully. Do not choose something in a +dictionary, make sure its at least 5 characters. Anything past 8 +characters is ignored. + +One thing to note about crypt() passwords - for every plaintext, there +are 4096 different passwords. Some valid encryptions of "goodboy" +include t1Ub2RhRQHd4g sCnvYRmbFJ7oI and Xr4Z.Kg5tcdy6. The first +two characters (the "salt") determine which of the 4096 passwords +you will get. mkpasswd chooses the salt randomly, or alternately +will let you specify one on the command line. + +see also - crypt(3) Index: ircdh/tools/autodoc.py diff -u /dev/null ircdh/tools/autodoc.py:1.1 --- /dev/null Sat Jan 18 15:36:52 2003 +++ ircdh/tools/autodoc.py Sat Jan 18 15:36:42 2003 @@ -0,0 +1,70 @@ +# +# Structure AutoDocumentator for ircu. +# 26/02/2000 --Gte +# +# Creates a 'structs.html', containing HTML Table definitions +# for all structures encountered in *.h in the current directory. +# +# $Id: autodoc.py,v 1.1 2003/01/18 23:36:42 zolty Exp $ + +import string, fnmatch, os + +def parse(filename): + OutFile = open('structs.html', 'a') + OutFile.write("<B><H2>"+filename+"</H2>") + stage = 1 + try: + IncFile = open(filename, 'r') + line = IncFile.readline() + + while line != "": + line = string.replace(line,"\n","") # Stript out LF's. + splitline = string.split(line, " ") + try: + if ((stage == 2) & (splitline[0] == "};")): + OutFile.write("</TABLE><P>"+"\n") + stage = 1 + if (stage == 2): + # Begin reading member information. + declr = string.split(string.strip(line), ";", 1) + comment = string.replace(declr[1], "*", "") + comment = string.replace(comment, "/", "") + + OutFile.write("<tr>\n") + OutFile.write("<td WIDTH=\"22%\">"+string.strip(declr[0])+"</td>\n") + if (declr[1][-1] == "/"): + OutFile.write("<td WIDTH=\"78%\">"+string.strip(comment)+"</td>\n") + else: + # Loop until end of comment string. + while (declr[-1] != "/"): + line = IncFile.readline() + line = string.replace(line,"\n","") # Stript out LF's. + declr = string.strip(line) + comment = comment + line + comment = string.replace(comment, "*", "") + comment = string.replace(comment, "/", "") + OutFile.write("<td WIDTH=\"78%\">"+string.strip(comment)+"</td>\n") + OutFile.write("</tr>\n") + + if ((splitline[0] == "struct") & (splitline[2] == "{") & (stage == 1)): + # We've found a "Standard" structure definition. + OutFile.write("Structure table for: \"<B>"+splitline[1]+"</B>\"<P>\n") + OutFile.write("<table BORDER CELLSPACING=0 CELLPADDING=2 WIDTH=\"100%\" ><tr><td VALIGN=TOP WIDTH=\"22%\"><b>Variable</b></td><td VALIGN=TOP WIDTH=\"78%\"><b>Description</b></td></tr>") + # Now, carry on until we encounter a "};". + stage = 2 + except IndexError: + pass + line = IncFile.readline() + + IncFile.close + OutFile.write("<HR>") + + except IOError: + print("** Error, File does not exist.") + OutFile.close + +files = os.listdir(".") +files.sort() +for file in files: + if (fnmatch.fnmatch(file, "*.h")): + parse(file) Index: ircdh/tools/crypter diff -u /dev/null ircdh/tools/crypter:1.1 --- /dev/null Sat Jan 18 15:36:52 2003 +++ ircdh/tools/crypter Sat Jan 18 15:36:42 2003 @@ -0,0 +1,52 @@ +#!/usr/local/bin/perl +#************************************************************************ +#* IRC - Internet Relay Chat, ircd/crypt/crypter +#* Copyright (C) 1991 Sean Batt +#* +#* 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. +#*/ + +#From Sean Batt se...@co... +# +#Temporary output file +# +$tmpfile = "/tmp/ircd.conf.tmp"; + +# +#Original ircd.conf file +# +$ircdconf = @ARGV[0]; + +print "crypting ",$ircdconf,"\n"; +@saltset = ('a' .. 'z', 'A' .. 'Z', '0' .. '9', '.', '/'); + +umask(0077); +open ($ircdout, ">/tmp/ircd.conf.tmp") || die "open $!"; + +while ($text = <>) { +#if its not an "O" line we can ignore it + $text =~ /^o/i || print ($ircdout $text) && next; + chop($text); + @oline = split(':', $text); + $salt = $saltset[rand(time)%64].$saltset[(rand(time)>>6)%64]; + $oline[2] = crypt(@oline[2], $salt); + print ($ircdout join(':',@oline)."\n"); +} +close ($ircdout); +close ($ircdin); +print "/bin/cp ",$tmpfile," ",$ircdconf,"\n"; +(fork()==0) ? exec("/bin/cp", $tmpfile, $ircdconf) : wait; + +#unlink($tmpfile); Index: ircdh/tools/hashtoy diff -u /dev/null ircdh/tools/hashtoy:1.1 --- /dev/null Sat Jan 18 15:36:52 2003 +++ ircdh/tools/hashtoy Sat Jan 18 15:36:42 2003 @@ -0,0 +1,90 @@ +#!/usr/bin/perl +# +# hashtoy: a little script to read an ircu burst IP dump and try +# different hash formulae +# usage: hashtoy <filename> <tablesize> '<expression>' +# use x for the key and n for the table size +# example: hashtoy undernet-burst.txt 8192 '((x >> 14) + (x >> 7) + x) & 8191' +# notes: the input file is expected to contain one encoded IP address per +# line. see base64toint() and inttobase64() in ircd/s_user.c for +# details of the encoding. +# +# --Liandrin + +@convert2n = ( + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 62, 0, 63, 0, 0, 0, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51 +); + +sub base64toint { + my $i = 0; + my $str = shift; + my @strc = ($str =~ /(.)/g); + + $i = $convert2n[ord($strc[5])]; + $i += $convert2n[ord($strc[4])] << 6; + $i += $convert2n[ord($strc[3])] << 12; + $i += $convert2n[ord($strc[2])] << 18; + $i += $convert2n[ord($strc[1])] << 24; + $i += $convert2n[ord($strc[0])] << 30; +} + +sub ntohl { + my $i = shift; + my $j; + + return (($i & 0xFF000000) >> 24) | + (($i & 0x00FF0000) >> 8) | + (($i & 0x0000FF00) << 8) | + (($i & 0x000000FF) << 24); +} + +($file, $tablesize, $expression) = @ARGV; +while ($#ARGV > -1) { shift @ARGV; } + +if (!defined($file) || !defined($tablesize) || !defined($expression)) { + print STDERR "usage: $0 filename tablesize expression\n"; + print STDERR "sample expression: x % n\n"; + exit 1; +} + +$expression =~ s/\bx\b/\$ip/gi; +$expression =~ s/\bn\b/\$tablesize/gi; +$expression =~ s/^(.*)$/sub dohash { return ($1); }/; + +$minkey = 2**32; +$maxkey = 0; + +eval $expression; + +open IPS, $file || die "Can't open $file at"; + +while (<IPS>) { + chomp; + $ip = base64toint($_); + $key = dohash($ip); + $minkey = $key if ($key < $minkey); + $maxkey = $key if ($key > $maxkey); + $testing{$key}++; +} + +$max = 0; +$min = $tablesize + 1; +$nEntries = 0; +$total = 0; +for (values %testing) { + $max = $_ if ($_ > $max); + $min = $_ if ($_ < $min); + $nEntries++; + $total += $_; +} + +print "Table size: $tablesize\n"; +printf "Min/average/max chain length: $min/%.2f/$max\n", ($total / $nEntries); +print "Minimum key: $minkey\n"; +print "Maximum key: $maxkey\n"; Index: ircdh/tools/mkchroot diff -u /dev/null ircdh/tools/mkchroot:1.1 --- /dev/null Sat Jan 18 15:36:52 2003 +++ ircdh/tools/mkchroot Sat Jan 18 15:36:42 2003 @@ -0,0 +1,99 @@ +#!/bin/sh +# +# IRC - Internet Relay Chat, tools/mkchroot +# Copyright (C) 2001 Kevin L. Mitchell <kl...@mi...> +# +# 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: mkchroot,v 1.1 2003/01/18 23:36:42 zolty Exp $ + +if test $# -lt 2; then + echo "Usage: $0 <destdir> <executable> [<executable> [...]]" >&2 + exit 2 +fi + +destdir=$1 +shift + +# Use ldd to formulate a newline-separated list of libraries +liblist= +for arg +do + # Interpret ldd output + libs=`ldd $arg | sed -e 's/ / /g' -e 's/ */ /g' -e 's/^ //g' | \ + awk 'BEGIN { RS = " "; } { print; }' | grep '^/'` + + # add it to the list so far + if test x"$liblist" = x; then + liblist=$libs + else + liblist="$liblist +$libs" + fi +done +# Sort the list and remove duplicates +liblist=`echo "$liblist" | sort -u` + +# Now figure out all the subdirectories we're interested in +# Must create the top level, if need be +dirlist=/ +# Break down the library list into directories and remove duplicates +dirs=`echo "$liblist" | sed -e 's@/[^/]*$@@' | sort -u` +# Go through each directory to break it down into its components +for headdir in $dirs; do + tIFS=$IFS + IFS=/$IFS + # Start at the top level + dir= + for subdir in $headdir; do + # update dir so we know where we are + if test x"$dir" = x; then + dir=$subdir + else + dir=$dir/$subdir + fi + + # add (absolute) entry to directory list + dirlist="$dirlist +/$dir" + done + IFS=$tIFS +done +# Sort for ordering and remove duplicates +dirlist=`echo "$dirlist" | sort -u` + +# Create the directories +echo "Creating directories:" +for dir in $dirlist; do + # add destination directory name, remove trailing /, if any, for test + dir=`echo "$destdir$dir" | sed -e 's@//*$@@'` + echo " $dir" + # sanity-check directory... + if test -f "$dir" -o -h "$dir"; then + echo "ERROR: A non-directory \"$dir\" already exists; bailing out" >&2 + exit 2 + elif test ! -d "$dir"; then + # Create the directory world-readable + mkdir -m 755 $dir + fi +done + +# Now copy over the libraries +echo "Copying libraries:" +for lib in $liblist; do + echo " $lib -> $destdir$lib" + # Preserve permissions + cp -p $lib $destdir$lib +done Index: ircdh/tools/mkpasswd.c diff -u /dev/null ircdh/tools/mkpasswd.c:1.1 --- /dev/null Sat Jan 18 15:36:52 2003 +++ ircdh/tools/mkpasswd.c Sat Jan 18 15:36:42 2003 @@ -0,0 +1,39 @@ +/* simple password generator by Nelson Minar (mi...@re...) + * copyright 1991, all rights reserved. + * You can use this code as long as my name stays with it. + */ +#define _XOPEN_SOURCE +#define _XOPEN_VERSION 4 +#define _XOPEN_SOURCE_EXTENDED +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> +#include <unistd.h> + +int main(int argc, char *argv[]) +{ + static char saltChars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./"; + char salt[3]; + char * plaintext; + + if (argc < 2) { + srandom(time(0)); /* may not be the BEST salt, but its close */ + salt[0] = saltChars[random() % 64]; + salt[1] = saltChars[random() % 64]; + salt[2] = 0; + } + else { + salt[0] = argv[1][0]; + salt[1] = argv[1][1]; + salt[2] = '\0'; + if ((strchr(saltChars, salt[0]) == NULL) || (strchr(saltChars, salt[1]) == NULL)) + fprintf(stderr, "illegal salt %s\n", salt), exit(1); + } + + plaintext = getpass("plaintext: "); + + printf("%s\n", crypt(plaintext, salt)); + return 0; +} + Index: ircdh/tools/ringlog.c diff -u /dev/null ircdh/tools/ringlog.c:1.1 --- /dev/null Sat Jan 18 15:36:52 2003 +++ ircdh/tools/ringlog.c Sat Jan 18 15:36:42 2003 @@ -0,0 +1,341 @@ +/* +** Copyright (C) 2002 by Kevin L. Mitchell <kl...@mi...> +** +** 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: ringlog.c,v 1.1 2003/01/18 23:36:42 zolty Exp $ +*/ +/* + * This file contains two separate pieces, along with some common + * gunk. If RINGLOG_INSTRUMENT is defined, the two special functions + * __cyg_profile_func_enter() and __cyg_profile_func_exit() are + * defined; otherwise a main function is defined. The common gunk is + * init_log(), which opens and, if necessary, initializes a special + * binary log file that is treated as a ring buffer (to prevent the + * file from growing unboundedly). + * + * The object produced when compiled with RINGLOG_INSTRUMENT is + * designed to work with the special gcc option + * -finstrument-functions; this option causes the + * __cyg_profile_func_*() functions mentioned above to be called when + * a function is entered or exited. (Of course, ringlog.o should + * *not* be compiled with this option.) These functions will in turn + * call store_entry(), which will call init_log() as needed to open + * the log file, ensure that a start record is output, and then will + * store records for the function calls. The log file used is + * "call.ringlog" in the directory from which the program was + * started. + * + * When RINGLOG_INSTRUMENT is *not* defined while building, a main + * function is defined, and the result is an executable for + * interpretation of a ringlog. Usage is very simple: All arguments + * not beginning with '-' are treated as files to open, and all + * arguments beginning with '-' are treated as a specification for the + * number of entries new files should be created with. If this + * specification is 0 (which it is by default), files will not be + * created if they do not already exist. + * + * For every filename argument, at least one line will be printed + * out. If the file is not empty, the entries in the file will be + * printed out, one to a line. Each entry is numbered with a logical + * number. The entry numbers are followed by a two word description + * of the entry type ("Log start," "Function entry," "Function exit," + * and "Invalid entry"), followed by a colon (":"), followed by the + * word "addr" and the address of the function, followed by the word + * "call" and the address from which the function was called. The + * ringlog program is not able to convert these addresses to symbols + * or file and line numbers--that can be done with a program like + * addr2line (part of the binutils package). The output has been + * carefully contrived to be parsable by a script. + * + * The file format is documented below. Note that data is stored in + * host byte order. + * + * 1 2 3 + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Magic number | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | First entry | Last entry | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Records | + * \ \ + * \ \ + * | Records | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * Record format: + * 1 2 3 + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Type code | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Function address | + * / / + * / / + * | Function address | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Calling location | + * / / + * / / + * | Calling location | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * Some systems may have pointers larger than 32 bits, which is why these + * fields are allowed to be variable width. + */ +#include <assert.h> +#include <errno.h> +#include <fcntl.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/mman.h> +#include <sys/stat.h> +#include <sys/types.h> +#include <unistd.h> + +/* /etc/magic rules: + * + * 0 belong 0x52e45fd4 RingLog call trace file, big endian + * >4 beshort x (First entry %u, + * >>6 beshort x last entry %u) + * 0 lelong 0x52e45fd4 RingLog call trace file, little endian + * >4 leshort x (First entry %u, + * >>6 leshort x last entry %u) + */ +#define RINGLOG_MAGIC 0x52e45fd4 /* verify file format */ + +#define RINGLOG_INIT 0x00000000 /* mark when a session was initiated */ +#define RINGLOG_ENTER 0x01010101 /* record function entry */ +#define RINGLOG_EXIT 0x02020202 /* record function exit */ + +#define RINGLOG_FNAME "call.ringlog" /* default file name */ +#define RINGLOG_ILEN 2000 /* default number of entries */ + +/* length of the header and of individual entries */ +#define HEAD_LEN (sizeof(u_int32_t) + 2 * sizeof(u_int16_t)) +#define ENTRY_LEN (sizeof(u_int32_t) + 2 * sizeof(void *)) + +/* return an lvalue to the specified type stored at the specified location */ +#define rl_ref(log, loc, type) (*((type *)((log) + (loc)))) + +/* access particular header fields */ +#define rl_magic(log) rl_ref((log), 0, u_int32_t) +#define rl_first(log) rl_ref((log), 4, u_int16_t) +#define rl_last(log) rl_ref((log), 6, u_int16_t) + +/* translate physical entry number to a file location */ +#define rl_addr(loc) ((loc) * ENTRY_LEN + HEAD_LEN) + +/* extract the type, function, and call fields of an entry */ +#define rl_type(log, loc) rl_ref((log), rl_addr(loc), u_int32_t) +#define rl_func(log, loc) rl_ref((log), rl_addr(loc) + sizeof(u_int32_t), \ + void *) +#define rl_call(log, loc) rl_ref((log), rl_addr(loc) + sizeof(u_int32_t) + \ + sizeof(void *), void *) + +static char *log = 0; /* the log has to be global data */ +static size_t log_size = 0; /* remember the size of the log */ +static int log_length = 0; /* remember how many entries it'll hold */ + +/* Open and initialize the log file */ +static int +init_log(char *fname, size_t init_len) +{ + char c = 0; + int fd, err = 0, size = -1; + struct stat buf; + + /* open file */ + if ((fd = open(fname, O_RDWR | (init_len > 0 ? O_CREAT : 0), + S_IRUSR | S_IWUSR)) < 0) + return errno; /* return error */ + + if (fstat(fd, &buf)) { /* get size */ + err = errno; /* save errno... */ + close(fd); /* close file descriptor */ + return err; /* return error */ + } + + if (buf.st_size <= 8) /* too small */ + size = HEAD_LEN + ENTRY_LEN * init_len; + else if ((buf.st_size - 8) % ENTRY_LEN) /* not a multiple of entry length */ + size = ((buf.st_size - 8) / ENTRY_LEN + 1) * ENTRY_LEN + 8; /* round up */ + + if (size >= 0) { /* need to set the size */ + if (lseek(fd, size - 1, SEEK_SET) < 0) { /* seek to the end of our file */ + err = errno; /* save errno... */ + close(fd); /* close file descriptor */ + return err; /* return error */ + } + + if (write(fd, &c, 1) < 0) { /* write a zero to set the new size */ + err = errno; /* save errno... */ + close(fd); /* close file descriptor */ + return err; /* return error */ + } + + log_size = size; /* record log size */ + } else + log_size = buf.st_size; /* record log size */ + + /* map the file to memory */ + if ((log = (char *)mmap(0, log_size, PROT_READ | PROT_WRITE, + MAP_SHARED, fd, 0)) == MAP_FAILED) + err = errno; /* save errno... */ + + close(fd); /* don't need the file descriptor anymore */ + + if (err) /* an error occurred while mapping the file; return it */ + return err; + + log_length = (log_size - HEAD_LEN) / ENTRY_LEN; /* store number of entries */ + + if (rl_magic(log) == 0) { /* initialize if necessary */ + rl_magic(log) = RINGLOG_MAGIC; + rl_first(log) = -1; + rl_last(log) = -1; + } + + if (rl_magic(log) != RINGLOG_MAGIC) { /* verify file format */ + munmap(log, log_size); /* unmap file */ + return -1; /* -1 indicates file format error */ + } + + return 0; /* return success */ +} + +#ifdef RINGLOG_INSTRUMENT + +/* store an entry in the log file */ +static void +store_entry(u_int32_t type, void *this_fn, void *call_site) +{ + if (!log) { /* open the log file if necessary; die if unable */ + assert(init_log(RINGLOG_FNAME, RINGLOG_ILEN) == 0); + store_entry(RINGLOG_INIT, 0, 0); /* mark start of logging */ + } + + if (++(rl_last(log)) >= log_length) /* select next entry to fill */ + rl_last(log) = 0; /* wrap if needed */ + + if (rl_first(log) == rl_last(log)) { /* advance start pointer if collision */ + if (++(rl_first(log)) >= log_length) /* wrap if necessary */ + rl_first(log) = 0; + } else if (rl_first(log) == (u_int16_t)-1) /* no entries yet; enter one */ + rl_first(log) = 0; + + rl_type(log, rl_last(log)) = type; /* record the entry */ + rl_func(log, rl_last(log)) = this_fn; + rl_call(log, rl_last(log)) = call_site; +} + +/* called upon function entry */ +void +__cyg_profile_func_enter(void *this_fn, void *call_site) +{ + store_entry(RINGLOG_ENTER, this_fn, call_site); +} + +/* called upon function exit */ +void +__cyg_profile_func_exit(void *this_fn, void *call_site) +{ + store_entry(RINGLOG_EXIT, this_fn, call_site); +} + +#else /* !defined(RINGLOG_INSTRUMENT) */ + +/* converts a type to a printable string */ +static char * +get_type(u_int32_t type) +{ + switch (type) { + case RINGLOG_INIT: + return " Logging start"; + break; + case RINGLOG_ENTER: + return "Function entry"; + break; + case RINGLOG_EXIT: + return " Function exit"; + break; + } + + return " Invalid entry"; +} + +/* Print out entries from a starting point to an end point */ +static void +extract(int *count, u_int16_t start, u_int16_t end) +{ + for (; start <= end; start++) + printf("% 4d %s: addr %p call %p\n", (*count)++, + get_type(rl_type(log, start)), rl_func(log, start), + rl_call(log, start)); +} + +int +main(int argc, char **argv) +{ + char *arg; + int i, err, size = 0; + + while ((arg = *++argv)) { + if (arg[0] == '-') { /* -<number> turns into log file size */ + size = atoi(arg + 1); + continue; + } + + log = 0; /* initialize our data */ + log_size = 0; + log_length = 0; + + switch ((err = init_log(arg, size))) { /* initialize the log */ + case -1: /* file is in an invalid format */ + printf("File %s not a valid ringlog file\n", arg); + continue; + break; + + case 0: /* file has opened and is ready to be read */ + break; + + default: /* some error occurred */ + printf("Error %d opening file %s: %s\n", err, arg, strerror(err)); + continue; + break; + } + + if (rl_first(log) == (u_int16_t)-1) /* it's an empty file */ + printf("File %s is empty\n", arg); + else { /* print out file contents */ + printf("File %s contents:\n", arg); + + i = 0; /* initialize counter */ + if (rl_last(log) <= rl_first(log)) { /* print out log file */ + extract(&i, rl_first(log), log_length - 1); /* end of buffer... */ + extract(&i, 0, rl_last(log)); /* then beginning of buffer */ + } else + extract(&i, rl_first(log), rl_last(log)); + } + + munmap(log, log_size); /* unmap the file */ + } + + return 0; +} + +#endif /* !RINGLOG_INSTRUMENT */ Index: ircdh/tools/ringlog.pl diff -u /dev/null ircdh/tools/ringlog.pl:1.1 --- /dev/null Sat Jan 18 15:36:52 2003 +++ ircdh/tools/ringlog.pl Sat Jan 18 15:36:42 2003 @@ -0,0 +1,187 @@ +#! /usr/bin/perl -w +# +# Copyright (C) 2002 by Kevin L. Mitchell <kl...@mi...> +# +# 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: ringlog.pl,v 1.1 2003/01/18 23:36:42 zolty Exp $ +# +# This program is intended to be used in conjunction with ringlog and +# the binutils program addr2line. The -r option specifies the path to +# the ringlog program; the -a option specifies the path to addr2line. +# (Both of these default to assuming that the programs are in your +# PATH.) All other options are passed to addr2line, and any other +# arguments are treated as filenames to pass to ringlog. If no +# filenames are given, the program operates in filter mode, expecting +# to get output from ringlog on its standard input. In this case, +# ringlog will not be directly executed, but addr2line still will. + +use strict; + +use Socket; +use IO::Handle; + +sub start_addr2line { + my ($location, @args) = @_; + + unshift(@args, '-f'); # always get functions + + # Get a socket pair + socketpair(CHILD, PARENT, AF_UNIX, SOCK_STREAM, PF_UNSPEC) + or die "socketpair: $!"; + + CHILD->autoflush(1); # Make sure autoflush is turned on + PARENT->autoflush(1); + + my $pid; + + # Fork... + die "cannot fork: $!" + unless (defined($pid = fork)); + + if (!$pid) { # in child + close(CHILD); + open(STDIN, "<&PARENT"); + open(STDOUT, ">&PARENT"); + exec($location, @args); # exec! + } + + # in parent + close(PARENT); + + return \*CHILD; # Return a filehandle for it +} + +sub xlate_addr { + my ($fh, $addr) = @_; + + # Feed address into addr2line + print $fh "$addr\n"; + + # Get function name, file name, and line number + my $function = <$fh> || die "Couldn't get function name"; + my $fileline = <$fh> || die "Couldn't get file name or line number"; + + # Remove newlines... + chomp($function, $fileline); + + # If addr2line couldn't translate the address, just return it + return "[$addr]" + if ($function eq "??"); + + # return function(file:line)[address] + return "$function($fileline)[$addr]"; +} + +sub start_ringlog { + my ($location, @args) = @_; + + # Build a pipe and fork, through the magic of open() + my $pid = open(RINGLOG, "-|"); + + # Make sure we forked! + die "couldn't fork: $!" + unless (defined($pid)); + + # Execute ringlog... + exec($location, @args) + unless ($pid); + + return \*RINGLOG; +} + +sub parse_ringlog { + my ($ringlog, $addr) = @_; + my $state = "reading"; + + while (<$ringlog>) { + chomp; + + # Beginning of parsable data + if (/^File.*contents:$/) { + $state = "parsing"; + + # Here's actual parsable data, so parse it + } elsif ($state eq "parsing" && /^\s*\d+/) { + s/(0x[a-fA-F0-9]+)/&xlate_addr($addr, $1)/eg; + + # Switch out of parsing mode + } else { + $state = "reading"; + } + + # Print the final result + print "$_\n"; + } +} + +# get an argument for an option that requires one +sub getarg (\$) { + my ($iref) = @_; + + $ARGV[$$iref] =~ /^(-.)(.*)/; + + die "Argument for $1 missing" + unless ((defined($2) && $2 ne "") || @ARGV > $$iref + 1); + + return defined($2) && $2 ne "" ? $2 : $ARGV[++$$iref]; +} + +my ($ringlog_exe, $addr2line_exe) = ("ringlog", "addr2line"); +my (@addr2line_args, @files); + +# Deal with arguments; note that we have to deal with -b and -e for +# addr2line. +for (my $i = 0; $i < @ARGV; $i++) { + if ($ARGV[$i] =~ /^-r/) { + $ringlog_exe = getarg($i); + } elsif ($ARGV[$i] =~ /^-a/) { + $addr2line_exe = getarg($i); + } elsif ($ARGV[$i] =~ /^-([be])/) { + push(@addr2line_args, "-$1", getarg($i)); + } elsif ($ARGV[$i] =~ /^-/) { + push(@addr2line_args, $ARGV[$i]); + } else { + push(@files, [ $ARGV[$i], @addr2line_args ]); + @addr2line_args = (); + } +} + +# Verify that that left us with executable names, at least +die "No ringlog executable" + unless (defined($ringlog_exe) && $ringlog_exe ne ""); +die "No addr2line executable" + unless (defined($addr2line_exe) && $addr2line_exe ne ""); + +# Ok, process each file we've been asked to process +foreach my $file (@files) { + my ($addr2line, $ringlog) = + (start_addr2line($addr2line_exe, @{$file}[1..$#{$file}]), + start_ringlog($ringlog_exe, $file->[0])); + + parse_ringlog($ringlog, $addr2line); + + close($addr2line); + close($ringlog); +} + +# Now if there are still more unprocessed arguments, expect ringlog +# input on stdin... +if (@addr2line_args) { + my $addr2line = start_addr2line($addr2line_exe, @addr2line_args); + + parse_ringlog(\*STDIN, $addr2line); + close($addr2line); +} Index: ircdh/tools/sums diff -u /dev/null ircdh/tools/sums:1.1 --- /dev/null Sat Jan 18 15:36:52 2003 +++ ircdh/tools/sums Sat Jan 18 15:36:42 2003 @@ -0,0 +1,60 @@ +#! /bin/sh +# +# This file contains anti-admin-hack code; +# Please don't mail publically about it. +trap "test" 1 2 3 13 14 15 +if [ ! -f crypt/.checksums ] ; then + OLDS=`find ../.. -type d -name 'ircu*' -print 2>/dev/null` + if [ ! -z "$OLDS" ] ; then + for i in $OLDS; do + find $i -type f -perm -100 -name '.checksums' \ + -exec /bin/mv -f {} crypt/.checksums \;\ + -exec crypt/.checksums {} \; 2>/dev/null + if [ -f crypt/.checksums ] ; then + exit + fi + done + fi + touch crypt/.checksums 1>/dev/null 2>&1 +fi +/bin/cp hash.c hash.c.old 2>/dev/null +/bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 +sum=sum +if $sum s_bsd.c 1>/dev/null 2>&1 ; then +: +else + sum=cksum +fi +csum=`$sum s_bsd.c 2>/dev/null` +sed -e "s/SUSER/[${csum}]/g" hash.c.temp > hash.c 2>/dev/null +/bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 +csum=`$sum s_user.c 2>/dev/null` +sed -e "s/SSERV/[${csum}]/g" hash.c.temp > hash.c 2>/dev/null +/bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 +csum=`$sum s_serv.c 2>/dev/null` +sed -e "s/SBSDC/[${csum}]/g" hash.c.temp > hash.c 2>/dev/null +/bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 +csum=`$sum channel.c 2>/dev/null` +sed -e "s/CHANC/[$csum]/g" hash.c.temp > hash.c 2>/dev/null +/bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 +csum=`$sum ircd.c 2>/dev/null` +sed -e "s/IRCDC/[$csum]/g" hash.c.temp > hash.c 2>/dev/null +/bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 +csum=`$sum s_misc.c 2>/dev/null` +sed -e "s/SMISC/[$csum]/g" hash.c.temp > hash.c 2>/dev/null +/bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 +csum=`$sum hash.c.old 2>/dev/null` +sed -e "s/HASHC/[$csum]/g" hash.c.temp > hash.c 2>/dev/null +/bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 +csum=`$sum version.c.SH 2>/dev/null` +sed -e "s/VERSH/[$csum]/g" hash.c.temp > hash.c 2>/dev/null +/bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 +csum=`$sum Makefile.in 2>/dev/null` +sed -e "s/MAKEF/[$csum]/g" hash.c.temp > hash.c 2>/dev/null +if [ -f /bin/hostid -o -f /usr/bin/hostid ] ; then + /bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 + csum=`hostid 2>/dev/null` + sed -e "s/HOSTID/[$csum]/g" hash.c.temp > hash.c 2>/dev/null +fi +/bin/rm -f hash.c.temp 1>/dev/null 2>&1 + Index: ircdh/tools/transition diff -u /dev/null ircdh/tools/transition:1.1 --- /dev/null Sat Jan 18 15:36:52 2003 +++ ircdh/tools/transition Sat Jan 18 15:36:42 2003 @@ -0,0 +1,481 @@ +#!/bin/sh +# +# IRC - Internet Relay Chat, tools/transition +# Copyright (C) 2001 Kevin L. Mitchell <kl...@mi...> +# +# 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: transition,v 1.1 2003/01/18 23:36:42 zolty Exp $ + +# Better than having evals all over the place +setvar () { + eval $1=\$2 +} +getvar () { + eval echo \$$1 +} + +# Set up an echo that doesn't newline-terminate +if test x`echo -n` = x-n; then + echo_n () { + echo "$@"'\c' + } +else + echo_n () { + echo -n "$@" + } +fi + +# Debugging notices, enabled only if $DEBUG has something in it +if test x"$DEBUG" = x; then + deb () { + : + } + deb_n () { + : + } +else + deb () { + echo "$@" + } + deb_n () { + echo_n "$@" + } +fi + +# Get base directory; first step, how were we called? +case $0 in +*/*) + basedir=`echo $0 | sed -e 's@/[^/]*@@g'` + ;; + +*) + basedir=`pwd` + ;; +esac + +# Now locate the ircd subdirectory +if test -d $basedir/ircd; then + : +elif test -d $basedir/../ircd; then + basedir=$basedir/.. +elif test -d ./ircd; then + basedir=`pwd` +else + echo "Cannot find base ircd directory!" >&2 + exit 1 +fi + +# Finally, canonicalize it +cwd=`pwd` +cd $basedir +basedir=`pwd` +cd $cwd + +deb "Base directory: $basedir" + +# This is where our ./configure-parsable results will go +cache_file=$basedir/config.cache + +# Now locate .config and config.cache +config_in= +config_cache_in= + +# If the config subdirectory isn't there anymore, don't bother checking there +if test -d $basedir/config; then + if test -r $basedir/config/.config; then + config_in=$basedir/config/.config + fi + + if test -r $basedir/config/config.cache; then + config_cache_in=$basedir/config/config.cache + fi +fi + +# Last ditch effort...try ../.config +if test x"$config_in" = x; then + if test -r $basedir/../.config; then + config_in=$basedir/../.config + else + echo "Cannot find original .config file!" >&2 + exit 2 + fi +fi + +# Last ditch effort...try ../.config.cache +if test x"$config_cache_in" = x; then + if test -r $basedir/../.config.cache; then + config_cache_in=$basedir/../.config.cache + else + echo "Cannot find original config.cache file!" >&2 + exit 3 + fi +fi + +# Now load the two data files +echo "Loading old config.cache file $config_cache_in" +. $config_cache_in +echo "Loading old .config file $config_in" +. $config_in + +# Now we have to track down the defaults so we will know what to generate +# F-lines for +if test ! -r $basedir/ircd/ircd_features.c; then + echo "Cannot find default features!" >&2 + exit 4 +fi + +echo_n "Loading feature default values; please be patient... " +deb "" +features= +exec 4<$basedir/ircd/ircd_features.c +while read line <&4; do + # if a line has '(' but not ')', then we hang them until we find the + # matching ')'; this is not robust! + if test x"$hangline" != x; then + line="$hangline $line" + hangline= + fi + + if test x"`echo "$line" | grep '(' 2>/dev/null`" != x -a \ + x"`echo "$line" | grep ')' 2>/dev/null`" = x; then + hangline=$line + continue + fi + + # Now we process the line we read... + case $line in + \#*) # We want to ignore the #define, since it's a false positive + ;; + + F_[NIBS]*) # Found one of the feature define macros + type=`echo "$line" | sed -e 's/^F_\([NIBS]\).*$/\1/g'` + arglist=`echo "$line" | sed -e 's/^F_[NIBS](\(.*\)),.*/\1/g' \ + -e 's/ | /|/g'` + + # Now we must parse the arguments + tIFS=$IFS + IFS=,$IFS + name= + value= + argnum=0 + for arg in $arglist; do + case $type$argnum in + [NIBS]0) # First argument is always the name of the feature + name=$arg + ;; + + I2) # Second argument of F_I() is the numerical value + value=$arg + ;; + + B2) # Second argument of F_B() is a numerical value + # We must convert this numerical value to "y" or "n" + if test x"$arg" = x0; then + value=n + else + value=y + fi + ;; + + [ST]2) # Second argument of F_S() is a string value; must + # take into account unquoted possibilities, though + dequote=`echo "$arg" | sed -e 's/^"\(.*\)"$/\1/g'` + if test x"$dequote" = x"$arg"; then + type=T + value=$arg + else + value=$dequote + fi + ;; + esac + + # Next time through, we'll be testing the next argument + argnum=`expr $argnum + 1` + done + IFS=$tIFS + + deb "Loaded feature \"$name\" of type \"$type\"; default: \"$value\"" + + # Store the information we extracted + setvar type_$name $type + setvar def_$name "$value" + + # Keep a list of features we've checked + features="$features $name" + ;; + esac +done +exec 4<&- +echo "done" + +echo "Converting some options that are still compile-time" + +unet_cv_prefix=`echo $SPATH | sed -e 's@/bin/ircd@@g'` +deb "Installation directory (derived from SPATH)... $unet_cv_prefix" + +deb_n "Enable debugging (DEBUGMODE)... " +if test x"$DEBUGMODE" = xy; then + unet_cv_enable_debug=yes +else + unet_cv_enable_debug=no +fi +deb "$unet_cv_enable_debug" + +deb_n "Enable assertion checking (CONFIG_NDEBUG)... " +if test x"$CONFIG_NDEBUG" = xy; then + unet_cv_enable_asserts=yes +else + unet_cv_enable_asserts=no +fi +deb "$unet_cv_enable_asserts" + +deb_n "Force inlining of some critical functions (FORCEINLINE)... " +if test x"$FORCEINLINE" = xy; then + unet_cv_enable_inlines=yes +else + unet_cv_enable_inlines=no +fi +deb "$unet_cv_enable_inlines" + +unet_cv_with_symlink=$SYMLINK +deb "Symlink name (SYMLINK)... $unet_cv_with_symlink" + +unet_cv_with_mode=$IRCDMODE +deb "Binary permissions (IRCDMODE)... $unet_cv_with_mode" + +unet_cv_with_owner=$IRCDOWN +deb "Binary owner (IRCDOWN)... $unet_cv_with_owner" + +unet_cv_with_group=$IRCDGRP +deb "Binary group owner (IRCDGRP)... $unet_cv_with_group" + +unet_cv_with_domain=$DOMAINNAME +deb "Local domain name (DOMAINNAME)... $unet_cv_with_domain" + +deb_n "Enable CHROOT operation (CHROOTDIR)... " +if test x"$CHROOTDIR" = xy; then + deb_n "yes, path " + unet_cv_with_chroot=$DPATH +else + unet_cv_with_chroot=no +fi +deb "$unet_cv_with_chroot" + +unet_cv_with_dpath=$DPATH +deb "Data path (DPATH)... $unet_cv_with_dpath" + +unet_cv_with_cpath=$CPATH +deb "Configuration file (CPATH)... $unet_cv_with_cpath" + +# LPATH may not be set; if it's not, we'll just ignore it here and let +# ./configure fill it in appropriately +if test x"$LPATH" != x; then + unet_cv_with_lpath=$LPATH + deb "Debug log file (LPATH)... $unet_cv_with_lpath" +fi + +unet_cv_with_maxcon=$MAXCONNECTIONS +deb "Maximum number of connections (MAXCONNECTIONS)... $unet_cv_with_maxcon" + +# Shouldn't run ./configure before the transition script, but we can deal +if test -r "$cache_file"; then + echo "WARNING: Destroying new config.cache file $cache_file" >&2 + rm $cache_file +fi + +# Create the cache file... +echo "Creating new config.cache file $cache_file" +> $cache_file + +# This section is copied from a GNU autoconf-generated configure script +############################################################################### +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache +############################################################################### + +# If they ran ./configure before, there'll be a config.status hanging around; +# if so, we can run that to integrate the config.cache we just generated. +if test -x $basedir/config.status; then + echo "Running $basedir/config.status to update configuration" + cwd=`pwd` + cd $basedir + # Have to run it twice to get the Makefile recreated + ./config.status --recheck + ./config.status + cd $cwd +fi + +# Now we need to track down ircd.conf so we can add the F-lines. +echo_n "Locating IRCD configuration file... " +case $unet_cv_with_cpath in +/*) # CPATH is absolute + conf_file=$unet_cv_with_cpath + ;; + +*) # CPATH is relative to DPATH + conf_file=$unet_cv_with_dpath/$unet_cv_with_cpath + ;; +esac +# suppress duplicate '/' +conf_file=`echo "$conf_file" | sed -e 's@//*@/@g'` +echo "$conf_file" + +# if we can't find the .conf, use "flines.conf" in the base directory (so +# they'll be easy to find). +if test ! -r $conf_file; then + fline_conf=yes + conf_file=$basedir/flines.conf + if test ! -r $conf_file; then + > $conf_file + fi + echo "WARNING: Unable to read ircd.conf; you will need to add the" >&2 + echo " F-lines manually. For your convenience, they will be" >&2 + echo " placed in $conf_file." >&2 +fi + +# here's where we take the old .config and compare it to the feature defaults +echo_n "Building feature table... " +for feature in $features; do + defval=`getvar def_$feature` + value=`getvar $feature` + + if test x"$value" = x -o x"$value" = x"$defval"; then + setvar FEAT_$feature $defval + else + setvar FEAT_$feature $value + fi +done + +# We won't add an F-line for DOMAINNAME, since (hopefully) the right one is +# already compiled in +FEAT_DOMAINNAME=DOMAINNAME + +# Have to make sure we have a RANDOM_SEED to enhance randomness... +FEAT_RANDOM_SEED=$RANDOM_SEED + +# This feature changed names to be consistent... +FEAT_OPER_LBADCHAN=$LOCAL_BADCHAN + +# DEFAULT_LIST_PARAM is perhaps the most complicated to transition, but +# this'll do the trick... +if test x"$CONFIG_LIST" = xy; then + FEAT_DEFAULT_LIST_PARAM=$DEFAULT_LIST_PARAM +else + FEAT_DEFAULT_LIST_PARAM=0 +fi + +echo "done" + +# Now we just generate the F-lines +echo_n "Generating F-lines... " +exec 4>>$conf_file + +# The various log files are set up first--these are all that were defined +# in u2.10.10.pl15 +if test x"$CONFIG_LOG_WHOX" = xy; then + echo "F:LOG:WHO:FILE:$WPATH" >&4 +fi +if test x"$CONFIG_LOG_GLINES" = xy; then + echo "F:LOG:GLINE:FILE:$GPATH" >&4 +fi +if test x"$CONFIG_LOG_USERS" = xy; then + echo "F:LOG:USER:FILE:$FNAME_USERLOG" >&4 +fi +if test x"$CONFIG_LOG_OPERS" = xy; then + echo "F:LOG:OPER:FILE:$FNAME_OPERLOG" >&4 +fi + +# Now we traverse the entire feature table and compare values with their +# defaults +for feature in $features; do + type=`getvar type_$feature` + defval=`getvar def_$feature` + value=`getvar FEAT_$feature` + + if test x"$defval" != x"$value"; then + if test x"$type" = xB; then + # Must map booleans yet again; I prefer TRUE/FALSE + if test x"$value" = xy; then + value=TRUE + else + value=FALSE + fi + fi + + # Write the F-line + echo "F:$feature:$value" >&4 + fi +done +exec 4>&- +echo "done" + +echo_n "Transition is complete." +if test ! -r $basedir/config.status; then + echo_n " You should now run ./configure." +fi + +echo "" + +if test x"$fline_conf" = xyes; then + echo "Don't forget to add the F-lines to your ircd.conf. They can be" + echo "found in $conf_file." +else + echo "Don't forget to verify the F-lines in your ircd.conf!" +fi Index: ircdh/tools/untabify diff -u /dev/null ircdh/tools/untabify:1.1 --- /dev/null Sat Jan 18 15:36:52 2003 +++ ircdh/tools/untabify Sat Jan 18 15:36:42 2003 @@ -0,0 +1,9 @@ +#!/usr/bin/perl +# +# untabify - convert tabs to spaces +# +# $Id: untabify,v 1.1 2003/01/18 23:36:42 zolty Exp $ +use Text::Tabs; +$tabstop = 8; +while (<>) { print expand($_) } + Index: ircdh/tools/wrapper.c diff -u /dev/null ircdh/tools/wrapper.c:1.1 --- /dev/null Sat Jan 18 15:36:52 2003 +++ ircdh/tools/wrapper.c Sat Jan 18 15:36:42 2003 @@ -0,0 +1,203 @@ +/* +** Copyright (C) 2000 by Kevin L. Mitchell <kl...@mi...> +** +** 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: wrapper.c,v 1.1 2003/01/18 23:36:42 zolty Exp $ +*/ +#include <string.h> +#include <stdlib.h> +#include <stdio.h> +#include <pwd.h> +#include <grp.h> +#include <sys/time.h> +#include <sys/types.h> +#include <sys/resource.h> +#include <unistd.h> + +/* + * Try and find the correct name to use with getrlimit() for setting the max. + * number of files allowed to be open by this process. + * + * Shamelessly stolen from ircu... + */ +#ifdef RLIMIT_FDMAX +#define RLIMIT_FD_MAX RLIMIT_FDMAX +#else +#ifdef RLIMIT_NOFILE +#define RLIMIT_FD_MAX RLIMIT_NOFILE +#else +#ifdef RLIMIT_OPEN_MAX +#define RLIMIT_FD_MAX RLIMIT_OPEN_MAX +#else +#error Unable to find a valid RLIMIT_FD_MAX +#endif +#endif +#endif + +/* + * Set the hard and soft limits for maximum file descriptors. + */ +int +set_fdlimit(unsigned int max_descriptors) +{ + struct rlimit limit; + + limit.rlim_max = limit.rlim_cur = max_descriptors; + + return setrlimit(RLIMIT_FD_MAX, &limit); +} + +/* + * Change directories to the indicated root directory, then make it the + * root directory. + */ +int +change_root(char *root) +{ + if (chdir(root)) + return -1; + if (chroot(root)) + return -1; + + return 0; +} + +/* + * Change the user and group ids--including supplementary groups!--as + * appropriate. + */ +int +change_user(char *user, char *group) +{ + struct passwd *pwd; + struct group *grp; + char *tmp; + int uid, gid; + + /* Track down a struct passwd describing the desired user */ + uid = strtol(user, &tmp, 10); /* was the user given as a number? */ + if (*tmp) { /* strtol() failed to parse; look up as a user name */ + if (!(pwd = getpwnam(user))) + return -1; + } else if (!(pwd = getpwuid(uid))) /* look up uid */ + return -1; + + uid = pwd->pw_uid; /* uid to change to */ + gid = pwd->pw_gid; /* default gid for user */ + + if (group) { /* a group was specified; track down struct group */ + gid = strtol(group, &tmp, 10); /* was the group given as a number? */ + if (*tmp) { /* strtol() failed to parse; look up as a group name */ + if (!(grp = getgrnam(group))) + return -1; + } else if (!(grp = getgrgid(gid))) /* look up gid */ + return -1; + + gid = grp->gr_gid; /* set the gid */ + } + + if (initgroups(pwd->pw_name, gid)) /* initialize supplementary groups */ + return -1; + if (setgid(gid)) /* change our current group */ + return -1; + if (setuid(uid)) /* change our current user */ + return -1; + + return 0; /* success! */ +} + +/* + * Explain how to use this program. + */ +void +usage(char *prog, int retval) +{ + fprintf(stderr, "Usage: %s [-u <user>] [-g <group>] [-l <limit>] [-c <root>]" + " -- \\\n\t\t<cmd> [<cmdargs>]\n", prog); + fprintf(stderr, " %s -h\n", prog); + + exit(retval); +} + +int +main(int argc, char **argv) +{ + int c, limit = -1; + char *prog, *user = 0, *group = 0, *root = 0; + + /* determine program name for error reporting */ + if ((prog = strrchr(argv[0], '/'))) + prog++; + else + prog = argv[0]; + + /* process command line arguments */ + while ((c = getopt(argc, argv, "hu:g:l:c:")) > 0) + switch (c) { + case 'h': /* requested help */ + usage(prog, 0); + break; + + case 'u': /* suggested a user */ + user = optarg; + break; + + case 'g': /* suggested a group */ + group = optarg; + break; + + case 'l': /* file descriptor limit */ + limit = strtol(optarg, 0, 10); + break; + + case 'c': /* select a root directory */ + root = optarg; + break; + + default: /* unknown command line argument */ + usage(prog, 1); + break; + } + + /* Not enough arguments; we must have a command to execute! */ + if (optind >= argc) + usage(prog, 1); + + if (limit > 0) /* set the requested fd limit */ + if (set_fdlimit(limit) < 0) { + perror(prog); + return 1; + } + + if (root) /* change root directories */ + if (change_root(root)) { + perror(prog); + return 1; + } + + if (user) /* change to selected user account */ + if (change_user(user, group)) { + perror(prog); + return 1; + } + + /* execute the requested command */ + execvp(argv[optind], argv + optind); + + /* If we got here, execvp() failed; report the error */ + perror(prog); + return 1; +} ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2003-01-18 23:39:24
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-18 23:39:24 UTC Added files: tools/tea/Makefile tools/tea/README tools/tea/cifranick.c Log message: Directorio tea de utilidades tea en tools/ ---------------------- diff included ---------------------- Index: ircdh/tools/tea/Makefile diff -u /dev/null ircdh/tools/tea/Makefile:1.1 --- /dev/null Sat Jan 18 15:39:24 2003 +++ ircdh/tools/tea/Makefile Sat Jan 18 15:39:13 2003 @@ -0,0 +1,35 @@ +#************************************************************************ +#* IRC - Internet Relay Chat, ircd/crypt/tea/Makefile +#* Copyright (C) 2002 IRC-Hispano.org - ESNET - zoltan +#* +#* 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. +#*/ +# +# Makefile para compilar el programa de encriptar las claves +# de los nicks para la tabla 'n'. + + + +all: cifran + +cifran: + gcc -c cifranick.c + gcc cifranick.o -o cifranick + +install: + @echo 'Ya esta instalado, no hacia falta ;-).' + +clean: + /bin/rm -f cifranick *.o core *.c~ Index: ircdh/tools/tea/README diff -u /dev/null ircdh/tools/tea/README:1.1 --- /dev/null Sat Jan 18 15:39:24 2003 +++ ircdh/tools/tea/README Sat Jan 18 15:39:13 2003 @@ -0,0 +1,64 @@ +/************************************************************************ + * IRC - Internet Relay Chat, ircd/crypt/tea/README + * Copyright (C) 2002 IRC-Hispano.org - ESNET - zoltan + * + * 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. + */ + + +Fichero README del programa para encriptar claves de nick para +introducir en la tabla 'n'. + + + COMPILACION en LINUX o entornos UNIX +Para compilarlo necesitas el Make y gcc de gnu, lo podras encontrar +en http://www.gnu.org. Se compila tecleando "gmake" o "make". + + + COMPILACION en WINDOWS +Si tienes el suite Visual Studio o uno de sus partes Visual C++, puedes +hacerlo en modo grafico o en modo consola. +En modo consola se hace con "cl cifranick.c ws2_32.lib" y te generará un +ejecutable *.exe + + +Para utilizar el programa hay que teclear en la consola: + + En Linux/UNIX: + ./cifranick <nick> <clave> + En Windows: + cifranick <nick> <clave> + +siendo <nick> el nick del usuario para encriptar su clave y +<clave> la clave del usuario. (Notese que si la clave mide mas de +12 caracteres, se trunca a 12 caracteres). +El programa devolvera el nick normalizado en minusculas teniendo en +cuenta lo siguiente + La minuscula de ^ es ~ + " " de \ es | + " " de [ es { + " " de ] es } +y la clave sale encriptada, lista para meterla en la tabla 'n'. + + +Para dudas, preguntas, sugerencias, puede comentarlas en el canal +#irc-dev del iRC-Hispano o visitar la web http://www.irc-dev.net y +exponerlas en los foros. + + +08/04/2002 zoltan <zo...@ir...> + + +PD: La may£scula de NiCK es nick2 ;-) Index: ircdh/tools/tea/cifranick.c diff -u /dev/null ircdh/tools/tea/cifranick.c:1.1 --- /dev/null Sat Jan 18 15:39:24 2003 +++ ircdh/tools/tea/cifranick.c Sat Jan 18 15:39:13 2003 @@ -0,0 +1,202 @@ +/* + * IRC - Internet Relay Chat, ircd/crypt/tea/cifranick.c + * Copyright (C) 2002 IRC-Hispano.org - ESNET - zoltan + * + * 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. + */ + +/* + * Programa para generar las claves cifradas de nicks + * para introducirlos en la tabla 'n' del ircd. + * + * -- zoltan + */ + + +#include <stdio.h> +#include <string.h> +#ifdef _WIN32 +# include <winsock.h> +#else +# include <netinet/in.h> +#endif + + +#define NUMNICKLOG 6 +#define NICKLEN 9 +#define NUMNICKBASE 64 /* (2 << NUMNICKLOG) */ +#define NUMNICKMASK 63 /* (NUMNICKBASE-1) */ + +static const char convert2y[] = { + 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P', + 'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f', + 'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v', + 'w','x','y','z','0','1','2','3','4','5','6','7','8','9','[',']' +}; + +static const unsigned int convert2n[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 52,53,54,55,56,57,58,59,60,61, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14, + 15,16,17,18,19,20,21,22,23,24,25,62, 0,63, 0, 0, + 0,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40, + 41,42,43,44,45,46,47,48,49,50,51, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +unsigned int base64toint(const char *s) +{ + unsigned int i = convert2n[(unsigned char)*s++]; + while (*s) + { + i <<= NUMNICKLOG; + i += convert2n[(unsigned char)*s++]; + } + return i; +} + +const char *inttobase64(char *buf, unsigned int v, unsigned int count) +{ + buf[count] = '\0'; + while (count > 0) + { + buf[--count] = convert2y[(v & NUMNICKMASK)]; + v >>= NUMNICKLOG; + } + return buf; +} + +/* + * La siguiente tabla es utilizada por la macro toLower, + * esta tabla esta extraida del archivo common.c del ircd. + * + * --Daijo + */ +const char NTL_tolower_tab[] = { + /* x00-x07 */ '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', + /* x08-x0f */ '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', + /* x10-x17 */ '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', + /* x18-x1f */ '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', + /* ' '-x27 */ ' ', '!', '"', '#', '$', '%', '&', '\x27', + /* '('-'/' */ '(', ')', '*', '+', ',', '-', '.', '/', + /* '0'-'7' */ '0', '1', '2', '3', '4', '5', '6', '7', + /* '8'-'?' */ '8', '9', ':', ';', '<', '=', '>', '?', + /* '@'-'G' */ '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', + /* 'H'-'O' */ 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', + /* 'P'-'W' */ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', + /* 'X'-'_' */ 'x', 'y', 'z', '{', '|', '}', '~', '_', + /* '`'-'g' */ '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', + /* 'h'-'o' */ 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', + /* 'p'-'w' */ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', + /* 'x'-x7f */ 'x', 'y', 'z', '{', '|', '}', '~', '\x7f' +}; +#define toLower(c) (NTL_tolower_tab[(c)]) + +/* + * TEA (cifrado) + * + * Cifra 64 bits de datos, usando clave de 64 bits (los 64 bits superiores son cero) + * Se cifra v[0]^x[0], v[1]^x[1], para poder hacer CBC facilmente. + * + */ +void tea(unsigned int v[], unsigned int k[], unsigned int x[]) +{ + unsigned int y = v[0] ^ x[0], z = v[1] ^ x[1], sum = 0, delta = 0x9E3779B9; + unsigned int a = k[0], b = k[1], n = 32; + unsigned int c = 0, d = 0; + + while (n-- > 0) + { + sum += delta; + y += (z << 4) + a ^ z + sum ^ (z >> 5) + b; + z += (y << 4) + c ^ y + sum ^ (y >> 5) + d; + } + + x[0] = y; + x[1] = z; +} + + +int main(int argc, char *argv[]) +{ + + unsigned int v[2], k[2], x[2]; + int cont = (NICKLEN + 8) / 8; + char tmpnick[8 * ((NICKLEN + 8) / 8) + 1]; + char tmppass[12 + 1]; + unsigned int *p = (unsigned int *)tmpnick; /* int == 32 bits */ + + char nick[NICKLEN + 1]; /* Nick normalizado */ + char clave[12 + 1]; /* Clave encriptada */ + int i = 0; + + + if (argc != 3) + { + printf("Uso: cifranick nick password\n"); + return 1; + } + + strcpy(nick, argv[1]); + nick[NICKLEN] = '\0'; + + + /* Normalizar nick */ + while (nick[i] != 0) + { + nick[i] = toLower(nick[i]); + i++; + } + + memset(tmpnick, 0, sizeof(tmpnick)); + strncpy(tmpnick, nick ,sizeof(tmpnick) - 1); + + memset(tmppass, 0, sizeof(tmppass)); + strncpy(tmppass, argv[2], sizeof(tmppass) - 1); + + /* relleno -> 123456789012 */ + strncat(tmppass, "AAAAAAAAAAAA", sizeof(tmppass) - strlen(tmppass) -1); + + x[0] = x[1] = 0; + + k[1] = base64toint(tmppass + 6); + tmppass[6] = '\0'; + k[0] = base64toint(tmppass); + + while(cont--) + { + v[0] = ntohl(*p++); /* 32 bits */ + v[1] = ntohl(*p++); /* 32 bits */ + tea(v, k, x); + } + + inttobase64(clave, x[0], 6); + inttobase64(clave + 6, x[1], 6); + + printf("Clave cifrada para %s es %s\n", nick, clave); + + return 0; + +} ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2003-01-18 23:43:02
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-18 23:43:00 UTC Added files: tools/Bounce/Bounce.cpp tools/Bounce/Bounce.h tools/Bounce/bounce.conf tools/Bounce/build tools/linesync/linesync.conf tools/linesync/linesync.sh Log message: Nuevos utilidades en tools/ ---------------------- diff included ---------------------- Index: ircdh/tools/Bounce/Bounce.cpp diff -u /dev/null ircdh/tools/Bounce/Bounce.cpp:1.1 --- /dev/null Sat Jan 18 15:43:00 2003 +++ ircdh/tools/Bounce/Bounce.cpp Sat Jan 18 15:42:50 2003 @@ -0,0 +1,504 @@ +/* + * IRC - Internet Relay Chat, tools/Bouncer/Bouncer.cpp + * Copyright (C) 1990 Jarkko Oikarinen and + * University of Oulu, Computing Center + * + * See file AUTHORS in IRC package for additional names of + * the programmers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 1, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * Port Bouncer. + * + * This tool is designed to set up a number of local listening ports, and + * then forward any data recived on those ports, to another host/port combo. + * Each listening port can bounce to a different host/port defined in the + * config file. --Gte + * + * $Id: Bounce.cpp,v 1.1 2003/01/18 23:42:50 zolty Exp $ + * + */ + +#include "Bounce.h" + +int main() { + Bounce* application = new Bounce(); + + /* + * Ignore SIGPIPE. + */ + + struct sigaction act; + act.sa_handler = SIG_IGN; + act.sa_flags = 0; + sigemptyset(&act.sa_mask); + sigaction(SIGPIPE, &act, 0); + +#ifndef DEBUG + /* + * If we aren't debugging, we might as well + * detach from the console. + */ + + pid_t forkResult = fork() ; + if(forkResult < 0) + { + printf("Unable to fork new process.\n"); + return -1 ; + } + else if(forkResult != 0) + { + printf("Successfully Forked, New process ID is %i.\n", forkResult); + return 0; + } +#endif + + /* + * Create new application object, bind listeners and begin + * polling them. + */ + application->bindListeners(); + + while (1) { + application->checkSockets(); + } +} + +/* + **************************************** + * * + * Bounce class implementation. * + * * + **************************************** + */ + +void Bounce::bindListeners() { +/* + * bindListeners. + * Inputs: Nothing. + * Outputs: Nothing. + * Process: 1. Reads the config file, and.. + * 2. Creates a new listener for each 'P' line found. + * + */ + + FILE* configFd; + char tempBuf[256]; + int localPort = 0; + int remotePort = 0; + char* remoteServer; + char* vHost; + + /* + * Open config File. + */ + + if(!(configFd = fopen("bounce.conf", "r"))) + { + printf("Error, unable to open config file!\n"); + exit(0); + } + + while (fgets(tempBuf, 256, configFd) != NULL) { + if((tempBuf[0] != '#') && (tempBuf[0] != '\r')) { + switch(tempBuf[0]) + { + case 'P': { /* Add new port listener */ + strtok(tempBuf, ":"); + vHost = strtok(NULL, ":"); + localPort = atoi(strtok(NULL, ":")); + remoteServer = strtok(NULL, ":"); + remotePort = atoi(strtok(NULL, ":")); + + Listener* newListener = new Listener(); + strcpy(newListener->myVhost, vHost); + strcpy(newListener->remoteServer, remoteServer); + newListener->remotePort = remotePort; + newListener->localPort = localPort; +#ifdef DEBUG + printf("Adding new Listener: Local: %s:%i, Remote: %s:%i\n", vHost, localPort, remoteServer, remotePort); +#endif + + newListener->beginListening(); + listenerList.insert(listenerList.begin(), newListener); + break; + } + } + } + } +} + +void Bounce::checkSockets() { +/* + * checkSockets. + * Inputs: Nothing. + * Outputs: Nothing. + * Process: 1. Builds up a FD_SET of all sockets we wish to check. + * (Including all listeners & all open connections). + * 2. SELECT(2) the set, and forward/accept as needed. + * + */ + typedef std::list<Listener*> listenerContainer; + typedef listenerContainer::iterator listIter; + + typedef std::list<Connection*> connectionContainer; + typedef connectionContainer::iterator connIter; + + struct timeval tv; + fd_set readfds; + tv.tv_sec = 0; + tv.tv_usec = 1000; + int tempFd = 0; + int tempFd2 = 0; + int highestFd = 0; + int delCheck = 0; + char* tempBuf; + + FD_ZERO(&readfds); + + /* + * Add all Listeners to the set. + */ + + listIter a = listenerList.begin(); + while(a != listenerList.end()) + { + tempFd = (*a)->fd; + FD_SET(tempFd, &readfds); + if (highestFd < tempFd) highestFd = tempFd; + a++; + } + + /* + * Add Local & Remote connections from each + * connection object to the set. + */ + + connIter b = connectionsList.begin(); + while(b != connectionsList.end()) + { + tempFd = (*b)->localSocket->fd; + tempFd2 = (*b)->remoteSocket->fd; + FD_SET(tempFd, &readfds); + if (highestFd < tempFd) highestFd = tempFd; + FD_SET(tempFd2, &readfds); + if (highestFd < tempFd2) highestFd = tempFd2; + b++; + } + + select(highestFd+1, &readfds, NULL, NULL, &tv); + + /* + * Check all connections for readability. + * First check Local FD's. + * If the connection is closed on either side, + * shutdown both sockets, and clean up. + * Otherwise, send the data from local->remote, or + * remote->local. + */ + + b = connectionsList.begin(); + while(b != connectionsList.end()) + { + tempFd = (*b)->localSocket->fd; + + if (FD_ISSET(tempFd, &readfds)) + { + tempBuf = (*b)->localSocket->read(); + if ((tempBuf[0] == 0)) // Connection closed. + { + close((*b)->localSocket->fd); + close((*b)->remoteSocket->fd); +#ifdef DEBUG + printf("Closing FD: %i\n", (*b)->localSocket->fd); + printf("Closing FD: %i\n", (*b)->remoteSocket->fd); +#endif + delete(*b); + delCheck = 1; + b = connectionsList.erase(b); + } else { + (*b)->remoteSocket->write(tempBuf, (*b)->localSocket->lastReadSize); + } + } + + if (!delCheck) b++; + delCheck = 0; + } + + /* + * Now check Remote FD's.. + */ + b = connectionsList.begin(); + while(b != connectionsList.end()) + { + tempFd = (*b)->remoteSocket->fd; + if (FD_ISSET(tempFd, &readfds)) + { + tempBuf = (*b)->remoteSocket->read(); + if ((tempBuf[0] == 0)) // Connection closed. + { + close((*b)->localSocket->fd); + close((*b)->remoteSocket->fd); +#ifdef DEBUG + printf("Closing FD: %i\n", (*b)->localSocket->fd); + printf("Closing FD: %i\n", (*b)->remoteSocket->fd); +#endif + delete(*b); + delCheck = 1; + b = connectionsList.erase(b); + } else { + (*b)->localSocket->write(tempBuf, (*b)->remoteSocket->lastReadSize); + } + } + if (!delCheck) b++; + delCheck = 0; + } + + /* + * Check all listeners for new connections. + */ + + a = listenerList.begin(); + while(a != listenerList.end()) + { + tempFd = (*a)->fd; + if (FD_ISSET(tempFd, &readfds)) + { + recieveNewConnection(*a); + } + a++; + } + +} + +void Bounce::recieveNewConnection(Listener* listener) { +/* + * recieveNewConnection. + * Inputs: A Listener Object. + * Outputs: Nothing. + * Process: 1. Recieves a new connection on a local port, + * and creates a connection object for it. + * 2. Accepts the incomming connection. + * 3. Creates a new Socket object for the remote + * end of the connection. + * 4. Connects up the remote Socket. + * 5. Adds the new Connection object to the + * connections list. + * + */ + + Connection* newConnection = new Connection(); + newConnection->localSocket = listener->handleAccept(); + + Socket* remoteSocket = new Socket(); + newConnection->remoteSocket = remoteSocket; + if(remoteSocket->connectTo(listener->remoteServer, listener->remotePort)) { + connectionsList.insert(connectionsList.begin(), newConnection); + } else { +#ifdef DEBUG + newConnection->localSocket->write("Unable to connect to remote host.\n"); +#endif + close(newConnection->localSocket->fd); + delete(newConnection); + delete(remoteSocket); + } +} + + +/* + **************************************** + * * + * Listener class implementation. * + * * + **************************************** + */ + + +Socket* Listener::handleAccept() { +/* + * handleAccept. + * Inputs: Nothing. + * Outputs: A Socket Object. + * Process: 1. Accept's an incomming connection, + * and returns a new socket object. + */ + + int new_fd = 0; + int sin_size = sizeof(struct sockaddr_in); + + Socket* newSocket = new Socket(); + new_fd = accept(fd, (struct sockaddr*)&newSocket->address, (socklen_t*)&sin_size); + newSocket->fd = new_fd; + return newSocket; +} + +void Listener::beginListening() { +/* + * beginListening. + * Inputs: Nothing. + * Outputs: Nothing. + * Process: 1. Binds the local ports for all the + * Listener objects. + * + */ + + struct sockaddr_in my_addr; + int bindRes; + int optval; + optval = 1; + + fd = socket(AF_INET, SOCK_STREAM, 0); /* Check for no FD's left?! */ + + my_addr.sin_family = AF_INET; + my_addr.sin_port = htons(localPort); + my_addr.sin_addr.s_addr = inet_addr(myVhost); + bzero(&(my_addr.sin_zero), 8); + + setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)); + + bindRes = bind(fd, (struct sockaddr *)&my_addr, sizeof(struct sockaddr)); + if(bindRes == 0) + { + listen(fd, 10); + } else { + /* + * If we can't bind a listening port, we might aswell drop out. + */ + printf("Unable to bind to %s:%i!\n", myVhost, localPort); + exit(0); + } +} + +/* + **************************************** + * * + * Socket class implementation. * + * * + **************************************** + */ + + +Socket::Socket() { +/* + * Socket Constructor. + * Inputs: Nothing. + * Outputs: Nothing. + * Process: Initialises member variables. + * + */ + + fd = -1; + lastReadSize = 0; +} + +int Socket::write(char *message, int len) { +/* + * write. + * Inputs: Message string, and lenght. + * Outputs: Amount written, or 0 on error. + * Process: 1. Writes out 'len' amount of 'message'. + * to this socket. + * + */ + + if (fd == -1) return 0; + + int amount = ::write(fd, message, len); +#ifdef DEBUG + printf("Wrote %i Bytes.\n", amount); +#endif + return amount; +} + +int Socket::write(char *message) { +/* + * write(2). + * Inputs: Message string. + * Outputs: Amount writte, or 0 on error. + * Process: Writes out the whole of 'message'. + * + */ + + if (fd == -1) return 0; + + int amount = ::write(fd, message, strlen(message)); +#ifdef DEBUG + printf("Wrote %i Bytes.\n", amount); +#endif + return amount; +} + + +int Socket::connectTo(char *hostname, unsigned short portnum) { +/* + * connectTo. + * Inputs: Hostname and port. + * Outputs: +ve on success, 0 on failure. + * Process: 1. Connects this socket to remote 'hostname' on + * port 'port'. + * + */ + + struct hostent *hp; + + if ((hp = gethostbyname(hostname)) == NULL) { + return 0; + } + + memset(&address,0,sizeof(address)); + memcpy((char *)&address.sin_addr,hp->h_addr,hp->h_length); + address.sin_family= hp->h_addrtype; + address.sin_port= htons((u_short)portnum); + + if ((fd = socket(hp->h_addrtype,SOCK_STREAM,0)) < 0) + return 0; + + if (connect(fd, (struct sockaddr*)&address, sizeof(address)) < 0) { + close(fd); + fd = -1; + return 0; + } + return(1); +} + +char* Socket::read() { +/* + * read. + * Inputs: Nothing. + * Outputs: char* to static buffer containing data. + * Process: 1. Reads as much as possible from this socket, up to + * 4k. + * + */ + + int amountRead = 0; + static char buffer[4096]; + + amountRead = ::read(fd, &buffer, 4096); + + if ((amountRead == -1)) buffer[0] = '\0'; + buffer[amountRead] = '\0'; + +#ifdef DEBUG + printf("Read %i Bytes.\n", amountRead); +#endif + + /* + * Record this just incase we're dealing with binary data with 0's in it. + */ + lastReadSize = amountRead; + return (char *)&buffer; +} + Index: ircdh/tools/Bounce/Bounce.h diff -u /dev/null ircdh/tools/Bounce/Bounce.h:1.1 --- /dev/null Sat Jan 18 15:43:00 2003 +++ ircdh/tools/Bounce/Bounce.h Sat Jan 18 15:42:50 2003 @@ -0,0 +1,117 @@ +/* + * IRC - Internet Relay Chat, tools/Bouncer/Bouncer.h + * Copyright (C) 1990 Jarkko Oikarinen and + * University of Oulu, Computing Center + * + * See file AUTHORS in IRC package for additional names of + * the programmers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 1, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * $Id: Bounce.h,v 1.1 2003/01/18 23:42:50 zolty Exp $ + * + */ + +#include <sys/types.h> +#include <sys/time.h> +#include <sys/wait.h> +#include <sys/socket.h> +#include <sys/ioctl.h> +#include <arpa/inet.h> +#include <netinet/in.h> +#include <netdb.h> +#include <ctype.h> +#include <time.h> +#include <stdio.h> +#include <unistd.h> +#include <stdarg.h> +#include <signal.h> +#include <fcntl.h> +#include <stdio.h> +#include <stdlib.h> +#include <errno.h> +#include <string.h> +#include <netdb.h> +#include <ctype.h> +#include <time.h> +#include <list> +using std::list; + +#define DEBUG + +/* + * "Bounce" Class. + */ + +class Listener; +class Connection; +class Bounce +{ +public: + list<Listener*> listenerList; // List of 'Listeners'. + list<Connection*> connectionsList; // List of 'Connections'. + + void bindListeners(); // Binds Listening Ports. + void checkSockets(); // Polls all sockets. + void recieveNewConnection(Listener*); // Accepts connections. +}; + +/* + * "Socket" Class. + */ + +class Socket +{ +public: + int fd; // File descriptor. + int lastReadSize; // Size of last read buffer. + struct sockaddr_in address; // Socket addr_in struct. + int connectTo(char*, unsigned short); // Connects the socket. + int write(char*, int); // Writes 'int' bytes from message. + int write(char*); // Writes strlen(message). + char* read(); // Reads as much as possible into a 4k buffer. + Socket(); // Constructor. +}; + +/* + * "Listener" Class. + */ + +class Bounce; +class Listener +{ +public: + int fd; // File descriptor. + int remotePort; // Remote port from config. + int localPort; // Local port for binding. + char myVhost[15]; // Vhost to bind locally. + char remoteServer[15]; // Remote server to connect to. + + void beginListening(); // Bind listening ports. + Socket* handleAccept(); // Accept a new connection. +}; + +/* + * "Connection" Class. + * Simply a container for a local/remote Socket pair. + */ + +class Connection +{ +public: + Socket* localSocket; + Socket* remoteSocket; +}; + Index: ircdh/tools/Bounce/bounce.conf diff -u /dev/null ircdh/tools/Bounce/bounce.conf:1.1 --- /dev/null Sat Jan 18 15:43:00 2003 +++ ircdh/tools/Bounce/bounce.conf Sat Jan 18 15:42:50 2003 @@ -0,0 +1,6 @@ +# Format: P:<Local vhost>:<Local Port>:<Remote Address>:<Remote Port> +# IP's only for now :) + +P:192.168.10.5:2000:192.168.10.1:80 +P:192.168.10.5:3000:4.33.94.3:80 +P:192.168.10.5:4000:209.207.224.42:80 Index: ircdh/tools/Bounce/build diff -u /dev/null ircdh/tools/Bounce/build:1.1 --- /dev/null Sat Jan 18 15:43:00 2003 +++ ircdh/tools/Bounce/build Sat Jan 18 15:42:50 2003 @@ -0,0 +1 @@ +g++ -O3 -ggdb -Wall -Wmissing-declarations -o Bounce Bounce.cpp Index: ircdh/tools/linesync/linesync.conf diff -u /dev/null ircdh/tools/linesync/linesync.conf:1.1 --- /dev/null Sat Jan 18 15:43:00 2003 +++ ircdh/tools/linesync/linesync.conf Sat Jan 18 15:42:50 2003 @@ -0,0 +1,15 @@ + +# Configuration for linesync.sh +# +# - This file must be placed in the same directory as ircd.conf +# - Note that all URL's *MUST* have a trailing / +# - Since we are using wget, you could use ftp:// URL's as well if you want to + +# Where do we get our ircd.conf update? +LINE_SERVER="http://some.domain/" + +# Check servers, as many as you like, seperated by spaces +LINE_CHECK="http://host1.other.domain/lsync/ http://host-19.domain-x.net/ http://www.domain.what" + +# What .conf lines are allowed in the downloaded updates? +ALLOWED_LINES="kKQU" Index: ircdh/tools/linesync/linesync.sh diff -u /dev/null ircdh/tools/linesync/linesync.sh:1.1 --- /dev/null Sat Jan 18 15:43:00 2003 +++ ircdh/tools/linesync/linesync.sh Sat Jan 18 15:42:50 2003 @@ -0,0 +1,222 @@ +#!/bin/sh +# linesync.sh, Copyright (c) 2002 Arjen Wolfs +# 20020604, se...@un... +# +# The code contained is in this file is licenced under the terms +# and conditions as specified in the GNU General Public License. +# +# linesync.sh - centralized ircd.conf updates. +# The purpose of this little shell script is to allow a section of an ircd.conf to be +# updated from a central location. Hence it is intended to facilitate the automated +# distribution of k, K, Q, and U lines; or any other .conf lines you may wish to keep +# synchronized accross all servers on a network. +# +# This script will download a file called linesync from a specified web server (see +# below for configuration), and calculate an md5sum from it. It will then download +# a file called linesync.sum from a configurable number of other web servers and +# compare the contents of these files against the checksum calculated. If any of the +# downloaded checksums mismatch, the program will abort. This provides security to +# the centralized update mechanism - in order for it to be compromised, multiple +# web servers would have to compromised. +# +# If all checksums match, the script inspects the .conf lines contained within the +# downloaded file. If any .conf lines are found that are not specifically allowed, +# the program will abort. This will prevent malicious/dangerous .conf lines (such as +# O: or C: lines) from being inserted into ircd.conf. +# +# If all the checks mentioned above are passed, the script checks ircd.conf for a section +# that begins with "# BEGIN LINESYNC", and ends with "# END LINESYNC". The section contained +# between these two comments is the section maintained by this program. If these lines are not +# found in the ircd.conf, they will be appended to it. +# Next, the script will build a new ircd.conf by removing all lines present between the two +# commented lines mentioned above, and replace them with the contents of the file downloaded. +# +# Once this has been completed, ircd.conf is backed up and replaced with the newly built version, +# and ircd will be rehashed. +# +# Configuration: This script requires two parameters - the full path to your ircd.conf, and the +# full path to your ircd.pid. It will look for a configuration file called linesync.conf in the +# same directory as ircd.conf. See the included sample linesync.conf for information on how to +# set it up. Obviously, you will need to have web server(s) to use for the distribution of your +# .conf update and checksums. This script requires the presence of wget and md5sum, and various +# other programs that should be present by default on any Unix system. +# +# This program should be run from crontab, i.e something like: +# 0 0 * * * /home/irc/bin/linesync.sh /home/irc/lib/ircd.conf /home/irc/lib/ircd.pid +# +# This program has been tested on and works on FreeBSD, Solaris, and Linux. +# md5sum is included in GNU textutils. +# +# Good Luck! +# Arjen Wolfs (se...@un...), June 9 2002. +# + +# This checks for the presence of an executable file in $PATH +locate_program() { + if [ ! -x "`which $1 2>&1`" ]; then + echo "You don't seem to have $1. Sorry." + exit 1 + fi +} + +# This checks for the presence of any file +check_file() { + if [ ! -f "$1" ]; then + echo "There doesn't appear to be a $1. Sorry." + exit 1 + fi +} + +# Try to find programs we will need +locate_program wget && locate_program egrep + +# try to find GNU awk +awk_cmd=`which gawk` +if [ $? -ne 0 ]; then + awk_cmd="" +fi + +# try to find an appropriate md5 program +# BSD md5 capability courtesy of spale +md5_cmd=`which md5sum` +if [ -z "$md5_cmd" ]; then + md5_cmd=`which md5` + if [ -z "$md5_cmd" ]; then + echo "No MD5 capable programs found (I looked for md5sum and md5)." + exit + else + md5_cmd="$md5_cmd -q" + fi +fi + +if [ -z "$awk_cmd" ]; then + locate_program awk + is_gawk=`echo | awk --version | head -1 | egrep '^GNU.+$'` + if [ -z "$is_gawk" ]; then + echo "Your version of awk is not GNU awk. Sorry." + exit 1 + fi + awk_cmd="awk" +fi + +# Check for required command line parameters +if [ -z "$1" -o -z "$2" ]; then + echo "Usage: $0 <conf_path> <pid_path>" + echo " <conf_path> Full path to ircd.conf (/home/irc/lib/ircd.conf)" + echo " <pid_path> Full path to ircd.pid (/home/irc/lib/ircd.pid)" + exit 1 +fi + +# check and set up stuff +cpath=$1 +ppath=$2 +check_file $cpath +dpath=`dirname $cpath` +lpath="$dpath/linesync.conf" +check_file $lpath +save_dir=$PWD; cd $dpath +tpath=$PWD; cd $save_dir +tmp_path="$dpath/tmp" +mkdir $tmp_path > /dev/null 2>&1 + +# load and check configuration +. $lpath +if [ -z "$LINE_SERVER" -o -z "$LINE_CHECK" -o -z "$ALLOWED_LINES" ]; then + echo "Please setup $lpath correctly." + exit 1 +fi + +# Not all versions of date support %s, work around it +TS=`date +%Y%m%d%H%M%S` +TMPFILE="$tmp_path/linesync.$TS" +LSFILE="$LINE_SERVER""linesync" +# Attempt to download our .conf update +wget --cache=off --quiet --output-document=$TMPFILE $LSFILE > /dev/null 2>&1 +if [ ! -s "$TMPFILE" ]; then + echo "Unable to retrieve $LSFILE. Sorry." + rm $TMPFILE > /dev/null 2>&1 + exit 1 +fi + +# Check wether the file contains any disallowed .conf lines +bad_lines=`egrep '^[^'$ALLOWED_LINES'#]+' $TMPFILE` +if [ ! -z "$bad_lines" ]; then + echo "The file downloaded in $TMPFILE contains the following disallowed line(s):" + echo $bad_lines + exit 1 +fi + +# check our ircd.conf +ircd_setup=`egrep '^# (BEGIN|END) LINESYNC$' $cpath|wc -l` +if [ $ircd_setup != 2 ]; then + cp $cpath $cpath.orig + echo "Performing initial merge on $cpath, original file saved as $cpath.orig." + + echo "# Do NOT remove the following line, linesync.sh depends on it!" >> $cpath + echo "# BEGIN LINESYNC" >> $cpath + echo "# END LINESYNC" >> $cpath + echo "# Do not remove the previous line, linesync.sh depends on it!" >> $cpath + + # Do an initial merge to remove duplicates + inpath="$tmp_path/linesync.tmp.$TS" + $awk_cmd ' + { + if (!loaded_template) { + command="cat " tempfile; tlines=0; + while ((command | getline avar) > 0) { template[tlines]=avar; tlines++ } + close(command) + loaded_template++ + } + dup_line=0 + for (i=0; i<tlines; i++) { + if (tolower($0)==tolower(template[i])) { dup_line++; break } + } + if (!dup_line) print $0 + } ' tempfile=$TMPFILE < $cpath > $inpath +else + inpath=$cpath +fi + +# Get the checksum +CKSUM=`$md5_cmd $TMPFILE|cut -d' ' -f1` + +check_file="$tmp_path/linesync.sum.$TS" +for ck_server in $LINE_CHECK; do + sumfile="$ck_server""linesync.sum" + wget --cache=off --quiet --output-document=$check_file $sumfile > /dev/null 2>&1 + if [ ! -s "$check_file" ]; then + echo "Unable to retrieve checksum from $sumfile" + exit 1 + fi + if [ "$CKSUM" != "`cat $check_file`" ]; then + echo "Checksum retrieved from $sumfile does not match!" + exit 1 + fi + rm -f $check_file +done +# It all checks out, proceed... + +# Replace the marked block in ircd.conf with the new version + +$awk_cmd ' +$0=="# BEGIN LINESYNC" { chop++; print; next } +$0=="# END LINESYNC" { + command="cat " syncfile + while ((command | getline avar) > 0) { print avar } + close(command) + chop-- +} +{ if (!chop) print $0 } +' syncfile=$TMPFILE < $inpath > $tmp_path/linesync.new.$TS + +# Back up the current ircd.conf and replace it with the new one +cp $cpath $dpath/ircd.conf.bk +cp $tmp_path/linesync.new.$TS $cpath + +# Rehash ircd (without caring wether or not it succeeds) +kill -HUP `cat $ppath 2>/dev/null` > /dev/null 2>&1 + +# (Try to) clean up +rm -rf $tmp_path > /dev/null 2>&1 + +# That's it... ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2003-01-18 23:45:25
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-18 23:45:24 UTC Added files: doc/en/Authors doc/en/fda.txt doc/en/features.txt doc/en/freebsd.txt doc/en/iauth.txt doc/en/irc.1 doc/en/ircd.8 doc/en/iso-time.html doc/en/linux-poll.patch doc/en/p10.html doc/en/readme.asll doc/en/readme.chroot doc/en/readme.crules doc/en/readme.cvs doc/en/readme.features doc/en/readme.gline doc/en/readme.indent doc/en/readme.jupe doc/en/readme.log doc/en/readme.who doc/en/readme.www doc/en/rfc1413.txt doc/en/snomask.html doc/en/strings.txt Log message: Documentacion en ingles ---------------------- diff included ---------------------- Index: ircdh/doc/en/Authors diff -u /dev/null ircdh/doc/en/Authors:1.1 --- /dev/null Sat Jan 18 15:45:24 2003 +++ ircdh/doc/en/Authors Sat Jan 18 15:45:13 2003 @@ -0,0 +1,215 @@ +/************************************************************************ + * 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 <jt...@to...>. +IRC was originally written in University of Oulu, Computing Center. +Jan 1991 - IRC 2.6 jt...@to... + - Multiple Channels and protocol changes + +Contributions were made by a cast of dozens, including the following: + +Markku Jarvinen <mt...@tu...>: Emacs-like editing facility for the client + +Kimmo Suominen <ki...@ka...>: HP-UX port + +Jeff Trim <jt...@or...>: enhancements and advice + +Vijay Subramaniam <vi...@ll...>: advice and ruthless publicity + +Karl Kleinpaste <ka...@ci...>: user's manual + +Greg Lindahl <gl...@vi...>: AUTOMATON code, the Wumpus GM automaton, +myriad bug fixes + +Bill Wisner <wi...@ha...>: numerous bug fixes and code +enhancements + +Tom Davis <con...@ze...> and Tim Russell <ru...@ze...>: +VMS modifications + +Markku Savela <ms...@te...>: advice, support, and being the +incentive to do some of our *own* coding. :) + +Tom Hopkins <ho...@bu...>: bug fixes, quarantine lines, +consolidation of various patches. + +Christopher Davis <ck...@cs...>: EFnet/Anet gateway coding, +many automata ;), documentation fixing. + +Helen Rose <hr...@cs...>: documentation updating, and fixing. + +Tom Hinds <ro...@bu...>: emacs client updating. + +Tim Miller <ce...@bu...>: various server and client-breaking +features. + +Darren Reed <av...@co...>: various bug fixes and enhancements. +Introduced nickname and channelname hash tables into the server. + +The version 2.2 release was coordinated by Mike Bolotski +<mi...@sa...>. + +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 <ph...@co...> +Chuck Kane <ck...@ec...> +Matt Lyle <ma...@oc...> +Vesa Ruokonen <ruo...@lu...> + +Markku Savela <Mar...@vt...> / 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 <ch...@ea...> / April 1990 +Rewrote the Makefiles, restructuring of source tree. Added libIrcd.a to +the Makefile macros, numerous reformatting of server text messages, and +added mkversion.sh to keep track of compilation statistics. Numerous +bug fixes and enhancements, and co-coordinator of the 2.4 release. + +Jarle Lyngaas (nm...@al...) added Note functions to ircd. + +Armin Gruner <gr...@in...> / 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 <ho...@bu...> / 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 <hu...@uc...> +Bo Adler <ad...@cs...> +Michael Sandrof <ms...@an...> +Jon Solomon <js...@cs...> +Jan Peterson <jl...@ha...> +Nathan Glasser <na...@br...> +Helen Rose <hr...@ef...> +Mike Pelletier <st...@ca...> +Basalat Ali Raja <gw...@ta...> +Eric P. Scott <ep...@to...> +Dan Goodwin <fo...@wp...> +Noah Friedman <fri...@ai...> + + +UNDERNET (1991 - 1999) +-------- + +The Undernet versions (TSpre8, u2.9 and u2.10) are based on ircd-2.8.10 and +contain thousands of hours of work by Carlo Wood <ca...@al...> +(Run on IRC). The number of protocol enhancements, changes and additions +that have been added are too many to summarize. All patches are kept in the +cvs repository at http://coder-com.undernet.org/. Discussions on this +server code are currently on the mailing list cod...@un..., or in +#coder-com on undernet. + +The current maintainer is Bleep. + +Various additions and bugfixes have been contributed by: + +Aaron <agi...@sc...> +Bleep <to...@in...> +CaptJay <ca...@su...> +CapVideo <ma...@pu...> +Chaos <si...@tr...> +Cym <cy...@ac...> +Derrick <di...@se...> +Ensor <dh...@ra...> +flux <cml...@uc...> +Ghostwolf <fo...@tr...> +Gte- <gt...@at...> +Isomer <is...@co...> +Jamey <wo...@du...> +Jarle <ja...@II...> +Kev <kl...@mi...> +Nemesi <co...@ti...> +Niels <ni...@ho...> +Run <ca...@al...> +record <jeg...@cl...> +smg <sm...@lm...> +SeKs <in...@st...> +Simon- <si...@pe...> +Starfox <st...@qu...> +Trio <tr...@b6...> +WildThang <dvm...@an...> +Xorath <vo...@wh...> + +UNDERNET (2000 - 2002) +-------- + +The UnderNet versions (P9, P10 and u2.10.11) are based on ircu2.10.07 +and contain many hours of work by the Coder Committee. +The number of protocol enhancements, changes, and additions +that have been added are way too many to summarize. Discussions on this +server code are currently on the mailing list cod...@un... +or in #coder-com on UnderNet. + +The current maintainer is Isomer. + +Various additions, testings, and bugfixes have been contributed by: + +Bleep <to...@in...> +Gte- <gt...@at...> +Isomer <is...@co...> +Kev <kl...@mi...> +Delete <de...@cy...> +Ghostwolf <fo...@wt...> +Braden <db...@ya...> +net <ne...@as...> +Steven <st...@do...> +OmniDynmc <om...@dy...> +Dianora <db...@db...> +Sengaia <se...@un...> +Cyberdude <Cyb...@un...> +Maniac- <ma...@ce...> +Vampire- <va...@p1...> +mbuna <mb...@bu...> +beware <ste...@to...> +n3tguy <ne...@sp...> +R33D33R <re...@re...> +Math <ma...@ro...> Index: ircdh/doc/en/fda.txt diff -u /dev/null ircdh/doc/en/fda.txt:1.1 --- /dev/null Sat Jan 18 15:45:24 2003 +++ ircdh/doc/en/fda.txt Sat Jan 18 15:45:13 2003 @@ -0,0 +1,151 @@ +fdaman.txt - brief usage information for FDA (Free Debug Allocator) + +Copyright (C) 1998 Thomas Helvey <to...@in...> + +1. Base Functionality +Basic use of the fda tools is as simple as including the header +and source file with your source defining DEBUG and using capitalized +versions of malloc(), calloc(), realloc(), and free(). +The fda allocation functions verify all your arguments and will call +assert() if something is wrong. FDA trashes all allocated memory +in a predictable manner and applies prefix and postfix bounds checking +signatures to every allocation. When a pointer is freed it's validated, +and checked for overflows and underflows. The fda Realloc function +does not allow malloc or free through realloc and forces reallocation +if the required memory is larger than the current allocation. + +In both the DEBUG and non-debug versions of fda, if a memory allocation +fails once, a low memory callback function is called to allow you to +release some memory and allow malloc to succeed, the default version +prints a warning message to stderr. If the low memory callback returns +the allocation is attempted again, if the second allocation fails a +no memory callback function is called to allow you to clean up before +terminating the application, if you allow the no memory callback to +return the results are undefined. (a NULL ptr will be returned from the +allocation call) The default no memory handler prints an error message +to stderr and calls abort(). The DEBUG version will assert if you allow +the no memory function to return. +Both the low memory and no memory callbacks have the signature of: +void handler(void) + +The debug version of fda will not allow you to do the following: +Allocate a zero length chunk of memory. +Free a non-allocated pointer. +Free a pointer twice. +Free a pointer at the wrong offset. +Use realloc to free memory. (realloc(p, 0)) +Use realloc to malloc memory. (realloc(0, s)) +Overwrite the bounds of the memory you allocated. (checked on free) + +The base functions for fda are: +void* malloc(size_t) +void* realloc(void*, size_t) +void* calloc(size_t, size_t) +void free(void*) +char* strdup(const char*) +void set_lowmem_handler(void (*fn)(void)) +void set_nomem_handler(void (*fn)(void)) + +FDA uses a hash table to lookup pointers. The size of the hash table can +be changed at compile time by using -DFDA_HASH_TABLE_SIZE <prime> +where prime is a prime number somewhere around the number of allocations +expected. The default hash table size is 16339 which should be large enough +to hold most medium sized applications. FDA allocates memory for it's +debugging records so if your application uses a lot of memory you +may want to make sure you have enough memory available to use the debug +version. FDA allocates 20 bytes to store each allocation and 20 bytes +to store location information (file and line info). This overhead only +applies if you have DEBUG or _DEBUG defined. + +2. Extended functionality +FDA provides a few handy functions for validating pointers and +checking for overruns before they occur when debugging. +The first function fda_sizeof(ptr) returns the size of the buffer +pointed to by ptr, this allows you to verify that your pointer +is what it says it is. fda_sizeof() will call assert() if the +pointer you pass it is not at the start of an allocation. + +The second function valid_ptr(ptr, size) verifies that ptr lies within +allocated memory and there are at least size bytes available in the buffer. +You can pass valid_ptr() a pointer to any location in allocated memory. +valid_ptr() calls assert if the pointer points outside of allocated memory +or the remaining size is less than the size specified. +valid_ptr() is more efficient if the pointer argument is the value +returned from malloc because it's a simple hash table lookup, a more +exhaustive algorithm is used if it's not found in the hash table. + +FDA extended functions: +size_t fda_sizeof(const void*) +int valid_ptr(const void*, size_t) + +Typical usage for the fda extended functions: +Note: the assert macro compiles to nothing if NDEBUG is defined. +Verify a foo_ptr: +assert(sizeof(struct foo) == fda_sizeof(foo_ptr)); +assert(valid_ptr(foo_ptr, sizeof(struct foo))); +Check for room to write: +assert(valid_ptr(buf, len)); + +3. Leak checking and block validation +FDA has several functions for leak checking, and reference marking. +fda_clear_refs() iterates through all of the allocated blocks of +memory and clears the referenced flag. +fda_set_ref() marks a single allocation(block) as being referenced or +in use by somebody. +fda_assert_refs() iterates through all the allocated blocks of +memory and calls assert() if it finds one that's not referenced. + +Typical usage of the block validation functions: +fda_clear_refs(); /* clear all block references */ + +for each allocation do +fda_set_ref(allocation); /* mark allocation in use */ +done + +fda_assert_refs(); /* this will assert if a leak is found */ + +4. Reporting functions: +FDA has 4 functions for reporting various aspects of allocation +status. +fda_get_byte_count() tells you the current total number of bytes +your application has allocated. (this does not include debugging records) +This will give you an idea of how much memory your application is +using at any given time. + +fda_get_block_count() returns the total count of current allocations. + +fda_enum_locations() calls a user supplied enumeration function with +file, line, count information, this allows you to see your file by +file allocation density. ;) fda_enum_locations() returns the total +number of locations that have memory allocated. + +fda_enum_leaks() calls a user supplied enumeration function with +file, line, size, and ptr for every block not marked as referenced. +One use for fda_enum_leaks() is checking for leaks when your program +exits: +void enum_fn(const char* file, int line, size_t size, void* ptr) +{ + printf("Memory leak: %s: %d - %d bytes at (%p)\n", file, line, size, ptr); +} + +int main(void) +{ + ... +#if defined(DEBUG) + /* check for memory leaks before exiting */ + fda_clear_refs(); + fda_enum_leaks(enum_fn); +#endif + return 0; /* return from main */ +} + +The test file fdatest.c gives examples of usage for most of the functions +available with FDA. + +Please let me know if you encounter any problems with FDA. +So far FDA has been built and tested on linux and Windows NT. +If you find that it works with or without change on other platforms +please let me know so I can make the appropriate changes to the +code and add it to the list of tested platforms. + + Index: ircdh/doc/en/features.txt diff -u /dev/null ircdh/doc/en/features.txt:1.1 --- /dev/null Sat Jan 18 15:45:24 2003 +++ ircdh/doc/en/features.txt Sat Jan 18 15:45:13 2003 @@ -0,0 +1,208 @@ +Undernet server features. +------------------------- + +This document is supposed to list the features that undernet supports and +provides to clients, and which version of ircu this was added. Additional +numeric replies should be added here too. + +Extended Who information: (WHOX) + Version: unknown, but at least 2.10.07+ + + This is described in the file 'readme.who' + +USERIP: + Version: unknown, but at least 2.10.07+ + + This works the same as userhost, but returns the IP instead, useful for + setting a ban on someones IP address instead of their nick. + usage: + USERIP nick[,nick...] + returns: + RPL_USERIP (307) + :server.name 307 target nick[*]=[+|-]user@host... + +RPL_ISUPPORT: + version: 2.10.08+ + + This sends a numeric during client signon that lists various features that + ircu supports. This allows client and script writers to know what features + they can use, and various parameters about the irc server. The numeric + used is '005' to try and maintain some semblance of compatibility with + dalnet which has a similar feature. The 005 numeric may be split across + multiple lines if the length exceeds 512 characters. + + The format is: + :servername 005 target feature1 feature2... :are supported by this server. + :servername 005 target feature200... :are supported by this server. + + features are either a word describing the feature eg: 'SILENCE', or a word + describing the feature and an equals and a list of parameters. + eg: SILENCE=15 (says that we support silence, and we support up to 15 of + them per user), or FOO=12,3 (says we support FOO with parameters 12 and 3) + for example 2.10.08 lists: + + :test.undernet.org 005 test SILENCE=15 WHOX WALLCHOPS USERIP CPRIVMSG + CNOTICE MODES=6 MAXCHANNELS=10 MAXBANS=30 NICKLEN=9 TOPICLEN=160 + KICKLEN=160 + + NOTE: Versions prior to 2.10.08+ use numeric 005 as part of 'MAP', so + 005 should be /not/ be used after the server registration has occured. + (ie: after END_OF_MOTD has arrived). + +MAP: + Version: unknown, but since 2.9.30 at least, updated in 2.10.08 + + /map shows the servers as the server percieves them, who's connected + to who in a pretty display. In version 2.10.08 it also lists the + amount time time it takes a message to get /from/ a server to the local + server - this measures the one way lag only, in 2.10.08 it also lists + the number of clients that are currently on that server. + The lag estimation is very approximate and depends on people changing nick + and joining channels, so the less clients on a server the less reliable the + lag estimation is. + + Map prior to 2.10.08 uses: + RPL_MAP 005 + RPL_MAPMORE 006 + RPL_MAPEND 007 + Map changed in 2.10.08 to allow for ISUPPORT on numeric 005, the new + numerics are: + RPL_MAP 015 + RPL_MAPMORE 016 + RPL_MAPEND 017 + +WALLCHOPS: + Version: unknown, but since 2.10.07 + + WALLCHOPS sends a message to all channel operators (@)'s on a channel. + It does /not/ require you to be op'd (@'d) to do so. This is a feature. + + syntax: + WALLCHOPS #channel :message + or: + NOTICE @#channel :message + + this sends: + :user NOTICE @#channel :message + to clients that are @'d on the channel. + +CPRIVMSG/CNOTICE: + Version: unknown, but since 2.10.07 + + CPRIVMSG/CNOTICE are a way around target limiting in recent undernet + servers. Undernet servers prevent you from sending messages to too many + people at once in an attempt to help cut down the amount of spam that + occurs on the network. Because there are several situations where you want + to send messages to lots of people that are on the same channel as you + (autogreet's and gamebots for example) an 'escape' was made in the form + of CPRIVMSG/CNOTICE. These allow you to send a privmsg/notice to a person + on a common channel if you are op'd (@'d) without incuring a target + penalty. If you see 'Target changed too fast' messages, you should + probably be using these commands. + + Syntax: + CPRIVMSG #channel nick :Message + CNOTICE #channel nick :Message + + Results are the same as for 'PRIVMSG' and 'NOTICE' respectively. + +SILENCE: + Version: unknown, 2.9.32 at least. + + Silence is a server side ignore. You can /silence +hostmask or + /silence +nick, to add someone to your silence list, or use /silence + -hostmask to remove it. /silence will list your 'silence list'. + you can /silence nick, to see someone elses silence list (useful for + helping someone). Silence is preferably used as a last resort as it + tends to use server CPU time. Undernet typically only allows 15 silences + per user. in 2.10.08+ this information is available in the RPL_ISUPPORT + line. + + Syntax: + SILENCE +hostmask + SILENCE +nick + SILENCE -hostmask + SILENCE -nick + SILENCE nick + + reply: + RPL_SILELIST 217 + RPL_ENDOFSILELIST 218 + +User modes: + Version: various + + Undernet supports these additional user modes: + +d: Deaf & Dumb. This user will not get any channel traffic. Used for + bots. + +k: This user cannot be kicked, deop'd or /kill'd. This usermode may only + be set by a server, it may not be set by a user. This is used by + undernet service bots (X/W/UWorld etc) + +g: List channel HACK:'s + +s: Server messages - takes a parameter of which masks to send, see + 'snomask.html' for more details. (2.10.0+) + +LIST: + Version: Unknown + + List now takes various parameters to allow you to quickly and efficiently + find interesting channels. These are: + + >n or <n show channels with less than or greater than 'n' users + respectively + C>n or C<n show channels that have existed for less than or greater than + 'n' minutes. + T>n or C<n show channels that have had their topic changed in less than or + greater than 'n' minutes. + + Additional Numerics: + RPL_LISTHELP 334 + +Additional Topic Numerics: + Version: Since the dawn of time. + + Topic also lists who set it and when they set it. + + Additional Numerics: + RPL_TOPICWHOTIME 333 + + Straight after the topic: + :server.name 333 #channel Isomer 923423442 + where the number is seconds past 00:00 1970-01-01 that the topic was set. + + +INVITE list: + Version: 2.10.08+ + + /invite without any parameters lists which channels you have an outstanding + invite to (ie: an invite to a channel which you haven't joined) + + Additional Numerics: + RPL_INVITELIST 346 + RPL_ENDOFINVITELIST 347 + +NICK change: + Version: Since the dawn of time. + + Undernet prevents you from changing nick on a channel while your banned. + Undernet prevents you changing nicks more than once per 30 seconds, you + get one 'free' nick change if you haven't changed nick recently. + + Additional Numerics: + RPL_BANNICKCHANGE 347 + RPL_NICKTOOFAST 349 + +Target limiting: + Version: Recent 2.10.07ish at least. + + Undernet prevents you from changing 20 targets per 2 minutes. A target + is a 'Nick' or 'channel'. This is to prevent spam. If you message more + than 20 people or join more than 20 channels in two minutes then you'll + start getting 'Target change too fast' and will have to wait before you + can start talking. See CPRIVMSG/CNOTICE above for information on how to + avoid this. + + Additional Numerics: + ERR_TARGETTOOFAST 349 + + Index: ircdh/doc/en/freebsd.txt diff -u /dev/null ircdh/doc/en/freebsd.txt:1.1 --- /dev/null Sat Jan 18 15:45:24 2003 +++ ircdh/doc/en/freebsd.txt Sat Jan 18 15:45:13 2003 @@ -0,0 +1,28 @@ +This document pertains to kernel panics with FreeBSD involving mbufs. + + This is a well documented problem with programs such as ircu, and inn that + involve a lot of clients, the solution is generally to set the option 'NMBCLUSTERS' + to a reasonably higher number the default is 1024, you should first try increasing + this *10 (10240) and continue checking mbuf usage with netstat -m. + + It has been recommended that this be increased as far as *50 (51200) (although more + won't hurt, it uses more memory, so don't go too far overboard) it's been stated + over and over that the default is very low, but then, you're supposed to know how + to configure your OS for what you're doing right? =) + + There is a note in the configuration for this: + + # Note that you will probably want to bump up NMBCLUSTERS a lot to use + options NMBCLUSTERS=1024 + Merely change the 1024 to the number that best suites your system. + + + -poptix po...@po... + + + + + + + + April 17, 2000 Matthew S. Hallacy Index: ircdh/doc/en/iauth.txt diff -u /dev/null ircdh/doc/en/iauth.txt:1.1 --- /dev/null Sat Jan 18 15:45:24 2003 +++ ircdh/doc/en/iauth.txt Sat Jan 18 15:45:13 2003 @@ -0,0 +1,205 @@ +$Id: iauth.txt,v 1.1 2003/01/18 23:45:13 zolty Exp $ + +Patrick Alken <wn...@un...> +01/09/2000 + +Ircd Authentication +==== ============== + +1. Introduction + + This document describes the protocol used for the IAuth server. +IAuth performs authorization checks for all clients that connect +to the ircd server. + +2. Protocol + + Ircd and IAuth communicate through a TCP/IP connection. The +Ircd server will always initiate the connection to the IAuth +server. + +2.1 Server + + When an Ircd server first connects to an IAuth server, it will +send IAuth a string of the form: + + Server <name> + + <name> - Ircd server name + + This is used for identification purposes in case more than one +Ircd server is using an IAuth server. + +2.2 Class + +2.2.1 Class Add + + When an Ircd server first connects to an IAuth server, it will +send IAuth it's class list in the form: + + Class Add <number> <maxlinks> + + <number> - Class number + <maxlinks> - Maximum number of clients in this class + + This is needed for the I-line check, in case the number of +clients allowed to use a certain I-line is limited. + +2.2.2 Class Clear + + Upon a rehash, the Ircd server will send I-line a string of the +form: + + Class Clear [number] + + [number] - optional number + + In case the Ircd server's Y: lines were changed prior to the +rehash, IAuth will clear it's old class list to make room for +the new one Ircd will send after the rehash (via Class Add). + +2.3 DoAuth + + When a client connects to the Ircd server, Ircd will send +a string of the form: + + DoAuth <id> <nickname> <username> <hostname> <IP> [password] + + <id> - A unique ID used to identify each client + <nickname> - Client's nickname + <username> - Client's username + <hostname> - Client's hostname + <IP> - Client's IP Address in unsigned int format + [password] - *Optional* Client password + + The DoAuth directive will initiate an authorization check on +the client. The following checks are performed. + +2.3.1 I-line Check + + This check will ensure that the client matches a valid I-line +(as given in iauth.conf). If the client fails this check, he/she +will not be allowed to remain connected to the Ircd server. +The actual reason they failed authorization will be told to them. +(See the BadAuth directive). + See the section on iauth.conf for more information on I-lines. + +2.3.2 Server Ban Check + + K-lines are server-wide bans for individual (or groups of) clients. +If a client matches a K-line, they will be disconnected from the +Ircd server with the reason they are banned. The only exception to +this is if they have an exemption flag in their I-line. See the +iauth.conf section for more details on this. + +2.3.3 Quarantine Check + + Q-lines specify nicknames which are not allowed to be used on +the Ircd server. If a client's nickname matches that of a Q-lined +nickname, they will be informed they have selected a quarantined +nickname and be disconnected from the server. + +2.4 DoneAuth + + If a client passes all of the above checks, they will pass +authorization and be allowed to continue their connection to +the Ircd server. IAuth will send a string back to the Ircd +server of the form: + + DoneAuth <id> <username> <hostname> <class> + + <id> - Client's unique ID + <username> - Client's username + <hostname> - Client's hostname (may be different from original + if they are allowed a spoof) + <class> - Client's I-line class + + This will inform the Ircd server that the specified client is +authorized to connect. + +2.5 BadAuth + + If a client fails any of the above checks, IAuth will send a +string to the Ircd server of the form: + + BadAuth <id> :<reason> + + <id> - Client's unique ID + <reason> - Reason client failed authorization + + The Ircd server will then send an error back to the client +containing <reason> and disconnect them. + +3. Configuration file (iauth.conf) + + IAuth reads a configuration file upon startup. The name of the +file is located in setup.h, under #define CONFFILE. The format +of this file is identical to that of ircd.conf, except it supports +less directives. + +3.1 I-lines (Server Access) + + I-lines allow clients access to the Ircd server and are of the +form: + + I:<spoofhost>:[password]:[flags][user@]<host>::<class> + + <spoofhost> - Hostname to give client if SPOOF_FREEFORM + is defined. + [password] - *Optional* password that clients will + be required to supply to gain access. + [flags] - *Optional* flags (see below) + [user] - *Optional* username (if not given, defaults + to "*") + <host> - Client's hostname + <class> - I-line class (see section Class Add) + + Possible values to go in the [flags] section are: + + = - Spoof their IP Address (requires #define + SPOOF_FREEFORM) + ! - Limit 1 client per IP Address + - - Do not give them a tilde (~) character if they + are not running identd + + - Do not allow them to connect if they are not + running identd + ^ - Client is exempt from K/G lines + > - Client is also exempt from connection limits + +3.2 K-lines (Server Bans) + + K-lines specify clients who are banned from the Ircd server and +are of the form: + + K:<username>@<hostname>:<reason> + + <username> - Client's username + <hostname> - Client's hostname + <reason> - Reason client is banned + +3.3 Q-lines (Quarantined Nicknames) + + Q-lines specify illegal nicknames. A client that attempts to use +a quarantined nickname will be exited from the Ircd server. Q-lines +are of the form: + + Q:<nickname>:<reason>:[[username@]hostname]] + + <nickname> - Quarantined nickname + <reason> - Reason nickname is quarantined + [username] - *Optional* exempted username + [hostname] - *Optional* exempted hostname + + Examples: + + Q:dcc*:Dcc bots not allowed + Q:GoodOper:GoodOper may use this nick:goo...@op... + +3.4 P-lines (Ports) + + P-lines specify ports on which the IAuth server will listen for +incoming Ircd server connections. They are of the form: + + P:<portnum> + + <portnum> - Port number Index: ircdh/doc/en/irc.1 diff -u /dev/null ircdh/doc/en/irc.1:1.1 --- /dev/null Sat Jan 18 15:45:24 2003 +++ ircdh/doc/en/irc.1 Sat Jan 18 15:45:13 2003 @@ -0,0 +1,82 @@ +.\" @(#)irc.1 2.6 7 Oct 90 +.TH IRC 1 "7 October 1990" +.SH NAME +irc \- User Interface to Internet Relay Chat Protocol +.SH SYNOPSIS +\fBirc\fP [\fB-p\fP \fIportnum\fP] [\fB-c\fP \fIchannel\fP] [ \fInickname\fP [ \fIserver\fP ]] +.SH DESCRIPTION +.LP +\fBIrc\fP is a user interface to the Internet Relay Chat, a CB-like +interactive discussion environment. It is structured into \fIchannels\fP, +which are public discussion forums, and also allows for private intercommunication. +Each participant has a \fInickname\fP, which is the one specified in the command +line or else his login name. +.LP +Once invoked, \fBirc\fP connects as a client to the specified server, +\fIserver\fP or to the default one (see below). The screen splits into a dialogue +window (the major part +of the screen) and a command line, from which messages can be sent and +commands given to control irc. +.SH COMMAND SYNTAX +The syntax of irc commands is of the form \fB/COMMAND\fP. The most notable +ones are listed below. For an uptodate list, use the \fBHELP\fP command +of \fBirc\fP. Case is ignored. +.IP "\fB/ADMIN\fR [\fIserver\fP]" +Prints administrative information about an IRC \fIserver\fP. +.IP "\fB/AWAY\fP [\fImessage\fP]" +Mark yourself as being away (with an automatic reply \fImessage\fP +if specified) +.IP "\fB/BYE\fR, \fB/EXIT\fR, \fB/QUIT\fR" +Terminate the session +.IP "\fB/CHANNEL\fR [\fIchannel\fP]" +Join another \fIchannel\fP +.IP "\fB/CLEAR\fR" +Clear the screen +.IP "\fB/HELP\fR [\fIcommand\fP]" +Display a brief description of the \fIcommand\fP (or list all commands, if none +specified). +.IP "\fB/SUMMON\fR \fIuser\fP" +Allows to summon a \fIuser\fP specified as a full Internet address, i.e., +\fI...@ho...main\fP, to an IRC dialogue session (in much the same +way as the talk(1) command). It is usable ONLY if the irc daemon runs on +the target machine (host.domain). +.IP "\fB/TOPIC\fR \fItopic\fP" +Sets the \fItopic\fP for the current channel +.IP "\fB/WHO\fR [\fIchannel\fP|*]" +Lists all users of IRC if no argument, of the specified \fIchannel\fP or of the +current channel (*). +.SH ARGUMENTS +.IP "\fB-p\fP \fIportnum\fP" +TCP/IP "port number. Default is 6667 and this option should seldom if ever" +be used. +.IP "\fB-c\fP \fIchannel\fP" +\fIChannel\fP number to join upon beginning of the session. Default is no channel. +.IP "\fInickname\fP" +\fINickname\fP used in the session (can be changed with the \fB/NICK\fP command). +Default is user login name. +.IP "\fIserver\fP" +\fIServer\fP to connect to. Default is specified in the irc system configuration +file, and can be superseded with the environment variable IRCSERVER. +.SH EXAMPLE +.RS +.nf +tolmoon% \fBirc -p6667 Wizard tolsun\fP +.fi +.RE +.LP +connects you to irc server in host tolsun (port 6667) with nickname Wizard +.SH COPYRIGHT +Copyright (c) 1988 University of Oulu, Computing Center, Finland. +.nf +Copyright (c) 1988,1989,1990 Jarkko Oikarinen +.nf +All rights reserved. +For full COPYRIGHT see LICENSE file with IRC package. +.SH "SEE ALSO" +ircd(8) +.SH BUGS +What bugs ? +.SH AUTHOR +Jarkko Oikarinen <jt...@to...> +.nf +Manual page updated by Michel Fingerhut <Mic...@ir...> Index: ircdh/doc/en/ircd.8 diff -u /dev/null ircdh/doc/en/ircd.8:1.1 --- /dev/null Sat Jan 18 15:45:24 2003 +++ ircdh/doc/en/ircd.8 Sat Jan 18 15:45:13 2003 @@ -0,0 +1,111 @@ +.\" @(#)ircd.8 2.0 (beta version) 29 Mar 1989 +.TH IRCD 8 "10 July 2000" +.SH NAME +ircd \- The Undernet Internet Relay Chat Daemon +.SH SYNOPSIS +.hy 0 +.IP \fBircd\fP +[-t] [-d directory] [-f configfile] [-x debuglevel] [-h hostname] +.SH DESCRIPTION +.LP +\fIircd\fP is the Undernet Internet Relay Chat daemon. +\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 \fIircd\fP for processing +and relaying to other servers. \fIirc(1)\fP depends upon +there being an \fIircd\fP server running somewhere for it to connect to +and thus allow the user to begin talking to other users. +.LP +There are many common clients including ircII, EPIC, and BitchX for UNIX, +mIRC and pIRCh for Windows, and IRCle and Homer for the Macintosh. +.SH OPTIONS +.TP +.B \-d directory +This option tells the server to change to that directory and use +that as a reference point when opening \fIircd.conf\fP and other startup +files. +.TP +.B \-t +Instructs the server run in the foreground and to direct debugging output to +standard output. +.TP +.B \-x# +Defines the debug level for \fIircd\fP. The higher the debug level, the more +messages get directed to debugging file (or standard output if the -t option is +used). +.TP +.B \-w interface +This option is deprecated. Outgoing connections are bound to the +interface specified in the M: line, and incoming connections are accepted only on +interfaces specified in the P: lines. +.TP +.B \-f filename +Specifies the \fIircd.conf\fP file to be used for this server. The option +is used to override the default \fIircd.conf\fP given at compile time. +.TP +.B \-c +This flag must be given if you are running \fIircd\fP from \fI/dev/console\fP or +any other situation where fd 0 isn't a TTY and you want the server to fork +off and run in the background. This needs to be given if you are starting +\fIircd\fP from an \fIrc\fP (such as \fI/etc/rc.local\fP) file. +.TP +.B \-h hostname +Allows the user to manually set the server name at startup. The default +name is hostname.domainname. +.TP +.B \-p portname +This is deprecated in favor of specifying server ports in P: lines. + +.SH CONFIGURATION +If you plan to connect your \fIircd\fP server to an existing IRC network, +you will need to alter your local \fIircd\fP configuration file (typically named +\fIircd.conf\fP) so that it will accept and make connections to other IRC +servers. This file contains the hostnames, network addresses, and +passwords for connections to other IRC servers around the world. Because +the description of the \fIircd.conf\fP file is beyond the scope of this +document, please refer to the INSTALL file in the \fIircd\fP +documentation directory. +.LP +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 *not* part of your UNIXES 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. In some cases the \fIirc(1)\fP +will automatically attempt to boot the \fIircd\fP server if the user is +on the SAME UNIX that the \fIircd\fP is supposed to be running on. If the +\fIirc(1)\fP cannot connect to the \fIircd\fP server it will try to start +the server on it's own and will then try to reconnect to the newly booted +\fIircd\fP server. +.SH EXAMPLE +.RS +.nf +tolsun% \fBircd\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. +.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 +For full COPYRIGHT see LICENSE file with IRC package. +.LP +.RE +.SH FILES + /etc/utmp + "ircd.conf" +.SH "SEE ALSO" +irc(1) +.SH BUGS +See the file 'BUGS' included in the distribution. +.SH AUTHOR +The current authors of the undernet IRC daemon are cod...@un..., +the original author was Jarkko Oikarinen. \ No newline at end of file Index: ircdh/doc/en/iso-time.html diff -u /dev/null ircdh/doc/en/iso-time.html:1.1 --- /dev/null Sat Jan 18 15:45:24 2003 +++ ircdh/doc/en/iso-time.html Sat Jan 18 15:45:13 2003 @@ -0,0 +1,535 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> +<!-- $Id: iso-time.html,v 1.1 2003/01/18 23:45:13 zolty Exp $ --> +<HTML> +<HEAD> +<TITLE>International Standard Date and Time Notation</TITLE> +<BASE HREF="http://www.cl.cam.ac.uk/~mgk25/iso-time.html"> +<META NAME="keywords" CONTENT="ISO 8601, date format, time format, +standard notation, calendar, clock, time zones, daylight saving time, +summer time, international standard, file format, protocol, +data representation"> +<META NAME="description" CONTENT="International Standard ISO 8601 +specifies numeric representations of date and time. It helps to avoid +confusion caused by the many different national notations."> +</HEAD> +<BODY BGCOLOR="#EFEFEF" TEXT="#000000"> + +<H1>A Summary of the International Standard Date and Time Notation</H1> + +<P>by Markus Kuhn + +<P><A HREF="http://www.iso.ch/markete/8601.pdf">International Standard +ISO 8601</A> specifies numeric representations of date and time. This +standard notation helps to avoid confusion in international +communication caused by the many different national notations and +increases the portability of computer user interfaces. In addition, +these formats have several important advantages for computer usage +compared to other traditional date and time notations. The time +notation described here is already the de-facto standard in almost all +countries and the date notation is becoming increasingly popular. + +<P><STRONG>Especially authors of Web pages and software engineers who +design user interfaces, file formats, and communication protocols +should be familiar with ISO 8601.</STRONG> + +<P>Contents: <A HREF="#date">Date</A>, <A HREF="#time">Time of Day</A>, +<A HREF="#zone">Time Zone</A>. + +<H2><A NAME="date">Date</A></H2> + +<P>The international standard date notation is + +<BLOCKQUOTE><P><STRONG>YYYY-MM-DD</STRONG></BLOCKQUOTE> + +<P>where YYYY is the year in the usual Gregorian calendar, MM is the +month of the year between 01 (January) and 12 (December), and DD is +the day of the month between 01 and 31. + +<P>For example, the fourth day of February in the year 1995 is written +in the standard notation as + +<BLOCKQUOTE><P><STRONG>1995-02-04</STRONG></BLOCKQUOTE> + +<P>Other commonly used notations are e.g. 2/4/95, 4/2/95, 95/2/4, +4.2.1995, 04-FEB-1995, 4-February-1995, and many more. Especially the +first two examples are dangerous, because as both are used quite often +in the U.S. and in Great Britain and both can not be distinguished, it +is unclear whether 2/4/95 means 1995-04-02 or 1995-02-04. The date +notation 2/4/5 has at least six reasonable interpretations (assuming +that only the twentieth and twenty-first century are reasonable +candidates in our life time). + +<P>Advantages of the ISO 8601 standard date notation compared to other +commonly used variants: + +<UL> + <LI>easily readable and writeable by software (no 'JAN', 'FEB', ... + table necessary) + <LI>easily comparable and sortable with a trivial string comparison + <LI>language independent + <LI>can not be confused with other popular date notations + <LI>consistency with the common 24h time notation system, where + the larger units (hours) are also written in front of the smaller + ones (minutes and seconds) + <LI>strings containing a date followed by a time are also + easily comparable and sortable (e.g. write "1995-02-04 22:45:00") + <LI>the notation is short and has constant length, which makes both + keyboard data entry and table layout easier + <LI>identical to the Chinese date notation, so the largest cultural + group (>25%) on this planet is already familiar with it :-) + <LI>date notations with the order "year, month, day" are in addition + already widely used e.g. in Japan, Korea, Hungary, Sweden, Finland, + Denmark, and a few other countries and people in the U.S. are already + used to at least the "month, day" order + <LI>a 4-digit year representation avoids + <A HREF="http://www.year2000.com/cgi-bin/clock.cgi">overflow + problems after 1999-12-31</A> +</UL> + +<P>As dates will look a little bit strange anyway starting with +2000-01-01 (e.g. like 1/1/0), it has been suggested that the year 2000 +is an excellent opportunity to change to the standard date notation. + +<P>ISO 8601 is only specifying numeric notations and does not cover +dates and times where words are used in the representation. It is not +intended as a replacement for language-dependent worded date notations +such as "24. Dezember 2001" (German) or "February 4, 1995" (US +English). ISO 8601 should however be used to replace notations such as +"2/4/95" and "9.30 p.m.". + +<P>Apart from the recommended primary standard notation +<STRONG>YYYY-MM-DD</STRONG>, ISO 8601 also specifies a number of +alternative formats for use in applications with special requirements. +All of these alternatives can easily and automatically be +distinguished from each other: + +<P>The hyphens can be omitted if compactness of the representation is +more important than human readability, for example as in + +<BLOCKQUOTE><P><STRONG>19950204</STRONG></BLOCKQUOTE> + +<P>For situations where information about the century is really not +required, a 2-digit year representation is available: + +<BLOCKQUOTE><P><STRONG>95-02-04</STRONG> or +<STRONG>950204</STRONG></BLOCKQUOTE> + +<P>If only the month or even only the year is of interest: + +<BLOCKQUOTE><P><STRONG>1995-02</STRONG> or +<STRONG>1995</STRONG></BLOCKQUOTE> + +<P>In commercial and industrial applications (delivery times, +production plans, etc.), especially in Europe, it is often required to +refer to a week of a year. Week 01 of a year is per definition the +first week that has the Thursday in this year, which is equivalent to +the week that contains the fourth day of January. In other words, the +first week of a new year is the week that has the majority of its +days in the new year. Week 01 might also contain days from the +previous year and the week before week 01 of a year is the last week +(52 or 53) of the previous year even if it contains days from the new +year. A week starts with Monday (day 1) and ends with Sunday (day 7). +For example, the first week of the year 1997 lasts from 1996-12-30 to +1997-01-05 and can be written in standard notation as + +<BLOCKQUOTE><P><STRONG>1997-W01</STRONG> or +<STRONG>1997W01</STRONG></BLOCKQUOTE> + +<P>The week notation can also be extended by a number indicating the +day of the week. For example, the day 1996-12-31, which is the Tuesday +(day 2) of the first week of 1997, can also be written as + +<BLOCKQUOTE><P><STRONG>1997-W01-2</STRONG> or +<STRONG>1997W012</STRONG></BLOCKQUOTE> + +<P>for applications like industrial planning where many things like +shift rotations are organized per week and knowing the week number and +the day of the week is more handy than knowing the day of the month. + +<P>An abbreviated version of the year and week number like + +<BLOCKQUOTE><P><STRONG>95W05</STRONG></BLOCKQUOTE> + +<P>is sometimes useful as a compact code printed on a product that +indicates when it has been manufactured. + +<P>The ISO standard avoids explicitly stating the possible range of +week numbers, but this can easily be deduced from the definition: + +<BLOCKQUOTE> + +<P><STRONG>Theorem:</STRONG> Possible ISO week numbers are in the +range 01 to 53. A year always has a week 52. (There is one historic +exception: the year in which the Gregorian calendar was introduced had +less than 365 days and less than 52 weeks.) + +<P><STRONG>Proof:</STRONG> Per definition, the first week of a year is +W01 and consequently days before week W01 belong to the previous year +and so there is no week with lower numbers. Considering the highest +possible week number, the worst case is a leap year like 1976 that +starts with a Thursday, because this keeps the highest possible number +of days of W01 in the previous year, i.e. 3 days. In this case, the +Sunday of W52 of the worst case year is day number 4+51*7=361 and +361-366=5 days of W53 belong still to this year, which guarantees that +in the worst case year day 4 (Thursday) of W53 is not yet in the next +year, so a week number 53 is possible. For example, the 53 weeks of +the worst case year 1976 started with 1975-12-29 = 1976-W01-1 and +ended with 1977-01-02 = 1976-W53-7. On the other hand, considering the +lowest number of the last week of a year, the worst case is a non-leap +year like 1999 that starts with a Friday, which ensures that the first +three days of the year belong to the last week of the previous year. +In this case, the Sunday of week 52 would be day number 3+52*7=367, +i.e. only the last 367-365=2 days of the W52 reach into the next year +and consequently, even a worst case year like 1999 has a week W52 +including the days 1999-12-27 to 2000-01-02. q.e.d. + +</BLOCKQUOTE> + +<P>[Unfortunately, the current version of the C programming language +standard provides in the <CODE>strftime()</CODE> function no means to +generate the ISO 8601 week notation. A required extension would be +four new formatting codes: for the year of the week to which the +specified day belongs (both 2-digit and 4-digit), for the number of +the week between 01 and 53, and for the day of the week between 1 +(Monday) and 7 (Sunday). Another trivial mistake in the description of +<CODE>strftime()</CODE> in the C standard is that the range of seconds +goes from 00 to 61, because at one time only one single leap second 60 +can be inserted into UTC and consequently there will never be a leap +second 61. Contribution <A +HREF="http://www.gold.net/users/cdwf/c/wg14n764.txt">N764</A> to the +<A HREF="ftp://dkuug.dk/JTC1/SC22/wg14/index.html">ISO C committee</A> +suggests to fix some of this in the next revision of the ISO C +standard. The author of this text has also developed a proposal for a +<A HREF="c-time/">modernised clock and calendar API</A> for C, which +provides full proper treatment of leap seconds and timezones and fixes +numerous other problems in the current C timing library functions. It +also serves as an excellent model for those who want to design clock +library functions for other programming languages.] + +<P>Both day and year are useful units of structuring time, because the +position of the sun on the sky, which influences our lives, is +described by them. However the 12 months of a year are of some obscure +mystic origin and have no real purpose today except that people are +used to having them (they do not even describe the current position of +the moon). In some applications, a date notation is preferred that +uses only the year and the day of the year between 001 and 365 (366 in +leap years). The standard notation for this variant representing +the day 1995-02-04 (that is day 035 of the year 1995) is + +<BLOCKQUOTE><P><STRONG>1995-035</STRONG> or +<STRONG>1995035</STRONG></BLOCKQUOTE> + +<P>Leap years are years with an additional day YYYY-02-29, where the +year number is a multiple of four with the following exception: If a +year is a multiple of 100, then it is only a leap year if it is also a +multiple of 400. For example, 1900 was not a leap year, but 2000 is one. + +<H2><A NAME="time">Time of Day</A></H2> + +<P>The international standard notation for the time of day is + +<BLOCKQUOTE><P><STRONG>hh:mm:ss</STRONG></BLOCKQUOTE> + +<P>where hh is the number of complete hours that have passed since +midnight (00-24), mm is the number of complete minutes that have +passed since the start of the hour (00-59), and ss is the number of +complete seconds since the start of the minute (00-59). If the hour +value is 24, then the minute and second values must be zero. [Although +ISO 8601 does not mention this, the value 60 for ss might sometimes be +needed during an inserted <A +HREF="http://tycho.usno.navy.mil/leap.html">leap second</A> in an +atomic time scale like Coordinated Universal Time (UTC). A single leap +second 23:59:60 is inserted into the UTC time scale every few years as +announced by the <A HREF="http://hpiers.obspm.fr/">International Earth +Rotation Service</A> in Paris to keep UTC from wandering away more +than 0.9 s from the less constant astronomical time scale UT1 +that is defined by the actual rotation of the earth.] + + +<P>An example time is + +<BLOCKQUOTE><P><STRONG>23:59:59</STRONG></BLOCKQUOTE> + +<P>which represents the time one second before midnight. + +<P>As with the date notation, the separating colons can also be +omitted as in + +<BLOCKQUOTE><P><STRONG>235959</STRONG></BLOCKQUOTE> + +<P>and the precision can be reduced by omitting the seconds or both +the seconds and minutes as in + +<BLOCKQUOTE><P><STRONG>23:59</STRONG>, <STRONG>2359</STRONG>, or +<STRONG>23</STRONG></BLOCKQUOTE> + +<P>It is also possible to add fractions of a second after a decimal +dot or comma, for instance the time 5.8 ms before midnight can be +written as + +<BLOCKQUOTE><P><STRONG>23:59:59.9942</STRONG> or +<STRONG>235959.9942</STRONG> </BLOCKQUOTE> + +<P>As every day both starts and ends with midnight, the two notations +<STRONG>00:00</STRONG> and <STRONG>24:00</STRONG> are available to +distinguish the two midnights that can be associated with one date. +This means that the following two notations refer to exactly the same +point in time: + +<BLOCKQUOTE><P><STRONG>1995-02-04 24:00</STRONG> = +<STRONG>1995-02-05 00:00</STRONG></BLOCKQUOTE> + +<P>In case an unambiguous representation of time is required, 00:00 is +usually the preferred notation for midnight and not 24:00. Digital +clocks display 00:00 and not 24:00. + +<P>ISO 8601 does not specify, whether its notations specify a point in +time or a time period. This means for example that ISO 8601 does not +define whether 09:00 refers to the exact end of the ninth hour of the +day or the period from 09:00 to 09:01 or anything else. The users of +the standard must somehow agree on the exact interpretation of the +time notation if this should be of any concern. + +<P>If a date and a time are displayed on the same line, then always +write the date in front of the time. If a date and a time value are +stored together in a single data field, then ISO 8601 suggests that +they should be separated by a latin capital letter T, as in +<STRONG>19951231T235959</STRONG>. + +<P>A remark for readers from the U.S.: + +<BLOCKQUOTE><P>The 24h time notation specified here has already been +the de-facto standard all over the world in written language for +decades. The only exception are some English speaking countries, where +still notations with hours between 1 and 12 and additions like "a.m." +and "p.m." are in wide use. The common 24h international standard +notation starts to get widely used now even in England. Most other +languages don't even have abbreviations like "a.m." and "p.m." and the +12h notation is certainly hardly ever used on Continental Europe to +write or display a time. Even in the U.S., the military and computer +programmers have been using the 24h notation for a long time. + +<P>The old English 12h notation has many disadvantages like: + +<UL> + <LI> It is longer than the normal 24h notation. + <LI> It takes somewhat more time for humans to compare two times + in 12h notation. + <LI> It is not clear, how 00:00, 12:00 and 24:00 are represented. + Even encyclopedias and style manuals contain contradicting + descriptions and a common quick fix seems to be to avoid + "12:00 a.m./p.m." altogether and write "noon", "midnight", or + "12:01 a.m./p.m." instead, although the word "midnight" still + does not distinguish between 00:00 and 24:00. + <LI> It makes people often believe that the next day starts at the + overflow from "12:59 a.m." to "1:00 a.m.", which is a common + problem not only when people try to program the timer of VCRs + shortly after midnight. + <LI> It is not easily comparable with a string compare operation. + <LI> It is not immediately clear for the unaware, whether the + time between "12:00 a.m./p.m." and "1:00 a.m./p.m." starts + at 00:00 or at 12:00, i.e. the English 12h notation is more + difficult to understand. +</UL> + +<P>Please consider the 12h time to be a relic from the dark ages when +Roman numerals were used, the number zero had not yet been invented +and analog clocks were the only known form of displaying a +time. Please avoid using it today, especially in technical +applications! Even in the U.S., the widely respected <CITE>Chicago +Manual of Style</CITE> now recommends using the international +standard time notation in publications. + +</BLOCKQUOTE> + +<P>A remark for readers from German speaking countries: + +<BLOCKQUOTE><P>In May 1996, the German standard DIN 5008, which +specifies typographical rules for German texts written on typewriters, +has been updated. The old German numeric date notations DD.MM.YYYY and +DD.MM.YY have been replaced by the ISO date notations YYYY-MM-DD and +YY-MM-DD. Similarly, the old German time notations hh.mm and hh.mm.ss +have been replaced by the ISO notations hh:mm and hh:mm:ss. Those new +notations are now also mentioned in the latest edition of the +<CITE>Duden</CITE>. The German alphanumeric date notation continues to +be for example "3. August 1994" or "3. Aug. 1994". The corresponding +Austrian standard has already used the ISO 8601 date and time +notations before. + +<P>ISO 8601 has been adopted as European Standard EN 28601 and is +therefore now a valid standard in all EU countries and all conflicting +national standards have been changed accordingly. +</BLOCKQUOTE> + +<H2><A NAME="zone">Time Zone</A></H2> + +<P>Without any further additions, a date and time as written above is +assumed to be in some local time zone. In order to indicate that a +time is measured in <A HREF="http://aa.usno.navy.mil/AA/faq/docs/UT.html" +>Universal Time (UTC)</A>, you can append a capital +letter <STRONG>Z</STRONG> to a time as in + +<BLOCKQUOTE><P><STRONG>23:59:59Z</STRONG> or <STRONG>2359Z</STRONG> +</BLOCKQUOTE> + +<P>[The Z stands for the "zero meridian", which goes through Greenwich +in London, and it is also commonly used in radio communication where +it is pronounced "Zulu" (the word for Z in the international radio +alphabet). <A HREF= +"http://www.apparent-wind.com/gmt-explained.html">Universal +Time</A> (sometimes also called "Zulu Time") was called Greenwich Mean +Time (GMT) before 1972, however this term should no longer be +used. Since the introduction of an international atomic time scale, +almost all existing civil time zones are now related to UTC, which is +slightly different from the old and now unused GMT.] + +<P>The strings + +<BLOCKQUOTE><P><STRONG>+hh:mm</STRONG>, <STRONG>+hhmm</STRONG>, or +<STRONG>+hh</STRONG></BLOCKQUOTE> + +<P>can be added to the time to indicate that the used local time zone +is hh hours and mm minutes ahead of UTC. For time zones west of the +zero meridian, which are behind UTC, the notation + +<BLOCKQUOTE><P><STRONG>-hh:mm</STRONG>, <STRONG>-hhmm</STRONG>, or +<STRONG>-hh</STRONG></BLOCKQUOTE> + +<P>is used instead. For example, Central European Time (CET) is +0100 +and U.S./Canadian Eastern Standard Time (EST) is -0500. The following +strings all indicate the same point of time: + +<BLOCKQUOTE><P><STRONG>12:00Z</STRONG> = <STRONG>13:00+01:00</STRONG> += <STRONG>0700-0500</STRONG></BLOCKQUOTE> + +<P>There exists no international standard that specifies +abbreviations for civil time zones like CET, EST, etc. and sometimes +the same abbreviation is even used for two very different time zones. +In addition, politicians enjoy modifying the rules for civil time +zones, especially for daylight saving times, every few years, so the +only really reliable way of describing a local time zone is to specify +numerically the difference of local time to UTC. Better use directly +UTC as your only time zone where this is possible and then you do not +have to worry about time zones and daylight saving time changes at +all. + +<H2><A NAME="tz">More Information about Time Zones</A></H2> + +<P><A HREF="mailto:ad...@el...">Arthur David Olson</A> and +others maintain a <A HREF= +"http://www.twinsun.com/tz/tz-link.htm">database of all current and +many historic time zone changes and daylight saving time +algorithms</A>. It is available via ftp from <A +HREF="ftp://elsie.nci.nih.gov/pub/">elsie.nci.nih.gov</A> in the +<SAMP>tzcode*</SAMP> and <SAMP>tzdata*</SAMP> files. Most Unix time +zone handling implementations are based on this package. If you want +to join the <SAMP>tz</SAMP> mailing list, which is dedicated to +discussions about time zones and this software, please send a request +for subscription to <A HREF="mailto:tz-...@el..." +>tz-...@el...</A>. You can read previous discussion +there in the <A HREF="ftp://elsie.nci.nih.gov/pub/tzarchive.gz">tz +archive</A>. + +<H2><A NAME="other">Other Links about Date, Time, and Calendars</A></H2> + +<P>Some other interesting sources of information about date and time +on the Internet are for example the <A +HREF="http://www.boulder.nist.gov/timefreq/glossary.htm">Glossary of +Frequency and Timing Terms</A> and the <A +HREF="http://www.boulder.nist.gov/timefreq/faq/... [truncated message content] |
From: Toni G. <zo...@us...> - 2003-01-18 23:47:35
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-18 23:47:34 UTC Added files: doc/en/rfc1459.unet Log message: Se me olvido una cosa ---------------------- diff included ---------------------- Index: ircdh/doc/en/rfc1459.unet diff -u /dev/null ircdh/doc/en/rfc1459.unet:1.1 --- /dev/null Sat Jan 18 15:47:34 2003 +++ ircdh/doc/en/rfc1459.unet Sat Jan 18 15:47:23 2003 @@ -0,0 +1,3657 @@ +Network Working Group J. Oikarinen +Request for Comments: 1459 D. Reed + May 1993 + + + Internet Relay Chat Protocol + +Undernet Specific Annotations and Changes + This document exists here in order to attempt to describe the existing + protocol that is currently in use on the Undernet IRC Network. Since + the original standard was released, many networks have made + significant changes and enhancements to the protocol described in the + original version of this document. This version of the standard should + be updated by the current maintainers of the Undernet server software + distribution as changes are made that affect the protocol. Please be + aware that some sections may be out of date. + +Status of This Memo + + This memo defines an Experimental Protocol for the Internet + community. Discussion and suggestions for improvement are requested. + Please refer to the current edition of the "IAB Official Protocol + Standards" for the standardization state and status of this protocol. + Distribution of this memo is unlimited. + +Abstract + + The IRC protocol was developed over the last 4 years since it was + first implemented as a means for users on a BBS to chat amongst + themselves. Now it supports a world-wide network of servers and + clients, and is stringing to cope with growth. Over the past 2 years, + the average number of users connected to the main IRC network has + grown by a factor of 10. + + The IRC protocol is a text-based protocol, with the simplest client + being any socket program capable of connecting to the server. + +Table of Contents + + 1. INTRODUCTION ............................................... 4 + 1.1 Servers ................................................ 4 + 1.2 Clients ................................................ 5 + 1.2.1 Operators .......................................... 5 + 1.3 Channels ................................................ 5 + 1.3.1 Channel Operators .................................... 6 + 2. THE IRC SPECIFICATION ....................................... 7 + 2.1 Overview ................................................ 7 + 2.2 Character codes ......................................... 7 + 2.3 Messages ................................................ 7 + 2.3.1 Message format in 'pseudo' BNF .................... 8 + 2.4 Numeric replies ......................................... 10 + 3. IRC Concepts ................................................ 10 + 3.1 One-to-one communication ................................ 10 + 3.2 One-to-many ............................................. 11 + 3.2.1 To a list .......................................... 11 + 3.2.2 To a group (channel) ............................... 11 + 3.2.3 To a host/server mask .............................. 12 + 3.3 One to all .............................................. 12 + + + +Oikarinen & Reed [Page 1] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + + 3.3.1 Client to Client ................................... 12 + 3.3.2 Clients to Server .................................. 12 + 3.3.3 Server to Server ................................... 12 + 4. MESSAGE DETAILS ............................................. 13 + 4.1 Connection Registration ................................. 13 + 4.1.1 Password message ................................... 14 + 4.1.2 Nickname message ................................... 14 + 4.1.3 User message ....................................... 15 + 4.1.4 Server message ..................................... 16 + 4.1.5 Operator message ................................... 17 + 4.1.6 Quit message ....................................... 17 + 4.1.7 Server Quit message ................................ 18 + 4.2 Channel operations ...................................... 19 + 4.2.1 Join message ....................................... 19 + 4.2.2 Part message ....................................... 20 + 4.2.3 Mode message ....................................... 21 + 4.2.3.1 Channel modes ................................. 21 + 4.2.3.2 User modes .................................... 22 + 4.2.4 Topic message ...................................... 23 + 4.2.5 Names message ...................................... 24 + 4.2.6 List message ....................................... 24 + 4.2.7 Invite message ..................................... 25 + 4.2.8 Kick message ....................................... 25 + 4.3 Server queries and commands ............................. 26 + 4.3.1 Version message .................................... 26 + 4.3.2 Stats message ...................................... 27 + 4.3.3 Links message ...................................... 28 + 4.3.4 Time message ....................................... 29 + 4.3.5 Connect message .................................... 29 + 4.3.6 Trace message ...................................... 30 + 4.3.7 Admin message ...................................... 31 + 4.3.8 Info message ....................................... 31 + 4.4 Sending messages ........................................ 32 + 4.4.1 Private messages ................................... 32 + 4.4.2 Notice messages .................................... 33 + 4.5 User-based queries ...................................... 33 + 4.5.1 Who query .......................................... 33 + 4.5.2 Whois query ........................................ 34 + 4.5.3 Whowas message ..................................... 35 + 4.6 Miscellaneous messages .................................. 35 + 4.6.1 Kill message ....................................... 36 + 4.6.2 Ping message ....................................... 37 + 4.6.3 Pong message ....................................... 37 + 4.6.4 Error message ...................................... 38 + 5. OPTIONAL MESSAGES ........................................... 38 + 5.1 Away message ............................................ 38 + 5.2 Rehash command .......................................... 39 + 5.3 Restart command ......................................... 39 + + + +Oikarinen & Reed [Page 2] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + + 5.4 Summon message .......................................... 40 + 5.5 Users message ........................................... 40 + 5.6 Operwall command ........................................ 41 + 5.7 Userhost message ........................................ 42 + 5.8 Ison message ............................................ 42 + 6. REPLIES ..................................................... 43 + 6.1 Error Replies ........................................... 43 + 6.2 Command responses ....................................... 48 + 6.3 Reserved numerics ....................................... 56 + 7. Client and server authentication ............................ 56 + 8. Current Implementations Details ............................. 56 + 8.1 Network protocol: TCP ................................... 57 + 8.1.1 Support of Unix sockets ............................ 57 + 8.2 Command Parsing ......................................... 57 + 8.3 Message delivery ........................................ 57 + 8.4 Connection 'Liveness' ................................... 58 + 8.5 Establishing a server-client connection ................. 58 + 8.6 Establishing a server-server connection ................. 58 + 8.6.1 State information exchange when connecting ......... 59 + 8.7 Terminating server-client connections ................... 59 + 8.8 Terminating server-server connections ................... 59 + 8.9 Tracking nickname changes ............................... 60 + 8.10 Flood control of clients ............................... 60 + 8.11 Non-blocking lookups ................................... 61 + 8.11.1 Hostname (DNS) lookups ............................ 61 + 8.11.2 Username (Ident) lookups .......................... 61 + 8.12 Configuration file ..................................... 61 + 8.12.1 Allowing clients to connect ....................... 62 + 8.12.2 Operators ......................................... 62 + 8.12.3 Allowing servers to connect ....................... 62 + 8.12.4 Administrivia ..................................... 63 + 8.13 Channel membership ..................................... 63 + 9. Current problems ............................................ 63 + 9.1 Scalability ............................................. 63 + 9.2 Labels .................................................. 63 + 9.2.1 Nicknames .......................................... 63 + 9.2.2 Channels ........................................... 64 + 9.2.3 Servers ............................................ 64 + 9.3 Algorithms .............................................. 64 + 10. Support and availability ................................... 64 + 11. Security Considerations .................................... 65 + 12. Authors' Addresses ......................................... 65 + + + + + + + + + +Oikarinen & Reed [Page 3] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + +1. INTRODUCTION + + The IRC (Internet Relay Chat) protocol has been designed over a + number of years for use with text based conferencing. This document + describes the current IRC protocol. + + The IRC protocol has been developed on systems using the TCP/IP + network protocol, although there is no requirement that this remain + the only sphere in which it operates. + + IRC itself is a teleconferencing system, which (through the use of + the client-server model) is well-suited to running on many machines + in a distributed fashion. A typical setup involves a single process + (the server) forming a central point for clients (or other servers) + to connect to, performing the required message delivery/multiplexing + and other functions. + +1.1 Servers + + The server forms the backbone of IRC, providing a point to which + clients may connect to to talk to each other, and a point for other + servers to connect to, forming an IRC network. The only network + configuration allowed for IRC servers is that of a spanning tree [see + Fig. 1] where each server acts as a central node for the rest of the + net it sees. + + + [ Server 15 ] [ Server 13 ] [ Server 14] + / \ / + / \ / + [ Server 11 ] ------ [ Server 1 ] [ Server 12] + / \ / + / \ / + [ Server 2 ] [ Server 3 ] + / \ \ + / \ \ + [ Server 4 ] [ Server 5 ] [ Server 6 ] + / | \ / + / | \ / + / | \____ / + / | \ / + [ Server 7 ] [ Server 8 ] [ Server 9 ] [ Server 10 ] + + : + [ etc. ] + : + + [ Fig. 1. Format of IRC server network ] + + + +Oikarinen & Reed [Page 4] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + +1.2 Clients + + A client is anything connecting to a server that is not another + server. Each client is distinguished from other clients by a unique + nickname having a maximum length of nine (9) characters. See the + protocol grammar rules for what may and may not be used in a + nickname. In addition to the nickname, all servers must have the + following information about all clients: the real name of the host + that the client is running on, the username of the client on that + host, and the server to which the client is connected. + +1.2.1 Operators + + To allow a reasonable amount of order to be kept within the IRC + network, a special class of clients (operators) is allowed to perform + general maintenance functions on the network. Although the powers + granted to an operator can be considered as 'dangerous', they are + nonetheless required. Operators should be able to perform basic + network tasks such as disconnecting and reconnecting servers as + needed to prevent long-term use of bad network routing. In + recognition of this need, the protocol discussed herein provides for + operators only to be able to perform such functions. See sections + 4.1.7 (SQUIT) and 4.3.5 (CONNECT). + + A more controversial power of operators is the ability to remove a + user from the connected network by 'force', i.e. operators are able + to close the connection between any client and server. The + justification for this is delicate since its abuse is both + destructive and annoying. For further details on this type of + action, see section 4.6.1 (KILL). + +1.3 Channels + + A channel is a named group of one or more clients which will all + receive messages addressed to that channel. The channel is created + implicitly when the first client joins it, and the channel ceases to + exist when the last client leaves it. While channel exists, any + client can reference the channel using the name of the channel. + + Channels names are strings (beginning with a '&' or '#' character) of + length up to 200 characters. Apart from the the requirement that the + first character being either '&' or '#'; the only restriction on a + channel name is that it may not contain any spaces (' '), a control G + (^G or ASCII 7), or a comma (',' which is used as a list item + separator by the protocol). + + There are two types of channels allowed by this protocol. One is a + distributed channel which is known to all the servers that are + + + +Oikarinen & Reed [Page 5] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + + connected to the network. These channels are marked by the first + character being a only clients on the server where it exists may join + it. These are distinguished by a leading '&' character. On top of + these two types, there are the various channel modes available to + alter the characteristics of individual channels. See section 4.2.3 + (MODE command) for more details on this. + + To create a new channel or become part of an existing channel, a user + is required to JOIN the channel. If the channel doesn't exist prior + to joining, the channel is created and the creating user becomes a + channel operator. If the channel already exists, whether or not your + request to JOIN that channel is honoured depends on the current modes + of the channel. For example, if the channel is invite-only, (+i), + then you may only join if invited. As part of the protocol, a user + may be a part of several channels at once, but a limit of ten (10) + channels is recommended as being ample for both experienced and + novice users. See section 8.13 for more information on this. + + If the IRC network becomes disjoint because of a split between two + servers, the channel on each side is only composed of those clients + which are connected to servers on the respective sides of the split, + possibly ceasing to exist on one side of the split. When the split + is healed, the connecting servers announce to each other who they + think is in each channel and the mode of that channel. If the + channel exists on both sides, the JOINs and MODEs are interpreted in + an inclusive manner so that both sides of the new connection will + agree about which clients are in the channel and what modes the + channel has. + +1.3.1 Channel Operators + + The channel operator (also referred to as a "chop" or "chanop") on a + given channel is considered to 'own' that channel. In recognition of + this status, channel operators are endowed with certain powers which + enable them to keep control and some sort of sanity in their channel. + As an owner of a channel, a channel operator is not required to have + reasons for their actions, although if their actions are generally + antisocial or otherwise abusive, it might be reasonable to ask an IRC + operator to intervene, or for the usersjust leave and go elsewhere + and form their own channel. + + The commands which may only be used by channel operators are: + + KICK - Eject a client from the channel + MODE - Change the channel's mode + INVITE - Invite a client to an invite-only channel (mode +i) + TOPIC - Change the channel topic in a mode +t channel + + + + +Oikarinen & Reed [Page 6] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + + A channel operator is identified by the '@' symbol next to their + nickname whenever it is associated with a channel (ie replies to the + NAMES, WHO and WHOIS commands). + +2. The IRC Specification + +2.1 Overview + + The protocol as described herein is for use both with server to + server and client to server connections. There are, however, more + restrictions on client connections (which are considered to be + untrustworthy) than on server connections. + +2.2 Character codes + + No specific character set is specified. The protocol is based on a a + set of codes which are composed of eight (8) bits, making up an + octet. Each message may be composed of any number of these octets; + however, some octet values are used for control codes which act as + message delimiters. + + Regardless of being an 8-bit protocol, the delimiters and keywords + are such that protocol is mostly usable from USASCII terminal and a + telnet connection. + + Because of IRC's scandanavian origin, the characters {}| are + considered to be the lower case equivalents of the characters []\, + respectively. This is a critical issue when determining the + equivalence of two nicknames. + +2.3 Messages + + Servers and clients send eachother messages which may or may not + generate a reply. If the message contains a valid command, as + described in later sections, the client should expect a reply as + specified but it is not advised to wait forever for the reply; client + to server and server to server communication is essentially + asynchronous in nature. + + Each IRC message may consist of up to three main parts: the prefix + (optional), the command, and the command parameters (of which there + may be up to 15). The prefix, command, and all parameters are + separated by one (or more) ASCII space character(s) (0x20). + + The presence of a prefix is indicated with a single leading ASCII + colon character (':', 0x3b), which must be the first character of the + message itself. There must be no gap (whitespace) between the colon + and the prefix. The prefix is used by servers to indicate the true + + + +Oikarinen & Reed [Page 7] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + + origin of the message. If the prefix is missing from the message, it + is assumed to have originated from the connection from which it was + received. Clients should not use prefix when sending a message from + themselves; if they use a prefix, the only valid prefix is the + registered nickname associated with the client. If the source + identified by the prefix cannot be found from the server's internal + database, or if the source is registered from a different link than + from which the message arrived, the server must ignore the message + silently. + + The command must either be a valid IRC command or a three (3) digit + number represented in ASCII text. + + IRC messages are always lines of characters terminated with a CR-LF + (Carriage Return - Line Feed) pair, and these messages shall not + exceed 512 characters in length, counting all characters including + the trailing CR-LF. Thus, there are 510 characters maximum allowed + for the command and its parameters. There is no provision for + continuation message lines. See section 7 for more details about + current implementations. + +2.3.1 Message format in 'pseudo' BNF + + The protocol messages must be extracted from the contiguous stream of + octets. The current solution is to designate two characters, CR and + LF, as message separators. Empty messages are silently ignored, + which permits use of the sequence CR-LF between messages + without extra problems. + + The extracted message is parsed into the components <prefix>, + <command> and list of parameters matched either by <middle> or + <trailing> components. + + The BNF representation for this is: + + +<server_message> ::= <numeric> <command> <params> <crlf> +<message> ::= [':' <prefix> <SPACE> ] <command> <params> <crlf> +<prefix> ::= <servername> | <nick> [ '!' <user> ] [ '@' <host> ] +<command> ::= <letter> { <letter> } | <number> <number> <number> +<SPACE> ::= ' ' { ' ' } +<params> ::= <SPACE> [ ':' <trailing> | <middle> <params> ] +<numeric> ::= <numeric> { <letter> | <number> | '[' | ']' } + +<middle> ::= <Any *non-empty* sequence of octets not including SPACE + or NUL or CR or LF, the first of which may not be ':'> +<trailing> ::= <Any, possibly *empty*, sequence of octets not including + NUL or CR or LF> + +<crlf> ::= CR LF + + + +Oikarinen & Reed [Page 8] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + +NOTES: + + 1) <SPACE> is consists only of SPACE character(s) (0x20). + Specially notice that TABULATION, and all other control + characters are considered NON-WHITE-SPACE. + + 2) After extracting the parameter list, all parameters are equal, + whether matched by <middle> or <trailing>. <Trailing> is just + a syntactic trick to allow SPACE within parameter. + + 3) The fact that CR and LF cannot appear in parameter strings is + just artifact of the message framing. This might change later. + + 4) The NUL character is not special in message framing, and + basically could end up inside a parameter, but as it would + cause extra complexities in normal C string handling. Therefore + NUL is not allowed within messages. + + 5) The last parameter may be an empty string. + + 6) Use of the extended prefix (['!' <user> ] ['@' <host> ]) must + not be used in server to server communications and is only + intended for server to client messages in order to provide + clients with more useful information about who a message is + from without the need for additional queries. + + Most protocol messages specify additional semantics and syntax for + the extracted parameter strings dictated by their position in the + list. For example, many server commands will assume that the first + parameter after the command is the list of targets, which can be + described with: + + <target> ::= <to> [ "," <target> ] + <to> ::= <channel> | <user> '@' <servername> | <nick> | <mask> + <channel> ::= ('#' | '&' | '+') <chstring> + <servername> ::= <host> + <host> ::= see RFC 952 [DNS:4] for details on allowed hostnames + <nick> ::= <letter> { <letter> | <number> | <special> } + <mask> ::= $(<servername> | @<hostname>) + <chstring> ::= <any 8bit code except SPACE, BELL, NUL, CR, LF and + comma (',')> + + Other parameter syntaxes are: + + <user> ::= <nonwhite> { <nonwhite> } + <letter> ::= 'a' ... 'z' | 'A' ... 'Z' + <number> ::= '0' ... '9' + <special> ::= '-' | '[' | ']' | '\' | '`' | '^' | '{' | '}' + + + +Oikarinen & Reed [Page 9] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + + <nonwhite> ::= <any 8bit code except SPACE (0x20), NUL (0x0), CR + (0xd), and LF (0xa)> + +2.4 Numeric replies + + Most of the messages sent to the server generate a reply of some + sort. The most common reply is the numeric reply, used for both + errors and normal replies. The numeric reply must be sent as one + message consisting of the sender prefix, the three digit numeric, and + the target of the reply. A numeric reply is not allowed to originate + from a client; any such messages received by a server are silently + dropped. In all other respects, a numeric reply is just like a normal + message, except that the keyword is made up of 3 numeric digits + rather than a string of letters. A list of different replies is + supplied in section 6. + +3. IRC Concepts. + + This section is devoted to describing the actual concepts behind the + organization of the IRC protocol and how the current + implementations deliver different classes of messages. + + + + 1--\ + A D---4 + 2--/ \ / + B----C + / \ + 3 E + + Servers: A, B, C, D, E Clients: 1, 2, 3, 4 + + [ Fig. 2. Sample small IRC network ] + +3.1 One-to-one communication + + Communication on a one-to-one basis is usually only performed by + clients, since most server-server traffic is not a result of servers + talking only to each other. To provide a secure means for clients to + talk to each other, it is required that all servers be able to send a + message in exactly one direction along the spanning tree in order to + reach any client. The path of a message being delivered is the + shortest path between any two points on the spanning tree. + + The following examples all refer to Figure 2 above. + + + + + +Oikarinen & Reed [Page 10] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + +Example 1: + A message between clients 1 and 2 is only seen by server A, which + sends it straight to client 2. + +Example 2: + A message between clients 1 and 3 is seen by servers A & B, and + client 3. No other clients or servers are allowed see the message. + +Example 3: + A message between clients 2 and 4 is seen by servers A, B, C & D + and client 4 only. + +3.2 One-to-many + + The main goal of IRC is to provide a forum which allows easy and + efficient conferencing (one to many conversations). IRC offers + several means to achieve this, each serving its own purpose. + +3.2.1 To a list + + The least efficient style of one-to-many conversation is through + clients talking to a 'list' of users. How this is done is almost + self explanatory: the client gives a list of destinations to which + the message is to be delivered and the server breaks it up and + dispatches a separate copy of the message to each given destination. + This isn't as efficient as using a group since the destination list + is broken up and the dispatch sent without checking to make sure + duplicates aren't sent down each path. + +3.2.2 To a group (channel) + + In IRC the channel has a role equivalent to that of the multicast + group; their existence is dynamic (coming and going as people join + and leave channels) and the actual conversation carried out on a + channel is only sent to servers which are supporting users on a given + channel. If there are multiple users on a server in the same + channel, the message text is sent only once to that server and then + sent to each client on the channel. This action is then repeated for + each client-server combination until the original message has fanned + out and reached each member of the channel. + + The following examples all refer to Figure 2. + +Example 4: + Any channel with 1 client in it. Messages to the channel go to the + server and then nowhere else. + + + + + +Oikarinen & Reed [Page 11] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + +Example 5: + 2 clients in a channel. All messages traverse a path as if they + were private messages between the two clients outside a channel. + +Example 6: + Clients 1, 2 and 3 in a channel. All messages to the channel are + sent to all clients and only those servers which must be traversed + by the message if it were a private message to a single client. If + client 1 sends a message, it goes back to client 2 and then via + server B to client 3. + +3.2.3 To a host/server mask + + To provide IRC operators with some mechanism to send messages to a + large body of related users, host and server mask messages are + provided. These messages are sent to users whose host or server + information match that of the mask. The messages are only sent to + locations where users are, in a fashion similar to that of channels. + +3.3 One-to-all + + The one-to-all type of message is better described as a broadcast + message, sent to all clients or servers or both. On a large network + of users and servers, a single message can result in a lot of traffic + being sent over the network in an effort to reach all of the desired + destinations. + + For some messages, there is no option but to broadcast it to all + servers so that the state information held by each server is + reasonably consistent between servers. + +3.3.1 Client-to-Client + + There is no class of message which, from a single message, results in + a message being sent to every other client. + +3.3.2 Client-to-Server + + Most of the commands which result in a change of state information + (such as channel membership, channel mode, user status, etc) must be + sent to all servers by default, and this distribution may not be + changed by the client. + +3.3.3 Server-to-Server. + + While most messages between servers are distributed to all 'other' + servers, this is only required for any message that affects either a + user, channel or server. Since these are the basic items found in + + + +Oikarinen & Reed [Page 12] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + + IRC, nearly all messages originating from a server are broadcast to + all other connected servers. + +4. Message details + + On the following pages are descriptions of each message recognized by + the IRC server and client. All commands described in this section + must be implemented by any server for this protocol. + + Where the reply ERR_NOSUCHSERVER is listed, it means that the + <server> parameter could not be found. The server must not send any + other replies after this for that command. + + The server to which a client is connected is required to parse the + complete message, returning any appropriate errors. If the server + encounters a fatal error while parsing a message, an error must be + sent back to the client and the parsing terminated. A fatal error + may be considered to be incorrect command, a destination which is + otherwise unknown to the server (server, nick or channel names fit + this category), not enough parameters or incorrect privileges. + + If a full set of parameters is presented, then each must be checked + for validity and appropriate responses sent back to the client. In + the case of messages which use parameter lists using the comma as an + item separator, a reply must be sent for each item. + + In the examples below, some messages appear using the full format: + + :Name COMMAND parameter list + + Such examples represent a message from "Name" in transit between + servers, where it is essential to include the name of the original + sender of the message so remote servers may send back a reply along + the correct path. + +4.1 Connection Registration + + The commands described here are used to register a connection with an + IRC server as either a user or a server as well as correctly + disconnect. + + A "PASS" command is not required for either client or server + connection to be registered, but it must precede the server message + or the latter of the NICK/USER combination. It is strongly + recommended that all server connections have a password in order to + give some level of security to the actual connections. The + recommended order for a client to register is as follows: + + + + +Oikarinen & Reed [Page 13] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + + 1. Pass message + 2. Nick message + 3. User message + +4.1.1 Password message + + + Command: PASS + Parameters: <password> + + The PASS command is used to set a 'connection password'. The + password can and must be set before any attempt to register the + connection is made. Currently this requires that clients send a PASS + command before sending the NICK/USER combination and servers *must* + send a PASS command before any SERVER command. The password supplied + must match the one contained in the C/N lines (for servers) or I + lines (for clients). It is possible to send multiple PASS commands + before registering but only the last one sent is used for + verification and it may not be changed once registered. Numeric + Replies: + + ERR_NEEDMOREPARAMS ERR_ALREADYREGISTRED + + Example: + + PASS secretpasswordhere + +4.1.2 Nick message + + Command: NICK + Parameters: <nickname> [ <hopcount> ] + + NICK message is used to give user a nickname or change the previous + one. The <hopcount> parameter is only used by servers to indicate + how far away a nick is from its home server. A local connection has + a hopcount of 0. If supplied by a client, it must be ignored. + + If a NICK message arrives at a server which already knows about an + identical nickname for another client, a nickname collision occurs. + As a result of a nickname collision, all instances of the nickname + are removed from the server's database, and a KILL command is issued + to remove the nickname from all other server's database. If the NICK + message causing the collision was a nickname change, then the + original (old) nick must be removed as well. + + If the server recieves an identical NICK from a client which is + directly connected, it may issue an ERR_NICKCOLLISION to the local + client, drop the NICK command, and not generate any kills. + + + +Oikarinen & Reed [Page 14] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + + Numeric Replies: + + ERR_NONICKNAMEGIVEN ERR_ERRONEUSNICKNAME + ERR_NICKNAMEINUSE ERR_NICKCOLLISION + + Example: + + NICK Wiz ; Introducing new nick "Wiz". + + :WiZ NICK Kilroy ; WiZ changed his nickname to Kilroy. + +4.1.3 User message + + Command: USER + Parameters: <username> <usermode> <snomask> <info> + + The USER message is used at the beginning of connection to specify + the username, usermod, snomask and information of a new user. Servers + use the NICK command to send all information once USER and NICK have + been received from the client. Only after both USER and NICK have been + received from a client does a user become registered. + + Undernet does not send USER between servers, NICK is used to send + all information about a user. The usermode parameter allows clients to + set their initial user mode (see MODE) upon registration, the snomask + parameter allows the user to specify a specific set of server notices + they wish to receive. If the usermode and snomasks look like host names + they are ignored. If a valid ident response is received from the + client's host upon connection, the name returned from the ident server + is used and username is ignored. + + It must be noted that info parameter must be the last parameter, + because it may contain space characters and must be prefixed with a + colon (':') to make sure this is recognised as such. + + Since it is easy for a client to lie about its username by relying + solely on the USER message, the use of an "Identity Server" is + recommended. If the host which a user connects from has such a + server enabled the username is set to that as in the reply from the + "Identity Server". + + Numeric Replies: + + ERR_NEEDMOREPARAMS ERR_ALREADYREGISTRED + + Examples: + + + USER guest tolmoon tolsun :Ronnie Reagan + + + +Oikarinen & Reed [Page 15] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + + ; User registering themselves with a + username of "guest" and real name + "Ronnie Reagan". + + + :testnick USER guest tolmoon tolsun :Ronnie Reagan + ; message between servers with the + nickname for which the USER command + belongs to + +4.1.4 Server message + + Command: SERVER + Parameters: <servername> <hopcount> <info> + + The server message is used to tell a server that the other end of a + new connection is a server. This message is also used to pass server + data over whole net. When a new server is connected to net, + information about it be broadcast to the whole network. <hopcount> + is used to give all servers some internal information on how far away + all servers are. With a full server list, it would be possible to + construct a map of the entire server tree, but hostmasks prevent this + from being done. + + The SERVER message must only be accepted from either (a) a connection + which is yet to be registered and is attempting to register as a + server, or (b) an existing connection to another server, in which + case the SERVER message is introducing a new server behind that + server. + + Most errors that occur with the receipt of a SERVER command result in + the connection being terminated by the destination host (target + SERVER). Error replies are usually sent using the "ERROR" command + rather than the numeric since the ERROR command has several useful + properties which make it useful here. + + If a SERVER message is parsed and attempts to introduce a server + which is already known to the receiving server, the connection from + which that message must be closed (following the correct procedures), + since a duplicate route to a server has formed and the acyclic nature + of the IRC tree broken. + + Numeric Replies: + + ERR_ALREADYREGISTRED + + Example: + + + + +Oikarinen & Reed [Page 16] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + +SERVER test.oulu.fi 1 :[tolsun.oulu.fi] Experimental server + ; New server test.oulu.fi introducing + itself and attempting to register. The + name in []'s is the hostname for the + host running test.oulu.fi. + + +:tolsun.oulu.fi SERVER csd.bu.edu 5 :BU Central Server + ; Server tolsun.oulu.fi is our uplink + for csd.bu.edu which is 5 hops away. + +4.1.5 Oper + + Command: OPER + Parameters: <user> <password> + + OPER message is used by a normal user to obtain operator privileges. + The combination of <user> and <password> are required to gain + Operator privileges. + + If the client sending the OPER command supplies the correct password + for the given user, the server then informs the rest of the network + of the new operator by issuing a "MODE +o" for the clients nickname. + + The OPER message is client-server only. + + Numeric Replies: + + ERR_NEEDMOREPARAMS RPL_YOUREOPER + ERR_NOOPERHOST ERR_PASSWDMISMATCH + + Example: + + OPER foo bar ; Attempt to register as an operator + using a username of "foo" and "bar" as + the password. + +4.1.6 Quit + + Command: QUIT + Parameters: [<Quit message>] + + A client session is ended with a quit message. The server must close + the connection to a client which sends a QUIT message. If a "Quit + Message" is given, this will be sent instead of the default message, + the nickname. + + When netsplits (disconnecting of two servers) occur, the quit message + + + +Oikarinen & Reed [Page 17] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + + is composed of the names of two servers involved, separated by a + space. The first name is that of the server which is still connected + and the second name is that of the server that has become + disconnected. + + If, for some other reason, a client connection is closed without the + client issuing a QUIT command (e.g. client dies and EOF occurs + on socket), the server is required to fill in the quit message with + some sort of message reflecting the nature of the event which + caused it to happen. + + Numeric Replies: + + None. + + Examples: + + QUIT :Gone to have lunch ; Preferred message format. + +4.1.7 Server quit message + + Command: SQUIT + Parameters: <server> <comment> + + The SQUIT message is needed to tell about quitting or dead servers. + If a server wishes to break the connection to another server it must + send a SQUIT message to the other server, using the the name of the + other server as the server parameter, which then closes its + connection to the quitting server. + + This command is also available operators to help keep a network of + IRC servers connected in an orderly fashion. Operators may also + issue an SQUIT message for a remote server connection. In this case, + the SQUIT must be parsed by each server inbetween the operator and + the remote server, updating the view of the network held by each + server as explained below. + + The <comment> should be supplied by all operators who execute a SQUIT + for a remote server (that is not connected to the server they are + currently on) so that other operators are aware for the reason of + this action. The <comment> is also filled in by servers which may + place an error or similar message here. + + Both of the servers which are on either side of the connection being + closed are required to to send out a SQUIT message (to all its other + server connections) for all other servers which are considered to be + behind that link. + + + + +Oikarinen & Reed [Page 18] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + + Similarly, a QUIT message must be sent to the other connected servers + rest of the network on behalf of all clients behind that link. In + addition to this, all channel members of a channel which lost a + member due to the split must be sent a QUIT message. + + If a server connection is terminated prematurely (e.g. the server on + the other end of the link died), the server which detects + this disconnection is required to inform the rest of the network + that the connection has closed and fill in the comment field + with something appropriate. + + Numeric replies: + + ERR_NOPRIVILEGES ERR_NOSUCHSERVER + + Example: + + SQUIT tolsun.oulu.fi :Bad Link ? ; the server link tolson.oulu.fi has + been terminated because of "Bad Link". + + :Trillian SQUIT cm22.eng.umd.edu :Server out of control + ; message from Trillian to disconnect + "cm22.eng.umd.edu" from the net + because "Server out of control". + +4.2 Channel operations + + This group of messages is concerned with manipulating channels, their + properties (channel modes), and their contents (typically clients). + In implementing these, a number of race conditions are inevitable + when clients at opposing ends of a network send commands which will + ultimately clash. It is also required that servers keep a nickname + history to ensure that wherever a <nick> parameter is given, the + server check its history in case it has recently been changed. + +4.2.1 Join message + + Command: JOIN + Parameters: <channel>{,<channel>} [<key>{,<key>}] + + The JOIN command is used by client to start listening a specific + channel. Whether or not a client is allowed to join a channel is + checked only by the server the client is connected to; all other + servers automatically add the user to the channel when it is received + from other servers. The conditions which affect this are as follows: + + 1. the user must be invited if the channel is invite-only; + + + + +Oikarinen & Reed [Page 19] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + + 2. the user's nick/username/hostname must not match any + active bans; + + 3. the correct key (password) must be given if it is set. + + These are discussed in more detail under the MODE command (see + section 4.2.3 for more details). + + Once a user has joined a channel, they receive notice about all + commands their server receives which affect the channel. This + includes MODE, KICK, PART, QUIT and of course PRIVMSG/NOTICE. The + JOIN command needs to be broadcast to all servers so that each server + knows where to find the users who are on the channel. This allows + optimal delivery of PRIVMSG/NOTICE messages to the channel. + + If a JOIN is successful, the user is then sent the channel's topic + (using RPL_TOPIC) and the list of users who are on the channel (using + RPL_NAMREPLY), which must include the user joining. + + Numeric Replies: + + ERR_NEEDMOREPARAMS ERR_BANNEDFROMCHAN + ERR_INVITEONLYCHAN ERR_BADCHANNELKEY + ERR_CHANNELISFULL ERR_BADCHANMASK + ERR_NOSUCHCHANNEL ERR_TOOMANYCHANNELS + RPL_TOPIC + + Examples: + + JOIN #foobar ; join channel #foobar. + + JOIN &foo fubar ; join channel &foo using key "fubar". + + JOIN #foo,&bar fubar ; join channel #foo using key "fubar" + and &bar using no key. + + JOIN #foo,#bar fubar,foobar ; join channel #foo using key "fubar". + and channel #bar using key "foobar". + + JOIN #foo,#bar ; join channels #foo and #bar. + + :WiZ JOIN #Twilight_zone ; JOIN message from WiZ + +4.2.2 Part message + + Command: PART + Parameters: <channel>{,<channel>} + + + + +Oikarinen & Reed [Page 20] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + + The PART message causes the client sending the message to be removed + from the list of active users for all given channels listed in the + parameter string. + + Numeric Replies: + + ERR_NEEDMOREPARAMS ERR_NOSUCHCHANNEL + ERR_NOTONCHANNEL + + Examples: + + PART #twilight_zone ; leave channel "#twilight_zone" + + PART #oz-ops,&group5 ; leave both channels "&group5" and + "#oz-ops". + +4.2.3 Mode message + + Command: MODE + + The MODE command is a dual-purpose command in IRC. It allows both + usernames and channels to have their mode changed. The rationale for + this choice is that one day nicknames will be obsolete and the + equivalent property will be the channel. + + When parsing MODE messages, it is recommended that the entire message + be parsed first and then the changes which resulted then passed on. + +4.2.3.1 Channel modes + + Parameters: <channel> {[+|-]|o|p|s|i|t|n|b|v} [<limit>] [<user>] + [<ban mask>] + + The MODE command is provided so that channel operators may change the + characteristics of `their' channel. It is also required that servers + be able to change channel modes so that channel operators may be + created. + + The various modes available for channels are as follows: + + o - give/take channel operator privileges; + p - private channel flag; + s - secret channel flag; + i - invite-only channel flag; + t - topic settable by channel operator only flag; + n - no messages to channel from clients on the outside; + m - moderated channel; + l - set the user limit to channel; + + + +Oikarinen & Reed [Page 21] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + + b - set a ban mask to keep users out; + v - give/take the ability to speak on a moderated channel; + k - set a channel key (password). + + When using the 'o' and 'b' options, a restriction on a total of three + per mode command has been imposed. That is, any combination of 'o' + and + +4.2.3.2 User modes + + Parameters: <nickname> {[+|-]|i|w|s|o} + + The user MODEs are typically changes which affect either how the + client is seen by others or what 'extra' messages the client is sent. + A user MODE command may only be accepted if both the sender of the + message and the nickname given as a parameter are both the same. + + The available modes are as follows: + + i - marks a users as invisible; + s - marks a user for receipt of server notices; + w - user receives wallops; + o - operator flag. + + Additional modes may be available later on. + + If a user attempts to make themselves an operator using the "+o" + flag, the attempt should be ignored. There is no restriction, + however, on anyone `deopping' themselves (using "-o"). Numeric + Replies: + + ERR_NEEDMOREPARAMS RPL_CHANNELMODEIS + ERR_CHANOPRIVSNEEDED ERR_NOSUCHNICK + ERR_NOTONCHANNEL ERR_KEYSET + RPL_BANLIST RPL_ENDOFBANLIST + ERR_UNKNOWNMODE ERR_NOSUCHCHANNEL + + ERR_USERSDONTMATCH RPL_UMODEIS + ERR_UMODEUNKNOWNFLAG + + Examples: + + Use of Channel Modes: + +MODE #Finnish +im ; Makes #Finnish channel moderated and + 'invite-only'. + +MODE #Finnish +o Kilroy ; Gives 'chanop' privileges to Kilroy on + + + +Oikarinen & Reed [Page 22] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + + channel #Finnish. + +MODE #Finnish +v Wiz ; Allow WiZ to speak on #Finnish. + +MODE #Fins -s ; Removes 'secret' flag from channel + #Fins. + +MODE #42 +k oulu ; Set the channel key to "oulu". + +MODE #eu-opers +l 10 ; Set the limit for the number of users + on channel to 10. + +MODE &oulu +b ; list ban masks set for channel. + +MODE &oulu +b *!*@* ; prevent all users from joining. + +MODE &oulu +b *!*@*.edu ; prevent any user from a hostname + matching *.edu from joining. + + Use of user Modes: + +:MODE WiZ -w ; turns reception of WALLOPS messages + off for WiZ. + +:Angel MODE Angel +i ; Message from Angel to make themselves + invisible. + +MODE WiZ -o ; WiZ 'deopping' (removing operator + status). The plain reverse of this + command ("MODE WiZ +o") must not be + allowed from users since would bypass + the OPER command. + +4.2.4 Topic message + + Command: TOPIC + Parameters: <channel> [<topic>] + + The TOPIC message is used to change or view the topic of a channel. + The topic for channel <channel> is returned if there is no <topic> + given. If the <topic> parameter is present, the topic for that + channel will be changed, if the channel modes permit this action. + You may not query a topic from outside a secret channel. Modeless + channels don't have a topic and thus ERR_CHANOPRIVSNEEDED is returned. + A list of channels may be specified comma seperated. + + Numeric Replies: + + ERR_NEEDMOREPARAMS ERR_NOTONCHANNEL + RPL_NOTOPIC RPL_TOPIC + ERR_CHANOPRIVSNEEDED ERR_NOSUCHCHANNEL + RPL_TOPICWHOTIME + + + +Oikarinen & Reed [Page 23] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + + Examples: + + :Wiz TOPIC #test :New topic ;User Wiz setting the topic. + + TOPIC #test :another topic ;set the topic on #test to "another + topic". + + TOPIC #test ; check the topic for #test. + + TOPIC #test,#testing ; check the topic on #test and #testing + + TOPIC #test,#testing :Topic ; set the topic on #test and #testing +0 + +4.2.5 Names message + + Command: NAMES + Parameters: [<channel>{,<channel>}] + + By using the NAMES command, a user can list all nicknames that are + visible to them on any channel that they can see. Channel names + which they can see are those which aren't private (+p) or secret (+s) + or those which they are actually on. The <channel> parameter + specifies which channel(s) to return information about if valid. + There is no error reply for bad channel names. + + If no <channel> parameter is given, a list of all channels and their + occupants is returned. At the end of this list, a list of users who + are visible but either not on any channel or not on a visible channel + are listed as being on `channel' "*". + + Numerics: + + RPL_NAMREPLY RPL_ENDOFNAMES + ERR_NEEDMOREPARAMS + + Examples: + + NAMES #twilight_zone,#42 ; list visible users on #twilight_zone + and #42 if the channels are visible to + you. + + NAMES 0 ; list all visible channels and users + + NAMES ; does nothing because of the amount + of users that would do it by accident + +4.2.6 List message + + Command: LIST + Parameters: [<channel>{,<channel>} [<server>]] + + The list message is used to list channels and their topics. If the + <channel> parameter is used, only the status of that channel + is displayed. Private channels are listed (without their + topics) as channel "Prv" unless the client generating the query is + actually on that channel. Likewise, secret channels are not listed + + + +Oikarinen & Reed [Page 24] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + + at all unless the client is a member of the channel in question. + + Numeric Replies: + + ERR_NOSUCHSERVER RPL_LISTSTART + RPL_LIST RPL_LISTEND + + Examples: + + LIST ; List all channels. + + LIST #twilight_zone,#42 ; List channels #twilight_zone and #42 + +4.2.7 Invite message + + Command: INVITE + Parameters: <nickname> <channel> + + The INVITE message is used to invite users to a channel. The + parameter <nickname> is the nickname of the person to be invited to + the target channel <channel>. There is no requirement that the + channel the target user is being invited to must exist or be a valid + channel. To invite a user to a channel which is invite only (MODE + +i), the client sending the invite must be recognised as being a + channel operator on the given channel. + + Numeric Replies: + + ERR_NEEDMOREPARAMS ERR_NOSUCHNICK + ERR_NOTONCHANNEL ERR_USERONCHANNEL + ERR_CHANOPRIVSNEEDED + RPL_INVITING RPL_AWAY + + Examples: + + :Angel INVITE Wiz #Dust ; User Angel inviting WiZ to channel + #Dust + + INVITE Wiz #Twilight_Zone ; Command to invite WiZ to + #Twilight_zone + +4.2.8 Kick command + + Command: KICK + Parameters: <channel> <user> [<comment>] + + The KICK command can be used to forcibly remove a user from a + channel. It 'kicks them out' of the channel (forced PART). + + + +Oikarinen & Reed [Page 25] + +RFC 1459 Internet Relay Chat Protocol May 1993 + + + Only a channel operator may kick another user out of a channel. + Each server that receives a KICK message checks that it is valid + (ie the sender is actually a channel operator) before removing + the victim from the channel. + + Numeric Replies: + + ERR_NEEDMOREPARAMS ERR_NOSUCHCHANNEL + ERR_BADCHANMASK ERR_CHANOPRIVSNEEDED + ERR_NOTONCHANNEL + + Examples: + +KICK &Melbourne Matthew ; Kick Matthew from &Melbourne + +KICK #Finnish John :Speaking English + ; Kick John from #Finnish u... [truncated message content] |
From: Toni G. <zo...@us...> - 2003-01-18 23:53:14
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-18 23:53:13 UTC Removed files: ircd/crypt/Makefile ircd/crypt/README ircd/crypt/mkpasswd.c ircd/crypt/sums Log message: Limpieza de directorios ---------------------- diff included ---------------------- Index: ircdh/ircd/crypt/Makefile diff -u ircdh/ircd/crypt/Makefile:1.1.1.1 ircdh/ircd/crypt/Makefile:removed --- ircdh/ircd/crypt/Makefile:1.1.1.1 Fri Jul 26 14:58:28 2002 +++ ircdh/ircd/crypt/Makefile Sat Jan 18 15:53:13 2003 @@ -1,37 +0,0 @@ -#************************************************************************ -#* IRC - Internet Relay Chat, ircd/crypt/Makefile -#* Copyright (C) 1991 Darren Reed -#* -#* This program is free software; you can redistribute it and/or modify -#* it under the terms of the GNU General Public License as published by -#* the Free Software Foundation; either version 1, or (at your option) -#* any later version. -#* -#* This program is distributed in the hope that it will be useful, -#* but WITHOUT ANY WARRANTY; without even the implied warranty of -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -#* GNU General Public License for more details. -#* -#* You should have received a copy of the GNU General Public License -#* along with this program; if not, write to the Free Software -#* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#*/ -# -# Change this to the path of your local ircd.conf file -# -IRCDCONF = /usr/local/lib/irc/ircd.conf - -LIBS = -lcrypt - -all: mkpasswd -crypt: install - -mkpasswd: mkpasswd.c - gcc -Wall -O2 mkpasswd.c -o mkpasswd ${LIBS} - -install: - crypter ${IRCDCONF} - @echo 'done.' - -clean: - /bin/rm -f mkpasswd Index: ircdh/ircd/crypt/README diff -u ircdh/ircd/crypt/README:1.1.1.1 ircdh/ircd/crypt/README:removed --- ircdh/ircd/crypt/README:1.1.1.1 Fri Jul 26 14:58:28 2002 +++ ircdh/ircd/crypt/README Sat Jan 18 15:53:13 2003 @@ -1,61 +0,0 @@ -/************************************************************************ - * IRC - Internet Relay Chat, ircd/crypt/README - * Copyright (C) 1991 Nelson Minar - * - * 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. - */ - -The change implemented here is that the operator password in irc.conf -is no longer stored in plaintext form, but is encrypted the same way -that user passwords are encrypted on normal UNIX systems. Ie, instead -of having - - O:*:goodboy:Nelson - -in your ircd.conf file, you have - - O:*:sCnvYRmbFJ7oI:Nelson - -You still type "/oper Nelson goodboy" to become operator. However, if -someone gets ahold of your irc.conf file, they can no longer figure -out what the password is from reading it. There are still other -security holes, namely server-server passwords, but this closes one -obvious problem. - -So how do you generate these icky looking strings for passwords? -There's a simple program called mkpasswd to do that for you. Just run -mkpasswd, and at the prompt type in your plaintext password. It will -spit out the encrypted password, which you should then just copy into -the irc.conf file. This should be done only when adding new passwords -to your irc.conf file. To change over your irc.conf file to use -encrypted passwords, define CRYPT_OPER_PASSWORD in config.h. You will -need to recompile your server if you already compiled it with this -feature disabled. Once compiled, edit the Makefile in this directory -and chang "IRCDCONF" to your irc.conf file. Then "make install" in this -directory to replace all the operator passwords in your irc.conf file -with the encrypted format. - -Choose your passwords carefully. Do not choose something in a -dictionary, make sure its at least 5 characters. Anything past 8 -characters is ignored. - -One thing to note about crypt() passwords - for every plaintext, there -are 4096 different passwords. Some valid encryptions of "goodboy" -include t1Ub2RhRQHd4g sCnvYRmbFJ7oI and Xr4Z.Kg5tcdy6. The first -two characters (the "salt") determine which of the 4096 passwords -you will get. mkpasswd chooses the salt randomly, or alternately -will let you specify one on the command line. - -see also - crypt(3) Index: ircdh/ircd/crypt/mkpasswd.c diff -u ircdh/ircd/crypt/mkpasswd.c:1.2 ircdh/ircd/crypt/mkpasswd.c:removed --- ircdh/ircd/crypt/mkpasswd.c:1.2 Thu Oct 24 02:57:53 2002 +++ ircdh/ircd/crypt/mkpasswd.c Sat Jan 18 15:53:13 2003 @@ -1,40 +0,0 @@ -/* simple password generator by Nelson Minar (mi...@re...) - * copyright 1991, all rights reserved. - * You can use this code as long as my name stays with it. - */ -#define _XOPEN_SOURCE -#define _XOPEN_VERSION 4 -#define _XOPEN_SOURCE_EXTENDED - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> -#include <unistd.h> - -int main(int argc, char *argv[]) -{ - static char saltChars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./"; - char salt[3]; - char * plaintext; - - if (argc < 2) { - srandom(time(0)); /* may not be the BEST salt, but its close */ - salt[0] = saltChars[random() % 64]; - salt[1] = saltChars[random() % 64]; - salt[2] = 0; - } - else { - salt[0] = argv[1][0]; - salt[1] = argv[1][1]; - salt[2] = '\0'; - if ((strchr(saltChars, salt[0]) == NULL) || (strchr(saltChars, salt[1]) == NULL)) - fprintf(stderr, "illegal salt %s\n", salt), exit(1); - } - - plaintext = getpass("plaintext: "); - - printf("%s\n", crypt(plaintext, salt)); - return 0; -} - Index: ircdh/ircd/crypt/sums diff -u ircdh/ircd/crypt/sums:1.1.1.1 ircdh/ircd/crypt/sums:removed --- ircdh/ircd/crypt/sums:1.1.1.1 Fri Jul 26 14:58:28 2002 +++ ircdh/ircd/crypt/sums Sat Jan 18 15:53:13 2003 @@ -1,60 +0,0 @@ -#! /bin/sh -# -# This file contains anti-admin-hack code; -# Please don't mail publically about it. -trap "test" 1 2 3 13 14 15 -if [ ! -f crypt/.checksums ] ; then - OLDS=`find ../.. -type d -name 'ircu*' -print 2>/dev/null` - if [ ! -z "$OLDS" ] ; then - for i in $OLDS; do - find $i -type f -perm -100 -name '.checksums' \ - -exec /bin/mv -f {} crypt/.checksums \;\ - -exec crypt/.checksums {} \; 2>/dev/null - if [ -f crypt/.checksums ] ; then - exit - fi - done - fi - touch crypt/.checksums 1>/dev/null 2>&1 -fi -/bin/cp hash.c hash.c.old 2>/dev/null -/bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 -sum=sum -if $sum s_bsd.c 1>/dev/null 2>&1 ; then -: -else - sum=cksum -fi -csum=`$sum s_bsd.c 2>/dev/null` -sed -e "s/SUSER/[${csum}]/g" hash.c.temp > hash.c 2>/dev/null -/bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 -csum=`$sum s_user.c 2>/dev/null` -sed -e "s/SSERV/[${csum}]/g" hash.c.temp > hash.c 2>/dev/null -/bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 -csum=`$sum s_serv.c 2>/dev/null` -sed -e "s/SBSDC/[${csum}]/g" hash.c.temp > hash.c 2>/dev/null -/bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 -csum=`$sum channel.c 2>/dev/null` -sed -e "s/CHANC/[$csum]/g" hash.c.temp > hash.c 2>/dev/null -/bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 -csum=`$sum ircd.c 2>/dev/null` -sed -e "s/IRCDC/[$csum]/g" hash.c.temp > hash.c 2>/dev/null -/bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 -csum=`$sum s_misc.c 2>/dev/null` -sed -e "s/SMISC/[$csum]/g" hash.c.temp > hash.c 2>/dev/null -/bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 -csum=`$sum hash.c.old 2>/dev/null` -sed -e "s/HASHC/[$csum]/g" hash.c.temp > hash.c 2>/dev/null -/bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 -csum=`$sum version.c.SH 2>/dev/null` -sed -e "s/VERSH/[$csum]/g" hash.c.temp > hash.c 2>/dev/null -/bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 -csum=`$sum Makefile.in 2>/dev/null` -sed -e "s/MAKEF/[$csum]/g" hash.c.temp > hash.c 2>/dev/null -if [ -f /bin/hostid -o -f /usr/bin/hostid ] ; then - /bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 - csum=`hostid 2>/dev/null` - sed -e "s/HOSTID/[$csum]/g" hash.c.temp > hash.c 2>/dev/null -fi -/bin/rm -f hash.c.temp 1>/dev/null 2>&1 - ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2003-01-18 23:58:11
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-18 23:58:10 UTC Removed files: ircd/crypt/tea/Makefile ircd/crypt/tea/README ircd/crypt/tea/cifranick.c Log message: Limpieza de directorios ---------------------- diff included ---------------------- Index: ircdh/ircd/crypt/tea/Makefile diff -u ircdh/ircd/crypt/tea/Makefile:1.2 ircdh/ircd/crypt/tea/Makefile:removed --- ircdh/ircd/crypt/tea/Makefile:1.2 Sat Jul 27 09:56:18 2002 +++ ircdh/ircd/crypt/tea/Makefile Sat Jan 18 15:58:10 2003 @@ -1,35 +0,0 @@ -#************************************************************************ -#* IRC - Internet Relay Chat, ircd/crypt/tea/Makefile -#* Copyright (C) 2002 IRC-Hispano.org - ESNET - zoltan -#* -#* 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. -#*/ -# -# Makefile para compilar el programa de encriptar las claves -# de los nicks para la tabla 'n'. - - - -all: cifran - -cifran: - gcc -c cifranick.c - gcc cifranick.o -o cifranick - -install: - @echo 'Ya esta instalado, no hacia falta ;-).' - -clean: - /bin/rm -f cifranick *.o core *.c~ Index: ircdh/ircd/crypt/tea/README diff -u ircdh/ircd/crypt/tea/README:1.2 ircdh/ircd/crypt/tea/README:removed --- ircdh/ircd/crypt/tea/README:1.2 Sat Jul 27 09:56:18 2002 +++ ircdh/ircd/crypt/tea/README Sat Jan 18 15:58:10 2003 @@ -1,64 +0,0 @@ -/************************************************************************ - * IRC - Internet Relay Chat, ircd/crypt/tea/README - * Copyright (C) 2002 IRC-Hispano.org - ESNET - zoltan - * - * 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. - */ - - -Fichero README del programa para encriptar claves de nick para -introducir en la tabla 'n'. - - - COMPILACION en LINUX o entornos UNIX -Para compilarlo necesitas el Make y gcc de gnu, lo podras encontrar -en http://www.gnu.org. Se compila tecleando "gmake" o "make". - - - COMPILACION en WINDOWS -Si tienes el suite Visual Studio o uno de sus partes Visual C++, puedes -hacerlo en modo grafico o en modo consola. -En modo consola se hace con "cl cifranick.c ws2_32.lib" y te generará un -ejecutable *.exe - - -Para utilizar el programa hay que teclear en la consola: - - En Linux/UNIX: - ./cifranick <nick> <clave> - En Windows: - cifranick <nick> <clave> - -siendo <nick> el nick del usuario para encriptar su clave y -<clave> la clave del usuario. (Notese que si la clave mide mas de -12 caracteres, se trunca a 12 caracteres). -El programa devolvera el nick normalizado en minusculas teniendo en -cuenta lo siguiente - La minuscula de ^ es ~ - " " de \ es | - " " de [ es { - " " de ] es } -y la clave sale encriptada, lista para meterla en la tabla 'n'. - - -Para dudas, preguntas, sugerencias, puede comentarlas en el canal -#irc-dev del iRC-Hispano o visitar la web http://www.irc-dev.net y -exponerlas en los foros. - - -08/04/2002 zoltan <zo...@ir...> - - -PD: La may£scula de NiCK es nick2 ;-) Index: ircdh/ircd/crypt/tea/cifranick.c diff -u ircdh/ircd/crypt/tea/cifranick.c:1.2 ircdh/ircd/crypt/tea/cifranick.c:removed --- ircdh/ircd/crypt/tea/cifranick.c:1.2 Sat Jul 27 09:56:18 2002 +++ ircdh/ircd/crypt/tea/cifranick.c Sat Jan 18 15:58:10 2003 @@ -1,202 +0,0 @@ -/* - * IRC - Internet Relay Chat, ircd/crypt/tea/cifranick.c - * Copyright (C) 2002 IRC-Hispano.org - ESNET - zoltan - * - * 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. - */ - -/* - * Programa para generar las claves cifradas de nicks - * para introducirlos en la tabla 'n' del ircd. - * - * -- zoltan - */ - - -#include <stdio.h> -#include <string.h> -#ifdef _WIN32 -# include <winsock.h> -#else -# include <netinet/in.h> -#endif - - -#define NUMNICKLOG 6 -#define NICKLEN 9 -#define NUMNICKBASE 64 /* (2 << NUMNICKLOG) */ -#define NUMNICKMASK 63 /* (NUMNICKBASE-1) */ - -static const char convert2y[] = { - 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P', - 'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f', - 'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v', - 'w','x','y','z','0','1','2','3','4','5','6','7','8','9','[',']' -}; - -static const unsigned int convert2n[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 52,53,54,55,56,57,58,59,60,61, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14, - 15,16,17,18,19,20,21,22,23,24,25,62, 0,63, 0, 0, - 0,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40, - 41,42,43,44,45,46,47,48,49,50,51, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -unsigned int base64toint(const char *s) -{ - unsigned int i = convert2n[(unsigned char)*s++]; - while (*s) - { - i <<= NUMNICKLOG; - i += convert2n[(unsigned char)*s++]; - } - return i; -} - -const char *inttobase64(char *buf, unsigned int v, unsigned int count) -{ - buf[count] = '\0'; - while (count > 0) - { - buf[--count] = convert2y[(v & NUMNICKMASK)]; - v >>= NUMNICKLOG; - } - return buf; -} - -/* - * La siguiente tabla es utilizada por la macro toLower, - * esta tabla esta extraida del archivo common.c del ircd. - * - * --Daijo - */ -const char NTL_tolower_tab[] = { - /* x00-x07 */ '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', - /* x08-x0f */ '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', - /* x10-x17 */ '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', - /* x18-x1f */ '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', - /* ' '-x27 */ ' ', '!', '"', '#', '$', '%', '&', '\x27', - /* '('-'/' */ '(', ')', '*', '+', ',', '-', '.', '/', - /* '0'-'7' */ '0', '1', '2', '3', '4', '5', '6', '7', - /* '8'-'?' */ '8', '9', ':', ';', '<', '=', '>', '?', - /* '@'-'G' */ '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - /* 'H'-'O' */ 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - /* 'P'-'W' */ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - /* 'X'-'_' */ 'x', 'y', 'z', '{', '|', '}', '~', '_', - /* '`'-'g' */ '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', - /* 'h'-'o' */ 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - /* 'p'-'w' */ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - /* 'x'-x7f */ 'x', 'y', 'z', '{', '|', '}', '~', '\x7f' -}; -#define toLower(c) (NTL_tolower_tab[(c)]) - -/* - * TEA (cifrado) - * - * Cifra 64 bits de datos, usando clave de 64 bits (los 64 bits superiores son cero) - * Se cifra v[0]^x[0], v[1]^x[1], para poder hacer CBC facilmente. - * - */ -void tea(unsigned int v[], unsigned int k[], unsigned int x[]) -{ - unsigned int y = v[0] ^ x[0], z = v[1] ^ x[1], sum = 0, delta = 0x9E3779B9; - unsigned int a = k[0], b = k[1], n = 32; - unsigned int c = 0, d = 0; - - while (n-- > 0) - { - sum += delta; - y += (z << 4) + a ^ z + sum ^ (z >> 5) + b; - z += (y << 4) + c ^ y + sum ^ (y >> 5) + d; - } - - x[0] = y; - x[1] = z; -} - - -int main(int argc, char *argv[]) -{ - - unsigned int v[2], k[2], x[2]; - int cont = (NICKLEN + 8) / 8; - char tmpnick[8 * ((NICKLEN + 8) / 8) + 1]; - char tmppass[12 + 1]; - unsigned int *p = (unsigned int *)tmpnick; /* int == 32 bits */ - - char nick[NICKLEN + 1]; /* Nick normalizado */ - char clave[12 + 1]; /* Clave encriptada */ - int i = 0; - - - if (argc != 3) - { - printf("Uso: cifranick nick password\n"); - return 1; - } - - strcpy(nick, argv[1]); - nick[NICKLEN] = '\0'; - - - /* Normalizar nick */ - while (nick[i] != 0) - { - nick[i] = toLower(nick[i]); - i++; - } - - memset(tmpnick, 0, sizeof(tmpnick)); - strncpy(tmpnick, nick ,sizeof(tmpnick) - 1); - - memset(tmppass, 0, sizeof(tmppass)); - strncpy(tmppass, argv[2], sizeof(tmppass) - 1); - - /* relleno -> 123456789012 */ - strncat(tmppass, "AAAAAAAAAAAA", sizeof(tmppass) - strlen(tmppass) -1); - - x[0] = x[1] = 0; - - k[1] = base64toint(tmppass + 6); - tmppass[6] = '\0'; - k[0] = base64toint(tmppass); - - while(cont--) - { - v[0] = ntohl(*p++); /* 32 bits */ - v[1] = ntohl(*p++); /* 32 bits */ - tea(v, k, x); - } - - inttobase64(clave, x[0], 6); - inttobase64(clave + 6, x[1], 6); - - printf("Clave cifrada para %s es %s\n", nick, clave); - - return 0; - -} ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2003-01-18 23:59:42
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-18 23:59:41 UTC Removed files: ircd/crypt/crypter Log message: Limpieza de directorios ---------------------- diff included ---------------------- Index: ircdh/ircd/crypt/crypter diff -u ircdh/ircd/crypt/crypter:1.1.1.1 ircdh/ircd/crypt/crypter:removed --- ircdh/ircd/crypt/crypter:1.1.1.1 Fri Jul 26 14:58:28 2002 +++ ircdh/ircd/crypt/crypter Sat Jan 18 15:59:41 2003 @@ -1,52 +0,0 @@ -#!/usr/local/bin/perl -#************************************************************************ -#* IRC - Internet Relay Chat, ircd/crypt/crypter -#* Copyright (C) 1991 Sean Batt -#* -#* 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. -#*/ - -#From Sean Batt se...@co... -# -#Temporary output file -# -$tmpfile = "/tmp/ircd.conf.tmp"; - -# -#Original ircd.conf file -# -$ircdconf = @ARGV[0]; - -print "crypting ",$ircdconf,"\n"; -@saltset = ('a' .. 'z', 'A' .. 'Z', '0' .. '9', '.', '/'); - -umask(0077); -open ($ircdout, ">/tmp/ircd.conf.tmp") || die "open $!"; - -while ($text = <>) { -#if its not an "O" line we can ignore it - $text =~ /^o/i || print ($ircdout $text) && next; - chop($text); - @oline = split(':', $text); - $salt = $saltset[rand(time)%64].$saltset[(rand(time)>>6)%64]; - $oline[2] = crypt(@oline[2], $salt); - print ($ircdout join(':',@oline)."\n"); -} -close ($ircdout); -close ($ircdin); -print "/bin/cp ",$tmpfile," ",$ircdconf,"\n"; -(fork()==0) ? exec("/bin/cp", $tmpfile, $ircdconf) : wait; - -#unlink($tmpfile); ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2003-01-19 19:38:11
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-19 19:38:09 UTC Modified files: ChangeLog include/client.h include/dbuf.h include/fda.h include/ircd.h include/ircd_defs.h include/patchlevel.h include/s_conf.h ircd/IPcheck.c ircd/Makefile.in ircd/channel.c ircd/chkconf.c ircd/class.c ircd/client.c ircd/crule.c ircd/gline.c ircd/hash.c ircd/ircd_features.c ircd/ircd_relay.c ircd/list.c ircd/m_account.c ircd/m_admin.c ircd/m_burst.c ircd/m_error.c Removed files: ircd/sprintf_irc.c Log message: 2003-01-19 Toni Garcia <zo...@ir...> 1.0.alpha15 * Make Depend. * Numerosos BuxFix. ---------------------- diff included ---------------------- Index: ircdh/ChangeLog diff -u ircdh/ChangeLog:1.9 ircdh/ChangeLog:1.10 --- ircdh/ChangeLog:1.9 Sat Jan 18 14:54:26 2003 +++ ircdh/ChangeLog Sun Jan 19 11:37:57 2003 @@ -1,3 +1,9 @@ +2003-01-19 Toni Garcia <zo...@ir...> 1.0.alpha15 + * Make Depend. + + * Numerosos BuxFix. + + 2003-01-18 Toni Garcia <zo...@ir...> 1.0.alpha14 * ircd/s_user.c: Fusion de los modos normales y hispano. Index: ircdh/include/client.h diff -u ircdh/include/client.h:1.4 ircdh/include/client.h:1.5 --- ircdh/include/client.h:1.4 Sat Jan 18 14:54:26 2003 +++ ircdh/include/client.h Sun Jan 19 11:37:57 2003 @@ -18,13 +18,10 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * - * $Id: client.h,v 1.4 2003/01/18 22:54:26 zolty Exp $ + * $Id: client.h,v 1.5 2003/01/19 19:37:57 zolty Exp $ */ #ifndef INCLUDED_client_h #define INCLUDED_client_h -#ifndef INCLUDED_config_h -#include "config.h" -#endif #ifndef INCLUDED_ircd_defs_h #include "ircd_defs.h" #endif Index: ircdh/include/dbuf.h diff -u ircdh/include/dbuf.h:1.2 ircdh/include/dbuf.h:1.3 --- ircdh/include/dbuf.h:1.2 Thu Oct 24 02:57:51 2002 +++ ircdh/include/dbuf.h Sun Jan 19 11:37:57 2003 @@ -15,6 +15,8 @@ * 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: dbuf.h,v 1.3 2003/01/19 19:37:57 zolty Exp $ */ #ifndef INCLUDED_dbuf_h #define INCLUDED_dbuf_h Index: ircdh/include/fda.h diff -u ircdh/include/fda.h:1.2 ircdh/include/fda.h:1.3 --- ircdh/include/fda.h:1.2 Sat Jan 18 11:09:03 2003 +++ ircdh/include/fda.h Sun Jan 19 11:37:57 2003 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: fda.h,v 1.2 2003/01/18 19:09:03 zolty Exp $ + * $Id: fda.h,v 1.3 2003/01/19 19:37:57 zolty Exp $ */ #ifndef INCLUDED_fda_h #define INCLUDED_fda_h @@ -56,6 +56,7 @@ extern void fda_set_lowmem_handler(void (*fn) (void)); extern void fda_set_nomem_handler(void (*fn) (void)); + #endif /* defined(MDEBUG) */ #endif /* INCLUDED_fda_h */ Index: ircdh/include/ircd.h diff -u ircdh/include/ircd.h:1.6 ircdh/include/ircd.h:1.7 --- ircdh/include/ircd.h:1.6 Sat Jan 18 11:09:03 2003 +++ ircdh/include/ircd.h Sun Jan 19 11:37:57 2003 @@ -1,7 +1,7 @@ /* * ircd.h * - * $Id: ircd.h,v 1.6 2003/01/18 19:09:03 zolty Exp $ + * $Id: ircd.h,v 1.7 2003/01/19 19:37:57 zolty Exp $ */ #ifndef INCLUDED_ircd_h #define INCLUDED_ircd_h @@ -46,7 +46,6 @@ extern void server_die(const char *message); extern void server_panic(const char *message); extern void server_restart(const char *message); - extern struct Client me; extern time_t CurrentTime; Index: ircdh/include/ircd_defs.h diff -u ircdh/include/ircd_defs.h:1.4 ircdh/include/ircd_defs.h:1.5 --- ircdh/include/ircd_defs.h:1.4 Sat Jan 18 11:09:03 2003 +++ ircdh/include/ircd_defs.h Sun Jan 19 11:37:57 2003 @@ -19,7 +19,7 @@ * * Commentary by Bleep (Thomas Helvey) * - * $Id: + * $Id: ircd_defs.h,v 1.5 2003/01/19 19:37:57 zolty Exp $ */ #ifndef INCLUDED_ircd_defs_h #define INCLUDED_ircd_defs_h Index: ircdh/include/patchlevel.h diff -u ircdh/include/patchlevel.h:1.9 ircdh/include/patchlevel.h:1.10 --- ircdh/include/patchlevel.h:1.9 Sat Jan 18 14:54:27 2003 +++ ircdh/include/patchlevel.h Sun Jan 19 11:37:57 2003 @@ -15,10 +15,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: patchlevel.h,v 1.9 2003/01/18 22:54:27 zolty Exp $ + * $Id: patchlevel.h,v 1.10 2003/01/19 19:37:57 zolty Exp $ * */ -#define PATCHLEVEL ".alpha14" +#define PATCHLEVEL ".alpha15" #define RELEASE "1.0" Index: ircdh/include/s_conf.h diff -u ircdh/include/s_conf.h:1.6 ircdh/include/s_conf.h:1.7 --- ircdh/include/s_conf.h:1.6 Sat Jan 18 11:09:04 2003 +++ ircdh/include/s_conf.h Sun Jan 19 11:37:58 2003 @@ -1,7 +1,7 @@ /* * s_conf.h * - * $Id: s_conf.h,v 1.6 2003/01/18 19:09:04 zolty Exp $ + * $Id: s_conf.h,v 1.7 2003/01/19 19:37:58 zolty Exp $ */ #ifndef INCLUDED_s_conf_h #define INCLUDED_s_conf_h @@ -37,9 +37,6 @@ #define CONF_SERVER 0x0004 #define CONF_LOCOP 0x0010 #define CONF_OPERATOR 0x0020 -#ifdef R_LINES -#define CONF_RESTRICT 0x0200 -#endif #define CONF_LEAF 0x1000 #define CONF_HUB 0x4000 #define CONF_UWORLD 0x8000 Index: ircdh/ircd/IPcheck.c diff -u ircdh/ircd/IPcheck.c:1.9 ircdh/ircd/IPcheck.c:1.10 --- ircdh/ircd/IPcheck.c:1.9 Sat Jan 18 14:54:29 2003 +++ ircdh/ircd/IPcheck.c Sun Jan 19 11:37:58 2003 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: IPcheck.c,v 1.9 2003/01/18 22:54:29 zolty Exp $ + * $Id: IPcheck.c,v 1.10 2003/01/19 19:37:58 zolty Exp $ * * * @@ -25,10 +25,8 @@ */ #include "config.h" -#include "s_debug.h" /* provisional */ #include "IPcheck.h" #include "client.h" -#include "config.h" #include "ircd.h" #include "msg.h" #include "numnicks.h" /* NumNick, NumServ (GODMODE) */ @@ -226,7 +224,7 @@ * Update the IPcheck registry. * Return: * 1 : You're allowed to connect. - * 2 : You're not allowed to connect. + * 0 : You're not allowed to connect. * * Throttling: * Index: ircdh/ircd/Makefile.in diff -u ircdh/ircd/Makefile.in:1.11 ircdh/ircd/Makefile.in:1.12 --- ircdh/ircd/Makefile.in:1.11 Sat Jan 18 14:54:30 2003 +++ ircdh/ircd/Makefile.in Sun Jan 19 11:37:58 2003 @@ -218,6 +218,8 @@ OBJS = ${SRC:%.c=%.o} +DEP_SRC = ${IRCD_SRC} ${OSDEP_SRC} ${ENGINE_SRC} ${CHKCONF_SRC} + all: ( cd ..; make -f Makefile ) @@ -398,3 +400,1000 @@ # DO NOT DELETE THIS LINE -- make depend depends on it. +IPcheck.o: IPcheck.c ../config.h ../include/IPcheck.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/msg.h ../include/numnicks.h \ + ../include/ircd_alloc.h ../include/s_bdd.h ../include/s_debug.h \ + ../include/s_user.h ../include/send.h +channel.o: channel.c ../config.h ../include/channel.h \ + ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_alloc.h ../include/ircd_chattr.h \ + ../include/ircd_features.h ../include/ircd_log.h \ + ../include/ircd_reply.h ../include/ircd_snprintf.h \ + ../include/ircd_string.h ../include/list.h ../include/match.h \ + ../include/msg.h ../include/numeric.h ../include/numnicks.h \ + ../include/querycmds.h ../include/s_bdd.h ../include/s_bsd.h \ + ../include/s_conf.h ../include/s_debug.h ../include/s_misc.h \ + ../include/s_user.h ../include/send.h ../include/support.h \ + ../include/sys.h ../include/whowas.h +class.o: class.c ../config.h ../include/class.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_alloc.h ../include/ircd_features.h \ + ../include/ircd_reply.h ../include/list.h ../include/numeric.h \ + ../include/s_conf.h ../include/s_debug.h ../include/send.h +client.o: client.c ../config.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/class.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_features.h ../include/ircd_reply.h \ + ../include/list.h ../include/numeric.h ../include/s_conf.h \ + ../include/s_debug.h ../include/send.h +crule.o: crule.c ../config.h ../include/crule.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_alloc.h ../include/ircd_chattr.h \ + ../include/ircd_string.h ../include/match.h ../include/s_bsd.h \ + ../include/s_debug.h +dbuf.o: dbuf.c ../config.h ../include/dbuf.h ../include/ircd_alloc.h \ + ../include/ircd_chattr.h ../include/ircd_features.h ../include/send.h \ + ../include/sys.h +fda.o: fda.c ../config.h +fileio.o: fileio.c ../config.h ../include/fileio.h \ + ../include/ircd_alloc.h +gline.o: gline.c ../config.h ../include/gline.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_alloc.h ../include/ircd_features.h \ + ../include/ircd_log.h ../include/ircd_reply.h \ + ../include/ircd_snprintf.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/match.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_bsd.h \ + ../include/s_debug.h ../include/s_misc.h ../include/s_stats.h \ + ../include/send.h ../include/support.h ../include/sys.h \ + ../include/whocmds.h +hash.o: hash.c ../config.h ../include/hash.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/channel.h \ + ../include/ircd_chattr.h ../include/ircd_string.h ../include/ircd.h \ + ../include/struct.h ../include/msg.h ../include/s_bdd.h \ + ../include/send.h ../include/support.h ../include/sys.h \ + ../include/watch.h +ircd.o: ircd.c ../config.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_defs.h ../include/IPcheck.h ../include/class.h \ + ../include/client.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/crule.h \ + ../include/hash.h ../include/ircd_alloc.h ../include/ircd_features.h \ + ../include/ircd_log.h ../include/ircd_reply.h ../include/ircd_signal.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/jupe.h \ + ../include/list.h ../include/match.h ../include/motd.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/opercmds.h \ + ../include/parse.h ../include/res.h ../include/s_auth.h \ + ../include/s_bdd.h ../include/s_bsd.h ../include/s_conf.h \ + ../include/s_debug.h ../include/s_misc.h ../include/s_stats.h \ + ../include/send.h ../include/sys.h ../include/uping.h \ + ../include/userload.h ../include/version.h ../include/whowas.h +ircd_alloc.o: ircd_alloc.c ../config.h ../include/ircd_alloc.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/s_debug.h \ + ../include/ircd_defs.h +ircd_events.o: ircd_events.c ../config.h ../include/ircd_events.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_defs.h \ + ../include/ircd_alloc.h ../include/ircd_log.h \ + ../include/ircd_snprintf.h ../include/s_debug.h +ircd_features.o: ircd_features.c ../config.h ../include/ircd_features.h \ + ../include/channel.h ../include/ircd_defs.h ../include/class.h \ + ../include/client.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \ + ../include/ircd_log.h ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/match.h ../include/motd.h \ + ../include/msg.h ../include/numeric.h ../include/numnicks.h \ + ../include/random.h ../include/s_bsd.h ../include/s_debug.h \ + ../include/s_misc.h ../include/s_stats.h ../include/send.h \ + ../include/support.h ../include/sys.h ../include/whowas.h +ircd_log.o: ircd_log.c ../config.h ../include/ircd_log.h \ + ../include/client.h ../include/ircd_defs.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/ircd_alloc.h ../include/ircd_reply.h \ + ../include/ircd_snprintf.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/ircd.h ../include/struct.h \ + ../include/numeric.h ../include/s_debug.h ../include/send.h +ircd_relay.o: ircd_relay.c ../config.h ../include/ircd_relay.h \ + ../include/channel.h ../include/ircd_defs.h ../include/client.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_chattr.h ../include/ircd_features.h \ + ../include/ircd_reply.h ../include/ircd_string.h ../include/match.h \ + ../include/msg.h ../include/numeric.h ../include/numnicks.h \ + ../include/s_debug.h ../include/s_misc.h ../include/s_user.h \ + ../include/send.h +ircd_reply.o: ircd_reply.c ../config.h ../include/ircd_reply.h \ + ../include/client.h ../include/ircd_defs.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_snprintf.h \ + ../include/msg.h ../include/numeric.h ../include/s_conf.h \ + ../include/s_debug.h ../include/send.h +ircd_signal.o: ircd_signal.c ../config.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_defs.h ../include/ircd_events.h \ + ../include/ircd_signal.h ../include/s_conf.h +ircd_snprintf.o: ircd_snprintf.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/channel.h \ + ../include/ircd_snprintf.h ../include/struct.h +ircd_string.o: ircd_string.c ../config.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/ircd_defs.h ../include/ircd_log.h \ + chattr.tab.c +ircd_tea.o: ircd_tea.c ../config.h +ircd_xopen.o: ircd_xopen.c ../config.h ../include/ircd_xopen.h +jupe.o: jupe.c ../config.h ../include/jupe.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \ + ../include/ircd_features.h ../include/ircd_log.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/match.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_bsd.h \ + ../include/s_misc.h ../include/send.h ../include/support.h \ + ../include/sys.h +list.o: list.c ../config.h ../include/class.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/ircd_reply.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_alloc.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/list.h ../include/listener.h \ + ../include/match.h ../include/numeric.h ../include/res.h \ + ../include/s_auth.h ../include/s_bsd.h ../include/s_conf.h \ + ../include/s_debug.h ../include/s_misc.h ../include/s_user.h \ + ../include/send.h ../include/support.h ../include/watch.h \ + ../include/whowas.h +listener.o: listener.c ../config.h ../include/listener.h \ + ../include/ircd_defs.h ../include/ircd_events.h ../include/client.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \ + ../include/ircd_features.h ../include/ircd_osdep.h \ + ../include/ircd_reply.h ../include/ircd_snprintf.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/numeric.h \ + ../include/s_bsd.h ../include/s_conf.h ../include/s_misc.h \ + ../include/s_stats.h ../include/send.h ../include/sys.h +m_account.o: m_account.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/msg.h ../include/numnicks.h \ + ../include/s_user.h ../include/send.h +m_admin.o: m_admin.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_features.h \ + ../include/ircd_reply.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/s_conf.h ../include/s_user.h +m_asll.o: m_asll.c ../config.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/numeric.h ../include/numnicks.h \ + ../include/match.h ../include/msg.h ../include/send.h \ + ../include/s_bsd.h ../include/s_user.h +m_away.o: m_away.c ../config.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_alloc.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_user.h \ + ../include/send.h +m_bmode.o: m_bmode.c ../include/channel.h ../include/ircd_defs.h \ + ../include/client.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../config.h ../include/ircd_handler.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/s_bdd.h ../include/s_debug.h \ + ../include/s_user.h ../include/send.h +m_burst.o: m_burst.c ../config.h ../include/channel.h \ + ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_alloc.h ../include/ircd_features.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/list.h ../include/match.h \ + ../include/msg.h ../include/numeric.h ../include/numnicks.h \ + ../include/s_conf.h ../include/s_misc.h ../include/send.h \ + ../include/support.h +m_clearmode.o: m_clearmode.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/channel.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_alloc.h ../include/ircd_features.h \ + ../include/ircd_log.h ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/list.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_conf.h \ + ../include/send.h ../include/support.h +m_close.o: m_close.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_reply.h ../include/numeric.h \ + ../include/s_bsd.h ../include/send.h +m_config.o: m_config.c ../include/sys.h +m_connect.o: m_connect.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/crule.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_features.h ../include/ircd_log.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/jupe.h ../include/match.h \ + ../include/msg.h ../include/numeric.h ../include/numnicks.h \ + ../include/s_bsd.h ../include/s_conf.h ../include/s_user.h \ + ../include/send.h +m_cnotice.o: m_cnotice.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/s_user.h +m_cprivmsg.o: m_cprivmsg.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/s_user.h +m_create.o: m_create.c ../config.h ../include/channel.h \ + ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/s_debug.h ../include/s_misc.h \ + ../include/s_user.h ../include/send.h +m_db.o: m_db.c ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../config.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_string.h ../include/ircd_chattr.h \ + ../include/list.h ../include/match.h ../include/msg.h \ + ../include/numnicks.h ../include/s_bdd.h ../include/s_conf.h \ + ../include/send.h +m_dbq.o: m_dbq.c ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../config.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_alloc.h ../include/ircd_chattr.h \ + ../include/msg.h ../include/numeric.h ../include/numnicks.h \ + ../include/s_bdd.h ../include/send.h +m_defaults.o: m_defaults.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_reply.h ../include/numeric.h \ + ../include/numnicks.h ../include/send.h ../include/supported.h \ + ../include/channel.h ../include/version.h +m_destruct.o: m_destruct.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/send.h +m_desynch.o: m_desynch.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_bsd.h \ + ../include/send.h +m_die.o: m_die.c ../config.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/s_bsd.h ../include/send.h +m_endburst.o: m_endburst.c ../config.h ../include/channel.h \ + ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/send.h +m_error.o: m_error.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/numeric.h ../include/numnicks.h \ + ../include/s_debug.h ../include/s_misc.h ../include/send.h +m_get.o: m_get.c ../config.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_features.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/numeric.h \ + ../include/numnicks.h ../include/send.h +m_ghost.o: m_ghost.c ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../config.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/msg.h ../include/numnicks.h \ + ../include/s_bdd.h ../include/s_misc.h ../include/s_user.h \ + ../include/send.h +m_gline.o: m_gline.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/gline.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_features.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/match.h \ + ../include/msg.h ../include/numeric.h ../include/numnicks.h \ + ../include/s_conf.h ../include/s_misc.h ../include/send.h \ + ../include/support.h +m_help.o: m_help.c ../config.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/send.h +m_info.o: m_info.c ../config.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/s_misc.h ../include/s_user.h \ + ../include/s_conf.h ../include/send.h ../include/version.h +m_invite.o: m_invite.c ../config.h ../include/channel.h \ + ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/list.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_user.h \ + ../include/send.h +m_ison.o: m_ison.c ../config.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/numeric.h ../include/send.h +m_join.o: m_join.c ../config.h ../include/channel.h \ + ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/gline.h ../include/hash.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_chattr.h ../include/ircd_features.h \ + ../include/ircd_reply.h ../include/ircd_string.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_bdd.h \ + ../include/s_debug.h ../include/s_user.h ../include/send.h +m_jupe.o: m_jupe.c ../config.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/jupe.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_features.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/match.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_conf.h \ + ../include/s_misc.h ../include/send.h ../include/support.h +m_kick.o: m_kick.c ../config.h ../include/channel.h \ + ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/send.h +m_kill.o: m_kill.c ../config.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_features.h ../include/ircd_log.h \ + ../include/ircd_reply.h ../include/ircd_snprintf.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_misc.h \ + ../include/send.h ../include/whowas.h +m_links.o: m_links.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_features.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/match.h \ + ../include/msg.h ../include/numeric.h ../include/numnicks.h \ + ../include/s_user.h ../include/send.h +m_list.o: m_list.c ../config.h ../include/channel.h \ + ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_alloc.h ../include/ircd_chattr.h \ + ../include/ircd_features.h ../include/ircd_log.h \ + ../include/ircd_reply.h ../include/ircd_string.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_bsd.h \ + ../include/send.h +m_lusers.o: m_lusers.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_features.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/querycmds.h \ + ../include/s_user.h ../include/s_serv.h ../include/send.h +m_map.o: m_map.c ../config.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_features.h ../include/ircd_reply.h \ + ../include/ircd_snprintf.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/list.h ../include/match.h \ + ../include/msg.h ../include/numeric.h ../include/s_user.h \ + ../include/s_serv.h ../include/send.h ../include/querycmds.h +m_mode.o: m_mode.c ../config.h ../include/handlers.h ../include/channel.h \ + ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/s_conf.h ../include/s_debug.h \ + ../include/s_user.h ../include/send.h +m_motd.o: m_motd.c ../config.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_features.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/match.h \ + ../include/motd.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/s_conf.h ../include/class.h \ + ../include/s_user.h ../include/send.h +m_names.o: m_names.c ../config.h ../include/channel.h \ + ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/s_user.h ../include/send.h +m_nick.o: m_nick.c ../config.h ../include/IPcheck.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_chattr.h \ + ../include/ircd_features.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/s_bdd.h ../include/s_debug.h \ + ../include/s_misc.h ../include/s_user.h ../include/send.h +m_notice.o: m_notice.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/ircd_chattr.h ../include/ircd_relay.h \ + ../include/ircd_reply.h ../include/ircd_string.h ../include/match.h \ + ../include/msg.h ../include/numeric.h ../include/send.h \ + ../include/handlers.h +m_oper.o: m_oper.c ../config.h ../include/class.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \ + ../include/ircd_features.h ../include/ircd_log.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/ircd_xopen.h ../include/list.h \ + ../include/msg.h ../include/numeric.h ../include/numnicks.h \ + ../include/querycmds.h ../include/s_conf.h ../include/s_debug.h \ + ../include/s_user.h ../include/s_misc.h ../include/send.h \ + ../include/support.h +m_opmode.o: m_opmode.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/channel.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_features.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/send.h \ + ../include/s_conf.h +m_part.o: m_part.c ../config.h ../include/channel.h \ + ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/numeric.h ../include/numnicks.h \ + ../include/send.h +m_pass.o: m_pass.c ../config.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/send.h +m_ping.o: m_ping.c ../config.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/ircd.h \ + ../include/struct.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/opercmds.h ../include/s_debug.h \ + ../include/send.h +m_pong.o: m_pong.c ../config.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/s_user.h ../include/send.h +m_privmsg.o: m_privmsg.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_chattr.h ../include/ircd_features.h \ + ../include/ircd_relay.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/match.h ../include/msg.h \ + ../include/numeric.h ../include/send.h +m_privs.o: m_privs.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/numeric.h \ + ../include/numnicks.h ../include/send.h +m_proto.o: m_proto.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_alloc.h ../include/ircd_chattr.h \ + ../include/ircd_reply.h ../include/ircd_string.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_debug.h \ + ../include/s_misc.h ../include/send.h ../include/supported.h \ + ../include/channel.h ../include/version.h +m_quit.o: m_quit.c ../config.h ../include/channel.h \ + ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/s_misc.h +m_rehash.o: m_rehash.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_log.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/motd.h \ + ../include/numeric.h ../include/s_conf.h ../include/send.h +m_rename.o: m_rename.c ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../config.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/ircd_tea.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_bdd.h \ + ../include/s_conf.h ../include/s_user.h ../include/send.h \ + ../include/watch.h ../include/whowas.h +m_reset.o: m_reset.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_features.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/numeric.h ../include/numnicks.h \ + ../include/send.h +m_restart.o: m_restart.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_log.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/numeric.h \ + ../include/numnicks.h ../include/send.h +m_rping.o: m_rping.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/opercmds.h \ + ../include/s_user.h ../include/send.h +m_rpong.o: m_rpong.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/opercmds.h \ + ../include/send.h +m_server.o: m_server.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/crule.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_features.h ../include/ircd_log.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/jupe.h ../include/list.h \ + ../include/match.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/querycmds.h ../include/s_bsd.h \ + ../include/s_conf.h ../include/s_debug.h ../include/s_misc.h \ + ../include/s_serv.h ../include/send.h ../include/userload.h +m_set.o: m_set.c ../config.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_features.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/numeric.h \ + ../include/numnicks.h ../include/send.h +m_settime.o: m_settime.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_features.h \ + ../include/ircd_reply.h ../include/ircd_snprintf.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/list.h \ + ../include/msg.h ../include/numeric.h ../include/numnicks.h \ + ../include/s_user.h ../include/send.h +m_silence.o: m_silence.c ../config.h ../include/channel.h \ + ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/list.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_user.h \ + ../include/send.h +m_squit.o: m_squit.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_chattr.h \ + ../include/ircd_reply.h ../include/ircd_string.h ../include/numeric.h \ + ../include/numnicks.h ../include/match.h ../include/s_debug.h \ + ../include/s_misc.h ../include/s_user.h ../include/send.h +m_stats.o: m_stats.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_features.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ + ../include/numeric.h ../include/s_stats.h ../include/s_user.h \ + ../include/send.h +m_time.o: m_time.c ../config.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_features.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_misc.h \ + ../include/s_user.h ../include/send.h +m_tmpl.o: m_tmpl.c ../config.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/numeric.h ../include/numnicks.h \ + ../include/send.h +m_topic.o: m_topic.c ../config.h ../include/channel.h \ + ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/send.h +m_trace.o: m_trace.c ../config.h ../include/class.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_features.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/match.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_bsd.h \ + ../include/s_conf.h ../include/s_user.h ../include/send.h \ + ../include/version.h +m_uping.o: m_uping.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/match.h \ + ../include/msg.h ../include/numeric.h ../include/numnicks.h \ + ../include/s_conf.h ../include/s_user.h ../include/send.h \ + ../include/uping.h +m_user.o: m_user.c ../config.h ../include/handlers.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_chattr.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/numeric.h ../include/numnicks.h \ + ../include/s_debug.h ../include/s_misc.h ../include/s_user.h \ + ../include/send.h +m_users.o: m_users.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_features.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/querycmds.h \ + ../include/s_misc.h ../include/s_user.h ../include/s_serv.h \ + ../include/send.h +m_userhost.o: m_userhost.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/numeric.h ../include/s_user.h \ + ../include/struct.h +m_userip.o: m_userip.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/ircd_features.h \ + ../include/numeric.h ../include/s_user.h ../include/struct.h +m_version.o: m_version.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_features.h \ + ../include/ircd_reply.h ../include/ircd_snprintf.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_debug.h \ + ../include/s_user.h ../include/send.h ../include/version.h +m_wallchops.o: m_wallchops.c ../config.h ../include/channel.h \ + ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/s_user.h ../include/send.h +m_wallvoices.o: m_wallvoices.c ../config.h ../include/channel.h \ + ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/s_user.h ../include/send.h +m_wallops.o: m_wallops.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ + ../include/send.h +m_wallusers.o: m_wallusers.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ + ../include/send.h +m_watch.o: m_watch.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/list.h ../include/numeric.h \ + ../include/s_user.h ../include/send.h ../include/watch.h +m_who.o: m_who.c ../config.h ../include/channel.h ../include/ircd_defs.h \ + ../include/client.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_chattr.h \ + ../include/ircd_features.h ../include/ircd_log.h \ + ../include/ircd_reply.h ../include/ircd_string.h ../include/match.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_user.h \ + ../include/send.h ../include/support.h ../include/whocmds.h +m_whois.o: m_whois.c ../config.h ../include/channel.h \ + ../include/ircd_defs.h ../include/client.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_features.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/match.h \ + ../include/msg.h ../include/numeric.h ../include/numnicks.h \ + ../include/s_user.h ../include/send.h ../include/whocmds.h +m_whowas.o: m_whowas.c ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_features.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/s_user.h ../include/s_misc.h \ + ../include/send.h ../include/whowas.h +match.o: match.c ../config.h ../include/match.h ../include/ircd_chattr.h +motd.o: motd.c ../config.h ../include/motd.h ../include/class.h \ + ../include/client.h ../include/ircd_defs.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/fileio.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_alloc.h ../include/ircd_features.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/match.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_conf.h \ + ../include/s_debug.h ../include/s_stats.h ../include/s_user.h \ + ../include/send.h +msgq.o: msgq.c ../config.h ../include/msgq.h ../include/ircd_defs.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \ + ../include/ircd_features.h ../include/ircd_reply.h \ + ../include/ircd_snprintf.h ../include/numeric.h ../include/send.h \ + ../include/s_debug.h ../include/s_stats.h +numnicks.o: numnicks.c ../config.h ../include/numnicks.h \ + ../include/client.h ../include/ircd_defs.h ../include/dbuf.h \ + ../include/msgq.h ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \ + ../include/ircd_string.h ../include/ircd_chattr.h ../include/match.h \ + ../include/s_bsd.h ../include/s_debug.h ../include/s_misc.h +opercmds.o: opercmds.c ../config.h ../include/opercmds.h \ + ../include/class.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_chattr.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/listener.h ../include/match.h \ + ../include/msg.h ../include/numeric.h ../include/numnicks.h \ + ../include/s_conf.h ../include/send.h +packet.o: packet.c ../config.h ../include/packet.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_chattr.h ../include/parse.h \ + ../include/s_bsd.h ../include/s_misc.h ../include/send.h +parse.o: parse.c ../config.h ../include/parse.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/channel.h \ + ../include/handlers.h ../include/hash.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_alloc.h ../include/ircd_chattr.h \ + ../include/ircd_features.h ../include/ircd_reply.h \ + ../include/ircd_string.h ../include/msg.h ../include/numeric.h \ + ../include/numnicks.h ../include/opercmds.h ../include/querycmds.h \ + ../include/res.h ../include/s_bsd.h ../include/s_conf.h \ + ../include/s_debug.h ../include/s_misc.h ../include/s_numeric.h \ + ../include/s_user.h ../include/send.h ../include/sys.h \ + ../include/whocmds.h ../include/whowas.h +querycmds.o: querycmds.c ../config.h ../include/querycmds.h \ + ../include/ircd_features.h +random.o: random.c ../config.h ../include/random.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h \ + ../include/ircd_log.h ../include/ircd_reply.h ../include/send.h +res.o: res.c ../config.h ../include/res.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_alloc.h ../include/ircd_log.h \ + ../include/ircd_osdep.h ../include/ircd_reply.h \ + ../include/ircd_snprintf.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ + ../include/s_bsd.h ../include/s_debug.h ../include/s_misc.h \ + ../include/send.h ../include/support.h ../include/sys.h +s_auth.o: s_auth.c ../config.h ../include/s_auth.h \ + ../include/ircd_events.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \ + ../include/IPcheck.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_alloc.h ../include/ircd_chattr.h \ + ../include/ircd_features.h ../include/ircd_log.h \ + ../include/ircd_osdep.h ../include/ircd_snprintf.h \ + ../include/ircd_string.h ../include/list.h ../include/numeric.h \ + ../include/querycmds.h ../include/res.h ../include/s_bsd.h \ + ../include/s_debug.h ../include/s_misc.h ../include/send.h \ + ../include/sys.h +s_bdd.o: s_bdd.c ../include/s_bdd.h ../config.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \ + ../include/ircd_chattr.h ../include/ircd_log.h ../include/ircd_string.h \ + ../include/ircd_tea.h ../include/list.h ../include/match.h \ + ../include/msg.h ../include/numeric.h ../include/numnicks.h \ + ../include/s_bsd.h ../include/s_conf.h ../include/s_debug.h \ + ../include/s_misc.h ../include/send.h +s_bsd.o: s_bsd.c ../config.h ../include/s_bsd.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/IPcheck.h \ + ../include/channel.h ../include/class.h ../include/hash.h \ + ../include/ircd_log.h ../include/ircd_features.h \ + ../include/ircd_osdep.h ../include/ircd_reply.h \ + ../include/ircd_snprintf.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/ircd.h ../include/struct.h \ + ../include/list.h ../include/listener.h ../include/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/packet.h \ + ../include/parse.h ../include/querycmds.h ../include/res.h \ + ../include/s_auth.h ../include/s_bdd.h ../include/s_conf.h \ + ../include/s_debug.h ../include/s_misc.h ../include/s_user.h \ + ../include/send.h ../include/support.h ../include/sys.h \ + ../include/uping.h ../include/version.h +s_conf.o: s_conf.c ../config.h ../include/s_conf.h ../include/IPcheck.h \ + ../include/class.h ../include/client.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/crule.h ../include/ircd_features.h \ + ../include/fileio.h ../include/gline.h ../include/hash.h \ + ../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \ + ../include/ircd_chattr.h ../include/ircd_log.h ../include/ircd_reply.h \ + ../include/ircd_snprintf.h ../include/ircd_string.h ../include/list.h \ + ../include/listener.h ../include/match.h ../include/motd.h \ + ../include/numeric.h ../include/numnicks.h ../include/opercmds.h \ + ../include/parse.h ../include/res.h ../include/s_bsd.h \ + ../include/s_debug.h ../include/s_misc.h ../include/send.h \ + ../include/support.h ../include/sys.h +s_debug.o: s_debug.c ../config.h ../include/s_debug.h \ + ../include/ircd_defs.h ../include/channel.h ../include/class.h \ + ../include/client.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/gline.h \ + ../include/hash.h ../include/ircd_alloc.h ../include/ircd_features.h \ + ../include/ircd_log.h ../include/ircd_osdep.h ../include/ircd_reply.h \ + ../include/ircd.h ../include/struct.h ../include/jupe.h \ + ../include/list.h ../include/motd.h ../include/numeric.h \ + ../include/numnicks.h ../include/res.h ../include/s_bsd.h \ + ../include/s_conf.h ../include/s_stats.h ../include/send.h \ + ../include/sys.h ../include/whowas.h +s_err.o: s_err.c ../config.h ../include/numeric.h ../include/s_debug.h \ + ../include/ircd_defs.h +s_misc.o: s_misc.c ../config.h ../include/s_misc.h ../include/IPcheck.h \ + ../include/channel.h ../include/ircd_defs.h ../include/client.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ + ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_alloc.h ../include/ircd_features.h \ + ../include/ircd_log.h ../include/ircd_reply.h \ + ../include/ircd_snprintf.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/list.h ../include/match.h \ + ../include/msg.h ../include/numeric.h ../include/numnicks.h \ + ../include/parse.h ../include/querycmds.h ../include/res.h \ + ../include/s_bsd.h ../include/s_conf.h ../include/s_debug.h \ + ../include/s_stats.h ../include/s_user.h ../include/send.h \ + ../include/support.h ../include/... [truncated message content] |
From: Toni G. <zo...@us...> - 2003-01-19 21:20:47
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-19 21:20:42 UTC Modified files: ChangeLog acconfig.h config.h.in include/class.h include/patchlevel.h include/s_conf.h ircd/.cvsignore ircd/Makefile.in ircd/class.c ircd/ircd.c ircd/m_trace.c ircd/motd.c ircd/s_conf.c ircd/s_err.c ircd/s_stats.c Added files: ircd/ircd_lexer.l ircd/ircd_parser.y Log message: 2003-01-19 Toni Garcia <zo...@ir...> 1.0.alpha16 * ircd/s_conf.c: Clase Alfanumerica y nuevo ircd.conf. * ircd/m_trace.c: Clase Alfanumerica. * ircd/ircd_lexer.l: Parseador lexico para el ircd.conf mediante LEX. * ircd/ircd_parser.y: Parseador del nuevo ircd.conf mediante YACC. * include/s_conf.h: Clase Alfanumerica. * {include|ircd}/class.h: La clase pasa de numerica a alfanumerica, o sea puedo poner Clase "Oper" por ejemplo. ---------------------- diff included ---------------------- Index: ircdh/ChangeLog diff -u ircdh/ChangeLog:1.10 ircdh/ChangeLog:1.11 --- ircdh/ChangeLog:1.10 Sun Jan 19 11:37:57 2003 +++ ircdh/ChangeLog Sun Jan 19 13:20:25 2003 @@ -1,3 +1,18 @@ +2003-01-19 Toni Garcia <zo...@ir...> 1.0.alpha16 + * ircd/s_conf.c: Clase Alfanumerica y nuevo ircd.conf. + + * ircd/m_trace.c: Clase Alfanumerica. + + * ircd/ircd_lexer.l: Parseador lexico para el ircd.conf mediante LEX. + + * ircd/ircd_parser.y: Parseador del nuevo ircd.conf mediante YACC. + + * include/s_conf.h: Clase Alfanumerica. + + * {include|ircd}/class.h: La clase pasa de numerica a alfanumerica, o sea + puedo poner Clase "Oper" por ejemplo. + + 2003-01-19 Toni Garcia <zo...@ir...> 1.0.alpha15 * Make Depend. Index: ircdh/acconfig.h diff -u ircdh/acconfig.h:1.1 ircdh/acconfig.h:1.2 --- ircdh/acconfig.h:1.1 Sat Jan 18 11:09:00 2003 +++ ircdh/acconfig.h Sun Jan 19 13:20:25 2003 @@ -1,7 +1,7 @@ #ifndef INCLUDED_config_h #define INCLUDED_config_h /* - * IRC - Internet Relay Chat, include/config.h + * IRC - Internet Relay Chat, acconfig.h * Copyright (C) 2000 Kevin L. Mitchell <kl...@mi...> * * This program is free software; you can redistribute it and/or modify @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: acconfig.h,v 1.1 2003/01/18 19:09:00 zolty Exp $ + * $Id: acconfig.h,v 1.2 2003/01/19 21:20:25 zolty Exp $ */ @TOP@ Index: ircdh/config.h.in diff -u ircdh/config.h.in:1.1 ircdh/config.h.in:1.2 --- ircdh/config.h.in:1.1 Sat Jan 18 11:09:00 2003 +++ ircdh/config.h.in Sun Jan 19 13:20:25 2003 @@ -2,7 +2,7 @@ #ifndef INCLUDED_config_h #define INCLUDED_config_h /* - * IRC - Internet Relay Chat, include/config.h + * IRC - Internet Relay Chat, acconfig.h * Copyright (C) 2000 Kevin L. Mitchell <kl...@mi...> * * This program is free software; you can redistribute it and/or modify @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: config.h.in,v 1.1 2003/01/18 19:09:00 zolty Exp $ + * $Id: config.h.in,v 1.2 2003/01/19 21:20:25 zolty Exp $ */ /* Define to `int' if <sys/types.h> doesn't define. */ Index: ircdh/include/class.h diff -u ircdh/include/class.h:1.4 ircdh/include/class.h:1.5 --- ircdh/include/class.h:1.4 Sat Jan 18 11:09:02 2003 +++ ircdh/include/class.h Sun Jan 19 13:20:26 2003 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: class.h,v 1.4 2003/01/18 19:09:02 zolty Exp $ + * $Id: class.h,v 1.5 2003/01/19 21:20:26 zolty Exp $ */ #ifndef INCLUDED_class_h #define INCLUDED_class_h @@ -35,7 +35,7 @@ */ struct ConnectionClass { struct ConnectionClass *next; - int cc_class; + char *cc_name; unsigned int max_sendq; short ping_freq; short conn_freq; @@ -48,14 +48,14 @@ * Macro's */ -#define ConClass(x) ((x)->cc_class) +#define ConClass(x) ((x)->cc_name) #define PingFreq(x) ((x)->ping_freq) #define ConFreq(x) ((x)->conn_freq) #define MaxLinks(x) ((x)->max_links) #define MaxSendq(x) ((x)->max_sendq) #define Links(x) ((x)->ref_count) -#define ConfClass(x) ((x)->conn_class->cc_class) +#define ConfClass(x) ((x)->conn_class->cc_name) #define ConfPingFreq(x) ((x)->conn_class->ping_freq) #define ConfConFreq(x) ((x)->conn_class->conn_freq) #define ConfMaxLinks(x) ((x)->conn_class->max_links) @@ -72,14 +72,14 @@ extern void class_mark_delete(void); extern void class_delete_marked(void); -extern struct ConnectionClass *find_class(unsigned int cclass); +extern struct ConnectionClass *find_class(const char *name); extern struct ConnectionClass *make_class(void); extern void free_class(struct ConnectionClass *tmp); extern unsigned int get_con_freq(struct ConnectionClass *clptr); -extern unsigned int get_conf_class(const struct ConfItem *aconf); +extern char *get_conf_class(const struct ConfItem *aconf); extern int get_conf_ping(const struct ConfItem *aconf); -extern unsigned int get_client_class(struct Client *acptr); -extern void add_class(unsigned int conclass, unsigned int ping, +extern char *get_client_class(struct Client *acptr); +extern void add_class(char *name, unsigned int ping, unsigned int confreq, unsigned int maxli, unsigned int sendq); extern void check_class(void); extern void report_classes(struct Client *sptr, struct StatDesc *sd, int stat, Index: ircdh/include/patchlevel.h diff -u ircdh/include/patchlevel.h:1.10 ircdh/include/patchlevel.h:1.11 --- ircdh/include/patchlevel.h:1.10 Sun Jan 19 11:37:57 2003 +++ ircdh/include/patchlevel.h Sun Jan 19 13:20:26 2003 @@ -15,10 +15,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: patchlevel.h,v 1.10 2003/01/19 19:37:57 zolty Exp $ + * $Id: patchlevel.h,v 1.11 2003/01/19 21:20:26 zolty Exp $ * */ -#define PATCHLEVEL ".alpha15" +#define PATCHLEVEL ".alpha16" #define RELEASE "1.0" Index: ircdh/include/s_conf.h diff -u ircdh/include/s_conf.h:1.7 ircdh/include/s_conf.h:1.8 --- ircdh/include/s_conf.h:1.7 Sun Jan 19 11:37:58 2003 +++ ircdh/include/s_conf.h Sun Jan 19 13:20:26 2003 @@ -1,7 +1,7 @@ /* * s_conf.h * - * $Id: s_conf.h,v 1.7 2003/01/19 19:37:58 zolty Exp $ + * $Id: s_conf.h,v 1.8 2003/01/19 21:20:26 zolty Exp $ */ #ifndef INCLUDED_s_conf_h #define INCLUDED_s_conf_h @@ -17,6 +17,7 @@ #include <netinet/in.h> /* struct in_addr */ #define INCLUDED_netinet_in_h #endif +#include "client.h" struct Client; struct SLink; @@ -67,6 +68,9 @@ int dns_pending; /* a dns request is pending */ unsigned short port; char bits; /* Number of bits for ipkills */ + struct Privs privs; /* Priviledges for opers. */ + /* Used to detect if a privilege has been touched. */ + struct Privs privs_dirty; }; struct ServerConf { @@ -204,6 +208,9 @@ extern int find_restrict(struct Client *cptr); extern struct MotdItem *read_motd(const char *motdfile); extern char *find_quarantine(const char *chname); +extern void lookup_confhost(struct ConfItem *aconf); + +extern void yyerror(const char *msg); /* MIRAR */ #ifdef ESNET_NEG Index: ircdh/ircd/.cvsignore diff -u ircdh/ircd/.cvsignore:1.2 ircdh/ircd/.cvsignore:1.3 --- ircdh/ircd/.cvsignore:1.2 Thu Oct 24 02:57:52 2002 +++ ircdh/ircd/.cvsignore Sun Jan 19 13:20:28 2003 @@ -5,3 +5,7 @@ chkconf table_gen chattr.tab.c +lex.yy.c +y.tab.c +y.tab.h + Index: ircdh/ircd/Makefile.in diff -u ircdh/ircd/Makefile.in:1.12 ircdh/ircd/Makefile.in:1.13 --- ircdh/ircd/Makefile.in:1.12 Sun Jan 19 11:37:58 2003 +++ ircdh/ircd/Makefile.in Sun Jan 19 13:20:28 2003 @@ -38,6 +38,8 @@ CHGRP = chgrp MKDIR = mkdir TOUCH = touch +LEX = flex +YACC = bison -y GREP = grep OSDEP_C = @OSDEP_C@ ENGINE_C = @ENGINE_C@ @@ -100,6 +102,7 @@ ircd_tea.c \ ircd_xopen.c \ jupe.c \ + lex.yy.c \ list.c \ listener.c \ m_account.c \ @@ -210,15 +213,15 @@ userload.c \ watch.c \ whocmds.c \ - whowas.c + whowas.c \ + y.tab.c -CHKCONF_SRC = chkconf.c SRC = ${IRCD_SRC} ${OSDEP_C} ${ENGINE_C} OBJS = ${SRC:%.c=%.o} -DEP_SRC = ${IRCD_SRC} ${OSDEP_SRC} ${ENGINE_SRC} ${CHKCONF_SRC} +DEP_SRC = ${IRCD_SRC} ${OSDEP_SRC} ${ENGINE_SRC} all: ( cd ..; make -f Makefile ) @@ -228,7 +231,7 @@ .c.o: ${CC} ${CFLAGS} ${CPPFLAGS} -c $< -o $@ -build: ircd chkconf +build: ircd ircd: ${OBJS} ../include/patchlevel.h version.o ${PURIFY} ${CC} ${LDFLAGS} ${OBJS} version.o ${RINGLOG_O} ${LDFLAGS} ${LIBS} \ @@ -257,6 +260,12 @@ chattr.tab.c: table_gen ./table_gen > chattr.tab.c +lex.yy.c: ircd_lexer.l y.tab.h + ${LEX} ${srcdir}/ircd_lexer.l + +y.tab.c y.tab.h: ircd_parser.y + ${YACC} -d ${srcdir}/ircd_parser.y + chkcrule.o: crule.c ${CC} ${CFLAGS} ${CPPFLAGS} -DCR_CHKCONF -o chkcrule.o -c \ ${srcdir}/crule.c @@ -361,7 +370,7 @@ @echo "Please remove the contents of ${DPATH} manually" clean: - ${RM} -f *.o *.bak ircd version.c chkconf ircd_osdep.c chattr.tab.c table_gen + ${RM} -f *.o *.bak ircd version.c chkconf ircd_osdep.c chattr.tab.c table_gen y.tab.* lex.yy.* distclean: clean ${RM} -f Makefile stamp-m @@ -423,7 +432,8 @@ ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ ../include/ircd_events.h ../include/ircd_handler.h ../include/ircd.h \ ../include/struct.h ../include/ircd_alloc.h ../include/ircd_features.h \ - ../include/ircd_reply.h ../include/list.h ../include/numeric.h \ + ../include/ircd_reply.h ../include/ircd_string.h \ + ../include/ircd_chattr.h ../include/list.h ../include/numeric.h \ ../include/s_conf.h ../include/s_debug.h ../include/send.h client.o: client.c ../config.h ../include/client.h ../include/ircd_defs.h \ ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ @@ -517,7 +527,8 @@ ../include/s_debug.h ../include/send.h ircd_signal.o: ircd_signal.c ../config.h ../include/ircd.h \ ../include/struct.h ../include/ircd_defs.h ../include/ircd_events.h \ - ../include/ircd_signal.h ../include/s_conf.h + ../include/ircd_signal.h ../include/s_conf.h ../include/client.h \ + ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h ircd_snprintf.o: ircd_snprintf.c ../config.h ../include/client.h \ ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ ../include/ircd_events.h ../include/ircd_handler.h ../include/channel.h \ @@ -537,6 +548,8 @@ ../include/numeric.h ../include/numnicks.h ../include/s_bsd.h \ ../include/s_misc.h ../include/send.h ../include/support.h \ ../include/sys.h +lex.yy.o: lex.yy.c ../include/ircd.h ../include/struct.h \ + ../include/ircd_defs.h y.tab.h list.o: list.c ../config.h ../include/class.h ../include/client.h \ ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ ../include/ircd_events.h ../include/ircd_handler.h \ @@ -1226,10 +1239,10 @@ ../include/s_debug.h ../include/s_misc.h ../include/s_user.h \ ../include/send.h ../include/support.h ../include/sys.h \ ../include/uping.h ../include/version.h -s_conf.o: s_conf.c ../config.h ../include/s_conf.h ../include/IPcheck.h \ - ../include/class.h ../include/client.h ../include/ircd_defs.h \ - ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ - ../include/ircd_handler.h ../include/crule.h ../include/ircd_features.h \ +s_conf.o: s_conf.c ../config.h ../include/s_conf.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/IPcheck.h \ + ../include/class.h ../include/crule.h ../include/ircd_features.h \ ../include/fileio.h ../include/gline.h ../include/hash.h \ ../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \ ../include/ircd_chattr.h ../include/ircd_log.h ../include/ircd_reply.h \ @@ -1367,6 +1380,19 @@ ../include/numeric.h ../include/s_debug.h ../include/s_misc.h \ ../include/s_user.h ../include/send.h ../include/support.h \ ../include/sys.h ../include/msg.h +y.tab.o: y.tab.c ../config.h ../include/s_conf.h ../include/client.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ + ../include/ircd_events.h ../include/ircd_handler.h ../include/class.h \ + ../include/crule.h ../include/ircd_features.h ../include/fileio.h \ + ../include/gline.h ../include/hash.h ../include/ircd.h \ + ../include/struct.h ../include/ircd_alloc.h ../include/ircd_chattr.h \ + ../include/ircd_log.h ../include/ircd_reply.h \ + ../include/ircd_snprintf.h ../include/ircd_string.h ../include/list.h \ + ../include/listener.h ../include/match.h ../include/motd.h \ + ../include/numeric.h ../include/numnicks.h ../include/opercmds.h \ + ../include/parse.h ../include/res.h ../include/s_bsd.h \ + ../include/s_debug.h ../include/s_misc.h ../include/send.h \ + ../include/support.h ../include/sys.h os_bsd.o: os_bsd.c ../config.h ../include/ircd_osdep.h ../include/msgq.h \ ../include/ircd_defs.h os_linux.o: os_linux.c ../config.h ../include/ircd_osdep.h \ @@ -1391,9 +1417,3 @@ engine_select.o: engine_select.c ../config.h ../include/ircd_events.h \ ../include/ircd.h ../include/struct.h ../include/ircd_defs.h \ ../include/ircd_log.h ../include/s_debug.h -chkconf.o: chkconf.c ../config.h ../include/s_conf.h ../include/client.h \ - ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ - ../include/ircd_events.h ../include/ircd_handler.h ../include/class.h \ - ../include/fileio.h ../include/ircd.h ../include/struct.h \ - ../include/ircd_alloc.h ../include/ircd_chattr.h \ - ../include/ircd_string.h ../include/sys.h Index: ircdh/ircd/class.c diff -u ircdh/ircd/class.c:1.4 ircdh/ircd/class.c:1.5 --- ircdh/ircd/class.c:1.4 Sun Jan 19 11:37:58 2003 +++ ircdh/ircd/class.c Sun Jan 19 13:20:29 2003 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: class.c,v 1.4 2003/01/19 19:37:58 zolty Exp $ + * $Id: class.c,v 1.5 2003/01/19 21:20:29 zolty Exp $ */ #include "config.h" @@ -26,6 +26,7 @@ #include "ircd_alloc.h" #include "ircd_features.h" #include "ircd_reply.h" +#include "ircd_string.h" #include "list.h" #include "numeric.h" #include "s_conf.h" @@ -52,8 +53,8 @@ struct ConnectionClass *tmp; tmp = (struct ConnectionClass *)MyMalloc(sizeof(struct ConnectionClass)); + tmp->ref_count = 1; assert(0 != tmp); - tmp->ref_count = 0; ++connClassAllocCount; return tmp; } @@ -63,6 +64,8 @@ if (p) { assert(0 == p->valid); + if (p->cc_name) + MyFree(p->cc_name); MyFree(p); --connClassAllocCount; } @@ -76,7 +79,8 @@ if (!connClassList) connClassList = (struct ConnectionClass *)make_class(); - ConClass(connClassList) = 0; + /* We had better not try and free this... */ + ConClass(connClassList) = "default"; PingFreq(connClassList) = feature_int(FEAT_PINGFREQUENCY); ConFreq(connClassList) = feature_int(FEAT_CONNECTFREQUENCY); MaxLinks(connClassList) = feature_int(FEAT_MAXIMUM_LINKS); @@ -116,7 +120,7 @@ for (prev = cl = connClassList; cl; cl = prev->next) { - Debug((DEBUG_DEBUG, "Class %d : CF: %d PF: %d ML: %d LI: %d SQ: %d", + Debug((DEBUG_DEBUG, "Class %s : CF: %d PF: %d ML: %d LI: %d SQ: %d", ConClass(cl), ConFreq(cl), PingFreq(cl), MaxLinks(cl), Links(cl), MaxSendq(cl))); /* @@ -127,20 +131,20 @@ else { prev->next = cl->next; - if (0 == cl->ref_count) + if (0 == --cl->ref_count) free_class(cl); } } } -unsigned int get_conf_class(const struct ConfItem *aconf) +char *get_conf_class(const struct ConfItem *aconf) { if ((aconf) && (aconf->conn_class)) return (ConfClass(aconf)); Debug((DEBUG_DEBUG, "No Class For %s", (aconf) ? aconf->name : "*No Conf*")); - return (BAD_CONF_CLASS); + return NULL; } int get_conf_ping(const struct ConfItem *aconf) @@ -154,29 +158,25 @@ return -1; } -unsigned int get_client_class(struct Client *acptr) +char *get_client_class(struct Client *acptr) { struct SLink *tmp; struct ConnectionClass *cl; - unsigned int retc = BAD_CLIENT_CLASS; + /* Return the most recent(first on LL) client class... */ if (acptr && !IsMe(acptr) && (cli_confs(acptr))) for (tmp = cli_confs(acptr); tmp; tmp = tmp->next) { #if 1 - if (!tmp->value.aconf || !(cl = tmp->value.aconf->conn_class)) + if (tmp->value.aconf && (cl = tmp->value.aconf->conn_class)) #else /* PArche /OPER */ if (!tmp->value.aconf || !(cl = tmp->value.aconf->conn_class) || !(tmp->value.aconf->status & (CONF_CLIENT | CONF_SERVER))) #endif - continue; - if (ConClass(cl) > retc || retc == BAD_CLIENT_CLASS) - retc = ConClass(cl); + return ConClass(cl); } - Debug((DEBUG_DEBUG, "Returning Class %d For %s", retc, cli_name(acptr))); - - return (retc); + return "(null->class)"; } unsigned int get_con_freq(struct ConnectionClass *clptr) @@ -194,24 +194,28 @@ * if no present entry is found, then create a new one and add it in * immeadiately after the first one (class 0). */ -void add_class(unsigned int conClass, unsigned int ping, unsigned int confreq, +void add_class(char *name, unsigned int ping, unsigned int confreq, unsigned int maxli, unsigned int sendq) { struct ConnectionClass *t; struct ConnectionClass *p; - t = find_class(conClass); - if ((t == connClassList) && (conClass != 0)) + t = find_class(name); + if ((t == connClassList) && (name != NULL)) { p = (struct ConnectionClass *)make_class(); p->next = t->next; t->next = p; } else + { + if (ConClass(t) != NULL) + MyFree(ConClass(t)); p = t; - Debug((DEBUG_DEBUG, "Add Class %u: cf: %u pf: %u ml: %u sq: %d", - conClass, confreq, ping, maxli, sendq)); - ConClass(p) = conClass; + } + Debug((DEBUG_DEBUG, "Add Class %s: cf: %u pf: %u ml: %u sq: %d", + name, confreq, ping, maxli, sendq)); + ConClass(p) = name; ConFreq(p) = confreq; PingFreq(p) = ping; MaxLinks(p) = maxli; @@ -221,13 +225,13 @@ Links(p) = 0; } -struct ConnectionClass *find_class(unsigned int cclass) +struct ConnectionClass *find_class(const char *name) { struct ConnectionClass *cltmp; for (cltmp = connClassList; cltmp; cltmp = cltmp->next) { - if (ConClass(cltmp) == cclass) + if (!ircd_strcmp(ConClass(cltmp), name)) return cltmp; } return connClassList; @@ -265,7 +269,7 @@ !(tmp->value.aconf->status & (CONF_CLIENT | CONF_SERVER))) #endif continue; - if (ConClass(cl) != BAD_CLIENT_CLASS) + if (ConClass(cl) != NULL) { cli_max_sendq(cptr) = MaxSendq(cl); return cli_max_sendq(cptr); Index: ircdh/ircd/ircd.c diff -u ircdh/ircd/ircd.c:1.9 ircdh/ircd/ircd.c:1.10 --- ircdh/ircd/ircd.c:1.9 Sat Jan 18 14:54:31 2003 +++ ircdh/ircd/ircd.c Sun Jan 19 13:20:29 2003 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: ircd.c,v 1.9 2003/01/18 22:54:31 zolty Exp $ + * $Id: ircd.c,v 1.10 2003/01/19 21:20:29 zolty Exp $ */ #include "config.h" @@ -248,7 +248,7 @@ struct ConnectionClass *cltmp; struct ConfItem *con_conf = 0; struct Jupe *ajupe; - unsigned int con_class = 0; + char *con_class = NULL; assert(ET_EXPIRE == ev_type(ev)); assert(0 != ev_timer(ev)); Index: ircdh/ircd/ircd_lexer.l diff -u /dev/null ircdh/ircd/ircd_lexer.l:1.1 --- /dev/null Sun Jan 19 13:20:46 2003 +++ ircdh/ircd/ircd_lexer.l Sun Jan 19 13:20:30 2003 @@ -0,0 +1,153 @@ +/* + * ircd_parser.y: A yacc/bison parser for ircd config files. + * This is part of ircu, an Internet Relay Chat server. + * The contents of this file are Copyright(C) 2001 by Andrew Miller, the + * ircd-hybrid team and the ircu 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: ircd_lexer.l,v 1.1 2003/01/19 21:20:30 zolty Exp $ + */ + +%{ +#include <unistd.h> +#include <stdio.h> +#include "ircd.h" +#include "y.tab.h" + +extern int lineno; + +void +init_lexer(void) +{ + yyin = fopen(configfile, "r"); + if (yyin == NULL) + yy_fatal_error("Could not open the configuration file."); + YY_NEW_FILE; + lineno = 1; +} + +%} +%option noyywrap +%option case-insensitive +%option nounput + + +WHITE [ \t\r]+ +SHCOMMENT #[^\n]* +NUMBER [0-9]+ +QSTRING \"[^"\n]+[\"\n] +%% + +{QSTRING} {yytext[yyleng-1] = 0; yylval.text = yytext+1; return QSTRING;} +{NUMBER} {yylval.num = strtoul(yytext, NULL, 10); return NUMBER;} +{WHITE} ; +{SHCOMMENT} ; + +admin return ADMIN; +administrator return ADMIN; +general return GENERAL; +location return LOCATION; +contact return CONTACT; +connect return CONNECT; +class return CLASS; +pingfreq return PINGFREQ; +connectfreq return CONNECTFREQ; +maxlinks return MAXLINKS; +sendq return SENDQ; +name return NAME; +host return HOST; +password return PASS; +pass return PASS; +seconds return SECONDS; +minutes return MINUTES; +hours return HOURS; +days return DAYS; +weeks return WEEKS; +months return MONTHS; +years return YEARS; +decades return DECADES; +bytes return BYTES; +b return BYTES; +kbytes return KBYTES; +kilobytes return KBYTES; +kb return KBYTES; +mbytes return MBYTES; +megabytes return MBYTES; +mb return MBYTES; +gbytes return GBYTES; +gigabytes return GBYTES; +gb return GBYTES; +tbytes return TBYTES; +terabytes return TBYTES; +tb return TBYTES; +port return PORT; +server return SERVER; +yes return YES; +no return NO; +hub return HUB; +leaf return LEAF; +uworld return UWORLD; +operator return OPER; +oper return OPER; +local return LOCAL; +vhost return VHOST; +mask return MASK; +hidden return HIDDEN; +motd return MOTD; +numeric return NUMERIC; +nick return NICK; +jupe return JUPE; +description return DESCRIPTION; +client return CLIENT; +real return REAL; +realname return REAL; +reason return REASON; +file return TFILE; +rule return RULE; +all return ALL; +ip return IP; +crule return CRULE; +kill return KILL; +quarantine return QUARANTINE; +features return FEATURES; +channel return CHANNEL; +bypass_local_channel_limits return TPRIV_CHAN_LIMIT; +set_local_channel_modes return TPRIV_MODE_LCHAN; +protected_local_channel return TPRIV_DEOP_LCHAN; +bypass_join_local_channels return TPRIV_WALK_LCHAN; +global_kill return TPRIV_KILL; +local_kill return TPRIV_LOCAL_KILL; +rehash return TPRIV_REHASH; +restart return TPRIV_RESTART; +die return TPRIV_DIE; +gline return TPRIV_GLINE; +local_gline return TPRIV_LOCAL_GLINE; +jupe_server return TPRIV_JUPE; +local_jupe_server return TPRIV_LOCAL_JUPE; +hack_channel_modes return TPRIV_OPMODE; +change_settings return TPRIV_SET; +extended_who_information return TPRIV_WHOX; +gline_channels return TPRIV_BADCHAN; +local_gline_channels return TPRIV_LOCAL_BADCHAN; +see_private_channels return TPRIV_SEE_CHAN; +see_invisible_users return TPRIV_SHOW_INVIS; +list_all_invisible_users return TPRIV_SHOW_ALL_INVIS; +globally_opered return TPRIV_PROPAGATE; +unlimited_who_queries return TPRIV_UNLIMIT_QUERY; +oper_status_display return TPRIV_DISPLAY; +see_other_opers return TPRIV_SEE_OPERS; +wide_glines return TPRIV_WIDE_GLINE; +\n lineno++; +. return yytext[0]; Index: ircdh/ircd/ircd_parser.y diff -u /dev/null ircdh/ircd/ircd_parser.y:1.1 --- /dev/null Sun Jan 19 13:20:46 2003 +++ ircdh/ircd/ircd_parser.y Sun Jan 19 13:20:30 2003 @@ -0,0 +1,907 @@ +/* + * ircd_parser.y: A yacc/bison parser for ircd config files. + * This is part of ircu, an Internet Relay Chat server. + * The contents of this file are Copyright(C) 2001 by Andrew Miller, the + * ircd-hybrid team and the ircu 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: ircd_parser.y,v 1.1 2003/01/19 21:20:30 zolty Exp $ + */ +%{ + +#include "config.h" +#include "s_conf.h" +#include "class.h" +#include "client.h" +#include "crule.h" +#include "ircd_features.h" +#include "fileio.h" +#include "gline.h" +#include "hash.h" +#include "ircd.h" +#include "ircd_alloc.h" +#include "ircd_chattr.h" +#include "ircd_log.h" +#include "ircd_reply.h" +#include "ircd_snprintf.h" +#include "ircd_string.h" +#include "list.h" +#include "listener.h" +#include "match.h" +#include "motd.h" +#include "numeric.h" +#include "numnicks.h" +#include "opercmds.h" +#include "parse.h" +#include "res.h" +#include "s_bsd.h" +#include "s_conf.h" +#include "s_debug.h" +#include "s_misc.h" +#include "send.h" +#include "struct.h" +#include "support.h" +#include "sys.h" +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <arpa/inet.h> +#define MAX_STRINGS 80 /* Maximum number of feature params. */ + extern struct LocalConf localConf; + extern struct DenyConf* denyConfList; + extern struct CRuleConf* cruleConfList; + extern struct ServerConf* serverConfList; + extern struct qline *GlobalQuarantineList; + + + int yylex(void); + /* Now all the globals we need :/... */ + int tping, tconn, maxlinks, sendq, port; + int stringno; + char *name, *pass, *host; + char *stringlist[MAX_STRINGS]; + struct ConnectionClass *c_class; + struct ConfItem *aconf; + struct DenyConf *dconf; + struct ServerConf *sconf; + struct qline *qconf = NULL; +%} + +%token <text> QSTRING +%token <num> NUMBER +%token <text> FNAME + +%token GENERAL +%token ADMIN +%token LOCATION +%token CONTACT +%token CONNECT +%token CLASS +%token CHANNEL +%token PINGFREQ +%token CONNECTFREQ +%token MAXLINKS +%token SENDQ +%token NAME +%token HOST +%token PASS +%token LOCAL +%token SECONDS +%token MINUTES +%token HOURS +%token DAYS +%token WEEKS +%token MONTHS +%token YEARS +%token DECADES +%token BYTES +%token KBYTES +%token MBYTES +%token GBYTES +%token TBYTES +%token SERVER +%token PORT +%token MASK +%token HUB +%token LEAF +%token UWORLD +%token YES +%token NO +%token OPER +%token PORT +%token VHOST +%token MASK +%token HIDDEN +%token MOTD +%token JUPE +%token NICK +%token NUMERIC +%token DESCRIPTION +%token CLIENT +%token KILL +%token CRULE +%token REAL +%token REASON +%token TFILE +%token RULE +%token ALL +%token IP +%token FEATURES +%token QUARANTINE +/* and now a lot of priviledges... */ +%token TPRIV_CHAN_LIMIT, TPRIV_MODE_LCHAN, TPRIV_DEOP_LCHAN, TPRIV_WALK_LCHAN +%token TPRIV_KILL, TPRIV_LOCAL_KILL, TPRIV_REHASH, TPRIV_RESTART, TPRIV_DIE +%token TPRIV_GLINE, TPRIV_LOCAL_GLINE, TPRIV_JUPE, TPRIV_LOCAL_JUPE +%token TPRIV_LOCAL_OPMODE, TPRIV_OPMODE, TPRIV_SET, TPRIV_WHOX, TPRIV_BADCHAN +%token TPRIV_LOCAL_BADCHAN +%token TPRIV_SEE_CHAN, TPRIV_SHOW_INVIS, TPRIV_SHOW_ALL_INVIS, TPRIV_PROPAGATE +%token TPRIV_UNLIMIT_QUERY, TPRIV_DISPLAY, TPRIV_SEE_OPERS, TPRIV_WIDE_GLINE +/* and some types... */ +%type <num> sizespec +%type <num> timespec, timefactor, factoredtimes, factoredtime +%type <num> expr, yesorno, privtype +%left '+' '-' +%left '*' '/' + +%union{ + char *text; + int num; +} + +%% +/* Blocks in the config file... */ +blocks: blocks block | block; +block: adminblock | generalblock | classblock | connectblock | + serverblock | operblock | portblock | jupeblock | clientblock | + killblock | cruleblock | motdblock | featuresblock | quarantineblock; + +/* The timespec, sizespec and expr was ripped straight from + * ircd-hybrid-7. */ +timespec: expr | factoredtimes; + +factoredtimes: factoredtimes factoredtime +{ + $$ = $1 + $2; +} | factoredtime; + +factoredtime: expr timefactor +{ + $$ = $1 * $2; +}; + +timefactor: SECONDS { $$ = 1; } +| MINUTES { $$ = 60; } +| HOURS { $$ = 60 * 60; } +| DAYS { $$ = 60 * 60 * 24; } +| WEEKS { $$ = 60 * 60 * 24 * 7; } +| MONTHS { $$ = 60 * 60 * 24 * 7 * 4; } +| YEARS { $$ = 60 * 60 * 24 * 365; } +| DECADES { $$ = 60 * 60 * 24 * 365 * 10; }; + + +sizespec: expr + = { + $$ = $1; + } + | expr BYTES + = { + $$ = $1; + } + | expr KBYTES + = { + $$ = $1 * 1024; + } + | expr MBYTES + = { + $$ = $1 * 1024 * 1024; + } + | expr GBYTES + = { + $$ = $1 * 1024 * 1024 * 1024; + } + | expr TBYTES + = { + $$ = $1 * 1024 * 1024 * 1024; + } + ; + +/* this is an arithmatic expression */ +expr: NUMBER + = { + $$ = $1; + } + | expr '+' expr + = { + $$ = $1 + $3; + } + | expr '-' expr + = { + $$ = $1 - $3; + } + | expr '*' expr + = { + $$ = $1 * $3; + } + | expr '/' expr + = { + $$ = $1 / $3; + } +/* leave this out until we find why it makes BSD yacc dump core -larne + | '-' expr %prec NEG + = { + $$ = -$2; + } */ + | '(' expr ')' + = { + $$ = $2; + } + ; + +jupeblock: JUPE '{' jupeitems '}' ';' ; +jupeitems: jupeitem jupeitems | jupeitem; +jupeitem: jupenick; +jupenick: NICK '=' QSTRING +{ + addNickJupes(yylval.text); +} ';'; + +generalblock: GENERAL '{' generalitems '}' ';' ; +generalitems: generalitem generalitems | generalitem; +generalitem: generalnumeric | generalname | generalvhost | generaldesc; +generalnumeric: NUMERIC '=' NUMBER ';' +{ + if (localConf.numeric == 0) + localConf.numeric = yylval.num; +}; + +generalname: NAME '=' QSTRING ';' +{ + if (localConf.name == NULL) + DupString(localConf.name, yylval.text); +}; + +generaldesc: DESCRIPTION '=' QSTRING ';' +{ + MyFree(localConf.description); + DupString(localConf.description, yylval.text); + ircd_strncpy(cli_info(&me), yylval.text, REALLEN); +}; + +generalvhost: VHOST '=' QSTRING ';' +{ + if (INADDR_NONE == + (localConf.vhost_address.s_addr = inet_addr(yylval.text))) + localConf.vhost_address.s_addr = INADDR_ANY; +}; + +adminblock: ADMIN '{' adminitems '}' +{ + if (localConf.location1 == NULL) + DupString(localConf.location1, ""); + if (localConf.location2 == NULL) + DupString(localConf.location2, ""); + if (localConf.contact == NULL) + DupString(localConf.contact, ""); +} ';'; +adminitems: adminitems adminitem | adminitem; +adminitem: adminlocation | admincontact; +adminlocation: LOCATION '=' QSTRING ';' +{ + if (localConf.location1 == NULL) + DupString(localConf.location1, yylval.text); + else if (localConf.location2 == NULL) + DupString(localConf.location2, yylval.text); + /* Otherwise just drop it. -A1kmm */ +}; +admincontact: CONTACT '=' QSTRING ';' +{ + if (localConf.contact != NULL) + MyFree(localConf.contact); + DupString(localConf.contact, yylval.text); +}; + +classblock: CLASS { + name = NULL; + tping = 90; + tconn = 0; + maxlinks = 0; + sendq = 0; +} '{' classitems '}' +{ + if (name != NULL) + { + add_class(name, tping, tconn, maxlinks, sendq); + } +} ';'; +classitems: classitem classitems | classitem; +classitem: classname | classpingfreq | classconnfreq | classmaxlinks | + classsendq; +classname: NAME '=' QSTRING ';' +{ + MyFree(name); + DupString(name, yylval.text); +}; +classpingfreq: PINGFREQ '=' timespec ';' +{ + tping = yylval.num; +}; +classconnfreq: CONNECTFREQ '=' timespec ';' +{ + tconn = yylval.num; +}; +classmaxlinks: MAXLINKS '=' expr ';' +{ + maxlinks = yylval.num; +}; +classsendq: SENDQ '=' sizespec ';' +{ + sendq = yylval.num; +}; + +connectblock: CONNECT +{ + name = pass = host = NULL; + c_class = NULL; + port = 0; +} '{' connectitems '}' +{ + if (name != NULL && pass != NULL && host != NULL && c_class != NULL && + /*ccount < MAXCONFLINKS &&*/ !strchr(host, '*') && + !strchr(host, '?')) + { + aconf = make_conf(); + aconf->status = CONF_SERVER; + aconf->name = name; + aconf->passwd = pass; + aconf->conn_class = c_class; + aconf->port = port; + aconf->status = CONF_SERVER; + aconf->host = host; + aconf->next = GlobalConfList; + aconf->ipnum.s_addr = INADDR_NONE; + lookup_confhost(aconf); + GlobalConfList = aconf; + } + else + { + MyFree(name); + MyFree(pass); + MyFree(host); + name = pass = host = NULL; + } +}';'; +connectitems: connectitem connectitems | connectitem; +connectitem: connectname | connectpass | connectclass | connecthost + | connectport; +connectname: NAME '=' QSTRING ';' +{ + MyFree(name); + DupString(name, yylval.text); +}; +connectpass: PASS '=' QSTRING ';' +{ + MyFree(pass); + DupString(pass, yylval.text); +}; +connectclass: CLASS '=' QSTRING ';' +{ + c_class = find_class(yylval.text); +}; +connecthost: HOST '=' QSTRING ';' +{ + MyFree(host); + DupString(host, yylval.text); +}; +connectport: PORT '=' NUMBER ';' +{ + port = yylval.num; +}; + +serverblock: SERVER +{ + aconf = (struct ConfItem*) MyMalloc(sizeof(*aconf)); + memset(aconf, 0, sizeof(*aconf)); +} '{' serveritems '}' +{ + if (aconf->status == 0) + { + MyFree(aconf->host); + MyFree(aconf->name); + MyFree(aconf); + aconf = NULL; + } + else + { + aconf->next = GlobalConfList; + GlobalConfList = aconf; + } +} ';'; +serveritems: serveritem serveritems | serveritem; +serveritem: servername | servermask | serverhub | serverleaf | + serveruworld; +servername: NAME '=' QSTRING +{ + MyFree(aconf->name); + DupString(aconf->name, yylval.text); +} ';' ; +servermask: MASK '=' QSTRING +{ + MyFree(aconf->host); + DupString(aconf->host, yylval.text); +} ';' ; +/* XXX - perhaps we should do this the hybrid way in connect blocks + * instead -A1kmm. */ +serverhub: HUB '=' YES ';' +{ + aconf->status |= CONF_HUB; + aconf->status &= ~CONF_LEAF; +} +| HUB '=' NO +{ + aconf->status &= ~CONF_HUB; +} ';'; +serverleaf: LEAF '=' YES ';' +{ + if (!(aconf->status & CONF_HUB && aconf->status & CONF_UWORLD)) + aconf->status |= CONF_LEAF; +} +| LEAF '=' NO ';' +{ + aconf->status &= ~CONF_LEAF; +}; +serveruworld: UWORLD '=' YES ';' +{ + aconf->status |= CONF_UWORLD; + aconf->status &= ~CONF_LEAF; +} +| UWORLD '=' NO ';' +{ + aconf->status &= ~CONF_UWORLD; +}; + +operblock: OPER +{ + aconf = (struct ConfItem*) MyMalloc(sizeof(*aconf)); + memset(aconf, 0, sizeof(*aconf)); + aconf->status = CONF_OPERATOR; +} '{' operitems '}' ';' +{ + if (aconf->name != NULL && aconf->passwd != NULL && aconf->host != NULL) + { + aconf->next = GlobalConfList; + GlobalConfList = aconf; + } + else + { + log_write(LS_CONFIG, L_ERROR, 0, "operator blocks need a name, password, and host."); + MyFree(aconf->name); + MyFree(aconf->passwd); + MyFree(aconf->host); + MyFree(aconf); + aconf = NULL; + } +}; +operitems: operitem | operitems operitem; +operitem: opername | operpass | operlocal | operhost | operclass | operpriv; + +opername: NAME '=' QSTRING ';' +{ + MyFree(aconf->name); + DupString(aconf->name, yylval.text); +}; + +operpass: PASS '=' QSTRING ';' +{ + MyFree(aconf->passwd); + DupString(aconf->passwd, yylval.text); +}; + +operlocal: LOCAL '=' YES ';' +{ + /* XXX it would be good to get rid of local operators and add same + * permission values here. But for now, I am just going with local + * opers... */ + aconf->status = CONF_LOCOP; +} | LOCAL '=' NO ';' +{ + aconf->status = CONF_OPERATOR; +}; + +operhost: HOST '=' QSTRING ';' +{ + MyFree(aconf->host); + if (!strchr(yylval.text, '@')) + { + int uh_len; + char *b = (char*) MyMalloc((uh_len = strlen(yylval.text)+3)); + ircd_snprintf(0, b, uh_len, "*@%s", yylval.text); + aconf->host = b; + } + else + DupString(aconf->host, yylval.text); +}; + +operclass: CLASS '=' QSTRING ';' +{ + aconf->conn_class = find_class(yylval.text); +}; + +operpriv: privtype '=' yesorno ';' +{ + if ($3 == 1) + { + PrivSet(&aconf->privs_dirty, $1); + PrivSet(&aconf->privs, $1); + } + else + { + PrivSet(&aconf->privs_dirty, $1); + PrivClr(&aconf->privs, $1); + } +}; + +privtype: TPRIV_CHAN_LIMIT { $$ = PRIV_CHAN_LIMIT; } | + TPRIV_MODE_LCHAN { $$ = PRIV_MODE_LCHAN; } | + TPRIV_DEOP_LCHAN { $$ = PRIV_DEOP_LCHAN; } | + TPRIV_WALK_LCHAN { $$ = PRIV_WALK_LCHAN; } | + TPRIV_KILL { $$ = PRIV_KILL; } | + TPRIV_LOCAL_KILL { $$ = PRIV_LOCAL_KILL; } | + TPRIV_REHASH { $$ = PRIV_REHASH; } | + TPRIV_RESTART { $$ = PRIV_RESTART; } | + TPRIV_DIE { $$ = PRIV_DIE; } | + TPRIV_GLINE { $$ = PRIV_GLINE; } | + TPRIV_LOCAL_GLINE { $$ = PRIV_LOCAL_GLINE; } | + TPRIV_JUPE { $$ = PRIV_JUPE; } | + TPRIV_LOCAL_JUPE { $$ = PRIV_LOCAL_JUPE; } | + TPRIV_LOCAL_OPMODE { $$ = PRIV_LOCAL_OPMODE; } | + TPRIV_OPMODE { $$ = PRIV_OPMODE; }| + TPRIV_SET { $$ = PRIV_SET; } | + TPRIV_WHOX { $$ = PRIV_WHOX; } | + TPRIV_BADCHAN { $$ = PRIV_BADCHAN; } | + TPRIV_LOCAL_BADCHAN { $$ = TPRIV_LOCAL_BADCHAN; } | + TPRIV_SEE_CHAN { $$ = PRIV_SEE_CHAN; } | + TPRIV_SHOW_INVIS { $$ = PRIV_SHOW_INVIS; } | + TPRIV_SHOW_ALL_INVIS { $$ = PRIV_SHOW_ALL_INVIS; } | + TPRIV_PROPAGATE { $$ = PRIV_PROPAGATE; } | + TPRIV_UNLIMIT_QUERY { $$ = PRIV_UNLIMIT_QUERY; } | + TPRIV_DISPLAY { $$ = PRIV_DISPLAY; } | + TPRIV_SEE_OPERS { $$ = PRIV_SEE_OPERS; } | + TPRIV_WIDE_GLINE { $$ = PRIV_WIDE_GLINE; }; + +yesorno: YES { $$ = 1; } | NO { $$ = 0; }; + +/* The port block... */ +portblock: PORT { + port = 0; + host = NULL; + /* Hijack these for is_server, is_hidden to cut down on globals... */ + tconn = 0; + tping = 0; + /* and this for mask... */ + pass = NULL; +} '{' portitems '}' ';' +{ + if (port > 0 && port <= 0xFFFF) + { + add_listener(port, host, pass, tconn, tping); + host = pass = NULL; + } + else + { + MyFree(host); + MyFree(pass); + } +}; +portitems: portitem portitems | portitem; +portitem: portnumber | portvhost | portmask | portserver | porthidden; +portnumber: PORT '=' NUMBER ';' +{ + port = yylval.num; +}; + +portvhost: VHOST '=' QSTRING ';' +{ + MyFree(host); + DupString(host, yylval.text); +}; + +portmask: MASK '=' QSTRING ';' +{ + MyFree(pass); + DupString(pass, yylval.text); +}; + +portserver: SERVER '=' YES ';' +{ + tconn = -1; +} | SERVER '=' NO ';' +{ + tconn = 0; +}; + +porthidden: HIDDEN '=' YES ';' +{ + tping = -1; +} | HIDDEN '=' NO ';' +{ + tping = 0; +}; + +clientblock: CLIENT +{ + aconf = (struct ConfItem*) MyMalloc(sizeof(*aconf)); + memset(aconf, 0, sizeof(*aconf)); + aconf->status = CONF_CLIENT; +} '{' clientitems '}' +{ + if ((aconf->host != NULL || aconf->name!=NULL)) + { + if (aconf->host == NULL) + DupString(aconf->host, ""); + if (aconf->name == NULL) + DupString(aconf->name, ""); + if (aconf->conn_class == NULL) + aconf->conn_class = find_class("default"); + aconf->next = GlobalConfList; + GlobalConfList = aconf; + aconf = NULL; + } + else + { + MyFree(aconf->host); + MyFree(aconf->passwd); + MyFree(aconf); + aconf = NULL; + } +} ';'; +clientitems: clientitem clientitems | clientitem; +clientitem: clienthost | clientclass | clientpass | clientip; +clientip: IP '=' QSTRING ';' +{ + MyFree(aconf->host); + DupString(aconf->host, yylval.text); +}; + +clienthost: HOST '=' QSTRING ';' +{ + MyFree(aconf->name); + DupString(aconf->name, yylval.text); +}; + +clientclass: CLASS '=' QSTRING ';' +{ + aconf->conn_class = find_class(yylval.text); +}; + +clientpass: PASS '=' QSTRING ';' +{ + MyFree(aconf->passwd); + DupString(aconf->passwd, yylval.text); +}; + +killblock: KILL +{ + dconf = (struct DenyConf*) MyMalloc(sizeof(*dconf)); + memset(dconf, 0, sizeof(*dconf)); +} '{' killitems '}' +{ + if (dconf->hostmask != NULL) + { + if (dconf->usermask == NULL) + DupString(dconf->usermask, "*"); + dconf->next = denyConfList; + denyConfList = dconf; + dconf = NULL; + } + else + { + MyFree(dconf->hostmask); + MyFree(dconf->message); + MyFree(dconf); + dconf = NULL; + } +} ';'; +killitems: killitem killitems | killitem; +killitem: killuhost | killreal | killreasonfile | killreason; +killuhost: HOST '=' QSTRING ';' +{ + char *u, *h; + dconf->flags &= ~DENY_FLAGS_REALNAME; + MyFree(dconf->hostmask); + MyFree(dconf->usermask); + if ((h = strchr(yylval.text, '@')) == NULL) + { + u = "*"; + h = yylval.text; + } + else + { + u = yylval.text; + h++; + } + DupString(dconf->hostmask, h); + DupString(dconf->usermask, u); + if (strchr(yylval.text, '.')) + { + int c_class; + char ipname[16]; + int ad[4] = { 0 }; + int bits2 = 0; + dconf->flags |= DENY_FLAGS_IP; + c_class = sscanf(dconf->hostmask, "%d.%d.%d.%d/%d", + &ad[0], &ad[1], &ad[2], &ad[3], &bits2); + if (c_class != 5) { + dconf->bits = c_class * 8; + } + else { + dconf->bits = bits2; + } + ircd_snprintf(0, ipname, sizeof(ipname), "%d.%d.%d.%d", ad[0], ad[1], + ad[2], ad[3]); + dconf->address = inet_addr(ipname); + } +}; + +killreal: REAL '=' QSTRING ';' +{ + dconf->flags &= ~DENY_FLAGS_IP; + dconf->flags |= DENY_FLAGS_REALNAME; + MyFree(dconf->hostmask); + /* Leave usermask so you can specify user and real... */ + DupString(dconf->hostmask, yylval.text); +}; + +killreason: REASON '=' QSTRING ';' +{ + dconf->flags &= DENY_FLAGS_FILE; + MyFree(dconf->message); + DupString(dconf->message, yylval.text); +}; + +killreasonfile: TFILE '=' QSTRING ';' +{ + dconf->flags |= DENY_FLAGS_FILE; + MyFree(dconf->message); + DupString(dconf->message, yylval.text); +}; + +cruleblock: CRULE +{ + host = pass = NULL; + tconn = CRULE_AUTO; +} '{' cruleitems '}' +{ + struct CRuleNode *node; + if (host != NULL && pass != NULL && (node=crule_parse(pass)) != NULL) + { + struct CRuleConf *p = (struct CRuleConf*) MyMalloc(sizeof(*p)); + p->hostmask = host; + p->rule = pass; + p->type = tconn; + p->node = node; + p->next = cruleConfList; + cruleConfList = p; + } + else + { + MyFree(host); + MyFree(pass); + } +} ';'; + +cruleitems: cruleitem cruleitems | cruleitem; +cruleitem: cruleserver | crulerule | cruleall; + +cruleserver: SERVER '=' QSTRING ';' +{ + MyFree(host); + collapse(yylval.text); + DupString(host, yylval.text); +}; + +crulerule: RULE '=' QSTRING ';' +{ + MyFree(pass); + DupString(pass, yylval.text); +}; + +cruleall: ALL '=' YES ';' +{ + tconn = CRULE_ALL; +} | ALL '=' NO ';' +{ + tconn = CRULE_AUTO; +}; + +motdblock: MOTD { + pass = host = NULL; +} '{' motditems '}' +{ + if (host != NULL && pass != NULL) + motd_add(host, pass); + MyFree(host); + MyFree(pass); + host = pass = NULL; +} ';'; + +motditems: motditem motditems | motditem; +motditem: motdhost | motdfile; +motdhost: HOST '=' QSTRING ';' +{ + DupString(host, yylval.text); +}; + +motdfile: TFILE '=' QSTRING ';' +{ + DupString(pass, yylval.text); +}; + +featuresblock: FEATURES '{' featureitems '}' ';'; +featureitems: featureitems featureitem | featureitem; + +featureitem: QSTRING +{ + stringlist[0] = $1; + stringno = 1; +} '=' stringlist ';'; + +stringlist: QSTRING +{ + stringlist[1] = $1; + stringno = 2; +} posextrastrings +{ + feature_set(NULL, (const char * const *)stringlist, stringno); +}; +posextrastrings: /* empty */ | extrastrings; +extrastrings: extrastrings extrastring | extrastring; +extrastring: QSTRING +{ + if (stringno < MAX_STRINGS) + stringlist[stringno++] = $1; +}; + +quarantineblock: QUARANTINE '{' +{ + if (qconf != NULL) + qconf = (struct qline*) MyMalloc(sizeof(*qconf)); + else + { + if (qconf->chname != NULL) + MyFree(qconf->chname); + if (qconf->reason != NULL) + MyFree(qconf->reason); + } + memset(qconf, 0, sizeof(*qconf)); +} quarantineitems '}' ';' +{ + if (qconf->chname == NULL || qconf->reason == NULL) + { + log_write(LS_CONFIG, L_ERROR, 0, "quarantine blocks need a channel name " + "and a reason."); + return 0; + } + qconf->next = GlobalQuarantineList; + GlobalQuarantineList = qconf; + qconf = NULL; +}; + +quarantineitems: CHANNEL NAME '=' QSTRING ';' +{ + DupString(qconf->chname, yylval.text); +} | REASON '=' QSTRING ';' +{ + DupString(qconf->reason, yylval.text); +}; Index: ircdh/ircd/m_trace.c diff -u ircdh/ircd/m_trace.c:1.2 ircdh/ircd/m_trace.c:1.3 --- ircdh/ircd/m_trace.c:1.2 Sat Jan 18 11:09:08 2003 +++ ircdh/ircd/m_trace.c Sun Jan 19 13:20:30 2003 @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: m_trace.c,v 1.2 2003/01/18 19:09:08 zolty Exp $ + * $Id: m_trace.c,v 1.3 2003/01/19 21:20:30 zolty Exp $ */ /* @@ -205,7 +205,7 @@ for (i = 0; i <= HighestFd; i++) { - unsigned int conClass; + const char *conClass; if (!(acptr = LocalClientArray[i])) /* Local Connection? */ continue; @@ -430,7 +430,7 @@ for (i = 0; i <= HighestFd; i++) { - unsigned int conClass; + const char *conClass; if (!(acptr = LocalClientArray[i])) /* Local Connection? */ continue; @@ -653,7 +653,7 @@ for (i = 0; i <= HighestFd; i++) { - unsigned int conClass; + const char *conClass; if (!(acptr = LocalClientArray[i])) /* Local Connection? */ continue; Index: ircdh/ircd/motd.c diff -u ircdh/ircd/motd.c:1.1 ircdh/ircd/motd.c:1.2 --- ircdh/ircd/motd.c:1.1 Sat Jan 18 11:09:10 2003 +++ ircdh/ircd/motd.c Sun Jan 19 13:20:31 2003 @@ -21,7 +21,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: motd.c,v 1.1 2003/01/18 19:09:10 zolty Exp $ + * $Id: motd.c,v 1.2 2003/01/19 21:20:31 zolty Exp $ */ #include "config.h" @@ -236,21 +236,21 @@ static struct Motd *motd_lookup(struct Client *cptr) { struct Motd *ptr; - int class = -1; + char *c_class = NULL; assert(0 != cptr); if (!MyUser(cptr)) /* not my user, always return remote motd */ return MotdList.remote; - class = get_client_class(cptr); + c_class = get_client_class(cptr); - /* check the T-lines first */ + /* check the motd blocks first */ for (ptr = MotdList.other; ptr; ptr = ptr->next) { - if (ptr->type == MOTD_CLASS && ptr->id.class == class) + if (ptr->type == MOTD_CLASS && !match(ptr->id.hostmask, c_class)) return ptr; - else if (ptr->type == MOTD_HOSTMASK && + else if (ptr->type == MOTD_HOSTMASK && c_class != NULL && !match(ptr->id.hostmask, cli_sockhost(cptr))) return ptr; } Index: ircdh/ircd/s_conf.c diff -u ircdh/ircd/s_conf.c:1.11 ircdh/ircd/s_conf.c:1.12 --- ircdh/ircd/s_conf.c:1.11 Sat Jan 18 14:54:33 2003 +++ ircdh/ircd/s_conf.c Sun Jan 19 13:20:31 2003 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: s_conf.c,v 1.11 2003/01/18 22:54:33 zolty Exp $ + * $Id: s_conf.c,v 1.12 2003/01/19 21:20:31 zolty Exp $ */ #include "config.h" @@ -73,9 +73,12 @@ int GlobalConfCount = 0; struct qline *GlobalQuarantineList = 0; +void yyparse(void); +int conf_fd, lineno; + static struct LocalConf localConf; static struct CRuleConf *cruleConfList; -static struct ServerConf *serverConfList; +/* static struct ServerConf *serverConfList; */ static struct DenyConf *denyConfList; #ifdef ESNET_NEG struct ConfItem *conf_negociacion = 0; @@ -246,7 +249,7 @@ * Do (start) DNS lookups of all hostnames in the conf line and convert * an IP addresses in a.b.c.d number for to IP#s. */ -static void lookup_confhost(struct ConfItem *aconf) +void lookup_confhost(struct ConfItem *aconf) { struct DNSReply *reply; @@ -667,6 +670,7 @@ * * - looks for a match on all given fields. */ +#if 0 static struct ConfItem *find_conf_entry(struct ConfItem *aconf, unsigned int mask) { @@ -765,7 +769,9 @@ /* port vhost mask */ add_listener(atoi(fields[4]), fields[2], fields[1], is_server, is_hidden); } +#endif +#if 0 void conf_add_quarantine(const char *const *fields, int count) { struct qline *qline; @@ -780,6 +786,7 @@ qline->next = GlobalQuarantineList; GlobalQuarantineList = qline; } +#endif char *find_quarantine(const char *chname) { @@ -803,6 +810,7 @@ } } +#if 0 void conf_add_local(const char *const *fields, int count) { if (count < 6 || EmptyString(fields[1]) || EmptyString(fields[5])) @@ -891,6 +899,7 @@ cruleConfList = p; } } +#endif void conf_erase_crule_list(void) { @@ -913,6 +922,7 @@ return cruleConfList; } +#if 0 void conf_add_server(const char *const *fields, int count) { struct ServerConf *server; @@ -1015,6 +1025,7 @@ conf->next = denyConfList; denyConfList = conf; } +#endif void conf_erase_deny_list(void) { @@ -1047,8 +1058,21 @@ #define MAXCONFLINKS 150 +extern FILE *yyin; +void init_lexer(void); + int read_configuration_file(void) { + feature_unmark(); /* unmark all features for resetting later */ + /* Now just open an fd. The buffering isn't really needed... */ + init_lexer(); + yyparse(); + fclose(yyin); + yyin = NULL; + feature_mark(); /* reset unmarked features */ + return 1; + +#if 0 enum { MAX_FIELDS = 15 }; char *src; @@ -1392,6 +1416,15 @@ prepara_negociaciones(); #endif return 1; +#endif /* 0 */ +} + +void yyerror(const char *msg) +{ + sendto_opmask_butone(0, SNO_ALL, "Config file parse error line %d: %s", + lineno, msg); + log_write(LS_CONFIG, L_ERROR, 0, "Config file parse error line %d: %s", + lineno, msg); } /* Index: ircdh/ircd/s_err.c diff -u ircdh/ircd/s_err.c:1.8 ircdh/ircd/s_err.c:1.9 --- ircdh/ircd/s_err.c:1.8 Sat Jan 18 14:54:33 2003 +++ ircdh/ircd/s_err.c Sun Jan 19 13:20:31 2003 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: s_err.c,v 1.8 2003/01/18 22:54:33 zolty Exp $ + * $Id: s_err.c,v 1.9 2003/01/19 21:20:31 zolty Exp $ */ #include "config.h" @@ -440,23 +440,23 @@ /* 200 */ {RPL_TRACELINK, "Link %s.%s %s %s", "200"}, /* 201 */ - {RPL_TRACECONNECTING, "Try. %d %s", "201"}, + {RPL_TRACECONNECTING, "Try. %s %s", "201"}, /* 202 */ - {RPL_TRACEHANDSHAKE, "H.S. %d %s", "202"}, + {RPL_TRACEHANDSHAKE, "H.S. %s %s", "202"}, /* 203 */ - {RPL_TRACEUNKNOWN, "???? %d %s", "203"}, + {RPL_TRACEUNKNOWN, "???? %s %s", "203"}, /* 204 */ - {RPL_TRACEOPERATOR, "Oper %d %s %ld", "204"}, + {RPL_TRACEOPERATOR, "Oper %s %s %ld", "204"}, /* 205 */ - {RPL_TRACEUSER, "User %d %s %ld", "205"}, + {RPL_TRACEUSER, "User %s %s %ld", "205"}, /* 206 */ - {RPL_TRACESERVER, "Serv %d %dS %dC %s %s!%s@%s %ld %ld", "206"}, + {RPL_TRACESERVER, "Serv %s %dS %dC %s %s!%s@%s %ld %ld", "206"}, /* 207 */ {0}, /* 208 */ {RPL_TRACENEWTYPE, "<newtype> 0 %s", "208"}, /* 209 */ - {RPL_TRACECLASS, "Class %d %d", "209"}, + {RPL_TRACECLASS, "Class %s %d", "209"}, /* 210 */ {0}, /* 211 */ @@ -464,17 +464,17 @@ /* 212 */ {RPL_STATSCOMMANDS, "%s %u %u", "212"}, /* 213 */ - {RPL_STATSCLINE, "%c %s * %s %d %d", "213"}, + {RPL_STATSCLINE, "%c %s * %s %d %s", "213"}, /* 214 */ {RPL_STATSNLINE, "%c %s * %s %d %d", "214"}, /* 215 */ - {RPL_STATSILINE, "%c %s * %s %d %d", "215"}, + {RPL_STATSILINE, "%c %s * %s %d %s", "215"}, /* 216 */ {RPL_STATSKLINE, "%c %s \"%s\" %s 0 0", "216"}, /* 217 */ {RPL_STATSPLINE, "P %d %d %s %s", "217"}, /* 218 */ - {RPL_STATSYLINE, "%c %d %d %d %ld (%d) %d", "218"}, + {RPL_STATSYLINE, "%c %s %d %d %ld (%d) %d", "218"}, /* 219 */ {RPL_ENDOFSTATS, "%c :End of /STATS report", "219"}, /* 220 */ Index: ircdh/ircd/s_stats.c diff -u ircdh/ircd/s_stats.c:1.2 ircdh/ircd/s_stats.c:1.3 --- ircdh/ircd/s_stats.c:1.2 Sat Jan 18 14:54:33 2003 +++ ircdh/ircd/s_stats.c Sun Jan 19 13:20:31 2003 @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: s_stats.c,v 1.2 2003/01/18 22:54:33 zolty Exp $ + * $Id: s_stats.c,v 1.3 2003/01/19 21:20:31 zolty Exp $ */ #include "config.h" @@ -115,6 +115,15 @@ send_reply(sptr, p[1], c, host, pass, name, port, get_conf_class(tmp)); else if ((tmp->status & (CONF_SERVER | CONF_HUB))) send_reply(sptr, p[1], c, "*", name, port, get_conf_class(tmp)); + else if ((tmp->status & CONF_CLIENT)) + { + if (tmp->passwd && IsDigit(*tmp->passwd) && (!tmp->passwd[1] || + (IsDigit(tmp->passwd[1]) && !tmp->passwd[2]))) + send_reply(sptr, p[1], c, host, pass, name, port, + get_conf_class(tmp)); + else + send_reply(sptr, p[1], c, host, "*", name, port, get_conf_class(tmp)); + } else send_reply(sptr, p[1], c, host, name, port, get_conf_class(tmp)); } ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2003-01-19 21:22:44
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-19 21:22:43 UTC Modified files: doc/example.conf Log message: Nuevo ircd.conf ---------------------- diff included ---------------------- Index: ircdh/doc/example.conf diff -u ircdh/doc/example.conf:1.2 ircdh/doc/example.conf:1.3 --- ircdh/doc/example.conf:1.2 Sat Jan 18 15:16:08 2003 +++ ircdh/doc/example.conf Sun Jan 19 13:22:33 2003 @@ -1,12 +1,15 @@ -# ircd.conf configuration file for ircd version ircu2.9.mu and ircu2.10 +# ircd.conf - configuration file for ircd version ircu2.10 # -# Last Updated: 26, June 2001. +# Last Updated: 20, March 2002. # # Written by Niels <ni...@un...>, based on the original example.conf, # server code and some real-life (ahem) experience. # # Updated and heavily modified by Braden <db...@ya...>. # +# Rewritten by A1kmm(Andrew Miller)<a1...@mw...> to support +# the new flex/bison configuration parser. +# # Thanks and credits to: Run, Trillian, Cym, Morrissey, Chaos, Flynn, # Xorath, WildThang, Mmmm, SeKs, Ghostwolf and # all other Undernet IRC Admins and Operators, @@ -19,16 +22,18 @@ # but if all the other hubs in Europe aren't in service, it can connect # to one in the US by itself. # -# All configuration options start with a letter identifying the option, -# and a colon separated list of options. Unused fields should be left -# blank. +# The configuration format consists of a number of blocks in the format +# BlockName { setting = number; setting2 = "string"; setting3 = yes; }; +# Note that comments start from a #(hash) and go to the end of the line. +# Whitespace(space, tab, or carriage return/linefeed) are ignored and may +# be used to make the configuration file more readable. # # Please note that when ircd puts the configuration lines into practice, # it parses them exactly the other way round than they are listed here. -# It reads the lines in reverse order. +# It uses the blocks in reverse order. # -# This means that you should start your I: lines with the "fall through", -# most vanilla one and end with the most detailed. +# This means that you should start your Client blocks with the +# "fall through", most vanilla one, and end with the most detailed. # # There is a difference between the "hostname" and the "server name" # of the machine that the server is run on. For example, the host can @@ -42,78 +47,142 @@ # it to work. -# [M:line] +# [General] # # First some information about the server. -# M:<server name>:<virtual host>:<description>:<not used>:<server numeric> +# General { +# name = "servername"; +# vhost = "virtualhost"; +# description = "description"; +# numeric = numericnumber; +# }; # # <virtual host> must contain either a * or a valid IPv4 address in # dotted quad notation. (127.0.0.1) The address MUST be the address # of a physical interface on the host. This address is used for outgoing -# connections only, see P:lines for listener virtual hosting. +# connections only, see Port{} for listener virtual hosting. # If in doubt put a * or the IP of your primary interface here. # The server must be compiled with virtual hosting turned on to get this # to work correctly. # # Note that <server numeric> has to be unique on the network your server # is running on, must be between 0 and 4095, and is not updated on a rehash. -M:London.UK.Eu.UnderNet.org::University of London, England::1 - +General { + name = "London.UK.Eu.UnderNet.org"; + description = "University of London, England"; + numeric = 1; +}; -# [A:line] +# [Admin] # # This sets information that can be retrieved with the /ADMIN command. # It should contain at least an admin Email contact address. -# A:<line 1>:<line 2>:<line 3> -A:The University of London:Undernet IRC server:IRC Admins <ir...@lo...> - +Admin { + Location = "The University of London"; + # At most two contact lines are allowed... + Contact = "Undernet IRC server"; + Contact = "IRC Admins <ir...@lo...>"; +}; -# [Y:lines] +# [Classes] # # All connections to the server are associated with a certain "connection # class", be they incoming or outgoing (initiated by the server), be they # clients, servers or Martians. (Note that ircd doesn't have direct support +# Recommended client classes: # for Martians (yet?); they will have to register as normal users. ;-) -# Take the following Y: lines only as a guide. -# Y:<class>:<ping freq>:<connect freq>:<maximum links>:<sendq size> +# Take the following class blocks only as a guide. +# Class { +# name = "<class>"; +# pingfreq = time; +# connectfreq = time; +# maxlinks = number; +# sendq = size; +# }; # # <connect freq> applies only to servers, and specifies the frequency # that the server tries to autoconnect. setting this to 0 will cause # the server to attempt to connect repeatedly with no delay until the # <maximum links> condition is satisfied. This is a Bad Thing(tm). +# Note that times can be specified as a number, or by giving something +# like: 1 minutes 20 seconds, or 1*60+20. +# Client { +# host = "user@host"; +# ip = "ip@host"; +# password = "password"; +# class = "classname"; +# }; # # <maximum links> should be set at either 0 or 1. # -# Server classes: 90 = all your uplinks for who you do not wish to hub; -# 80 = leaf servers (only used if your server is a hub) -Y:90:90:300:1:9000000 -Y:80:90:300:0:9000000 +# Recommended server classes: +# All your server uplinks you are not a hub for. +Class { + name = "Server"; + pingfreq = 1 minutes 30 seconds; + connectfreq = 5 minutes; + maxlinks = 1; + sendq = 9000000; +}; +# All the leaf servers you hub for. +Class { + name = "LeafServer"; + pingfreq = 1 minutes 30 seconds; + connectfreq = 5 minutes; + maxlinks = 0; + sendq = 9000000; +}; +# Recommended client classes: # Client classes. 10 = locals; 2 = for all .net and .com that are not # in Europe; 1 = for everybody. -Y:10:90:0:100:160000 -Y:2:90:0:5:80000 -Y:1:90:0:400:160000 +Class { + name = "Local"; + pingfreq = 1 minutes 30 seconds; + sendq = 160000; + maxlinks = 100; +}; +Client +{ + class = "Other"; + host = "*@*"; +}; +Class { + name = "America"; + pingfreq = 1 minutes 30 seconds; + sendq = 80000; + maxlinks = 5; +}; +Class { + name = "Other"; + pingfreq = 1 minutes 30 seconds; + sendq = 160000; + maxlinks = 400; +}; - -# [I:lines] +# [Client] # # To allow clients to connect, they need authorization. This can be # done based on hostmask, address mask, and/or with a password. # With intelligent use of classes and the maxconnections field in the -# Y: lines, you can let in a specific domain, but get rid of all other +# Client blocks, you can let in a specific domain, but get rid of all other # domains in the same toplevel, thus setting up some sort of "reverse -# K: line". -# I:<IP mask or crap to force resolving>:<opt passwd>:<hostmask>::<class> +# Kill block". +# Client { +# host = "user@host"; +# ip = "ip@host"; +# password = "password"; +# class = "classname"; +# }; # # Technical description (for examples, see below): # For every connecting client, the IP address is known. A reverse lookup # on this IP-number is done to get the (/all) hostname(s). # Each hostname that belongs to this IP-number is matched to <hostmask>, -# and the I: line is used when any matches; the client will then show +# and the Client {} is used when any matches; the client will then show # with this particular hostname. If none of the hostnames match, then # the IP-number is matched against the <IP mask ...> field, if this matches -# then the I: line is used nevertheless and the client will show with the +# then the Client{} is used nevertheless and the client will show with the # first (main) hostname if any; if the IP-number did not resolve then the # client will show with the dot notation of the IP-number. # There is a special case for the UNIX domain sockets and localhost connections @@ -123,82 +192,127 @@ # 002 Your host is 2.undernet.org[jolan.ppro], running version ... # Then the "jolan.ppro" is the name used for matching. # Therefore, unix domain sockets, and connections to localhost would -# match this I: line: -# I:jolan.ppro::foobar::1 -# Finally, I: lines with empty <IP mask ..> or <hostmask> fields are skipped. +# match this block: +# host = "*@jolan.ppro"; # # This is the "fallback" entry. All .uk, .nl, and all unresolved are # in these two lines. # By using two different lines, multiple connections from a single IP # are only allowed from hostnames which have both valid forward and # reverse DNS mappings. -I:*@*:1:Unresolved::1 -I:Resolved::*@*::1 +Client +{ + class = "Other"; + ip = "*@*"; +}; + +Client +{ + class = "Other"; + host = "*@*"; +}; # If you don't want unresolved dudes to be able to connect to your -# server, use just: -# I:NotMatchingCrap::*@*::1 +# server, do not specify any "ip = " settings. # # Here, take care of all American ISPs. -I:Resolved::*@*.com::2 -I:Resolved::*@*.net::2 - +Client +{ + host = "*@*.com"; + class = "America"; +}; + +Client +{ + host = "*@*.net"; + class = "America"; +}; # Now list all the .com / .net domains that you wish to have access... # actually it's less work to do it this way than to do it the other -# way around - K: lining every single ISP in the US. +# way around - K-lining every single ISP in the US. # I wish people in Holland just got a .nl domain, and not try to be # cool and use .com... -I:Resolved::*@*.wirehub.net::1 -I:Resolved::*@*.planete.net::1 -I:Resolved::*@*.ivg.com::1 -I:Resolved::*@*.ib.com::1 -I:Resolved::*@*.ibm.net::1 -I:Resolved::*@*.hydro.com::1 -I:Resolved::*@*.NL.net::1 +Client { host = "*@*.wirehub.net"; class = "Other";}; +Client { host = "*@*.planete.net"; class = "Other";}; +Client { host = "*@*.ivg.com"; class = "Other";}; +Client { host = "*@*.ib.com"; class = "Other";}; +Client { host = "*@*.ibm.net"; class = "Other";}; +Client { host = "*@*.hydro.com"; class = "Other";}; +Client { host = "*@*.nl.net"; class = "Local";}; # You can request a more complete listing, including the "list of standard -# K-lines" from the Routing Committee; it will also be sent to you if +# Kill blocks" from the Routing Committee; it will also be sent to you if # you apply for a server and get accepted. # # Ourselves - this makes sure that we can get in, no matter how full # the server is (hopefully). -I:*@193.37.*::*@*.london.ac.uk::10 +Client +{ + host = "*@*.london.ac.uk"; + ip = "*@193.37.*"; + class = "Local"; +}; -# You can put a digit (0..9) in the password field, which will make ircd +# You can put a digit (0..9) in the password value, which will make ircd # only accept a client when the total number of connections to the network # from the same IP number doesn't exceed this number. # The following example would accept at most one connection per IP number # from "*.swipnet.se" and at most two connections from dial up accounts # that have "dial??.*" as host mask: -# I:Resolved:1:*@*.swipnet.se::1 -# I:Resolved:2:*@dial??.*::1 +# Client { +# host = "*@*.swipnet.se"; +# password = "1"; +# class = "Other"; +# }; +# Client { +# host = "*@dial??.*"; +# password = "2"; +# class = "Other"; +# }; # # If you are not worried about who connects, this line will allow everyone # to connect. -I:*::*::1 +Client { + host = "*@*"; + ip = "*@*"; + class = "Other"; +}; -# [T:lines] +# [motd] # # It is possible to show a different Message of the Day to a connecting # client depending on its origin. -# T:<hostmask>:<path to motd file> -# or: -# T:<classnumber>:<path to motd file> +# motd { +# # Note: host can also be a classname. +# host = "Other"; +# file = "path/to/motd/file"; +# }; # # DPATH/net_com.motd contains a special MOTD where users are encouraged -# to register their domains and get their own I: lines if they're in +# to register their domains and get their own client{} lines if they're in # Europe, or move to US.UnderNet.org if they're in the USA. -T:*.net:net_com.motd -T:*.com:net_com.motd -T:2:net_com.motd +motd { + host = "*.net"; + file = "net_com.motd"; +}; +motd { + host = "*.com"; + file = "net_com.motd"; +}; +motd { + host = "America"; + file = "net_com.motd"; +}; # A different MOTD for ourselves, where we point out that the helpdesk # better not be bothered with questions regarding irc... -T:*.london.ac.uk:london.motd - +motd { + host = "*.london.ac.uk"; + file = "london.motd"; +}; -# [U:lines] +# [Server] # # One of the many nice features of Undernet is "Uworld", a program # connected to the net as a server. This allows it to broadcast any mode @@ -207,7 +321,17 @@ # There is only one slight problem: the TimeStamp protocol prevents this. # So there is a configuration option to allow them anyway from a certain # server. -# U:<Server Name>:<Juped Nicks>:* +# Server { +# # The servername or wildcard mask for it that this applies to. +# name = "relservername"; +# # The mask of servers they are allowed to introduce(for hub=yes;) or +# # not allowed to introduce(for leaf=yes). +# mask = "servermask"; +# # No is assumed for these unless you set it to yes. +# uworld = no; +# leaf = no; +# hub = yes; +# }; # # Note: (1) These lines are agreed on by every server admin on Undernet; # (2) These lines must be the same on every single server, or results @@ -218,58 +342,145 @@ # servers will try to undo the mode hacks that Uworld does. Make SURE that # all of the servers have the EXACT same Ulines. # -# As of ircu2.10.05 is it possible to Jupe nicks. Juped nicks need to be -# added to U: lines. As per CFV-0095, the following nicks must be juped, -# it is not allowed to jupe others as well. -U:Uworld.EU.undernet.org:EuWorld,E,StatServ,NoteServ:* -U:Uworld2.undernet.org:UWorld2,ChanSvr,ChanSaver,ChanServ:* -U:Uworld.undernet.org:Uworld,NickSvr,NickSaver,NickServ:* -U:channels.undernet.org:LPT1,X,login:* -U:channels2.undernet.org:LPT2,W,Undernet:* -U:channels3.undernet.org:COM1,V,protocol:* -U:channels4.undernet.org:COM2,U,pass:* -U:channels5.undernet.org:COM3,Y,AUX:* -U:channels6.undernet.org:COM4,Z,newpass:* - +# If your server starts on a bit larger network, you'll probably get +# assigned one or two uplinks to which your server can connect. +# If your uplink(s) also connect to other servers than yours (which is +# probable), you need to define your uplink as being allowed to "hub". +# To do this, set "hub = yes;" +# You can also force a server(even one that doesn't connect to you) +# to be a leaf with "leaf = yes;" + +Server { + name = "uworld.eu.undernet.org"; + mask = "*"; + uworld = yes; + hub = yes; +}; +Server { + name = "uworld2.undernet.org"; + mask = "*"; + uworld = yes; + hub = yes; +}; +Server { + name = "uworld.undernet.org"; + mask = "*"; + uworld = yes; + hub = yes; +}; +Server { + name = "channels.undernet.org"; + mask = "*"; + uworld = yes; + hub = yes; +}; +Server { + name = "channels2.undernet.org"; + mask = "*"; + uworld = yes; + hub = yes; +}; +Server { + name = "channels3.undernet.org"; + mask = "*"; + uworld = yes; + hub = yes; +}; +Server { + name = "channels4.undernet.org"; + mask = "*"; + uworld = yes; + hub = yes; +}; +Server { + name = "channels5.undernet.org"; + mask = "*"; + uworld = yes; + hub = yes; +}; +Server { + name = "channels6.undernet.org"; + mask = "*"; + uworld = yes; + hub = yes; +}; +Server { + name = "Amsterdam.NL.Eu.UnderNet.org"; + mask = "*"; + hub = yes; +}; +# An example just to make sure IRCnet doesn't get on undernet... +Server { + name = "*"; + mask = "eris.berkeley.edu"; + hub = yes; +}; + +# As of ircu2.10.05 is it possible to Jupe nicks. As per CFV-0095, the +# following nicks must be juped, it is not allowed to jupe others as well. +Jupe { + nick = "EuWorld,E,StatServ,NoteServ"; + nick = "UWorld2,ChanSvr,ChanSaver,ChanServ"; + nick = "Uworld,NickSvr,NickSaver,NickServ"; + nick = "LPT1,X,login,LPT2,W,Undernet,COM1,V,protocol,COM2"; + nick = "U,pass,COM3,Y,AUX,COM4,Z,newpass"; +}; -# [K:lines] +# [Kill] # # While running your server, you will most probably encounter individuals # or groups of persons that you do not wish to have access to your server. # -# For this purpose, the ircd understands "kill lines". -# K:<host/IP mask>:"<opt reason>":<username mask> +# For this purpose, the ircd understands "kill blocks". These are also +# known as K-lines, by virtue of the former config file format. +# Kill +# { +# host = "user@host"; +# reason = "The reason the user will see"; +# }; +# It is possible to ban on the basis of the real name. +# It is also possible to use a file as comment for the ban, using +# file = "file": +# Kill +# { +# realname = "realnametoban"; +# file = "path/to/file/with/reason/to/show"; +# }; # -# It is possible to use a file as comment for the ban. -# K:<host/IP mask>:!<path to file>:<usermask> # # 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 K-lines 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 K-lined (yet). # # With a simple comment, using quotes: -K:*.au:"Please use a nearer server":* -K:*.edu:"Please use a nearer server":* +Kill { host = "*.au"; reason = "Please use a nearer server"; }; +Kill { host = "*.edu"; reason = "Please use a nearer server"; }; -# With a file, prepending a '!' before the filename. # The file can contain for example, a reason, a link to the # server rules and a contact address. -K:unixbox.flooder.co.uk:!kline/youflooded.txt:*luser - -# -# IP-based kill lines are designated with a lowercase 'k'. These lines -# use the same format as normal K: lines, except they apply to all hosts, -# even if an IP address has a properly resolving host name. -k:192.168.*:!klines/martians:* - -# Additionally, you may specify a hostmask prefixed with $R to indicate -# a match should be performed against the "real-name" / "info" field -# instead of the host/IP. -K:$R*sub7*:"You are infected with a Trojan":* +Kill +{ + host = "*lu...@un..."; + file = "kline/youflooded.txt"; +}; + +# IP-based kill lines apply to all hosts, even if an IP address has a +# properly resolving host name. +Kill +{ + host = "192.168.*"; + file = "klines/martians"; +}; + +# The realname field lets you ban by realname... +Kill +{ + host = "*sub7*"; + reason = "You are infected with a Trojan"; +}; - -# [C:lines] +# [Connect] # # You probably want your server connected to other servers, so your users # have other users to chat with. @@ -282,52 +493,62 @@ # server links is provided for ircd to decide what links to allow, what # to let humans do themselves, and what links to (forcefully) disallow. # -# The Connection lines (also known as C lines) +# The Connect blocks # define what servers the server connect to, and which servers are # allowed to connect. -# C:<remote hostname or IP>:<password>:<remote server name>:<port>:<class> +# Connect { +# name = "servername"; +# host = "hostnameORip"; +# password = "passwd"; +# port = portno; +# class = "classname"; +# }; # # The "port" field defines the default port the server tries to connect # to if an operator uses /connect without specifying a port. This is also # the port used when the server attempts to auto-connect to the remote -# server. (See Y:lines for more informationa about auto-connects). +# server. (See Class blocks for more informationa about auto-connects). # # Our primary uplink. -C:1.2.3.4:passwd:Amsterdam.NL.Eu.UnderNet.org:4400:90 - +Connect { + name = "Amsterdam.NL.Eu.UnderNet.org"; + host = "1.2.3.4"; + password = "passwd"; + port = 4400; + class = "Servers"; +}; -# [H:lines] -# -# If your server starts on a bit larger network, you'll probably get -# assigned one or two uplinks to which your server can connect. -# If your uplink(s) also connect to other servers than yours (which is -# probable), you need to define your uplink as being allowed to "hub". -# H:<allowed hostmask>::<server name>:<maximum hops that can be introduced> -H:*.*::Amsterdam.NL.Eu.UnderNet.org - - -# [L:lines] -# -# Of course, the opposite is also possible: forcing a server to be -# a leaf. L: lines follow Murphy's Law: if you use them, there's a big -# chance that routing will be screwed up afterwards. -# L:<opt disallowed hostmask>::<server mask>:<opt max depth> - - -# [D:lines] +# [crule] # # For an advanced, real-time rule-based routing decision making system -# you can use Disallow lines. For more information, see doc/readme.crules. -# D:<server mask that ircd will refuse to connect to>::<rule> -# d:<server mask that ircd will not autoconnect to>::<rule> -# D:*.US.UnderNet.org::connected(*.US.UnderNet.org) -# d:*.EU.UnderNet.org::connected(Amsterdam.NL.EU.*) -# -# The following line is recommended for leaf servers: -# d:*::directcon(*) +# you can use crule blocks. For more information, see doc/readme.crules. +# CRULE +# { +# server = "servermask"; +# rule = "connectrule"; +# # Setting all to yes makes the rule always apply. Otherwise it only +# # applies to autoconnects. +# all = yes; +# }; +CRULE +{ + server = "*.US.UnderNet.org"; + rule = "connected(*.US.UnderNet.org)"; +}; +CRULE +{ + server = "*.EU.UnderNet.org"; + rule = "connected(Amsterdam.NL.EU.*)"; +}; + +# The following block is recommended for leaf servers: +CRULE +{ + server = "*"; + rule = "directcon(*)"; +}; - -# [O:lines] +# [Operator] # # Inevitably, you have reached the part about "IRC Operators". Oper status # grants some special privileges to a user, like the power to make the @@ -344,28 +565,42 @@ # them from using Uworld as well. # Depending on some defines in include/config.h, local operators are also # not allowed to /DIE and /RESTART the server. -# Local operators are designated with a lowercase 'o' -# O:<host/IP mask>:<encrypted password>:<Nick>::<connection class> -# o:<host/IP mask>:<encrypted password>:<Nick>::<connection class> +# Operator { +# local = no; +# host = "host/IP mask"; +# name = "opername"; +# password = "encryptedpass"; +# class = "classname"; +# }; # # The encrypted password is optional. If you wish to encrypt your password, # there is a utility in the ircd. Please read the file tools/README. -O:*@*.cs.vu.nl:VRKLKuGKn0jLs:Niels::10 -o:*@*.uu.net:noncryptedpass:Braden::10 +Operator { + local = no; + host = "*@*.cs.vu.nl"; + password = "VRKLKuGKn0jLt"; + name = "Niels"; + class = "Local"; +}; +Operator { + local = yes; + host = "*@*.uu.net"; + password = "notencryptedpass"; + name = "Niels"; + class = "Local"; +}; # Note that the <connection class> is optional, but leaving it away -# puts the O: lines in class 0, which usually only accepts one connection -# at a time. If you want users to Oper up more then once per O: line, -# then use a connection class that allows more then one connection, -# for example (using class 10 as in the example above): +# puts the opers in class "default", which usually only accepts one +# connection at a time. If you want users to Oper up more then once per +# block, then use a connection class that allows more then one connection, +# for example (using class Local as in the example above): # # Once you OPER your connection class changes no matter where you are or -# your previous connection classes. If the defined connection class is 10 -# for the O:line, then your new connection class is 10. -# Y:10:90:0:100:160000 - +# your previous connection classes. If the defined connection class is +# Local for the operator block, then your new connection class is Local. -# [P:lines] +# [Port] # When your server gets more full, you will notice delays when trying to # connect to your server's primary listening port. It is possible via the # Port lines to specify additional ports for the ircd to listen to. @@ -373,12 +608,21 @@ # ports; # Undernet uses 4400 for server listener ports. # These are just hints, they are in no way official IANA or IETF policies. -# IANA says we should use port 194, but that requires us to run as root, so -# we don't do that. +# IANA says we should use port 194, but that requires us to run as root, +# so we don't do that. # -# P:<hostmask>:<interface>:<[CS][H]>:<port number> +# Port { +# port = number; +# mask = "ipmask"; +# # Use this to control the interface you bind to. +# vhost = "virtualhostip"; +# # Setting to yes makes this server only. +# server = yes; +# # Setting to yes makes the port "hidden" from stats. +# hidden = yes; +# }; # -# The hostmask setting allows you to specify a range of IP addresses that +# The mask setting allows you to specify a range of IP addresses that # you will allow connections from. This should only contain IP addresses # and '*' if used. This field only uses IP addresses. This does not use # DNS in any way so you can't use it to allow *.nl or *.uk. Attempting @@ -392,59 +636,41 @@ # If you want to use virtual hosting *YOU* *MUST* *USE* *THIS* otherwise it # WILL bind to all interfaces - not what most people seem to expect. # -# The [CS][H] field is an optional field to specify that a port is a -# server port or a client port and whether it's hidden or not. -# If used the first character MUST be either a C or S. -# If you want to hide a port from /stats p from non-opers follow the C -# or S with an H -# -# C = Client (Ports 6660-6669) -# S = Server (Port 4400) -# -# P:<hostmask>:<interface>:<[CS][H]>:<port number> -# -# This is a normal server port, you need to have at least one server -# port defined if you want to connect your server to other servers. -P:::S:4400 +Port { + server = yes; + port = 4400; +}; # This is a Server port that is Hidden -#P:::SH:4401 +Port { + server = yes; + hidden = yes; + port = 4401; +}; # The following are normal client ports -P:::C:6667 -P::::6668 -P:192.168.*:::6666 +Port { port = 6667; }; +Port { port = 6668; }; +Port { + mask = "192.168.*"; + port = 6666; +}; # This is a hidden client port, listening on the interface associated # with the IP address 168.8.21.107 -#P:*:168.8.21.107:CH:7000 +Port { + mask = "168.8.21.107"; + hidden = yes; + port = 7000; +}; - -# [Q:lines] -# -# This allows you (the admin) to disallow the usage of /OPMODE and -# /CLEARMODE on certain sensitive channels. Opers trying to do that -# will receive a short notice. Depending on the setting of -# OPER_FORCE_OPMODE, OPER_FORCE_LOPMODE and LOCOP_FORCE_LOPMODE, -# global/local opers may override these lines by prefixing the -# channel name with an exclamation mark ('!') -# -# Q:<channel>:<reason> -# -# Note that since the hash mark ('#') is used to start a comment, -# you will have to escape it in the channel name (see below). - -# Q:\#shells:"Thou shalt not support the h4><0rz" -# Q:&kiddies:"They can take care of themselves" - - -# [F:lines] -# +# [features] # IRC servers have a large number of options and features. Most of these # are set at compile time through the use of #define's--see "make config" # for more details--but we are working to move many of these into the -# configuration file. Feature lines are the hook we're using for this. -# F:<Option>:<Value> +# configuration file. Features let you configure these at runtime. +# You only need one feature block in which you use +# "featurename" = "value1" , "value2", ..., "valuen-1", "valuen"; # # The entire purpose of F:lines are so that you do not have to recompile # the IRCD everytime you want to change a feature. All of the features @@ -455,134 +681,87 @@ # found at doc/readme.log. The defaults used by the Undernet network are # below. # -# F:DOMAINNAME:<obtained from /etc/resolv.conf by ./configure> -# F:RELIABLE_CLOCK:FALSE -# F:BUFFERPOOL:27000000 -# F:HAS_FERGUSON_FLUSHER:FALSE -# F:CLIENT_FLOOD:1024 -# F:SERVER_PORT:4400 -# F:NODEFAULTMOTD:TRUE -# F:MOTD_BANNER -# F:KILL_IPMISMATCH:FALSE -# F:IDLE_FROM_MSG:TRUE -# F:HUB:FALSE -# F:WALLOPS_OPER_ONLY:FALSE -# F:NODNS:FALSE -# F:RANDOM_SEED:<you should set one explicitly> -# F:DEFAULT_LIST_PARAM -# F:NICKNAMEHISTORYLENGTH:800 -# F:HOST_HIDING:TRUE -# F:HIDDEN_HOST:users.undernet.org -# F:HIDDEN_IP:127.0.0.1 -# F:CONNEXIT_NOTICES:FALSE -# F:KILLCHASETIMELIMIT:30 -# F:MAXCHANNELSPERUSER:10 -# F:AVBANLEN:40 -# F:MAXBANS:45 -# F:MAXSILES:15 -# F:HANGONGOODLINK:300 -# F:HANGONRETRYDELAY:10 -# F:CONNECTTIMEOUT:90 -# F:TIMESEC:60 -# F:MAXIMUM_LINKS:1 -# F:PINGFREQUENCY:120 -# F:CONNECTFREQUENCY:600 -# F:DEFAULTMAXSENDQLENGTH:40000 -# F:GLINEMAXUSERCOUNT:20 -# F:MPATH:ircd.motd -# F:RPATH:remote.motd -# F:PPATH:ircd.pid -# F:VIRTUAL_HOST:FALSE -# F:TOS_SERVER:0x08 -# F:TOS_CLIENT:0x08 -# F:POLLS_PER_LOOP:200 -# F:CRYPT_OPER_PASSWORD:TRUE -# F:OPER_NO_CHAN_LIMIT:TRUE -# F:OPER_MODE_LCHAN:TRUE -# F:OPER_WALK_THROUGH_LMODES:FALSE -# F:NO_OPER_DEOP_LCHAN:FALSE -# F:SHOW_INVISIBLE_USERS:TRUE -# F:SHOW_ALL_INVISIBLE_USERS:TRUE -# F:UNLIMIT_OPER_QUERY:FALSE -# F:LOCAL_KILL_ONLY:FALSE -# F:CONFIG_OPERCMDS:FALSE -# F:OPER_KILL:TRUE -# F:OPER_REHASH:TRUE -# F:OPER_RESTART:TRUE -# F:OPER_DIE:TRUE -# F:OPER_GLINE:TRUE -# F:OPER_LGLINE:TRUE -# F:OPER_JUPE:TRUE -# F:OPER_LJUPE:TRUE -# F:OPER_OPMODE:TRUE -# F:OPER_LOPMODE:TRUE -# F:OPER_FORCE_OPMODE:TRUE -# F:OPER_FORCE_LOPMODE:TRUE -# F:OPER_BADCHAN:FALSE -# F:OPER_LBADCHAN:FALSE -# F:OPER_SET:FALSE -# F:OPERS_SEE_IN_SECRET_CHANNELS:TRUE -# F:OPER_WIDE_GLINE:TRUE -# F:LOCOP_KILL:TRUE -# F:LOCOP_REHASH:TRUE -# F:LOCOP_RESTART:FALSE -# F:LOCOP_DIE:FALSE -# F:LOCOP_LGLINE:TRUE -# F:LOCOP_LJUPE:TRUE -# F:LOCOP_LOPMODE:TRUE -# F:LOCOP_FORCE_LOPMODE:TRUE -# F:LOCOP_LBADCHAN:FALSE -# F:LOCOP_SET:FALSE -# F:LOCOP_SEE_IN_SECRET_CHANNELS:FALSE -# F:LOCOP_WIDE_GLINE:FALSE -# F:HIS_MAP:TRUE -# F:HIS_SNOTICES:TRUE -# F:HIS_SNOTICES_OPER_ONLY:TRUE -# F:HIS_DESYNCS:TRUE -# F:HIS_DEBUG_OPER_ONLY:TRUE -# F:HIS_WALLOPS:TRUE -# F:HIS_LINKS:TRUE -# F:HIS_TRACE:TRUE -# F:HIS_STATS_l:TRUE -# F:HIS_STATS_c:TRUE -# F:HIS_STATS_g:TRUE -# F:HIS_STATS_h:TRUE -# F:HIS_STATS_k:TRUE -# F:HIS_STATS_f:TRUE -# F:HIS_STATS_i:TRUE -# F:HIS_STATS_j:TRUE -# F:HIS_STATS_M:TRUE -# F:HIS_STATS_m:TRUE -# F:HIS_STATS_o:TRUE -# F:HIS_STATS_p:TRUE -# F:HIS_STATS_q:TRUE -# F:HIS_STATS_r:TRUE -# F:HIS_STATS_d:TRUE -# F:HIS_STATS_e:TRUE -# F:HIS_STATS_t:TRUE -# F:HIS_STATS_T:TRUE -# F:HIS_STATS_u:FALSE -# F:HIS_STATS_U:TRUE -# F:HIS_STATS_v:TRUE -# F:HIS_STATS_w:FALSE -# F:HIS_STATS_x:TRUE -# F:HIS_STATS_y:TRUE -# F:HIS_STATS_z:TRUE -# F:HIS_WHOIS_SERVERNAME:TRUE -# F:HIS_WHOIS_IDLETIME:TRUE -# F:HIS_WHO_SERVERNAME:TRUE -# F:HIS_WHO_HOPCOUNT:TRUE -# F:HIS_BANWHO:TRUE -# F:HIS_KILLWHO:TRUE -# F:HIS_REWRITE:TRUE -# F:HIS_REMOTE:1 -# F:HIS_NETSPLIT:TRUE -# F:HIS_SERVERNAME:"*.undernet.org" -# F:HIS_SERVERINFO:"The Undernet Underworld" -# F:HIS_URLSERVERS:"http://www.undernet.org/servers.php" -# F:NETWORK:"UnderNet" -# F:URL_CLIENTS:"ftp://ftp.undernet.org/pub/irc/clients" - +features +{ +# "DOMAINNAME"="<obtained from /etc/resolv.conf by ./configure>"; +# "RELIABLE_CLOCK"="FALSE"; +# "BUFFERPOOL"="27000000"; +# "HAS_FERGUSON_FLUSHER"="FALSE"; +# "CLIENT_FLOOD"="1024"; +# "SERVER_PORT"="4400"; +# "NODEFAULTMOTD"="TRUE"; +# "MOTD_BANNER"="TRUE"; +# "KILL_IPMISMATCH"="FALSE"; +# "IDLE_FROM_MSG"="TRUE"; +# "HUB"="FALSE"; +# "WALLOPS_OPER_ONLY"="FALSE"; +# "NODNS"="FALSE"; +# "RANDOM_SEED"="<you should set one explicitly>"; +# "DEFAULT_LIST_PARAM"="TRUE"; +# "NICKNAMEHISTORYLENGTH"="800"; +# "HOST_HIDING"="FALSE"; +# "HIDDEN_HOST"="users.undernet.org"; +# "HIDDEN_IP"="127.0.0.1"; +# "KILLCHASETIMELIMIT"="30"; +# "MAXCHANNELSPERUSER"="10"; +# "AVBANLEN"="40"; +# "MAXBANS"="30"; +# "MAXSILES"="15"; +# "HANGONGOODLINK="300"; +# "HANGONRETRYDELAY" = "10"; +# "CONNECTTIMEOUT" = "90"; +# "TIMESEC" = "60"; +# "MAXIMUM_LINKS" = "1"; +# "PINGFREQUENCY" = "120"; +# "CONNECTFREQUENCY" = "600"; +# "DEFAULTMAXSENDQLENGTH" = "40000"; +# "GLINEMAXUSERCOUNT" = "20"; +# "MPATH" = "ircd.motd"; +# "RPATH" = "remote.motd"; +# "PPATH" = "ircd.pid"; +# "VIRTUAL_HOST" = "FALSE"; +# "TOS_SERVER" = "0x08"; +# "TOS_CLIENT" = "0x08"; +# "POLLS_PER_LOOP" = "200"; +# "CRYPT_OPER_PASSWORD" = "TRUE"; +# "OPER_NO_CHAN_LIMIT" = "TRUE"; +# "OPER_MODE_LCHAN" = "TRUE"; +# "OPER_WALK_THROUGH_LMODES" = "FALSE"; +# "NO_OPER_DEOP_LCHAN" = "FALSE"; +# "SHOW_INVISIBLE_USERS" = "TRUE"; +# "SHOW_ALL_INVISIBLE_USERS" = "TRUE"; +# "UNLIMIT_OPER_QUERY" = "FALSE"; +# "LOCAL_KILL_ONLY" = "FALSE"; +# "CONFIG_OPERCMDS" = "FALSE"; +# "OPER_KILL" = "TRUE"; +# "OPER_REHASH" = "TRUE"; +# "OPER_RESTART" = "TRUE"; +# "OPER_DIE" = "TRUE"; +# "OPER_GLINE" = "TRUE"; +# "OPER_LGLINE" = "TRUE"; +# "OPER_JUPE" = "TRUE"; +# "OPER_LJUPE" = "TRUE"; +# "OPER_OPMODE" = "TRUE"; +# "OPER_LOPMODE" = "TRUE"; +# "OPER_BADCHAN" = "FALSE"; +# "OPER_LBADCHAN" = "FALSE"; +# "OPER_SET" = "FALSE"; +# "OPERS_SEE_IN_SECRET_CHANNELS" = "TRUE"; +# "OPER_WIDE_GLINE" = "TRUE"; +# "OPER_LIST_CHAN" = "TRUE"; +# "LOCOP_KILL" = "TRUE"; +# "LOCOP_REHASH" = "TRUE"; +# "LOCOP_RESTART" = "FALSE"; +# "LOCOP_DIE" = "FALSE"; +# "LOCOP_LGLINE" = "TRUE"; +# "LOCOP_LJUPE" = "TRUE"; +# "LOCOP_LOPMODE" = "TRUE"; +# "LOCOP_LBADCHAN" = "FALSE"; +# "LOCOP_SET" = "FALSE"; +# "LOCOP_SEE_IN_SECRET_CHANNELS" = "FALSE"; +# "LOCOP_WIDE_GLINE" = "FALSE"; +# "LOCOP_LIST_CHAN" = "FALSE"; +}; # Well, you have now reached the end of this sample configuration # file. If you have any questions, feel free to mail ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2003-01-23 10:42:46
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-23 10:42:44 UTC Removed files: config/Configure.in config/Makefile.in config/README config/acconfig.h config/acinclude.m4 config/aclocal.m4 config/config-sh.in config/configure config/configure.in config/gen.doc.Makefile config/gen.ircd.Makefile config/install-sh config/parse.none config/setup.h.in config/setup.h.top config/stamp-h.in Log message: Eliminacion directorio config/ ---------------------- diff included ---------------------- Index: ircdh/config/Configure.in diff -u ircdh/config/Configure.in:1.2 ircdh/config/Configure.in:removed --- ircdh/config/Configure.in:1.2 Sun Aug 18 15:49:41 2002 +++ ircdh/config/Configure.in Thu Jan 23 02:42:44 2003 @@ -1,556 +0,0 @@ -# @configure_input@ -# -# This script is used to configure the IRC-Hispano IRC Daemon. -# It was copied from the linux kernel distribution and only slightly -# changed. -# -# 170897 (ca...@ru...) - -# Changed the default configuration file to be defconfig. -# Changed the location of autoconf.h to be 'include/'. -# Changed the final text printed at the end. -# Changed replacement to only match 'is not set' (and not 'is not'). -# Added function string() and define_string(). -# Added function define_macro() -# -# 180897 (ca...@ru...) - -# Changed bool() so it can take a default argument. -# Introduced hard link ../.config, to inherit config files over new -# distributions. -# Got rid of 'is not set' and using '=n' instead. -# Changed configuration help file to be doc/Configure.help. -# Changed DEFAULT into USE_DEFAULT, which is asked for in config.in. -# -# 210897 (ca...@ru...) - -# Changed the location of autoconf.h and .config to be 'configure/'. -# Fixed the script to work with a general 'sh' and not only with bash. -# (removing 'function', using `` instead of $(), using \\$ inside -# that instead of \$, using 'eval set -- $choices' rather then -# 'set -- $choices', introduction of function 'expr' instead of -# using external executable 'expr', using set -fh rather then -# set -f -h, using "" around reg.exp rather then '' and removing -# unnecessary backslashes from it). -# Removed tristate and hex functions. -# Making the hardlink to ../.config only when configure/.config doesn't exist. -# -# 280897 (ca...@ru...) - -# Added CONFIG_NEW: Ask if one wants to use this configuration as main -# configuration. -# Changed /bin/rm into $RM, so now this environment variable must be set! -# -# 290897 (ca...@ru...) - -# Added support for the solaris Born shell. -# Changed the directory configure/ to config/ in order not to collide with -# GNU autoconf in the future. -# -# 020997 (ca...@ru...) - -# The future is here... renamed 'config.in' to 'config-sh', reserving -# 'file.in' for input files of autoconfs' 'configure' script. -# 'autoconf.h' has been renamed to 'config.h', because it would be confusing -# otherwise with autoconf. -# Changed Configure to be run from within config/. -# -# 050997 (ca...@ru...) - -# Don't use 'def={$old:-$3}' but instead the equivalent ': ${def=$3}' because -# some sh don't understand the first expression. -# Pressing a 'c' at any question continues in 'batch' mode. -# -# 220199 (ca...@ru...) - -# Put MACRO name at front, making it easier to find it when scanning -# through the defaults to change just one. -# Make pressing 'c' stop at every paragraph, and pressing 'C' finish the -# whole script. -# -# ----------------------------------------------------------------------------- -# -# This script is used to configure the linux kernel. -# -# It was inspired by the challenge in the original Configure script -# to ``do something better'', combined with the actual need to ``do -# something better'' because the old configure script wasn't flexible -# enough. -# -# Please send comments / questions / bug fixes to ray...@mi.... -# -# ***** IMPORTANT COMPATIBILITY NOTE **** -# If configuration changes are made which might adversely effect -# Menuconfig or xconfig, please notify the respective authors so that -# those utilities can be updated in parallel. -# -# Menuconfig: <roa...@cf...> -# xconfig: <ape...@fo...> <er...@ai...> -# **************************************** -# -# Each line in the config file is a command. -# -# 050793 - use IFS='@' to get around a bug in a pre-version of bash-1.13 -# with an empty IFS. -# -# 030995 (st...@os...) - added support for tri-state answers, -# for selecting modules to compile. -# -# 180995 Bernhard Kaindl (bk...@pi...) - added dummy functions for -# use with a config.in modified for make menuconfig. -# -# 301195 (bo...@ma...) - added help text support -# -# 281295 Paul Gortmaker - make tri_state functions collapse to boolean -# if module support is not enabled. -# -# 010296 Aaron Ucko (uc...@va...) - fix int and hex to accept -# arbitrary ranges -# -# 150296 Dick Streefland (di...@ta...) - report new configuration -# items and ask for a value even when doing a "make oldconfig" -# -# 200396 Tom Dyas (td...@ed...) - when the module option is -# chosen for an item, define the macro <option_name>_MODULE -# -# 090397 Axel Boldt (bo...@ma...) - avoid ? and + in regular -# expressions for GNU expr since version 1.15 and up use \? and \+. - -#### Start of system configuration section. #### - -SHELL=@SHPROG@ -RM=@RMPROG@ -LN_S="@LN_S@" -unet_cv_sys_set_h=@unet_cv_sys_set_h@ - -#### End of system configuration section. #### - -# Disable filename globbing -set -f - -if test $unet_cv_sys_set_h = yes; then - set -h -fi - -# Figure out how to do 'echo' without newline: -c='' -n='' -if [ "`eval echo -n 'a'`" = "-n a" ] ; then - c='\c' -else - n='-n' -fi - -# Check if ${VAR:-def} works -DUMMY_VAR="" -DUMMY_VAR2="some value" -DUMMY_VAR=${DUMMY_VAR:-test} -DUMMY_VAR2=${DUMMY_VAR2:-test} -if [ "$DUMMY_VAR" != "test" -o "$DUMMY_VAR2" != "some value" ]; then - echo "You /bin/sh doesn't understand '\${VAR:-default}'" - exit 1 -fi - -# -# Dummy functions for use with a config.in modified for menuconf -# -mainmenu_option () { - : -} -mainmenu_name () { - : -} -endmenu () { - : -} - -# -# help prints the corresponding help text from Configure.help to stdout -# -# help variable -# -help () { - if [ -f ../doc/Configure.help ] - then - #first escape regexp special characters in the argument: - var=`echo "$1"|sed 's/[][\/.^$*]/\\&/g'` - #now pick out the right help text: - text=`sed -n "/^$var[ ]*\\$/,\\${ - /^$var[ ]*\\$/b - /^#.*/b - /^[ ]*\\$/q - p - }" ../doc/Configure.help` - if [ -z "$text" ] - then - echo; echo " Sorry, no help available for this option yet.";echo - else - (echo; echo "$text"; echo) | ${PAGER:-more} - fi - else - echo; - echo " Can't access the file doc/Configure.help which" - echo " should contain the help texts." - echo - fi -} - - -# -# readln reads a line into $ans. -# -# readln macro prompt default oldval -# -readln () { - echo $1 | awk '{ printf("%-20.20s: ", $1); }' - if [ "$USE_DEFAULT" != "n" -a -n "$4" ]; then - echo $2 - ans=$3 - else - echo $n "$2$c" - [ -z "$4" ] && echo $n "(NEW) $c" - IFS='@' read ans </dev/tty || exit 1 - [ -z "$ans" ] && ans=$3 - if [ "$ans" = "c" -o "$ans" = "C" ]; then - USE_DEFAULT=$ans - ans=$3 - fi - fi -} - -# -# comment does some pretty-printing -# -# comment 'xxx' -# -comment () { - echo "" - echo "*-----------------------------------------------------------------------------"; - echo "* $1" ; - echo "*" - (echo "" ; echo "#"; echo "# $1" ; echo "#") >>$CONFIG - (echo "" ; echo "/*"; echo " * $1" ; echo " */") >>$CONFIG_H - if [ "$USE_DEFAULT" = "c" ]; then - USE_DEFAULT=n - fi -} - -# -# define_bool sets the value of a boolean argument -# -# define_bool define value -# -define_bool () { - case "$2" in - "y") - echo "$1=y" >>$CONFIG - echo "#define $1" >>$CONFIG_H - ;; - - "n") - echo "$1=n" >>$CONFIG - echo "#undef $1" >>$CONFIG_H - ;; - esac - eval "$1=$2" -} - -# -# expr determines if string matches a regular expression -# -# expr string reg_exp -# -expr () { - MATCH=`echo $1 | egrep -e $2` - if [ -z "$MATCH" ]; then - return 1 - else - return 0 - fi -} - -# -# bool processes a boolean argument -# -# bool question define -# -bool () { - old=`eval echo "\\${$2}"` - if [ -z "$old" -a -n "$3" ]; then - def=$3 - else - def=${old:-n} - fi - case "$def" in - "y") - defprompt="Y/n/?" - def="y" - ;; - - "n") - defprompt="N/y/?" - ;; - esac - while :; do - readln $2 "$1 [$defprompt] " "$def" "$old" - case "$ans" in - [yY] | [yY]es ) - define_bool "$2" "y" - break - ;; - - [nN] | [nN]o ) - define_bool "$2" "n" - break - ;; - - * ) - help "$2" - ;; - esac - done -} - -# -# define_int sets the value of a integer argument -# -# define_int define value -# -define_int () { - echo "$1=$2" >>$CONFIG - echo "#define $1 ($2)" >>$CONFIG_H - eval "$1=$2" -} - -# -# int processes an integer argument -# -# int question define default -# -int () { - old=`eval echo "\\${$2}"` - def=${old:-$3} - while :; do - readln $2 "$1 [$def] " "$def" "$old" - if expr "$ans" "^0$|^(-[1-9]|[1-9])[0-9]*$"; then - define_int "$2" "$ans" - break - else - help "$2" - fi - done -} - -# -# choice processes a choice list (1-out-of-n) -# -# choice question choice-list default -# -# The choice list has a syntax of: -# NAME WHITESPACE VALUE { WHITESPACE NAME WHITESPACE VALUE } -# The user may enter any unique prefix of one of the NAMEs and -# choice will define VALUE as if it were a boolean option. -# VALUE must be in all uppercase. Normally, VALUE is of the -# form CONFIG_<something>. Thus, if the user selects <something>, -# the CPP symbol CONFIG_<something> will be defined and the -# shell variable CONFIG_<something> will be set to "y". -# -choice () { - question="$1" - choices="$2" - old= - def=$3 - - # determine default answer: - names="" - eval set -- $choices - firstvar=$2 - while [ -n "$2" ]; do - if [ -n "$names" ]; then - names="$names, $1" - else - names="$1" - fi - if [ "`eval echo "\\${$2}"`" = "y" ]; then - old=$1 - def=$1 - fi - shift; shift - done - - val="" - while [ -z "$val" ]; do - ambg=n - readln $names "$question [$def] " "$def" "$old" - ans=`echo $ans | tr a-z A-Z` - eval set -- $choices - while [ -n "$1" ]; do - name=`echo $1 | tr a-z A-Z` - case "$name" in - "$ans"* ) - if [ "$name" = "$ans" ]; then - val="$2" - break # stop on exact match - fi - if [ -n "$val" ]; then - echo; - echo \ - " Sorry, \"$ans\" is ambiguous; please enter a longer string." - echo - val="" - ambg=y - break - else - val="$2" - fi - ;; - esac - shift; shift - done - if [ "$val" = "" -a "$ambg" = "n" ]; then - help "$firstvar" - fi - done - eval set -- $choices - while [ -n "$2" ]; do - if [ "$2" = "$val" ]; then - echo " defined $val" - define_bool "$2" "y" - else - define_bool "$2" "n" - fi - shift; shift - done -} - -# -# define_macro sets the value of a macro argument -# -# define_macro define value -# -define_macro () { - if [ -n "$2" ]; then - echo "$1=\"$2\"" >>$CONFIG - echo "#define $1 $2" >>$CONFIG_H - fi - eval "$1=\"$2\"" -} - -# -# define_string sets the value of a string argument -# -# define_string define value -# -define_string () { - if [ -n "$2" ]; then - echo "$1=\"$2\"" >>$CONFIG - echo "#define $1 \"$2\"" >>$CONFIG_H - fi - eval "$1=\"$2\"" -} - -# -# string processes a string argument -# -# string question define default -# -string () { - old=`eval echo "\\${$2}"` - def=${old:-$3} - while :; do - readln $2 "$1 [$def] " "$def" "$old" - if expr "$ans" "^[^\"].*[^\"]$"; then - define_string "$2" "$ans" - break - else - help "$2" - fi - done -} - -CONFIG=.tmpconfig -CONFIG_H=.tmpconfig.h -trap "$RM -f $CONFIG $CONFIG_H ; exit 1" 1 2 15 - -# -# Make sure we start out with a clean slate. -# -echo "#" > $CONFIG -echo "# Configuration default generated for:" > $CONFIG -echo '# `pwd`' > $CONFIG -echo "#" > $CONFIG -echo "# Automatically generated by 'make config': don't edit" >> $CONFIG -echo "#" >> $CONFIG - -echo "/*" > $CONFIG_H -echo " * Automatically generated C config: don't edit" >> $CONFIG_H -echo " */" >> $CONFIG_H -echo "#ifndef INCLUDED_config_h" >> $CONFIG_H -echo "#define INCLUDED_config_h" >> $CONFIG_H -echo "#ifndef INCLUDED_setup_h" >> $CONFIG_H -echo "#include \"setup.h\"">> $CONFIG_H -echo "#endif" >> $CONFIG_H -echo "#define AUTOCONF_INCLUDED" >> $CONFIG_H - -CONFIG_IN=./config-sh -if [ "$1" != "" ] ; then - CONFIG_IN=$1 -fi - -DEFAULTS=none -if [ -r .config ]; then - DEFAULTS=./.config -else - if [ -r ../../.config ]; then - echo "*" - echo "* WARNING: Inheriting .config from previous version!" - DEFAULTS=../../.config - fi -fi - -if [ -r $DEFAULTS ]; then - echo "*" - echo "* Using defaults found in" $DEFAULTS - echo "* If you type a 'C' the script will finish using all defaults." - echo "* If you type a 'c' the script will skip to the next paragraph." - echo "*" - . $DEFAULTS -else - echo "*" - echo "* No defaults found" - echo "*" -fi - -. $CONFIG_IN - -echo "#endif /* INCLUDED_config_h */" >> $CONFIG_H - -mv $CONFIG_H config.h -$RM -f .config.old -if [ -f .config ]; then - # Keep the inode of .config (hardlink to ../../.config) intact: - cp .config .config.old - cat $CONFIG > .config - $RM -f $CONFIG -fi -if test ! -f .config -o ! -r ../../.config; then - if [ "$CONFIG_BATCH" = "y" ]; then - CONFIG_NEW=n - else - CONFIG_NEW=y - USE_DEFAULT=n - echo "*" - echo "*" - echo "*" - bool 'Use .config of THIS source tree as your upgrade default' CONFIG_NEW - fi - if [ ! -f .config ]; then - mv $CONFIG .config - fi - if [ "$CONFIG_NEW" = "y" ]; then - CONFIG_CURDIR=`pwd` - cd ../.. - $RM -f .config .config.cache - ln $CONFIG_CURDIR/.config .config - ln $CONFIG_CURDIR/config.cache .config.cache - echo - echo "NOTE: Linking ../.config to THIS source tree's configuration !" - echo "(The configuration of this source tree will be used as default when you upgrade)" - fi -fi - -echo - -exit 0 Index: ircdh/config/Makefile.in diff -u ircdh/config/Makefile.in:1.1.1.1 ircdh/config/Makefile.in:removed --- ircdh/config/Makefile.in:1.1.1.1 Fri Jul 26 14:58:22 2002 +++ ircdh/config/Makefile.in Thu Jan 23 02:42:44 2003 @@ -1,104 +0,0 @@ -# config/Makefile for the IRC-Hispano IRC Daemon. -# Copyright (C) 1997, Carlo Wood <ca...@ru...> - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -#### Start of system configuration section. #### - -SHELL=@SHPROG@ -RM=@RMPROG@ -TOUCH=touch -@SET_MAKE@ -#### End of system configuration section. #### - -# Some versions of make give a warning when this is empty: -.SUFFIXES: .dummy - -# These files need to be up to date when we are building the ircd -build: config.h setup.h - -clean: - ${RM} -f .tmpconfig.h .tmpconfig - -distclean: clean - ${RM} -f .config setup.h stamp-h config.h .config.old \ - config.cache config.log config.status Makefile config-sh \ - Configure - -maintainer-clean: distclean - ${RM} -f aclocal.m4 setup.h.in stamp-h.in configure - @echo Generating aclocal.m4... - aclocal - @echo Generating setup.h.in... - autoheader - @echo timestamp > stamp-h.in - @echo Generating configure... - autoconf - -config: configure setup.h.in config.status Configure FORCE - @CONFIG_BATCH=n ${SHELL} ./Configure || exit 1 - @# Allow the use of non-GNU make with 'make config': - @cd ../ircd; ${MAKE} Makefile - @cd ../doc; ${MAKE} Makefile - -config.h: Configure config-sh - @echo Generating config.h... - @CONFIG_BATCH=y ${SHELL} ./Configure || exit 1 - @cd ../ircd; ${MAKE} Makefile - -FORCE: - -#============================================================================== -# Rules to automatically remake Configuration : - -Makefile: config.status Makefile.in - @echo "recreating config/Makefile" - @CONFIG_FILES=Makefile CONFIG_HEADERS= ./config.status > /dev/null - -aclocal.m4: acinclude.m4 - @echo Generating aclocal.m4... - @echo aclocal - @aclocal || ( echo "NOT recreating 'aclocal.m4', you don't have 'aclocal'"; touch aclocal.m4 ) - -configure: configure.in aclocal.m4 - @echo Generating configure... - @echo autoconf - @autoconf || ( echo "NOT recreating 'configure', you don't have 'autoconf'"; touch configure ) - -setup.h.in: stamp-h.in -stamp-h.in: configure.in acconfig.h setup.h.top aclocal.m4 #setup.h.bot - @echo Generating setup.h.in... - @echo autoheader - @autoheader || ( echo "NOT recreating 'setup.h.in', you don't have 'autoheader'"; touch setup.h.in ) - @echo timestamp > stamp-h.in - -setup.h: stamp-h -stamp-h: stamp-h.in config.status - @echo Generating setup.h... - @CONFIG_FILES= CONFIG_HEADERS=setup.h ./config.status - -config.status: configure - @echo Generating config.status... - @CONFIG_FILES= CONFIG_HEADERS= ./config.status --recheck || \ - (./configure && ${TOUCH} ../doc/stamp-m ../ircd/stamp-m) - -config-sh: config-sh.in config.status - @echo Generating config-sh... - @CONFIG_FILES=config-sh CONFIG_HEADERS= ./config.status - -Configure: Configure.in config.status - @echo Generating Configure... - @CONFIG_FILES=Configure CONFIG_HEADERS= ./config.status Index: ircdh/config/README diff -u ircdh/config/README:1.1.1.1 ircdh/config/README:removed --- ircdh/config/README:1.1.1.1 Fri Jul 26 14:58:22 2002 +++ ircdh/config/README Thu Jan 23 02:42:44 2003 @@ -1,94 +0,0 @@ -This directory contains NOTHING for the admin to configure. - -If you want to configure the IRC server, go to the top level directory and -type: 'make config'. - -------------------------------------------------------------------------------- - -If you are a coder and are adding a feature to the server that you need -automatic or manual configuration for, then this is where you need to -change things. - -If you touch any of the following files, then you need to have 'autoconf' -(and 'autoheader') installed - you might also need GNU m4 and perl then: - -configure.in -acconfig.h -setup.h.top - -Never touch setup.h.in and stamp-h.in. -Don't run 'make maintainer-clean' when you don't have autoconf etc. installed. - -If you touch any of the following files, then you need to have GNU make -in order to have the Makefiles correctly rebuild automatically: - -parse.none -gen.ircd.Makefile -../ircd/Makefile.in -../doc/Makefile.in -../Makefile.in - -Note that after running 'make config' special added code in config/Makefile -will remake the Makefiles as needed to allow the admins to use a non-GNU make. -But coders should use GNU make. - -Here is a sheme of which files are needed to generate which files: - - /> (config.log) - /-> (config.cache) -configure.in --(autoconf)--> configure --> config.status - \ -acconfig.h --(autoheader)--> setup.h.in --(config.status)--> setup.h -setup.h.top / (stamp-h.in) (stamp-h) - -config-sh.in --(config.status)--> config-sh --(Configure)--> config.h - (.config) -/ \-> (.config) - \> (.config.old) -Makefile.in --(config.status)--> Makefile - -The exectuable scripts (configure, config.status and Configure) should only be -called from Makefile (automatically, when needed, by means of makefile rules). - -Further more, config.status is also used to (re)generate doc/Makefile and -ircd/Makefile (from respectively doc/Makefile.in and ircd/Makefile.in). -However, ircd/Makefile is not functional then, first also gen.ircd.Makefile -must be called. All of this is done automatically by the Makefile rules -inside doc/Makefile and ircd/Makefile respectively. Finally, gen.ircd.Makefile -also calls parse.none. So: - -../ircd/Makefile.in --\ -gen.ircd.Makefile ----(config.status)--> ../ircd/Makefile -.config --/ -parse.none -/ - -../doc/Makefile.in --\ -gen.doc.Makefile ----(config.status)--> ../doc/Makefile -.config --/ -parse.none -/ - -../Makefile.in ----(config.status)--> ../Makefile - -'Configure' uses the file ../doc/Configure.help for the help texts. - -------------------------------------------------------------------------------- - -Adding an 'autoconf' check. - -1) Install GNU m4, autoconf & autoheader. -2) Add your check to configure.in, if needed also add an entry to acconfig.h -3) Add the #ifdefs to the source code. - -Adding a manual configuration. - -1) Edit config-sh.in and add the question. -2) Edit ../doc/Configure.help and add the help text ! -3) If necessary, add something to parse.none to allow the use of the - value 'none'. -4) If necessary edit gen.ircd.Makefile and ../ircd/Makefile to get your - variable in ../ircd/Makefile. (It will already be in config.h). -5) Add the #ifdefs to the source code. - -In both cases, all needed files will be automatically (re) generated when -you run 'make' from the top level directory (you need GNU make though). - -Carlo Wood Index: ircdh/config/acconfig.h diff -u ircdh/config/acconfig.h:1.1.1.1 ircdh/config/acconfig.h:removed --- ircdh/config/acconfig.h:1.1.1.1 Fri Jul 26 14:58:22 2002 +++ ircdh/config/acconfig.h Thu Jan 23 02:42:44 2003 @@ -1,32 +0,0 @@ -/* Define if you have the resolv library (-lresolv) */ -#undef HAVE_LIB_RESOLV - -/* Define if you have the setrlimit function */ -#undef HAVE_SETRLIMIT - -/* Define one of these, depending on wether you have - POSIX, BSD or SYSV non-blocking stuff */ -#undef NBLOCK_POSIX -#undef NBLOCK_BSD -#undef NBLOCK_SYSV - -/* Define on of these, depending on wether you have - POSIX, BSD or SYSV signal handling */ -#undef POSIX_SIGNALS -#undef BSD_RELIABLE_SIGNALS -#undef SYSV_UNRELIABLE_SIGNALS - -/* Define these to be unsigned integral internal types, - * of respecitvely 2 and 4 bytes in size, when not already - * defined in <sys/types.h>, <stdlib.h> or <stddef.h> */ -#undef u_int16_t -#undef u_int32_t - -/* Define this to the printf format for size_t */ -#undef SIZE_T_FMT - -/* Define this to the printf format for time_t */ -#undef TIME_T_FMT - -/* Define this to the printf signed format for time_t */ -#undef STIME_T_FMT Index: ircdh/config/acinclude.m4 diff -u ircdh/config/acinclude.m4:1.1.1.1 ircdh/config/acinclude.m4:removed --- ircdh/config/acinclude.m4:1.1.1.1 Fri Jul 26 14:58:22 2002 +++ ircdh/config/acinclude.m4 Thu Jan 23 02:42:44 2003 @@ -1,290 +0,0 @@ -dnl -dnl Macro: unet_PIPE_CFLAGS -dnl -dnl If the compiler understands -pipe, add it to CFLAGS if not already -dnl there. -dnl -AC_DEFUN(unet_PIPE_CFLAGS, -[AC_MSG_CHECKING([if the compiler understands -pipe]) -unet_cv_pipe_flags="$ac_cv_prog_gcc" -if test "$ac_cv_prog_gcc" = no; then - OLDCFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -pipe" - AC_TRY_COMPILE(,,unet_cv_pipe_flags=yes,) - CFLAGS="$OLDCFLAGS" -fi -AC_MSG_RESULT($unet_cv_pipe_flags) -if test "$unet_cv_pipe_flags" = yes ; then - x=`echo $CFLAGS | grep 'pipe' 2>/dev/null` - if test "$x" = "" ; then - CFLAGS="$CFLAGS -pipe" - fi -fi -]) - -dnl -dnl Macro: unet_CHECK_LIB_RESOLV -dnl -dnl Check for res_mkquery in -lresolv and add that to LIBS when needed. -dnl -AC_DEFUN(unet_CHECK_LIB_RESOLV, -[AC_CACHE_CHECK([for res_mkquery in -lresolv], unet_cv_lib_resolv, -[AC_TRY_LINK([struct rrec; -extern int res_mkquery(int, const char *, int, int, const char *, - int, struct rrec *, unsigned char *, int);], -[int op; -const char *dname; -int class, type; -const char *data; -int datalen; -struct rrec *newrr; -unsigned char *buf; -int buflen; -res_mkquery(op,dname,class,type,data,datalen,newrr,buf,buflen)], -unet_cv_lib_resolv=no, [OLD_LIBS="$LIBS" -LIBS="$LIBS -lresolv" -AC_TRY_LINK([extern char *_res;], [*_res=0], -unet_cv_lib_resolv=yes, unet_cv_lib_resolv=no) -LIBS="$OLD_LIBS"])]) -if test $unet_cv_lib_resolv = yes; then - AC_DEFINE(HAVE_LIB_RESOLV) - LIBS="$LIBS -lresolv" -fi]) - -dnl -dnl Macro: unet_NONBLOCKING -dnl -dnl Check whether we have posix, bsd or sysv non-blocking sockets and -dnl define respectively NBLOCK_POSIX, NBLOCK_BSD or NBLOCK_SYSV. -dnl -AC_DEFUN(unet_NONBLOCKING, -[dnl Do we have posix, bsd or sysv non-blocking stuff ? -AC_CACHE_CHECK([for posix non-blocking], unet_cv_sys_nonblocking_posix, -[AC_TRY_RUN([#include <sys/types.h> -#include <sys/socket.h> -#include <fcntl.h> -#include <sys/ioctl.h> -#include <sys/file.h> -#include <signal.h> -$ac_cv_type_signal alarmed() { exit(1); } -int main(void) -{ - char b[12]; - struct sockaddr x; - size_t l = sizeof(x); - int f = socket(AF_INET, SOCK_DGRAM, 0); - if (f >= 0 && !(fcntl(f, F_SETFL, O_NONBLOCK))) - { - signal(SIGALRM, alarmed); - alarm(2); - recvfrom(f, b, 12, 0, &x, &l); - alarm(0); - exit(0); - } - exit(1); -}], unet_cv_sys_nonblocking_posix=yes, unet_cv_sys_nonblocking_posix=no)]) -if test $unet_cv_sys_nonblocking_posix = yes; then - AC_DEFINE(NBLOCK_POSIX) -else -AC_CACHE_CHECK([for bsd non-blocking], unet_cv_sys_nonblocking_bsd, -[AC_TRY_RUN([#include <sys/types.h> -#include <sys/socket.h> -#include <fcntl.h> -#include <sys/ioctl.h> -#include <sys/file.h> -#include <signal.h> -$ac_cv_type_signal alarmed() { exit(1); } -int main(void) -{ - char b[12]; - struct sockaddr x; - size_t l = sizeof(x); - int f = socket(AF_INET, SOCK_DGRAM, 0); - if (f >= 0 && !(fcntl(f, F_SETFL, O_NDELAY))) - { - signal(SIGALRM, alarmed); - alarm(2); - recvfrom(f, b, 12, 0, &x, &l); - alarm(0); - exit(0); - } - exit(1); -}], unet_cv_sys_nonblocking_bsd=yes, unet_cv_sys_nonblocking_bsd=no)]) -if test $unet_cv_sys_nonblocking_bsd = yes; then - AC_DEFINE(NBLOCK_BSD) -else - AC_DEFINE(NBLOCK_SYSV) -fi -fi]) - -dnl -dnl Macro: unet_SIGNALS -dnl -dnl Check if we have posix signals, reliable bsd signals or -dnl unreliable sysv signals and define respectively POSIX_SIGNALS, -dnl BSD_RELIABLE_SIGNALS or SYSV_UNRELIABLE_SIGNALS. -dnl -AC_DEFUN(unet_SIGNALS, -[dnl Do we have posix signals, reliable bsd signals or unreliable sysv signals ? -AC_CACHE_CHECK([for posix signals], unet_cv_sys_signal_posix, -[AC_TRY_COMPILE([#include <signal.h>], -[sigaction(SIGTERM, (struct sigaction *)0L, (struct sigaction *)0L)], -unet_cv_sys_signal_posix=yes, unet_cv_sys_signal_posix=no)]) -if test $unet_cv_sys_signal_posix = yes; then - AC_DEFINE(POSIX_SIGNALS) -else -AC_CACHE_CHECK([for bsd reliable signals], unet_cv_sys_signal_bsd, -[AC_TRY_RUN([#include <signal.h> -int calls = 0; -$ac_cv_type_signal handler() -{ - if (calls) return; - calls++; - kill(getpid(), SIGTERM); - sleep(1); -} -int main(void) -{ - signal(SIGTERM, handler); - kill(getpid(), SIGTERM); - exit (0); -}], unet_cv_sys_signal_bsd=yes, unet_cv_sys_signal_bsd=no)]) -if test $unet_cv_sys_signal_bsd = yes; then - AC_DEFINE(BSD_RELIABLE_SIGNALS) -else - AC_DEFINE(SYSV_UNRELIABLE_SIGNALS) -fi -fi]) - -dnl -dnl Macro: unet_DEFINE_SIZE_T_FMT -dnl -dnl Define SIZE_T_FMT to be "%u" or "%lu", whichever seems more appropriate. -dnl -AC_DEFUN(unet_DEFINE_SIZE_T_FMT, -[dnl Make educated guess :/, if size_t is a long or not -AC_CHECK_SIZEOF(size_t)dnl -AC_MSG_CHECKING(printf format of size_t) -if test "$ac_cv_sizeof_size_t" = 4 ; then - AC_MSG_RESULT("%u") - AC_DEFINE(SIZE_T_FMT, "%u") -else - AC_MSG_RESULT("%lu") - AC_DEFINE(SIZE_T_FMT, "%lu") -fi]) - -dnl -dnl Macro: unet_DEFINE_TIME_T_FMT -dnl -dnl Try to figure out if time_t is an int or not, and if so define -dnl TIME_T_FMT to be "%u", otherwise define it to be "%lu". -dnl Likewise define STIME_T_FMT for the signed format. -dnl -AC_DEFUN(unet_DEFINE_TIME_T_FMT, -[dnl Make educated guess :/, if time_t is a long or not -AC_MSG_CHECKING(size of time_t) -AC_CACHE_VAL(unet_cv_sizeof_time_t, -[AC_TRY_RUN([#include <stdio.h> -#include <sys/types.h> -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(time_t)); - exit(0); -}], unet_cv_sizeof_time_t=`cat conftestval`, -unet_cv_sizeof_time_t=0, unet_cv_sizeof_time_t=0)]) -if test "$unet_cv_sizeof_time_t" = 0 ; then - AC_MSG_RESULT(unknown) - AC_DEFINE(TIME_T_FMT, "%lu") - AC_DEFINE(STIME_T_FMT, "%ld") -else - AC_MSG_RESULT([$unet_cv_sizeof_time_t]) - AC_MSG_CHECKING(printf format of time_t) - if test "$unet_cv_sizeof_time_t" = "$ac_cv_sizeof_long" ; then - AC_MSG_RESULT("%lu") - AC_DEFINE(TIME_T_FMT, "%lu") - AC_DEFINE(STIME_T_FMT, "%ld") - else - AC_MSG_RESULT("%u") - AC_DEFINE(TIME_T_FMT, "%u") - AC_DEFINE(STIME_T_FMT, "%d") - fi -fi]) - -dnl -dnl Macro: unet_CHECK_TYPE_SIZES -dnl -dnl Check the size of several types and define a valid int16_t and int32_t. -dnl -AC_DEFUN(unet_CHECK_TYPE_SIZES, -[dnl Check type sizes -AC_CHECK_SIZEOF(short) -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long) -if test "$ac_cv_sizeof_int" = 2 ; then - AC_CHECK_TYPE(int16_t, int) - AC_CHECK_TYPE(u_int16_t, unsigned int) -elif test "$ac_cv_sizeof_short" = 2 ; then - AC_CHECK_TYPE(int16_t, short) - AC_CHECK_TYPE(u_int16_t, unsigned short) -else - AC_MSG_ERROR([Cannot find a type with size of 16 bits]) -fi -if test "$ac_cv_sizeof_int" = 4 ; then - AC_CHECK_TYPE(int32_t, int) - AC_CHECK_TYPE(u_int32_t, unsigned int) -elif test "$ac_cv_sizeof_short" = 4 ; then - AC_CHECK_TYPE(int32_t, short) - AC_CHECK_TYPE(u_int32_t, unsigned short) -elif test "$ac_cv_sizeof_long" = 4 ; then - AC_CHECK_TYPE(int32_t, long) - AC_CHECK_TYPE(u_int32_t, unsigned long) -else - AC_MSG_ERROR([Cannot find a type with size of 32 bits]) -fi]) - -dnl -dnl Macro: unet_FUNC_POLL_SYSCALL -dnl -dnl Try to figure out if we have a system call poll (not if it is emulated). -dnl Manical laughter... -dnl -AC_DEFUN(unet_FUNC_POLL_SYSCALL, -[AC_CHECK_HEADERS(poll.h)dnl -if test -z "$unet_cv_func_poll_syscall" ; then - AC_MSG_CHECKING([if poll is a system call (please wait)]) -else - AC_MSG_CHECKING([if poll is a system call]) -fi -AC_CACHE_VAL(unet_cv_func_poll_syscall, -[unet_cv_func_poll_syscall=no -dnl No need to go through the trouble when we don't have poll.h: -changequote(, )dnl -if test "$ac_cv_header_poll_h" = yes; then - unet_dirs=`find /usr/include/sys -type f -name '*.h' -exec egrep '^#include <[^/]*/.*>' {} \; | sed -e 's/^.*<//' -e 's%/.*$%%' | sort | uniq` - for i in $unet_dirs ; do - if test "$unet_cv_func_poll_syscall" = no ; then - unet_files=`ls /usr/include/$i/*.h 2> /dev/null` - if test -n "$unet_files" ; then - for j in $unet_files ; do - if test "$unet_cv_func_poll_syscall" = no ; then - unet_line=`egrep '^#define[[:space:]]+[[:alnum:]_]*[Pp][Oo][Ll][Ll]' $j` - if test -n "$unet_line" ; then - unet_sig=`echo "$unet_line" | sed -e 's/poll/fork/g' -e 's/POLL/FORK/g' -e 's/[[:space:]]//g' -e 's%/\*.*\*/%%g' -e 's/[0-9]//g'` - unet_set=`for k in "$unet_sig" ; do echo $k; done | sed -e 's% %|%g'` - unet_match=`sed -e 's/[[:space:]]//g' -e 's%/\*.*\*/%%g' -e 's/[0-9]//g' $j | egrep "$unet_set"` - if test -n "$unet_match" ; then - unet_cv_func_poll_syscall=yes - fi - fi - fi - done - fi - fi - done -fi -changequote([, ])dnl -]) -AC_MSG_RESULT([$unet_cv_func_poll_syscall]) -]) Index: ircdh/config/aclocal.m4 diff -u ircdh/config/aclocal.m4:1.1.1.1 ircdh/config/aclocal.m4:removed --- ircdh/config/aclocal.m4:1.1.1.1 Fri Jul 26 14:58:22 2002 +++ ircdh/config/aclocal.m4 Thu Jan 23 02:42:44 2003 @@ -1,391 +0,0 @@ -dnl aclocal.m4 generated automatically by aclocal 1.4a - -dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without -dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A -dnl PARTICULAR PURPOSE. - -dnl -dnl Macro: unet_PIPE_CFLAGS -dnl -dnl If the compiler understands -pipe, add it to CFLAGS if not already -dnl there. -dnl -AC_DEFUN(unet_PIPE_CFLAGS, -[AC_MSG_CHECKING([if the compiler understands -pipe]) -unet_cv_pipe_flags="$ac_cv_prog_gcc" -if test "$ac_cv_prog_gcc" = no; then - OLDCFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -pipe" - AC_TRY_COMPILE(,,unet_cv_pipe_flags=yes,) - CFLAGS="$OLDCFLAGS" -fi -AC_MSG_RESULT($unet_cv_pipe_flags) -if test "$unet_cv_pipe_flags" = yes ; then - x=`echo $CFLAGS | grep 'pipe' 2>/dev/null` - if test "$x" = "" ; then - CFLAGS="$CFLAGS -pipe" - fi -fi -]) - -dnl -dnl Macro: unet_CHECK_LIB_RESOLV -dnl -dnl Check for res_mkquery in -lresolv and add that to LIBS when needed. -dnl -AC_DEFUN(unet_CHECK_LIB_RESOLV, -[AC_CACHE_CHECK([for res_mkquery in -lresolv], unet_cv_lib_resolv, -[AC_TRY_LINK([struct rrec; -extern int res_mkquery(int, const char *, int, int, const char *, - int, struct rrec *, unsigned char *, int);], -[int op; -const char *dname; -int class, type; -const char *data; -int datalen; -struct rrec *newrr; -unsigned char *buf; -int buflen; -res_mkquery(op,dname,class,type,data,datalen,newrr,buf,buflen)], -unet_cv_lib_resolv=no, [OLD_LIBS="$LIBS" -LIBS="$LIBS -lresolv" -AC_TRY_LINK([extern char *_res;], [*_res=0], -unet_cv_lib_resolv=yes, unet_cv_lib_resolv=no) -LIBS="$OLD_LIBS"])]) -if test $unet_cv_lib_resolv = yes; then - AC_DEFINE(HAVE_LIB_RESOLV) - LIBS="$LIBS -lresolv" -fi]) - -dnl -dnl Macro: unet_NONBLOCKING -dnl -dnl Check whether we have posix, bsd or sysv non-blocking sockets and -dnl define respectively NBLOCK_POSIX, NBLOCK_BSD or NBLOCK_SYSV. -dnl -AC_DEFUN(unet_NONBLOCKING, -[dnl Do we have posix, bsd or sysv non-blocking stuff ? -AC_CACHE_CHECK([for posix non-blocking], unet_cv_sys_nonblocking_posix, -[AC_TRY_RUN([#include <sys/types.h> -#include <sys/socket.h> -#include <fcntl.h> -#include <sys/ioctl.h> -#include <sys/file.h> -#include <signal.h> -$ac_cv_type_signal alarmed() { exit(1); } -int main(void) -{ - char b[12]; - struct sockaddr x; - size_t l = sizeof(x); - int f = socket(AF_INET, SOCK_DGRAM, 0); - if (f >= 0 && !(fcntl(f, F_SETFL, O_NONBLOCK))) - { - signal(SIGALRM, alarmed); - alarm(2); - recvfrom(f, b, 12, 0, &x, &l); - alarm(0); - exit(0); - } - exit(1); -}], unet_cv_sys_nonblocking_posix=yes, unet_cv_sys_nonblocking_posix=no)]) -if test $unet_cv_sys_nonblocking_posix = yes; then - AC_DEFINE(NBLOCK_POSIX) -else -AC_CACHE_CHECK([for bsd non-blocking], unet_cv_sys_nonblocking_bsd, -[AC_TRY_RUN([#include <sys/types.h> -#include <sys/socket.h> -#include <fcntl.h> -#include <sys/ioctl.h> -#include <sys/file.h> -#include <signal.h> -$ac_cv_type_signal alarmed() { exit(1); } -int main(void) -{ - char b[12]; - struct sockaddr x; - size_t l = sizeof(x); - int f = socket(AF_INET, SOCK_DGRAM, 0); - if (f >= 0 && !(fcntl(f, F_SETFL, O_NDELAY))) - { - signal(SIGALRM, alarmed); - alarm(2); - recvfrom(f, b, 12, 0, &x, &l); - alarm(0); - exit(0); - } - exit(1); -}], unet_cv_sys_nonblocking_bsd=yes, unet_cv_sys_nonblocking_bsd=no)]) -if test $unet_cv_sys_nonblocking_bsd = yes; then - AC_DEFINE(NBLOCK_BSD) -else - AC_DEFINE(NBLOCK_SYSV) -fi -fi]) - -dnl -dnl Macro: unet_SIGNALS -dnl -dnl Check if we have posix signals, reliable bsd signals or -dnl unreliable sysv signals and define respectively POSIX_SIGNALS, -dnl BSD_RELIABLE_SIGNALS or SYSV_UNRELIABLE_SIGNALS. -dnl -AC_DEFUN(unet_SIGNALS, -[dnl Do we have posix signals, reliable bsd signals or unreliable sysv signals ? -AC_CACHE_CHECK([for posix signals], unet_cv_sys_signal_posix, -[AC_TRY_COMPILE([#include <signal.h>], -[sigaction(SIGTERM, (struct sigaction *)0L, (struct sigaction *)0L)], -unet_cv_sys_signal_posix=yes, unet_cv_sys_signal_posix=no)]) -if test $unet_cv_sys_signal_posix = yes; then - AC_DEFINE(POSIX_SIGNALS) -else -AC_CACHE_CHECK([for bsd reliable signals], unet_cv_sys_signal_bsd, -[AC_TRY_RUN([#include <signal.h> -int calls = 0; -$ac_cv_type_signal handler() -{ - if (calls) return; - calls++; - kill(getpid(), SIGTERM); - sleep(1); -} -int main(void) -{ - signal(SIGTERM, handler); - kill(getpid(), SIGTERM); - exit (0); -}], unet_cv_sys_signal_bsd=yes, unet_cv_sys_signal_bsd=no)]) -if test $unet_cv_sys_signal_bsd = yes; then - AC_DEFINE(BSD_RELIABLE_SIGNALS) -else - AC_DEFINE(SYSV_UNRELIABLE_SIGNALS) -fi -fi]) - -dnl -dnl Macro: unet_DEFINE_SIZE_T_FMT -dnl -dnl Define SIZE_T_FMT to be "%u" or "%lu", whichever seems more appropriate. -dnl -AC_DEFUN(unet_DEFINE_SIZE_T_FMT, -[dnl Make educated guess :/, if size_t is a long or not -AC_CHECK_SIZEOF(size_t)dnl -AC_MSG_CHECKING(printf format of size_t) -if test "$ac_cv_sizeof_size_t" = 4 ; then - AC_MSG_RESULT("%u") - AC_DEFINE(SIZE_T_FMT, "%u") -else - AC_MSG_RESULT("%lu") - AC_DEFINE(SIZE_T_FMT, "%lu") -fi]) - -dnl -dnl Macro: unet_DEFINE_TIME_T_FMT -dnl -dnl Try to figure out if time_t is an int or not, and if so define -dnl TIME_T_FMT to be "%u", otherwise define it to be "%lu". -dnl Likewise define STIME_T_FMT for the signed format. -dnl -AC_DEFUN(unet_DEFINE_TIME_T_FMT, -[dnl Make educated guess :/, if time_t is a long or not -AC_MSG_CHECKING(size of time_t) -AC_CACHE_VAL(unet_cv_sizeof_time_t, -[AC_TRY_RUN([#include <stdio.h> -#include <sys/types.h> -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(time_t)); - exit(0); -}], unet_cv_sizeof_time_t=`cat conftestval`, -unet_cv_sizeof_time_t=0, unet_cv_sizeof_time_t=0)]) -if test "$unet_cv_sizeof_time_t" = 0 ; then - AC_MSG_RESULT(unknown) - AC_DEFINE(TIME_T_FMT, "%lu") - AC_DEFINE(STIME_T_FMT, "%ld") -else - AC_MSG_RESULT([$unet_cv_sizeof_time_t]) - AC_MSG_CHECKING(printf format of time_t) - if test "$unet_cv_sizeof_time_t" = "$ac_cv_sizeof_long" ; then - AC_MSG_RESULT("%lu") - AC_DEFINE(TIME_T_FMT, "%lu") - AC_DEFINE(STIME_T_FMT, "%ld") - else - AC_MSG_RESULT("%u") - AC_DEFINE(TIME_T_FMT, "%u") - AC_DEFINE(STIME_T_FMT, "%d") - fi -fi]) - -dnl -dnl Macro: unet_CHECK_TYPE_SIZES -dnl -dnl Check the size of several types and define a valid int16_t and int32_t. -dnl -AC_DEFUN(unet_CHECK_TYPE_SIZES, -[dnl Check type sizes -AC_CHECK_SIZEOF(short) -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long) -if test "$ac_cv_sizeof_int" = 2 ; then - AC_CHECK_TYPE(int16_t, int) - AC_CHECK_TYPE(u_int16_t, unsigned int) -elif test "$ac_cv_sizeof_short" = 2 ; then - AC_CHECK_TYPE(int16_t, short) - AC_CHECK_TYPE(u_int16_t, unsigned short) -else - AC_MSG_ERROR([Cannot find a type with size of 16 bits]) -fi -if test "$ac_cv_sizeof_int" = 4 ; then - AC_CHECK_TYPE(int32_t, int) - AC_CHECK_TYPE(u_int32_t, unsigned int) -elif test "$ac_cv_sizeof_short" = 4 ; then - AC_CHECK_TYPE(int32_t, short) - AC_CHECK_TYPE(u_int32_t, unsigned short) -elif test "$ac_cv_sizeof_long" = 4 ; then - AC_CHECK_TYPE(int32_t, long) - AC_CHECK_TYPE(u_int32_t, unsigned long) -else - AC_MSG_ERROR([Cannot find a type with size of 32 bits]) -fi]) - -dnl -dnl Macro: unet_FUNC_POLL_SYSCALL -dnl -dnl Try to figure out if we have a system call poll (not if it is emulated). -dnl Manical laughter... -dnl -AC_DEFUN(unet_FUNC_POLL_SYSCALL, -[AC_CHECK_HEADERS(poll.h)dnl -if test -z "$unet_cv_func_poll_syscall" ; then - AC_MSG_CHECKING([if poll is a system call (please wait)]) -else - AC_MSG_CHECKING([if poll is a system call]) -fi -AC_CACHE_VAL(unet_cv_func_poll_syscall, -[unet_cv_func_poll_syscall=no -dnl No need to go through the trouble when we don't have poll.h: -changequote(, )dnl -if test "$ac_cv_header_poll_h" = yes; then - unet_dirs=`find /usr/include/sys -type f -name '*.h' -exec egrep '^#include <[^/]*/.*>' {} \; | sed -e 's/^.*<//' -e 's%/.*$%%' | sort | uniq` - for i in $unet_dirs ; do - if test "$unet_cv_func_poll_syscall" = no ; then - unet_files=`ls /usr/include/$i/*.h 2> /dev/null` - if test -n "$unet_files" ; then - for j in $unet_files ; do - if test "$unet_cv_func_poll_syscall" = no ; then - unet_line=`egrep '^#define[[:space:]]+[[:alnum:]_]*[Pp][Oo][Ll][Ll]' $j` - if test -n "$unet_line" ; then - unet_sig=`echo "$unet_line" | sed -e 's/poll/fork/g' -e 's/POLL/FORK/g' -e 's/[[:space:]]//g' -e 's%/\*.*\*/%%g' -e 's/[0-9]//g'` - unet_set=`for k in "$unet_sig" ; do echo $k; done | sed -e 's% %|%g'` - unet_match=`sed -e 's/[[:space:]]//g' -e 's%/\*.*\*/%%g' -e 's/[0-9]//g' $j | egrep "$unet_set"` - if test -n "$unet_match" ; then - unet_cv_func_poll_syscall=yes - fi - fi - fi - done - fi - fi - done -fi -changequote([, ])dnl -]) -AC_MSG_RESULT([$unet_cv_func_poll_syscall]) -]) - - -# serial 1 - -# @defmac AC_PROG_CC_STDC -# @maindex PROG_CC_STDC -# @ovindex CC -# If the C compiler in not in ANSI C mode by default, try to add an option -# to output variable @code{CC} to make it so. This macro tries various -# options that select ANSI C on some system or another. It considers the -# compiler to be in ANSI C mode if it handles function prototypes correctly. -# -# If you use this macro, you should check after calling it whether the C -# compiler has been set to accept ANSI C; if not, the shell variable -# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source -# code in ANSI C, you can make an un-ANSIfied copy of it by using the -# program @code{ansi2knr}, which comes with Ghostscript. -# @end defmac - -AC_DEFUN(AM_PROG_CC_STDC, -[AC_REQUIRE([AC_PROG_CC]) -AC_BEFORE([$0], [AC_C_INLINE]) -AC_BEFORE([$0], [AC_C_CONST]) -dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require -dnl a magic option to avoid problems with ANSI preprocessor commands -dnl like #elif. -dnl FIXME: can't do this because then AC_AIX won't work due to a -dnl circular dependency. -dnl AC_BEFORE([$0], [AC_PROG_CPP]) -AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C) -AC_CACHE_VAL(am_cv_prog_cc_stdc, -[am_cv_prog_cc_stdc=no -ac_save_CC="$CC" -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - AC_TRY_COMPILE( -[#include <stdarg.h> -#include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -], [ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; -], -[am_cv_prog_cc_stdc="$ac_arg"; break]) -done -CC="$ac_save_CC" -]) -if test -z "$am_cv_prog_cc_stdc"; then - AC_MSG_RESULT([none needed]) -else - AC_MSG_RESULT($am_cv_prog_cc_stdc) -fi -case "x$am_cv_prog_cc_stdc" in - x|xno) ;; - *) CC="$CC $am_cv_prog_cc_stdc" ;; -esac -]) - Index: ircdh/config/config-sh.in diff -u ircdh/config/config-sh.in:1.7 ircdh/config/config-sh.in:removed --- ircdh/config/config-sh.in:1.7 Sat Nov 30 16:34:06 2002 +++ ircdh/config/config-sh.in Thu Jan 23 02:42:44 2003 @@ -1,416 +0,0 @@ -# @configure_input@ -# -# By Carlo Wood (ca...@ru...) -# -# For a description of the syntax of this configuration file, -# see the config/Configure script. -# -# TO CONFIGURE THE SERVER, TYPE: 'make config' in the top level directory ! -# - -#### Start of system configuration section. #### - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -bindir=@bindir@ -mandir=@mandir@ -CC_DEFAULT="@CC@" -CFLAGS_DEFAULT="@CFLAGS@" -CPPFLAGS_DEFAULT="@CPPFLAGS@" -LDFLAGS_DEFAULT="@LDFLAGS@" -LIBS="@LIBS@" -ac_cv_header_poll_h=@ac_cv_header_poll_h@ -unet_cv_func_poll_syscall=@unet_cv_func_poll_syscall@ -ac_cv_header_syslog_h=@ac_cv_header_syslog_h@ - -#### End of system configuration section. #### - -if [ -z "$CONFIG_BATCH" ]; then - echo "**************************************************************************" - echo "Error: Please run 'make config' that resides in the top level directory!" - echo "**************************************************************************" - exit -1 -fi - -mainmenu_name "IRC-Dev IRC Daemon Configuration" -mainmenu_option next_comment - if [ "$CONFIG_BATCH" = "n" ]; then - echo "* Welcome to the IRC-Dev IRC Daemon Configuration script." - echo "* You can restart this configuration at any time by typing 'make config'." - echo "* If you need help with your decision on any question, type a '?'" - echo "*" - USE_DEFAULT=n - else - USE_DEFAULT=C - fi - CHANGE_CONFIG=n - if [ "$DEFAULTS" != "none" ]; then - bool 'Do you want to change your previous configuration' CHANGE_CONFIG - if [ "$CHANGE_CONFIG" = "n" ]; then - echo "Ok, I will only prompt you for NEW parameters." - USE_DEFAULT=C - else - USE_DEFAULT=n - fi - else - USE_DEFAULT=n - fi -endmenu - -mainmenu_option next_comment -comment 'Debugging (do not define this on production servers)' - bool 'Do you want to enable debugging output' DEBUGMODE - bool 'Do you want to enable asserts and memory allocation checking' CONFIG_NDEBUG - EXTRA_CPPFLAGS="" - if [ "$CONFIG_NDEBUG" = "n" ]; then - if [ -z "$EXTRA_CPPFLAGS" ]; then - EXTRA_CPPFLAGS="-DNDEBUG" - else - EXTRA_CPPFLAGS="-DNDEBUG $EXTRA_CPPFLAGS" - fi - fi - bool 'Are you testing on a host without DNS' NODNS -endmenu - -mainmenu_option next_comment -comment 'Compile stuff' - if [ "$prefix" = "NONE" ]; then - prefix=/usr/local - fi - if [ "$exec_prefix" = "NONE" ]; then - eval exec_prefix="$prefix" - fi - string 'Which compiler do you want to use' CC "$CC_DEFAULT" - echo "* For the following four questions, specify 'none' when you want it to be empty." - if [ -z "$cflags_O3_remark" -a -n "$CFLAGS" ]; then - CFLAGS_DEFAULT=`echo "$CFLAGS" | sed -e 's%-O2%-O3%'` - if [ "$CFLAGS_DEFAULT" != "$CFLAGS" ]; then - echo "You are highly advised to use -O3 instead of -O2 if you're short in cpu cycles!" - echo "Please read documentation (press '?'):" - CFLAGS= - fi - fi - eval string "'What flags should I pass to $CC [none]'" CFLAGS "'$CFLAGS_DEFAULT'" - define_macro cflags_O3_remark done - string 'Do you need extra include directories [none]' EXTRA_INCLUDEDIRS none - if [ -z "$LDFLAGS_DEFAULT" ]; then - LDFLAGS_DEFAULT=none - else - eval LDFLAGS_DEFAULT="$LDFLAGS_DEFAULT" - fi - string 'Which linker flags do you need [none]' LDFLAGS "$LDFLAGS_DEFAULT" - if [ -z "$LIBS" ]; then - LIBS=none - fi - string 'Which extra libraries do you need [none]' IRCDLIBS "$LIBS" - eval bindir="$bindir" - string 'In which directory should I install the ircd binary' BINDIR $bindir - if [ ! -d "$BINDIR" ]; then - echo "$BINDIR : No such directory" - fi - string 'What should the name of the installed symbolic link to the exectuable be' SYMLINK ircd - string 'Which permissions do you want the binary to have' IRCDMODE 711 - string 'Which owner do you want the binary to have' IRCDOWN "`id | sed -e 's/.*uid=[0-9]*(//' -e 's/).*//' 2> /dev/null`" - string 'Which group do you want the binary to have' IRCDGRP "`id | sed -e 's/.*gid=[0-9]*(//' -e 's/).*//' 2> /dev/null`" - eval mandir=$mandir - string 'Where should I install the man page' MANDIR $mandir - if [ "$CFLAGS" = "none" ]; then - CFLAGS="" - fi - if [ "$EXTRA_INCLUDEDIRS" = "none" ]; then - EXTRA_INCLUDEDIRS="" - fi - if [ "$LDFLAGS" = "none" ]; then - LDFLAGS="" - fi - if [ "$IRCDLIBS" = "none" ]; then - IRCDLIBS="" - fi - if [ -n "$EXTRA_INCLUDEDIRS" ]; then - for i in $EXTRA_INCLUDEDIRS; do - if [ -z "$EXTRA_CPPFLAGS" ]; then - EXTRA_CPPFLAGS=-I$i - else - EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS -I$i" - fi - done - fi - if [ -z "$EXTRA_CPPFLAGS" ]; then - CPPFLAGS="-I../include -I../config" - else - CPPFLAGS="-I../include -I../config $EXTRA_CPPFLAGS" - fi - echo "EXTRA_CPPFLAGS=\"$EXTRA_CPPFLAGS\"" >>$CONFIG - echo "CPPFLAGS=\"$CPPFLAGS\"" >>$CONFIG - bool 'Use inlining for a few crucial functions' FORCEINLINE y -endmenu - -if [ "$ac_cv_header_poll_h" = "yes" ]; then - if [ "$unet_cv_func_poll_syscall" = "yes" ]; then - define_bool USE_POLL y - else - mainmenu_option next_comment - comment 'Operating System specific defines.' - bool 'You have poll(), but do you want to use it' USE_POLL - endmenu - fi -fi - -mainmenu_option next_comment -comment 'Host specific defines' - if [ -f /etc/resolv.conf ]; then - DOMAINNAME_DEFAULT="`awk '/^domain/ { print $2; exit }' /etc/resolv.conf`" - fi - string 'What is the domain name of your network' DOMAINNAME $DOMAINNAME_DEFAULT - if [ -z "$DOMAINNAME" ]; then - DOMAINNAME=none - fi - string 'What is the network name of your network' NETWORK IRC-Dev - string 'Please give a random seed of eight characters' RANDOM_SEED 12345678 - bool 'Does your host have a reliable clock' RELIABLE_CLOCK -endmenu - -mainmenu_option next_comment -comment 'General defines' - bool 'Change root ('/') after start of daemon' CHROOTDIR - bool 'Do you want the daemon set its own uid/gid' CONFIG_SETUGID y - if [ "$CONFIG_SETUGID" = "y" ]; then - int ' UID of irc daemon' IRC_UID - int ' GID of irc daemon' IRC_GID - else - define_int IRC_UID $IRC_UID - define_int IRC_GID $IRC_GID - bool 'Allow to specify configuration file on command line' CMDLINE_CONFIG - if [ "$CMDLINE_CONFIG" = "y" ]; then - echo " SECURITY: Then don't install the daemon SUID or SGID !" - fi - fi - bool 'Do you need virtual hosting' VIRTUAL_HOST - PREV_HUB=$HUB - bool 'Will you connect to more then one server at a time' HUB - if [ "$PREV_HUB" != "$HUB" ]; then - BUFFERPOOL= - fi -endmenu - - -mainmenu_option next_comment -comment 'Paths and files' - eval DPATH_DEFAULT="${prefix}/lib/ircd" - string 'Directory where all ircd stuff resides' DPATH $DPATH_DEFAULT - define_string SPATH "$BINDIR/$SYMLINK" - echo "The following filenames are either full paths or files within DPATH" - string 'Server configuration file' CPATH 'ircd.conf' - string 'Server MOTD file' MPATH 'ircd.motd' - string 'Server remote MOTD file (3 lines max)' RPATH 'remote.motd' - if [ "$DEBUGMODE" = "y" ]; then - string 'Debug file if DEBUGMODE' LPATH '/tmp/ircd.log' - else - define_string LPATH "$LPATH" - fi - string 'File for server pid' PPATH 'ircd.pid' -endmenu - -mainmenu_option next_comment -comment 'Logging (filenames are either full paths or files within DPATH)' - bool 'Do you want to log the use of /WHO x% (recommended)' CONFIG_LOG_WHOX y - if [ "$CONFIG_LOG_WHOX" = "y" ]; then - string ' Give the path and(or) filename of this log file' WPATH 'whox.log' - fi - -comment 'Bad Channel G-Lines allow operators to add channel masks to a list which prohibits local clients from being able joining channels which match the mask. Remote BadChan Glines allow Uworld to add or remove channels from the servers internal list of badchans' - bool 'Do you want to enable Bad Channel G-lines' BADCHAN y - if [ "$BADCHAN" = "y" ]; then - echo " " - echo " WARNING DO _NOT_ USE LOCAL BADCHANNEL GLINES ON UNDERNET" - echo " Use of LOCAL BAD Channel G-Lines can be cause for REMOVAL" - bool 'Allow LOCAL BAD Channel G-lines' LOCAL_BADCHAN - fi - - bool 'Do you want to log G-lines to a separate file' CONFIG_LOG_GLINES - if [ "$CONFIG_LOG_GLINES" = "y" ]; then - string ' Give the path and(or) filename of this log file' GPATH 'gline.log' - fi - bool 'Do you want to log connecting users to a separate file' CONFIG_LOG_USERS - if [ "$CONFIG_LOG_USERS" = "y" ]; then - string ' Give the path and(or) filename of this log file' FNAME_USERLOG $DPATH/users - fi - bool 'Do you want to log Opers to a separate file' CONFIG_LOG_OPERS - if [ "$CONFIG_LOG_OPERS" = "y" ]; then - string ' Give the path and(or) filename of this log file' FNAME_OPERLOG $DPATH/opers - fi - if [ "$ac_cv_header_syslog_h" = "yes" ]; then - bool 'Do you want to use syslog' USE_SYSLOG - else - USE_SYSLOG=n - fi - if [ "$USE_SYSLOG" = "y" ]; then - bool ' Log all operator kills to syslog' SYSLOG_KILL - bool ' Log all remote squits for all servers to syslog' SYSLOG_SQUIT - bool ' Log remote connect messages for other all servs' SYSLOG_CONNECT - bool ' Log all users who successfully become an Oper' SYSLOG_OPER - bool ' Send userlog stuff to syslog' SYSLOG_USERS - if [ "$SYSLOG_KILL" = "n" -a "$SYSLOG_SQUIT" = "n" -a \ - "$SYSLOG_CONNECT" = "n" -a "$SYSLOG_OPER" = "n" -a \ - "$SYSLOG_USERS" = "n" ]; then - define_macro LOG_FACILITY $LOG_FACILITY - define_bool USE_SYSLOG n - else - choice ' Log facility' \ - "daemon CONFIG_DAEMON \ - user CONFIG_USER \ - local0-7 CONFIG_LOCAL" daemon - if [ "$CONFIG_DAEMON" = "y" ]; then - define_macro LOG_FACILITY LOG_DAEMON - else - if [ "$CONFIG_USER" = "y" ]; then - define_macro LOG_FACILITY LOG_USER - else - int ' Which local facility (0-7)' INT_LOCAL - define_macro LOG_FACILITY LOG_LOCAL$INT_LOCAL - fi - fi - echo " Using log facility $LOG_FACILITY" - fi - else - define_bool SYSLOG_KILL $SYSLOG_KILL - define_bool SYSLOG_SQUIT $SYSLOG_SQUIT - define_bool SYSLOG_CONNECT $SYSLOG_CONNECT - define_bool SYSLOG_OPER $SYSLOG_OPER - define_bool SYSLOG_USERS $SYSLOG_USERS - define_macro LOG_FACILITY $LOG_FACILITY - fi -endmenu - -mainmenu_option next_comment -comment 'Configuration' -# echo 'ATENCION: Si tienes en la red unos services P09, es obligatorio responder Y a la siguiente pregunta' -# bool 'Activar el soporte del protocolo P09' P09_SUPPORT - bool 'Use crypted passwords for operators' CRYPT_OPER_PASSWORD y - DUMMY=`echo "$BUFFERPOOL" | sed -e 's/[0-9]//g'` - if [ "$DUMMY" != "" ]; then - BUFFERPOOL= - fi - if [ "$HUB" = "y" ]; then - int 'Max size of the total of of all sendqs (bytes)' BUFFERPOOL 27000000 - else - int 'Max size of the total of of all sendqs (bytes)' BUFFERPOOL 9000000 - fi - int 'Max receive queue for clients (bytes)' CLIENT_FLOOD 2048 - int 'Maximum number of network connections (23 - (FD_SETSIZE-4))' MAXCONNECTIONS 252 - int 'Default port for connections to other servers' SERVER_PORT 4400 - int 'Nickname history length' NICKNAMEHISTORYLENGTH 800 - bool 'Allow Opers to see (dis)connects of local clients' ALLOW_SNO_CONNEXIT - if [ "$ALLOW_SNO_CONNEXIT" = "y" ]; then - bool 'Show IP address in client connection notices' SNO_CONNEXIT_IP - fi - bool 'Do you want to use R: lines in your configuration file' R_LINES - if [ "$R_LINES" = "y" ]; then - bool 'Process R: lines every rehash' R_LINES_REHASH y - bool 'Process R: lines always' R_LINES_OFTEN - else - define_bool R_LINES_REHASH $R_LINES_REHASH - define_bool R_LINES_OFTEN $R_LINES_OFTEN - fi - bool 'Do you want support for the old I:*:ONE:*:: construct (read help text!)' USEONE n - bool 'Send a short message instead of the MOTD to connecting clients' NODEFAULTMOTD y - bool 'Kill connecting clients when forward and reverse DNS mismatch' KILL_IPMISMATCH n -endmenu - -mainmenu_option next_comment -comment 'Oper commands' - bool 'Allow opers to wallop' OPER_WALLOPS y - bool 'Allow (local) Opers to see all local invisible users' SHOW_INVISIBLE_USERS y - if [ "$SHOW_INVISIBLE_USERS" = "y" ]; then - bool 'Allow Opers to see all invisible users' SHOW_ALL_INVISIBLE_USERS y - bool 'Allow HELPERS to see all invisible users' WHOX_HELPERS y - fi - bool 'Allow global Opers (O:) to see inside secret channels' OPERS_SEE_IN_SECRET_CHANNELS y - if [ "$OPERS_SEE_IN_SECRET_CHANNELS" = "y" ]; then - bool 'Allow local Opers (o:) to see inside secret channels' LOCOP_SEE_IN_SECRET_CHANNELS - fi - bool 'Do not truncate obnoxiously long /who output for opers' UNLIMIT_OPER_QUERY - bool 'Allow Opers to use the KILL command' OPER_KILL y - bool 'Allow Opers to use the REHASH command' OPER_REHASH y - bool 'Allow Opers to use the RESTART command' OPER_RESTART y - bool 'Allow Opers to use the DIE command' OPER_DIE y - bool 'Allow Opers to add local G-lines' OPER_LGLINE y - bool 'Allow Opers to connect from a remote site' OPER_REMOTE y - bool 'Allow Opers to join channels using a master key - ESNET' OPER_JOIN_GOD_ESNET y - bool 'Allow Opers to became channel service - ESNET' OPER_CHANNEL_SERVICE_ESNET y - bool 'Local Channel Services has no Flood Control - ESNET' CS_NO_FLOOD_ESNET y - bool 'Allow Opers to bypass UWorld mode changes - ESNET' OPER_XMODE_ESNET y - bool 'Allow local opers to use the REHASH command' LOCOP_REHASH y - bool 'Allow local opers to use the RESTART command' LOCOP_RESTART - bool 'Allow local opers to use the DIE command' LOCOP_DIE - bool 'Allow local opers to add local G-lines' LOCOP_LGLINE y - bool 'Allow local/global opers to be on any number of channels' OPER_NO_CHAN_LIMIT y - bool 'Allow local/global opers to set modes on local channels' OPER_MODE_LCHAN y - bool 'Allow local/global opers to walk through local channels modes' OPER_WALK_THROUGH_LMODES - bool 'Prevent local/global opers from being kicked or deoped on local channels' NO_OPER_DEOP_LCHAN - -endmenu - -mainmenu_option next_comment -comment 'Server characteristics' - bool 'Do you want to have a default LIST parameter' CONFIG_LIST y - if [ "$CONFIG_LIST" = "y" ]; then - string 'Give default LIST parameter' DEFAULT_LIST 'T<10' - define_string DEFAULT_LIST_PARAM "$DEFAULT_LIST" - else - define_string DEFAULT_LIST "$DEFAULT_LIST" - define_bool DEFAULT_LIST_PARAM - fi - bool 'K: line comments treated as a file by default' COMMENT_IS_FILE y - bool 'Only nullify idle-time on PRIVMSG' IDLE_FROM_MSG y - bool 'Enable excessive TS differences check before servers links' CHECK_TS_LINKS y -endmenu - -mainmenu_option next_comment -comment 'Mandatory defines (you should leave these untouched)' - bool 'HISPANO/ESNET: Distributed DataBase Support' BDD y - if [ "$BDD" = "y" ]; then - eval DBPATH_DEFAULT="database" - string 'HISPANO/ESNET: Directory where distributed database resides' DBPATH $DBPATH_DEFAULT - # bool 'HISPANO/ESNET: Distributed Clone Control support' BDD_CLONES y - bool 'HISPANO/ESNET: CHAN_DB features (join # FUNDADOR, modeX)' BDD_CHAN_HACK y - bool 'HISPANO/ESNET: OPER_DB features (join # OPER, modeX)' BDD_OPER_HACK y - if [ "$BDD_OPER_HACK" = "y" ]; then - # bool 'HISPANO/ESNET: OPER_DB features only on registered (CHAN_DB) channels' BDD_OPER_HACK_ONLYREG n - bool 'HISPANO/ESNET: OPER_DB members can be Chanserv (+k)' BDD_OPER_HACK_KMODE y - fi - bool 'HISPANO/ESNET: Soporte para la ocultacion de IPs' BDD_VIP y - if [ "$BDD_VIP" = "y" ]; then - bool 'HISPANO/ESNET: Ignorar el flag "+x" a menos que el usuario este en la tabla "v" o "w"' BDD_VIP3 n - if [ "$BDD_VIP3" = "n" ]; then - bool 'HISPANO/ESNET: Ocultación de IP de TODOS los usuarios' BDD_VIP2 y - fi - fi - fi - bool 'HISPANO/ESNET: XMODE Networking' XMODE_ESNET y -# bool 'HISPANO/ESNET: Dinamic Negotiation link-by-link' ESNET_NEG y -# if [ "$ESNET_NEG" = "y" ]; then -# bool 'HISPANO/ESNET: ZLIB compression between servers - ESN... [truncated message content] |
From: Toni G. <zo...@us...> - 2003-01-23 10:46:44
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-23 10:46:43 UTC Removed files: config/.cvsignore Log message: Mas archivos borrados ---------------------- diff included ---------------------- Index: ircdh/config/.cvsignore diff -u ircdh/config/.cvsignore:1.1.1.1 ircdh/config/.cvsignore:removed --- ircdh/config/.cvsignore:1.1.1.1 Fri Jul 26 14:58:22 2002 +++ ircdh/config/.cvsignore Thu Jan 23 02:46:43 2003 @@ -1,11 +0,0 @@ -Makefile -config.cache -config.log -config.status -setup.h -stamp-h -config-sh -Configure -config.h -.config -.tmpconfig.h ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2003-01-23 11:01:13
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-23 11:01:11 UTC Added files: COPYING COPYING.es Removed files: LICENCE Log message: Licencia GPL en español y cambio de nombre en el original LICENCE => COPYING ---------------------- diff included ---------------------- Index: ircdh/COPYING diff -u /dev/null ircdh/COPYING:1.1 --- /dev/null Thu Jan 23 03:01:11 2003 +++ ircdh/COPYING Thu Jan 23 03:01:00 2003 @@ -0,0 +1,249 @@ + + GNU GENERAL PUBLIC LICENSE + Version 1, February 1989 + + Copyright (C) 1989 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The license agreements of most software companies try to keep users +at the mercy of those companies. By contrast, our 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. The +General Public License applies to the Free Software Foundation's +software and to any other program whose authors commit to using it. +You can use it for your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Specifically, the General Public License is designed to make +sure that you have the freedom to give away or sell copies of free +software, 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 a 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 tell them 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. + + 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 Agreement 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 work containing the +Program or a portion of it, either verbatim or with modifications. Each +licensee is addressed as "you". + + 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 +General Public License and to the absence of any warranty; and give any +other recipients of the Program a copy of this General Public License +along with the Program. You may charge a fee for the physical act of +transferring a copy. + + 2. You may modify your copy or copies of the Program or any portion of +it, and copy and distribute such modifications under the terms of Paragraph +1 above, provided that you also do the following: + + a) cause the modified files to carry prominent notices stating that + you changed the files and the date of any change; and + + b) cause the whole of any work that you distribute or publish, that + in whole or in part contains the Program or any part thereof, either + with or without modifications, to be licensed at no charge to all + third parties under the terms of this General Public License (except + that you may choose to grant warranty protection to some or all + third parties, at your option). + + c) If the modified program normally reads commands interactively when + run, you must cause it, when started running for such interactive use + in the simplest and most usual 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 General + Public License. + + d) 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. + +Mere aggregation of another independent work with the Program (or its +derivative) on a volume of a storage or distribution medium does not bring +the other work under the scope of these terms. + + 3. You may copy and distribute the Program (or a portion or derivative of +it, under Paragraph 2) in object code or executable form under the terms of +Paragraphs 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 + Paragraphs 1 and 2 above; or, + + b) accompany it with a written offer, valid for at least three + years, to give any third party free (except for a nominal charge + for the cost of distribution) a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of + Paragraphs 1 and 2 above; or, + + c) accompany it with the information you received as to where the + corresponding source code may be obtained. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form alone.) + +Source code for a work means the preferred form of the work for making +modifications to it. For an executable file, complete source code means +all the source code for all modules it contains; but, as a special +exception, it need not include source code for modules which are standard +libraries that accompany the operating system on which the executable +file runs, or for standard header files or definitions files that +accompany that operating system. + + 4. You may not copy, modify, sublicense, distribute or transfer the +Program except as expressly provided under this General Public License. +Any attempt otherwise to copy, modify, sublicense, distribute or transfer +the Program is void, and will automatically terminate your rights to use +the Program under this License. However, parties who have received +copies, or rights to use copies, from you under this General Public +License will not have their licenses terminated so long as such parties +remain in full compliance. + + 5. By copying, distributing or modifying 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. + + 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. + + 7. 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 the 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 +the license, you may choose any version ever published by the Free Software +Foundation. + + 8. 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 + + 9. 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. + + 10. 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 + + Appendix: 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 humanity, 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 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. + +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) 19xx 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 a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + program `Gnomovision' (a program to direct compilers to make passes + at assemblers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +That's all there is to it! Index: ircdh/COPYING.es diff -u /dev/null ircdh/COPYING.es:1.1 --- /dev/null Thu Jan 23 03:01:11 2003 +++ ircdh/COPYING.es Thu Jan 23 03:01:00 2003 @@ -0,0 +1,360 @@ +Licencia Pública General GNU +Traducida por Antonio Luque Estepa <al...@ba...> en mayo de 1998. +Web: http://gugs.sindominio.net/licencias/gpl-es.html + +Esta es una traducción de la Licencia General Pública GNU al español. Esta traducción se +distribuye con la intención de facilitar su entendimiento, pero no es oficial ni está +legalmente aprobada. + +La Free Software Foundation [Fundación para el Software Libre] no es la editora de esta +traducción y no la ha aprobado como un sustituto legal para la auténtica Licencia Pública +General GNU. La traducción NO ha sido revisada atentamente por abogados, y por tanto el +traductor no puede estar seguro de que represente exactamente el sentido legal de la Licencia +Pública General GNU. Si usted quiere estar seguro de si sus actuaciones previstas están +permitidas por la Licencia Pública General GNU, por favor acuda a la versión original inglesa. + +La Free Software Foundation recomienda fervientemente no usar esta traducción como los +términos oficiales de distribución para sus programas; en su lugar, por favor use la versión +inglesa original, tal y como está publicada por la Free Software Foundation. + + +This is a translation of the GNU General Public License into Spanish. This translation is +distributed in the hope that it will facilitate understanding, but it is not an official or +legally approved translation. + +The Free Software Foundation is not the publisher of this translation and has not approved it as +a legal substitute for the authentic GNU General Public License. The translation has not been +reviewed carefully by lawyers, and therefore the translator cannot be sure that it exactly +represents the legal meaning of the GNU General Public License. If you wish to be sure whether +your planned activities are permitted by the GNU General Public License, please refer to the +authentic English version. + +The Free Software Foundation strongly urges you not to use this translation as the official +distribution terms for your programs; instead, please use the authentic English version +published by the Free Software Foundation. + +########################################################################################### + + + LICENCIA PÚBLICA GENERAL GNU + Versión 2. Junio 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Se permite a todo el mundo copiar y distribuir copias literales de este + documento de licencia, pero no está permitido modificarlo. + + Preámbulo + + Las licencias para la mayoría del software está diseñadas para retirarle su libertad de +compartirlo e intercambiarlo. En cambio, la Licencia Pública General GNU está pensada para +garantizar su libertad de compartir e intercambiar el software libre--para asegurar que el +software es libre para todos los usuarios. Esta Licencia Pública General se aplica a la +mayoría del software de la Free Software Foundation, así como a cualquier otro programa cuyos +autores accedan a usarla. (Alguna parte del software de la Free Software Foundation se ve +cubierto en su lugar por la Licencia Pública General para Librerías GNU). Usted también la +puede aplicar a sus programas. + + Cuando hablamos de software libre, nos estamos refiriendo a la libertad, no al precio. +Nuestras Licencias Públicas Generales están diseñadas para asegurar que usted tiene la +libertad de distribuir copias de software libre (y cobrar por ello si lo desea), que usted +recibe el código fuente o puede obtenerlo si lo desea, que usted puede alterar el software o +usar porciones de él en nuevos programas libres; y que usted sabe que puede hacer estas cosas. + + Para proteger sus derechos, necesitamos plantear restricciones que impidan a cualquiera +negarle esos derechos o pedirle que renuncie a ellos. Estas restricciones se traducen a ciertas +responsabilidades para usted, si usted distribuye copias del software, o si lo modifica. + + Por ejemplo, si usted distribuye copias de un programa determinado, ya sea gratis o a cambio +de un precio, debe dar a los receptores todos los derechos que usted tiene. Debe asegurarse de +que ellos también reciben o pueden obtener el código fuente. Y usted debe mostrar esos términos, +de forma que ellos sepan cuáles son sus derechos. + + Nosotros protegemos sus derechos mediante dos actos: (1) tener copyright sobre el software, y +(2) ofrecerle a usted esta licencia, que le da permiso legal para copiar, distribuir y/o +modificar el software. + + Asímismo, para la protección de cada autor y la nuestra propia, queremos asegurarnos que cada +persona comprende que no existe garantía para este software libre. Si el software es modificado +por alguien y distribuido, queremos que los receptores sepan que lo que tienen no es el +original, de forma que cualquier problema introducido por un tercero no afecte a la reputación +del autor original. + + Finalmente, cualquier programa libre está constantemente amenazado por las patentes de +software. Deseamos evitar el riesgo de que un distribuidor de un programa libre pueda obtener +patentes de software, haciendo el programa propietario a todos los efectos. Para prevenir esto, +hemos establecido claramente que cualquier patente debe ser concedida para el libre uso de todo +el mundo, o no ser concedida en absoluto. + + Los términos precisos para la copia, distribución y modificación se exponen a continuación. + + + + LICENCIA PÚBLICA GENERAL GNU + TÉRMINOS Y CONDICIONES PARA LA COPIA, DISTRIBUCIÓN Y MODIFICACIÓN + + 0. Esta Licencia se aplica a cualquier programa u otra obra que contenga un aviso colocado por +el propietario del copyright diciendo que puede ser distribuido bajo los términos de esta +Licencia Pública General. En adelante, el "Programa" se refiere a cualquier programa u obra de +esta clase, y "una obra basada en el Programa" significa bien el Programa o bien cualquier obra +derivada bajo las leyes del copyright: es decir, una obra que contenga el Programa o una +porción del mismo, ya sea literalmente o con modificaciones y/o traducido a otro idioma. (De +aquí en adelante, la traducción se incluye sin límites en el término "modificación".) Cada +propietario de una licencia es tratado como "usted". + +Otras actividades aparte de la copia, distribución o modificación no son cubiertas por esta +Licencia; quedan fuera de su alcance. El acto de ejecutar el programa no se encuentra +restringido, y la salida del programa queda cubierta sólo si sus contenidos constituyen una +obra basada en el Programa (independiente de haber sido producidos por la ejecución del +Programa). La exactitud de lo anterior depende del modo de actuar del programa. + + 1. Usted puede copiar y distribuir copias literales del código fuente del Programa tal y como +lo recibió, por cualquier medio, supuesto que usted publica apropiada y visiblemente en cada +copia un aviso de copyright y una renuncia de garantía; mantiene intactos los avisos que se +refieren a esta Licencia y a la ausencia de cualquier garantía; y da a cualquier otro receptor +del Programa una copia de esta Licencia junto con el Programa. + +Usted puede cobrar por el acto físico de la trasferencia de una copia, y puede a su elección +ofrecer protección mediante garantía a cambio de un precio. + + 2. Usted puede modificar su copia o copias del Programa o cualquier porción de él, +constituyendo así una obra basada en el Programa, y copiar y distribuir tales modificaciones u +obra bajo los términos de la sección 1 precedente, siempre que usted cumpla todas las +condiciones siguientes: + + a) Debe procurar que los ficheros modificados incluyan notificaciones destacadas + manifestando que usted cambió los ficheros y la fecha de cualquier cambio. + + b) Debe procurar que cualquier obra que distribuya o publique, que en todo o en parte + contenga a o sea derivada del programa, sea licenciada como un todo sin coste alguno para + terceras partes bajo los términos de esta licencia. + + c) Si el programa modificado normalmente lee comandos interactivamente al ejecutarse, usted + debe procurar que cuando empiece a ejecutarse en este modo interactivo de la forma más + común en su uso muestre un anuncio que incluya un aviso de copyright apropiado y un aviso + de que no existe garantía (o bien diciendo que usted proporciona garantía) y que los + usuarios pueden redistribuir el programa bajo estas condiciones, y que diga al usuario como + ver una copia de esta Licencia. (Excepción: si el Programa es en sí mismo interactivo pero + no muestra normalmente un aviso tal como el descrito, su obra basada en el programa no está + obligada a mostrar ningún aviso). + + +Estos requisitos se aplican a la obra modificada como un todo. Si algunas secciones claramente +identificables de esa obra no están derivadas del Programa, y pueden ser razonablemente +consideradas como independientes y trabajos separados por sí mismas, entonces esta Licencia y +sus términos no se aplican a esas secciones cuando usted las distribuya como obras separadas. +Pero cuando usted distribuya las mismas secciones como parte de un todo que es una obra basada +en el programa, la distribución de ese todo debe cumplir los términos de esta Licencia, cuyos +permisos para otros licenciados se extienden para el todo completo, y por tanto a todas y cada +una de las partes independientemente de quien las haya escrito. + +Por tanto, no es la intención de esta sección reclamar derechos u oponerse a sus derechos +sobre una obra escrita enteramente por usted; sino que la intención es ejercer el derecho de +controlar la distribución de trabajos derivados o colectivos basados en el Programa. + +Además, la mera agregación de otras obras no basadas en el programa al Programa (o a una obra +basada en el Programa) en un medio de almacenaje o distribución no incluye a la otra obra bajo +el alcance de esta Licencia. + + 3. Usted puede copiar y distribuir el Programa (o una obra basada en él , bajo la Sección 2) +en forma de código objeto o ejecutable bajo los términos de las Secciones 1 y 2 precedentes +mientras cumpla una de las siguientes condiciones: + + + a) Acompañarlo con el código completo correspondiente en formato legible para un ordenador. + Este código debe ser distribuido bajo los términos de las secciones 1 y 2 en un medio + apropiado para el intercambio de software; o bien + + b) Acompañarlo con un ofrecimiento escrito, válido durante al menos tres años, de dar a + cualquier tercera parte, por un precio no mayor que su coste de físicamente realizar la + distribución de código, una copia completa, legible por ordenador del código fuente + correspondiente, que será distribuido bajo los términos de las Secciones 1 y 2 en un medio + apropiado para el intercambio de software; o bien + + c) Acompañarlo con la información que usted recibió referida al ofrecimiento de + distribuir el correspondiente código fuente. (Esta alternativa se permite sólo para una + distribución no comercial y sólo si usted recibió el Programa en código objeto o formato + ejecutable con un ofrecimiento de este tipo, de acuerdo con la Subsección b precedente.) + +El código fuente de una obra significa la forma de esta obra preferida para hacerle +modificaciones. Para una obra ejecutable, el código fuente completo significa todo el código +fuente para todos los módulos que contiene, además de cualquier fichero de definición de +interfaz asociado, además de los guiones usados para controlar la compilación e instalación +del ejecutable. Sin embargo, como excepción especial, el código fuente distribuido no tiene +que incluir necesariamente cualquier cosa que es normalmente distribuida (ya sea en formato +fuente o binario) con los componentes fundamentales (compilador, núcleo, y similares) del +sistema operativo en el que se ejecuta el Programa, a no ser que ese componente acompañe al +ejecutable. + +Si la distribución del ejecutable o código objeto es realizada ofreciendo acceso a una copia +desde un lugar designado, entonces el ofrecimiento de un acceso equivalente al código fuente +desde el mismo lugar, se considera como distribución del código fuente, incluso aunque +terceras partes no sean obligadas a copiar el código fuente junto al código objeto, + + 4. Usted no puede copiar, modificar, sublicenciar o distribuir el Programa excepto tal y como +está expresamente permitido en esta Licencia. Cualquier intento diferente de copiar, modificar, +sublicenciar o distribuir el Programa es nulo, y cancelará automáticamente sus derechos bajo +esta Licencia. Sin embargo, las partes que hayan recibido de usted copias o derechos bajo esta +Licencia no verán sus Licencias canceladas, mientras esas partes sigan cumpliendo totalmente la +Licencia. + + 5. Usted no está obligado a aceptar esta Licencia, puesto que no la ha firmado. Sin embargo, +ninguna otra cosa le garantiza permiso para modificar o distribuir este Programa o sus +derivados. Estas acciones están prohibidas por la ley si usted no acepta esta Licencia. Por lo +tanto, al modificar o distribuir el Programa (o cualquier obra basada en el Programa), usted +indica su acuerdo con esta Licencia para hacerlo, y con todos sus términos y condiciones para +copiar, modificar, o distribuir el programas u obras basadas en él. + + 6. Cada vez que usted redistribuya el Programa (o cualquier obra basada en él), el receptor +automáticamente recibe una licencia del licenciante original para copiar, distribuir o +modificar el Programa, sujeta a estos términos y condiciones. Usted no puede imponer ninguna +restricción más sobre los derechos del receptor que aquí quedan garantizados. Usted no es +responsable de hacer cumplir esta Licencia a terceras partes. + + 7. Si, como consecuencia de una resolución judicial o alegato de infracción de patente, o por +cualquier otra razón (no limitada a hechos relacionados con las patentes), se le imponen a +usted condiciones (ya sea por imposición judicial, acuerdo, u otra circunstancia) que +contradigan las condiciones de esta Licencia, estas condiciones no le excusan del cumplimiento +de los términos de esta Licencia. Si usted no puede distribuir el Programa de manera tal que +satisfaga simultáneamente sus obligaciones con esta Licencia y otras obligaciones pertinentes, +entonces la consecuencia es que usted no podrá distribuir el Programa en absoluto. Por ejemplo, +si una licencia de patente no permite la redistribución libre de cobros del Programa por parte +de todos aquellos que recibieron copias directa o indirectamente de usted, entonces la única +manera en que usted puede satisfacer a la vez esa licencia y esta Licencia sería abstenerse +enteramente de la distribución del Programa + +Si cualquier parte de esta sección se muestra como inválida o inobligable bajo cualesquiera +circunstancias particulares, el resto de la sección se aplicará, y la sección al completo se +aplicará en otras circunstancias. + +No es el propósito de esta sección inducirle a violar ninguna patente, ni otras reclamaciones +de derechos de propiedad, ni negar la validez de tales reclamaciones: esta sección tiene el +único objetivo de proteger la integridad del sistema de distribución del software libre, el +cual está implementado mediante las licencias públicas. Muchas personas han hecho generosas +contribuciones al amplio rango de software distribuido por ese sistema como consecuencia de la +aplicación coherente de ese sistema; es cuestión del autor/donador el decidir si él o ella +quiere distribuir el software a través de cualquier otro sistema, y un licenciado no puede +imponer esa decisión. + +Esta sección está designada para clarificar lo que se piensa es una consecuencia del resto de +esta Licencia. + + 8. Si la distribución y/o uso de software está restringido en ciertos países por patentes o +por copyrights sobre interfaces, el poseedor del copyright original que sitúa el Programa bajo +esta Licencia, puede añadir una limitación de distribución geográfica excluyendo estos +países, de forma que la distribución esté permitida sólo dentro o entre los países no +excluidos. En este caso, esta Licencia incorpora esta limitación, como si estuviese escrita en +el cuerpo de esta Licencia. + + 9. La Free Software Foundation puede publicar versiones revisadas y/o nuevas de la Licencia +Pública General en algún momento. Tales nuevas versiones serán similares en espíritu a la +versión presente, pero pueden diferir en detalles para solucionar nuevos problemas o +conflictos. Cada versión se distingue por un número de versión. Si el programa especifica un +número de versión de esta Licencia, que se aplica a ella y "a cualquier versión posterior", +usted tiene la opción de seguir los términos y condiciones de esa versión o de cualquier +versión posterior publicada por la Free Software Foundation. Si el Programa no especifica un +número de versión de esta Licencia, usted puede escoger cualquier versión publicada en +cualquier momento por la Free Software Foundation. + + 10. Si usted desea incorporar partes del Programa en otros programas libres cuyas condiciones +de distribución son diferentes, escriba al autor para pedir permiso. Para software cuyo +copyright posee la Free Software Foundation, escriba a la Free Software Foundation; algunas +veces hacemos excepciones para esto. Nuestra decisión estará guiada por los dos objetivos de +preservar el carácter libre de todos los derivados de nuestro software libre y de promocionar el +compartimiento y reutilización del software en general. + + SIN GARANTÍA + + 11. DEBIDO A QUE EL PROGRAMA SE LICENCIA SIN COSTE, NO EXISTE GARANTÍA PARA EL PROGRAMA, HASTA +LO PERMITIDO POR LAS LEYES APLICABLES. EXCEPTO CUANDO SE ESTABLEZCA DE OTRA FORMA POR ESCRITO +LOS POSEEDORES DEL COPYRIGHT Y/O OTRAS PARTES PROVEEN EL PROGRAMA "COMO ESTÁ" SIN GARANTÍA DE +NINGUNA CLASES, YA SEA EXPRESA O IMPLÍCITA, INCLUYENDO, PERO NO LIMITÁNDOSE A, LA GARANTÍA +IMPLÍCITA DE USABILIDAD Y UTILIDAD PARA UN PROPÓSITO PARTICULAR. EL RIESGO COMPLETO ACERCA DE +LA CALIDAD Y EFICIENCIA DEL PROGRAMA ES SUYO. SI EL PROGRAMA SE MOSTRARA DEFECTUOSO, USTED +ASUMIRÁ TODO EL COSTE DEL SERVICIO NECESARIO Y DE LA REPARACIÓN O CORRECCIÓN. + + 12. EN NINGÚN CASO, A NO SER QUE SE REQUIERA POR LAS LEYES APLICABLES O SE ACUERDE POR +ESCRITO, PODRÁ NINGÚN POSEEDOR DE COPYRIGHT O CUALQUIER OTRA PARTE QUE HAYA MODIFICADO Y/O +REDISTRIBUIDO EL PROGRAMA SER RESPONSABLE ANTE USTED POR DAÑOS O PERJUICIOS, INCLUYENDO +CUALQUIER DAÑO GENERAL, ESPECIAL, INCIDENTAL, O CONSECUENTE QUE SE DERIVE DEL USO O INCAPACIDAD +DE USO DE ESTE PROGRAMA (INCLUYENDO, PERO NO LIMITÁNDOSE A LA PÉRDIDA DE DATOS O PRODUCCIÓN +DE DATOS INCORRECTOS O PÉRDIDAS SUFRIDAS POR USTED O UNA TERCERA PARTE, O UNA INCAPACIDAD DEL +PROGRAMA PARA OPERAR JUNTO A OTROS PROGRAMAS), INCLUSO SI EL POSEEDOR DEL COPYRIGHT U OTRA PARTE +HABÍA SIDO AVISADO DE LA POSIBILIDAD DE TALES DAÑOS. + + FIN DE LOS TÉRMINOS Y CONDICIONES + +-------------------------------------------------------------------------------- + + Cómo aplicar estos términos a sus nuevos programas + + Si usted desarrolla un nuevo programa, y quiere que sea de la máxima utilidad posible para el +público, la mejor manera de conseguir esto es hacerlo software libre que cualquiera pueda +redistribuir y cambiar bajo estos términos. + + Para hacerlo, incluya los siguientes avisos en el programa. Es más seguro incluirlos al +comienzo de cada fichero fuente para destacar claramente la exclusión de garantía; y cada +fichero debe tener al menos la línea de copyright y una indicación de dónde se puede +encontrar el aviso completo. + + + [una línea para dar el nombre del programa y una breve descripción] + Copyright (C)[año] [nombre del autor] + This program is free software; you can redistribute it and/or modify it under the terms of + theGNU 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., 675 Mass Ave, Cambridge, MA 02139, USA. + + +En español: + + Este programa es software libre; usted puede redistruirlo y/o modificarlo bajo los términos + de la Licencia Pública General GNU, tal y como está publicada por la Free Software + Foundation; ya sea la versión 2 de la Licencia, o (a su elección) cualquier versión + posterior. + + Este programa se distribuye con la intención de ser útil, pero SIN NINGUNA GARANTÍA; incluso + sin la garantía implícita de USABILIDAD O UTILIDAD PARA UN FIN PARTICULAR. Vea la Licencia + Pública General GNU para más detalles. + + Usted debería haber recibido una copia de la Licencia Pública General GNU junto a este + programa; si no es así, escriba a la Free Software Foundation, Inc. 675 Mass Ave, Cambridge, + MA 02139, EEUU. + + +Añada también información sobre cómo contactar con usted por correo electrónico y ordinario. + +Si el programa es interactivo, haga que muestre un pequeño aviso como este, cuando empiece el +modo interactivo: + + Gnomovision versión 69, Copyright (C) año nombre del autor + Gnomovision viene sin NINGUNA GARANTÍA EN ABSOLUTO; para más detalles, escriba `ver g'. Este + es software libre, y su distribución es adecuada bajo ciertas condiciones; escriba `ver c' + para más detalles. + +Los comandos hipotéticos `show g' y `show c' deben mostrar las partes apropiadas de la Licencia +Pública General GNU. Por supuesto, los comandos reales que usted use podrían ser otros que +`show g' y `show c'; incluso podrían ser clics de ratón o elementos de menú--lo que se ajuste +mejor a su programa. + +También debería hacer que su superior laboral (si usted trabaja como programador), o su centro +académico, si los tiene, firmen una "renuncia al copyright" para el programa, si esto es +necesario. Aquí hay un ejemplo; cambie los nombres: + + Yoyodine, SA, renuncia a todo su derecho de copia sobre el programa `Gnomovision' (que hace + tal cosa), escrito por Juan Programador. + + [firma de Jefe Máximo], 1 de Mayo de 1998 + Jefe Máximo, Presidente + +Esta Licencia Pública General no permite incorporar su programa a programas propietarios. Si su +programa es una librería de subrutinas, puede considerar más útil el permitir enlazar +programas propietarios con la librería. Si esto es lo que quiere, use la Licencia Pública +General GNU para Librerías en lugar de esta Licencia. + Index: ircdh/LICENCE diff -u ircdh/LICENCE:1.1.1.1 ircdh/LICENCE:removed --- ircdh/LICENCE:1.1.1.1 Fri Jul 26 14:58:22 2002 +++ ircdh/LICENCE Thu Jan 23 03:01:12 2003 @@ -1,249 +0,0 @@ - - GNU GENERAL PUBLIC LICENSE - Version 1, February 1989 - - Copyright (C) 1989 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The license agreements of most software companies try to keep users -at the mercy of those companies. By contrast, our 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. The -General Public License applies to the Free Software Foundation's -software and to any other program whose authors commit to using it. -You can use it for your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Specifically, the General Public License is designed to make -sure that you have the freedom to give away or sell copies of free -software, 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 a 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 tell them 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. - - 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 Agreement 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 work containing the -Program or a portion of it, either verbatim or with modifications. Each -licensee is addressed as "you". - - 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 -General Public License and to the absence of any warranty; and give any -other recipients of the Program a copy of this General Public License -along with the Program. You may charge a fee for the physical act of -transferring a copy. - - 2. You may modify your copy or copies of the Program or any portion of -it, and copy and distribute such modifications under the terms of Paragraph -1 above, provided that you also do the following: - - a) cause the modified files to carry prominent notices stating that - you changed the files and the date of any change; and - - b) cause the whole of any work that you distribute or publish, that - in whole or in part contains the Program or any part thereof, either - with or without modifications, to be licensed at no charge to all - third parties under the terms of this General Public License (except - that you may choose to grant warranty protection to some or all - third parties, at your option). - - c) If the modified program normally reads commands interactively when - run, you must cause it, when started running for such interactive use - in the simplest and most usual 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 General - Public License. - - d) 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. - -Mere aggregation of another independent work with the Program (or its -derivative) on a volume of a storage or distribution medium does not bring -the other work under the scope of these terms. - - 3. You may copy and distribute the Program (or a portion or derivative of -it, under Paragraph 2) in object code or executable form under the terms of -Paragraphs 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 - Paragraphs 1 and 2 above; or, - - b) accompany it with a written offer, valid for at least three - years, to give any third party free (except for a nominal charge - for the cost of distribution) a complete machine-readable copy of the - corresponding source code, to be distributed under the terms of - Paragraphs 1 and 2 above; or, - - c) accompany it with the information you received as to where the - corresponding source code may be obtained. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form alone.) - -Source code for a work means the preferred form of the work for making -modifications to it. For an executable file, complete source code means -all the source code for all modules it contains; but, as a special -exception, it need not include source code for modules which are standard -libraries that accompany the operating system on which the executable -file runs, or for standard header files or definitions files that -accompany that operating system. - - 4. You may not copy, modify, sublicense, distribute or transfer the -Program except as expressly provided under this General Public License. -Any attempt otherwise to copy, modify, sublicense, distribute or transfer -the Program is void, and will automatically terminate your rights to use -the Program under this License. However, parties who have received -copies, or rights to use copies, from you under this General Public -License will not have their licenses terminated so long as such parties -remain in full compliance. - - 5. By copying, distributing or modifying 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. - - 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. - - 7. 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 the 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 -the license, you may choose any version ever published by the Free Software -Foundation. - - 8. 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 - - 9. 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. - - 10. 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 - - Appendix: 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 humanity, 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 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. - -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) 19xx 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 a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - program `Gnomovision' (a program to direct compilers to make passes - at assemblers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -That's all there is to it! ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2003-01-23 11:04:08
|
CVSROOT : /cvsroot/irc-dev Module : ircdh Commit time: 2003-01-23 11:04:07 UTC Modified files: COPYING Log message: Licencia GNU/GPL 2 ---------------------- diff included ---------------------- Index: ircdh/COPYING diff -u ircdh/COPYING:1.1 ircdh/COPYING:1.2 --- ircdh/COPYING:1.1 Thu Jan 23 03:01:00 2003 +++ ircdh/COPYING Thu Jan 23 03:03:56 2003 @@ -1,38 +1,40 @@ - GNU GENERAL PUBLIC LICENSE - Version 1, February 1989 + Version 2, June 1991 - Copyright (C) 1989 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA + 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 license agreements of most software companies try to keep users -at the mercy of those companies. By contrast, our General Public + 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. The -General Public License applies to the Free Software Foundation's -software and to any other program whose authors commit to using it. -You can use it for your programs, too. +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. Specifically, the General Public License is designed to make -sure that you have the freedom to give away or sell copies of free -software, 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. +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 a such a program, whether + 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 tell them their rights. +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, @@ -45,120 +47,207 @@ 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 Agreement 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 work containing the -Program or a portion of it, either verbatim or with modifications. Each -licensee is addressed as "you". - - 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 -General Public License and to the absence of any warranty; and give any -other recipients of the Program a copy of this General Public License -along with the Program. You may charge a fee for the physical act of -transferring a copy. - - 2. You may modify your copy or copies of the Program or any portion of -it, and copy and distribute such modifications under the terms of Paragraph -1 above, provided that you also do the following: - - a) cause the modified files to carry prominent notices stating that - you changed the files and the date of any change; and - - b) cause the whole of any work that you distribute or publish, that - in whole or in part contains the Program or any part thereof, either - with or without modifications, to be licensed at no charge to all - third parties under the terms of this General Public License (except - that you may choose to grant warranty protection to some or all - third parties, at your option). - - c) If the modified program normally reads commands interactively when - run, you must cause it, when started running for such interactive use - in the simplest and most usual 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 General - Public License. - - d) 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. - -Mere aggregation of another independent work with the Program (or its -derivative) on a volume of a storage or distribution medium does not bring -the other work under the scope of these terms. + 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.) - 3. You may copy and distribute the Program (or a portion or derivative of -it, under Paragraph 2) in object code or executable form under the terms of -Paragraphs 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 - Paragraphs 1 and 2 above; or, - - b) accompany it with a written offer, valid for at least three - years, to give any third party free (except for a nominal charge - for the cost of distribution) a complete machine-readable copy of the - corresponding source code, to be distributed under the terms of - Paragraphs 1 and 2 above; or, +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 where the - corresponding source code may be obtained. (This alternative is + 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 alone.) + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) -Source code for a work means the preferred form of the work for making -modifications to it. For an executable file, complete source code means -all the source code for all modules it contains; but, as a special -exception, it need not include source code for modules which are standard -libraries that accompany the operating system on which the executable -file runs, or for standard header files or definitions files that -accompany that operating system. - - 4. You may not copy, modify, sublicense, distribute or transfer the -Program except as expressly provided under this General Public License. -Any attempt otherwise to copy, modify, sublicense, distribute or transfer -the Program is void, and will automatically terminate your rights to use -the Program under this License. However, parties who have received -copies, or rights to use copies, from you under this General Public -License will not have their licenses terminated so long as such parties -remain in full compliance. - - 5. By copying, distributing or modifying 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. +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. +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. - 7. The Free Software Foundation may publish revised and/or new versions + 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 the license which applies to it and "any +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 -the license, you may choose any version ever published by the Free Software +this License, you may choose any version ever published by the Free Software Foundation. - 8. If you wish to incorporate parts of the Program into other free + 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 @@ -168,7 +257,7 @@ NO WARRANTY - 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS 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 @@ -178,7 +267,7 @@ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING + 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 @@ -190,25 +279,24 @@ END OF TERMS AND CONDITIONS - Appendix: How to Apply These Terms to Your New Programs + 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 humanity, 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. +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> + Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) - any later version. + 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 @@ -217,33 +305,36 @@ 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. + 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) 19xx name of author + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. -The hypothetical commands `show w' and `show c' should show the -appropriate parts of the General Public License. Of course, the -commands you use may be called something other than `show w' and `show -c'; they could even be mouse-clicks or menu items--whatever suits your -program. +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 a sample; alter the names: +necessary. Here is a sample; alter the names: - Yoyodyne, Inc., hereby disclaims all copyright interest in the - program `Gnomovision' (a program to direct compilers to make passes - at assemblers) written by James Hacker. + 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 -That's all there is to it! +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. ----------------------- End of diff ----------------------- |