Thread: [IRC-Dev CVS] [CVS] Module ircd-ircdev: Change committed (Page 5)
Brought to you by:
zolty
From: Toni G. <zo...@us...> - 2005-05-23 08:53:21
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-05-23 08:53:14 UTC Modified files: TODO.es Log message: actualizacion ---------------------- diff included ---------------------- Index: ircd-ircdev/TODO.es diff -u ircd-ircdev/TODO.es:1.24 ircd-ircdev/TODO.es:1.25 --- ircd-ircdev/TODO.es:1.24 Mon May 16 03:18:57 2005 +++ ircd-ircdev/TODO.es Mon May 23 01:53:04 2005 @@ -1,7 +1,7 @@ # # TODO para ircd-ircdev # -# $Id: TODO.es,v 1.24 2005/05/16 10:18:57 zolty Exp $ +# $Id: TODO.es,v 1.25 2005/05/23 08:53:04 zolty Exp $ # # Insertar las nuevas entradas al principio de la lista TODO. # @@ -41,7 +41,6 @@ - [S] Comando SVSVHOST para cambiar la virtualhost. Estudiar alguna forma de propagarse en el burst. - [S] Comando /IDENTIFY y autentificacion NICK nick clave. - - [S] Comprobar el comando OPMODE haga lo que hacia el SAMODE de Terraircu. PRIORIDAD BAJA ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2005-05-23 08:59:10
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-05-23 08:58:47 UTC Modified files: ChangeLog ChangeLog.es include/patchlevel.h ircd/s_conf.c ircd/s_serv.c ircd/s_user.c Log message: Author: zoltan <zo...@ir...> Log message: 2005-05-23 Toni García <zo...@ir...> 1.0.alpha36 * Arreglos URGENTES ---------------------- diff included ---------------------- Index: ircd-ircdev/ChangeLog diff -u ircd-ircdev/ChangeLog:1.37 ircd-ircdev/ChangeLog:1.38 --- ircd-ircdev/ChangeLog:1.37 Mon May 16 04:31:19 2005 +++ ircd-ircdev/ChangeLog Mon May 23 01:58:36 2005 @@ -1,10 +1,13 @@ # # ChangeLog for ircd-ircdev # -# $Id: ChangeLog,v 1.37 2005/05/16 11:31:19 zolty Exp $ +# $Id: ChangeLog,v 1.38 2005/05/23 08:58:36 zolty Exp $ # # Insert new changes at beginning of the change list. # +2005-05-23 Toni García <zo...@ir...> 1.0.alpha36 + * URGENT bugfixes + 2005-05-16 Toni García <zo...@ir...> 1.0.alpha35 * Testing tools Index: ircd-ircdev/ChangeLog.es diff -u ircd-ircdev/ChangeLog.es:1.37 ircd-ircdev/ChangeLog.es:1.38 --- ircd-ircdev/ChangeLog.es:1.37 Mon May 16 04:31:19 2005 +++ ircd-ircdev/ChangeLog.es Mon May 23 01:58:36 2005 @@ -1,10 +1,13 @@ # # Log de Cambios para ircd-ircdev # -# $Id: ChangeLog.es,v 1.37 2005/05/16 11:31:19 zolty Exp $ +# $Id: ChangeLog.es,v 1.38 2005/05/23 08:58:36 zolty Exp $ # # Insertar los nuevos cambios al principio de esta lista de cambios. # +2005-05-23 Toni García <zo...@ir...> 1.0.alpha36 + * Arreglos URGENTES + 2005-05-16 Toni García <zo...@ir...> 1.0.alpha35 * Utilidades de Testing Index: ircd-ircdev/include/patchlevel.h diff -u ircd-ircdev/include/patchlevel.h:1.36 ircd-ircdev/include/patchlevel.h:1.37 --- ircd-ircdev/include/patchlevel.h:1.36 Mon May 16 04:31:20 2005 +++ ircd-ircdev/include/patchlevel.h Mon May 23 01:58:37 2005 @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: patchlevel.h,v 1.36 2005/05/16 11:31:20 zolty Exp $ + * $Id: patchlevel.h,v 1.37 2005/05/23 08:58:37 zolty Exp $ * */ -#define PATCHLEVEL ".alpha35" +#define PATCHLEVEL ".alpha36" #define RELEASE "1.0" Index: ircd-ircdev/ircd/s_conf.c diff -u ircd-ircdev/ircd/s_conf.c:1.16 ircd-ircdev/ircd/s_conf.c:1.17 --- ircd-ircdev/ircd/s_conf.c:1.16 Mon May 16 03:17:27 2005 +++ ircd-ircdev/ircd/s_conf.c Mon May 23 01:58:37 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief ircd configuration file driver - * @version $Id: s_conf.c,v 1.16 2005/05/16 10:17:27 zolty Exp $ + * @version $Id: s_conf.c,v 1.17 2005/05/23 08:58:37 zolty Exp $ */ #include "config.h" @@ -1118,6 +1118,7 @@ * added a check against the user's IP address to find_gline() -Kev */ send_reply(cptr, SND_EXPLICIT | ERR_YOUREBANNEDCREEP, ":%s.", GlineReason(agline)); + return -2; } return 0; Index: ircd-ircdev/ircd/s_serv.c diff -u ircd-ircdev/ircd/s_serv.c:1.11 ircd-ircdev/ircd/s_serv.c:1.12 --- ircd-ircdev/ircd/s_serv.c:1.11 Mon May 16 03:17:27 2005 +++ ircd-ircdev/ircd/s_serv.c Mon May 23 01:58:37 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Miscellaneous server support functions. - * @version $Id: s_serv.c,v 1.11 2005/05/16 10:17:27 zolty Exp $ + * @version $Id: s_serv.c,v 1.12 2005/05/23 08:58:37 zolty Exp $ */ #include "config.h" @@ -140,9 +140,6 @@ feature_bool(FEAT_HUB) ? "h" : "", *(cli_info(&me)) ? cli_info(&me) : "IRCers United"); -#if defined(DDB) - /* ddb_burst(cptr); */ -#endif /* * Don't charge this IP# for connecting * XXX - if this comes from a server port, it will not have been added Index: ircd-ircdev/ircd/s_user.c diff -u ircd-ircdev/ircd/s_user.c:1.18 ircd-ircdev/ircd/s_user.c:1.19 --- ircd-ircdev/ircd/s_user.c:1.18 Mon May 16 03:17:27 2005 +++ ircd-ircdev/ircd/s_user.c Mon May 23 01:58:37 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Miscellaneous user-related helper functions. - * @version $Id: s_user.c,v 1.18 2005/05/16 10:17:27 zolty Exp $ + * @version $Id: s_user.c,v 1.19 2005/05/23 08:58:37 zolty Exp $ */ #include "config.h" @@ -822,8 +822,9 @@ * Esta comprobacion solo se va a hacer si * el usuario es local y no esta haciendo nick flood. */ - if (MyConnect(cptr) && !IsIdentify(flags) && (ddb = ddb_find_key(DDB_NICKDB, (char *)nick)) - && (CurrentTime >= cli_nextnick(cptr))) + if (!IsServer(cptr) && MyConnect(cptr) && !IsIdentify(flags) + && (ddb = ddb_find_key(DDB_NICKDB, (char *)nick)) + && (CurrentTime >= cli_nextnick(sptr))) { const char *name; int nick_forbid = 0; @@ -996,11 +997,11 @@ * if client is on any channels where it is currently * banned. If so, do not allow the nick change to occur. */ - if (MyUser(sptr) && !IsRenamed(flags)) + if (MyUser(sptr)) { const char* channel_name; struct Membership *member; - if ((channel_name = find_no_nickchange_channel(sptr))) { + if ((channel_name = find_no_nickchange_channel(sptr)) && !IsRenamed(flags)) { return send_reply(cptr, ERR_BANNICKCHANGE, channel_name); } /* @@ -1011,7 +1012,7 @@ * however, allow to do two nick changes immediately after another * before limiting the nick flood. -Run */ - if (CurrentTime < cli_nextnick(cptr)) + if ((CurrentTime < cli_nextnick(cptr)) && !IsRenamed(flags)) { cli_nextnick(cptr) += 2; send_reply(cptr, ERR_NICKTOOFAST, parv[1], ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2005-05-25 16:56:43
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-05-25 16:56:35 UTC Modified files: ChangeLog ChangeLog.es include/channel.h include/ddb.h include/handlers.h include/msg.h include/patchlevel.h include/send.h include/supported.h ircd/Makefile.in ircd/channel.c ircd/ddb.c ircd/ddb_events.c ircd/hash.c ircd/m_join.c ircd/m_kick.c ircd/m_mode.c ircd/m_names.c ircd/m_whois.c ircd/parse.c ircd/s_user.c ircd/send.c ircd/whocmds.c Added files: ircd/m_bmode.c Log message: Author: zoltan <zo...@ir...> Log message: 2005-05-25 Toni García <zo...@ir...> 1.0.alpha37 * Canales registrados (con modo +r) * Modo owner/founder (+q) * Tabla c de Canales ---------------------- diff included ---------------------- Index: ircd-ircdev/ChangeLog diff -u ircd-ircdev/ChangeLog:1.38 ircd-ircdev/ChangeLog:1.39 --- ircd-ircdev/ChangeLog:1.38 Mon May 23 01:58:36 2005 +++ ircd-ircdev/ChangeLog Wed May 25 09:56:22 2005 @@ -1,10 +1,15 @@ # # ChangeLog for ircd-ircdev # -# $Id: ChangeLog,v 1.38 2005/05/23 08:58:36 zolty Exp $ +# $Id: ChangeLog,v 1.39 2005/05/25 16:56:22 zolty Exp $ # # Insert new changes at beginning of the change list. # +2005-05-25 Toni García <zo...@ir...> 1.0.alpha37 + * Registered channels (with mode +r) + * Owner/founder mode (+q) + * Channel table c + 2005-05-23 Toni García <zo...@ir...> 1.0.alpha36 * URGENT bugfixes Index: ircd-ircdev/ChangeLog.es diff -u ircd-ircdev/ChangeLog.es:1.38 ircd-ircdev/ChangeLog.es:1.39 --- ircd-ircdev/ChangeLog.es:1.38 Mon May 23 01:58:36 2005 +++ ircd-ircdev/ChangeLog.es Wed May 25 09:56:22 2005 @@ -1,10 +1,15 @@ # # Log de Cambios para ircd-ircdev # -# $Id: ChangeLog.es,v 1.38 2005/05/23 08:58:36 zolty Exp $ +# $Id: ChangeLog.es,v 1.39 2005/05/25 16:56:22 zolty Exp $ # # Insertar los nuevos cambios al principio de esta lista de cambios. # +2005-05-25 Toni García <zo...@ir...> 1.0.alpha37 + * Canales registrados (con modo +r) + * Modo owner/founder (+q) + * Tabla c de Canales + 2005-05-23 Toni García <zo...@ir...> 1.0.alpha36 * Arreglos URGENTES Index: ircd-ircdev/include/channel.h diff -u ircd-ircdev/include/channel.h:1.9 ircd-ircdev/include/channel.h:1.10 --- ircd-ircdev/include/channel.h:1.9 Wed Mar 9 10:12:32 2005 +++ ircd-ircdev/include/channel.h Wed May 25 09:56:23 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Channel management and maintenance. - * @version $Id: channel.h,v 1.9 2005/03/09 18:12:32 zolty Exp $ + * @version $Id: channel.h,v 1.10 2005/05/25 16:56:23 zolty Exp $ */ #ifndef INCLUDED_channel_h #define INCLUDED_channel_h @@ -91,9 +91,18 @@ */ #define CHFL_DELAYED 0x40000 /**< User's join message is delayed */ +#if defined(DDB) || defined(SERVICES) +#define CHFL_OWNER 0x10000 /**< Channel owner */ + +#define CHFL_OVERLAP (CHFL_OWNER | CHFL_CHANOP | CHFL_VOICE) +#define CHFL_BANVALIDMASK (CHFL_BANVALID | CHFL_BANNED) +#define CHFL_VOICED_OR_OPPED (CHFL_OWNER | CHFL_CHANOP | CHFL_VOICE) +#else + #define CHFL_OVERLAP (CHFL_CHANOP | CHFL_VOICE) #define CHFL_BANVALIDMASK (CHFL_BANVALID | CHFL_BANNED) #define CHFL_VOICED_OR_OPPED (CHFL_CHANOP | CHFL_VOICE) +#endif /* Channel Visibility macros */ @@ -108,8 +117,12 @@ #define MODE_KEY 0x0100 /**< +k Keyed */ #define MODE_BAN 0x0200 /**< +b Ban */ #define MODE_LIMIT 0x0400 /**< +l Limit */ -#define MODE_REGONLY 0x0800 /**< Only +r users may join */ +#define MODE_REGONLY 0x0800 /**< +R Only +r users may join */ #define MODE_DELJOINS 0x1000 /**< New join messages are delayed */ +#if defined(DDB) || defined(SERVICES) +#define MODE_REGCHAN 0x2000 /**< +r Channel registered */ +#define MODE_OWNER CHFL_OWNER /**< +q Channel owner */ +#endif #define MODE_SAVE 0x20000 /**< save this mode-with-arg 'til * later */ #define MODE_FREE 0x40000 /**< string needs to be passed to @@ -130,6 +143,15 @@ #define infochanmodes feature_bool(FEAT_OPLEVELS) ? "AbiklmnopstUvrD" : "biklmnopstvrD" /** Available Channel modes that take parameters */ #define infochanmodeswithparams feature_bool(FEAT_OPLEVELS) ? "AbkloUv" : "bklov" +#elif defined(DDB) || defined(SERVICES) +/** mode flags which take another parameter (With PARAmeterS) + */ +#define MODE_WPARAS (MODE_OWNER|MODE_CHANOP|MODE_VOICE|MODE_BAN|MODE_KEY|MODE_LIMIT) + +/** Available Channel modes */ +#define infochanmodes "biklmnopstvrRDq" +/** Available Channel modes that take parameters */ +#define infochanmodeswithparams "bklovq" #else /** mode flags which take another parameter (With PARAmeterS) */ @@ -225,24 +247,21 @@ struct Membership* next_channel; /**< Next channel this user is on */ struct Membership* prev_channel; /**< Previous channel this user is on*/ unsigned int status; /**< Flags for op'd, voice'd, etc */ -#if defined(UNDERNET) unsigned short oplevel; /**< Op level */ -#endif }; -#if defined(UNDERNET) #define MAXOPLEVELDIGITS 3 #define MAXOPLEVEL 999 -#endif #define IsZombie(x) ((x)->status & CHFL_ZOMBIE) /**< see \ref zombie */ #define IsDeopped(x) ((x)->status & CHFL_DEOPPED) #define IsBanned(x) ((x)->status & CHFL_BANNED) #define IsBanValid(x) ((x)->status & CHFL_BANVALID) +#if defined(DDB) || defined(SERVICES) +#define IsChanOwner(x) ((x)->status & CHFL_OWNER) +#endif #define IsChanOp(x) ((x)->status & CHFL_CHANOP) -#if defined(UNDERNET) #define OpLevel(x) ((x)->oplevel) -#endif #define HasVoice(x) ((x)->status & CHFL_VOICE) #define IsServOpOk(x) ((x)->status & CHFL_SERVOPOK) #define IsBurstJoined(x) ((x)->status & CHFL_BURST_JOINED) @@ -261,8 +280,11 @@ #define SetZombie(x) ((x)->status |= CHFL_ZOMBIE) #if defined(UNDERNET) #define SetChannelManager(x) ((x)->status |= CHFL_CHANNEL_MANAGER) -#define SetOpLevel(x, v) (void)((x)->oplevel = (v)) #endif +#if defined(DDB) || defined(SERVICES) +#define SetChanOwner(x) ((x)->status |= CHFL_OWNER) +#endif +#define SetOpLevel(x, v) (void)((x)->oplevel = (v)) #define SetUserParting(x) ((x)->status |= CHFL_USER_PARTING) #define SetDelayedJoin(x) ((x)->status |= CHFL_DELAYED) @@ -272,6 +294,9 @@ #define ClearServOpOk(x) ((x)->status &= ~CHFL_SERVOPOK) #define ClearBurstJoined(x) ((x)->status &= ~CHFL_BURST_JOINED) #define ClearDelayedJoin(x) ((x)->status &= ~CHFL_DELAYED) +#if defined(DDB) || defined(SERVICES) +#define ClearChanOwner(x) ((x)->status &= ~CHFL_OWNER) +#endif /** Mode information for a channel */ struct Mode { @@ -344,6 +369,9 @@ struct Client *mb_source; /**< Source of MODE changes */ struct Client *mb_connect; /**< Connection of MODE changes */ struct Channel *mb_channel; /**< Channel they affect */ +#if defined(DDB) + char *mb_botname; /**< Nick Bot of MODE changes */ +#endif unsigned int mb_dest; /**< Destination of MODE changes */ unsigned int mb_count; /**< Number of modes w/args */ struct { @@ -370,6 +398,9 @@ #define MODEBUF_DEST_HACK4 0x08000 /**< Send a HACK(4) notice, TS == 0 */ #define MODEBUF_DEST_NOKEY 0x10000 /**< Don't send the real key */ +#if defined(DDB) +#define MODEBUF_DEST_BOTMODE 0x20000 /**< Mode send by Bot */ +#endif #define MB_TYPE(mb, i) ((mb)->mb_modeargs[(i)].mbm_type) #define MB_UINT(mb, i) ((mb)->mb_modeargs[(i)].mbm_arg.mbma_uint) @@ -433,6 +464,9 @@ extern void remove_user_from_channel(struct Client *sptr, struct Channel *chptr); extern void remove_user_from_all_channels(struct Client* cptr); +#if defined(DDB) || defined(SERVICES) +extern int is_chan_owner(struct Client *cptr, struct Channel *chptr); +#endif extern int is_chan_op(struct Client *cptr, struct Channel *chptr); extern int is_zombie(struct Client *cptr, struct Channel *chptr); extern int has_voice(struct Client *cptr, struct Channel *chptr); Index: ircd-ircdev/include/ddb.h diff -u ircd-ircdev/include/ddb.h:1.8 ircd-ircdev/include/ddb.h:1.9 --- ircd-ircdev/include/ddb.h:1.8 Mon May 16 03:17:26 2005 +++ ircd-ircdev/include/ddb.h Wed May 25 09:56:23 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Distributed DataBases structures, macros and functions. - * @version $Id: ddb.h,v 1.8 2005/05/16 10:17:26 zolty Exp $ + * @version $Id: ddb.h,v 1.9 2005/05/25 16:56:23 zolty Exp $ */ #ifndef INCLUDED_ddb_h #define INCLUDED_ddb_h @@ -49,6 +49,8 @@ #define DDB_INIT 'a' /** Channels table of %DDB Distributed Databases. */ #define DDB_CHANDB 'c' +/** Channels table (nicks) of %DDB Distributed Databases. */ +#define DDB_CHANDB2 'd' /** Ilines table of %DDB Distributed Databases. */ #define DDB_ILINEDB 'i' /** Nicks table of %DDB Distributed Databases. */ @@ -73,6 +75,8 @@ */ /** Nickname of virtual bot for nicks registers */ #define DDB_NICKSERV "NickServ" +/** Nickname of virtual bot for channel bot */ +#define DDB_CHANSERV "ChanServ" /** Describes a key on one table. Index: ircd-ircdev/include/handlers.h diff -u ircd-ircdev/include/handlers.h:1.12 ircd-ircdev/include/handlers.h:1.13 --- ircd-ircdev/include/handlers.h:1.12 Sat Apr 2 11:47:34 2005 +++ ircd-ircdev/include/handlers.h Wed May 25 09:56:23 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Declarations for all protocol message handler functions. - * @version $Id: handlers.h,v 1.12 2005/04/02 19:47:34 zolty Exp $ + * @version $Id: handlers.h,v 1.13 2005/05/25 16:56:23 zolty Exp $ */ #ifndef INCLUDED_handlers_h #define INCLUDED_handlers_h @@ -198,6 +198,7 @@ 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*[]); +extern int ms_bmode(struct Client*, struct Client*, int, char*[]); 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*[]); Index: ircd-ircdev/include/msg.h diff -u ircd-ircdev/include/msg.h:1.12 ircd-ircdev/include/msg.h:1.13 --- ircd-ircdev/include/msg.h:1.12 Sat Apr 2 11:47:34 2005 +++ ircd-ircdev/include/msg.h Wed May 25 09:56:23 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Command and token declarations and structures. - * @version $Id: msg.h,v 1.12 2005/04/02 19:47:34 zolty Exp $ + * @version $Id: msg.h,v 1.13 2005/05/25 16:56:23 zolty Exp $ */ #ifndef INCLUDED_msg_h #define INCLUDED_msg_h @@ -378,6 +378,10 @@ #define TOK_DBQ "DBQ" #define CMD_DBQ MSG_DBQ, TOK_DBQ +#define MSG_BMODE "BMODE" /* BMODE */ +#define TOK_BMODE "BM" +#define CMD_BMODE MSG_BMODE, TOK_BMODE + #define MSG_GHOST "GHOST" /* GHOST */ #define TOK_GHOST "GHOST" #define CMD_GHOST MSG_GHOST, TOK_GHOST Index: ircd-ircdev/include/patchlevel.h diff -u ircd-ircdev/include/patchlevel.h:1.37 ircd-ircdev/include/patchlevel.h:1.38 --- ircd-ircdev/include/patchlevel.h:1.37 Mon May 23 01:58:37 2005 +++ ircd-ircdev/include/patchlevel.h Wed May 25 09:56:23 2005 @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: patchlevel.h,v 1.37 2005/05/23 08:58:37 zolty Exp $ + * $Id: patchlevel.h,v 1.38 2005/05/25 16:56:23 zolty Exp $ * */ -#define PATCHLEVEL ".alpha36" +#define PATCHLEVEL ".alpha37" #define RELEASE "1.0" Index: ircd-ircdev/include/send.h diff -u ircd-ircdev/include/send.h:1.7 ircd-ircdev/include/send.h:1.8 --- ircd-ircdev/include/send.h:1.7 Thu Mar 31 04:58:03 2005 +++ ircd-ircdev/include/send.h Wed May 25 09:56:23 2005 @@ -21,7 +21,7 @@ */ /** @file send.h * @brief Send messages to certain targets. - * @version $Id: send.h,v 1.7 2005/03/31 12:58:03 zolty Exp $ + * @version $Id: send.h,v 1.8 2005/05/25 16:56:23 zolty Exp $ */ #ifndef INCLUDED_send_h #define INCLUDED_send_h @@ -56,10 +56,12 @@ */ extern void sendrawto_one(struct Client *to, const char *pattern, ...); +#if defined(DDB) /* Send a bot command to one client */ -extern void sendcmdbotto_one(char *botname, const char *cmd, +extern void sendcmdbotto_one(const char *botname, const char *cmd, const char *tok, struct Client *to, const char *pattern, ...); +#endif /* Send a command to one client */ extern void sendcmdto_one(struct Client *from, const char *cmd, @@ -89,6 +91,17 @@ struct Client *one, const char *pattern, ...); +#if defined(DDB) +/* Send bot command to all channel users on this server */ +extern void sendcmdbotto_channel_butserv_butone(const char *botmode, + const char *cmd, + const char *tok, + struct Channel *to, + struct Client *one, + unsigned int skip, + const char *pattern, ...); +#endif + /* Send command to all channel users on this server */ extern void sendcmdto_channel_butserv_butone(struct Client *from, const char *cmd, Index: ircd-ircdev/include/supported.h diff -u ircd-ircdev/include/supported.h:1.7 ircd-ircdev/include/supported.h:1.8 --- ircd-ircdev/include/supported.h:1.7 Mon Jan 10 04:22:00 2005 +++ ircd-ircdev/include/supported.h Wed May 25 09:56:23 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: supported.h,v 1.7 2005/01/10 12:22:00 zolty Exp $ + * $Id: supported.h,v 1.8 2005/05/25 16:56:23 zolty Exp $ * */ #ifndef INCLUDED_supported_h @@ -73,7 +73,11 @@ #define FEATURESVALUES1 AWAYLEN, CHANNELLEN, NICKLEN, feature_int(FEAT_NICKLEN), TOPICLEN -#define FEATURESVALUES2 "b,k,l,imnpstrD", feature_bool(FEAT_LOCAL_CHANNELS) ? "#&" : "#", "(ov)@+", "@+" +#if defined(DDB) || defined(SERVICES) +#define FEATURESVALUES2 "b,k,l,imnpstrRD", feature_bool(FEAT_LOCAL_CHANNELS) ? "#&" : "#", "(qov).@+", ".@+" +#else +#define FEATURESVALUES2 "b,k,l,imnpstRD", feature_bool(FEAT_LOCAL_CHANNELS) ? "#&" : "#", "(ov)@+", "@+" +#endif #define FEATURESVALUES3 feature_int(FEAT_MAXCHANNELSPERUSER), feature_int(FEAT_MAXBANS), \ MAXTARGETS, MAXMODEPARAMS, feature_int(FEAT_MAXSILES), \ Index: ircd-ircdev/ircd/Makefile.in diff -u ircd-ircdev/ircd/Makefile.in:1.26 ircd-ircdev/ircd/Makefile.in:1.27 --- ircd-ircdev/ircd/Makefile.in:1.26 Mon May 16 03:17:26 2005 +++ ircd-ircdev/ircd/Makefile.in Wed May 25 09:56:23 2005 @@ -18,7 +18,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA -# $Id: Makefile.in,v 1.26 2005/05/16 10:17:26 zolty Exp $ +# $Id: Makefile.in,v 1.27 2005/05/25 16:56:23 zolty Exp $ #### Start of system configuration section. #### @@ -95,6 +95,7 @@ ddb.c \ ddb_db_native.c \ ddb_events.c\ + m_bmode.c \ m_db.c \ m_dbq.c \ m_ghost.c \ Index: ircd-ircdev/ircd/channel.c diff -u ircd-ircdev/ircd/channel.c:1.21 ircd-ircdev/ircd/channel.c:1.22 --- ircd-ircdev/ircd/channel.c:1.21 Mon May 16 04:22:50 2005 +++ ircd-ircdev/ircd/channel.c Wed May 25 09:56:24 2005 @@ -21,12 +21,13 @@ */ /** @file * @brief Channel management and maintanance - * @version $Id: channel.c,v 1.21 2005/05/16 11:22:50 zolty Exp $ + * @version $Id: channel.c,v 1.22 2005/05/25 16:56:24 zolty Exp $ */ #include "config.h" #include "channel.h" #include "client.h" +#include "ddb.h" #include "destruct_event.h" #include "hash.h" #include "ircd.h" @@ -272,6 +273,13 @@ schedule_destruct_event_1m(chptr); /* Get rid of it in approximately 4-5 minutes */ else schedule_destruct_event_48h(chptr); /* Get rid of it in approximately 48 hours */ + +#elif defined(DDB) + chptr->users = 0; + + if (!chptr->mode.mode & MODE_REGCHAN) + destruct_channel(chptr); + #else destruct_channel(chptr); #endif @@ -296,7 +304,9 @@ assert(0 == chptr->members); #if 0 -/* FIXME-ZOLTAN BORRAR!! ¿? */ +/* FIXME-ZOLTAN BORRAR!! + * Esto es listado de canales de /list, si se borra... se borra + * del list pendiente, pero parece ser que no es necesario ¿? */ /* Channel became (or was) empty: Remove channel */ if (is_listed(chptr)) { @@ -471,9 +481,7 @@ member->user = who; member->channel = chptr; member->status = flags; -#if defined(UNDERNET) member->oplevel = oplevel; -#endif member->next_member = chptr->members; if (member->next_member) @@ -600,6 +608,26 @@ remove_user_from_channel(cptr, chan->channel); } +#if defined(DDB) || defined(SERVICES) +/** Check if this user is a legitimate chan owner + * + * @param cptr Client to check + * @param chptr Channel to check + * + * @returns True if the user is a chan owner (And not a zombie), False otherwise. + * @see \ref zombie + */ +int is_chan_owner(struct Client *cptr, struct Channel *chptr) +{ + struct Membership* member; + assert(chptr); + if ((member = find_member_link(chptr, cptr))) + return (!IsZombie(member) && IsChanOwner(member)); + + return 0; +} +#endif /* defined(DDB) || defined(SERVICES) */ + /** Check if this user is a legitimate chanop * * @param cptr Client to check @@ -697,7 +725,6 @@ if (member->channel->mode.mode & MODE_MODERATED) return 0; #if defined(UNDERNET) - /* TODO */ /* If only logged in users may join and you're not one, you can't speak. */ if (member->channel->mode.mode & MODE_REGONLY && !IsAccount(member->user)) return 0; @@ -822,8 +849,12 @@ *mbuf++ = 'i'; if (chptr->mode.mode & MODE_NOPRIVMSGS) *mbuf++ = 'n'; - if (chptr->mode.mode & MODE_REGONLY) +#if defined(DDB) || defined(SERVICES) + if (chptr->mode.mode & MODE_REGCHAN) *mbuf++ = 'r'; +#endif + if (chptr->mode.mode & MODE_REGONLY) + *mbuf++ = 'R'; if (chptr->mode.mode & MODE_DELJOINS) *mbuf++ = 'D'; else if (MyUser(cptr) && (chptr->mode.mode & MODE_WASDELJOINS)) @@ -868,7 +899,6 @@ *mbuf = '\0'; } -#if defined(UNDERNET) /** Compare two members oplevel * * @param mp1 Pointer to a pointer to a membership @@ -886,7 +916,6 @@ return 0; return (member1->oplevel < member2->oplevel) ? -1 : 1; } -#endif /* UNDERNET */ /* send "cptr" a full list of the modes for channel chptr. * @@ -898,8 +927,20 @@ void send_channel_modes(struct Client *cptr, struct Channel *chptr) { /* The order in which modes are generated is now mandatory */ +#if defined(DDB) || defined(SERVICES) + static unsigned int current_flags[8] = + { 0, + CHFL_VOICE, + CHFL_CHANOP, + CHFL_CHANOP | CHFL_VOICE, + CHFL_OWNER, + CHFL_OWNER | CHFL_VOICE, + CHFL_OWNER | CHFL_CHANOP, + CHFL_OWNER | CHFL_CHANOP | CHFL_VOICE }; +#else static unsigned int current_flags[4] = { 0, CHFL_VOICE, CHFL_CHANOP, CHFL_CHANOP | CHFL_VOICE }; +#endif int first = 1; int full = 1; int flag_cnt = 0; @@ -1077,7 +1118,11 @@ } /* loop over 0,+v,+o,+ov */ #else /* !UNDERNET */ - for (first = 1; flag_cnt < 4; +#if defined(DDB) || defined(SERVICES) + for (first = 1; flag_cnt < 8; +#else + for (first = 1; flag_cnt < 4; +#endif member = chptr->members, new_mode = 1, flag_cnt++) { for (; member; member = member->next_member) @@ -1087,7 +1132,7 @@ current_flags[flag_cnt]) continue; /* Skip members with different flags */ if (msgq_bufleft(mb) < NUMNICKLEN + 4) - /* The 4 is a possible ",:ov" */ + /* The 5 is a possible ",:qov" */ { full = 1; /* Make sure we continue after sending it so far */ @@ -1106,9 +1151,13 @@ { new_mode = 0; if (IsVoicedOrOpped(member)) { - char tbuf[4] = ":"; + char tbuf[5] = ":"; int loc = 1; +#if defined(DDB) || defined(SERVICES) + if (IsChanOwner(member)) + tbuf[loc++] = 'q'; +#endif if (IsChanOp(member)) tbuf[loc++] = 'o'; if (HasVoice(member)) @@ -1354,10 +1403,13 @@ if (chptr->mode.limit && chptr->users >= chptr->mode.limit) return overrideJoin + ERR_CHANNELISFULL; + if ((chptr->mode.mode & MODE_REGONLY) && #if defined(UNDERNET) - if ((chptr->mode.mode & MODE_REGONLY) && !IsAccount(sptr)) - return overrideJoin + ERR_NEEDREGGEDNICK; + !IsAccount(sptr)) +#elif defined(DDB) || defined(SERVICES) + !IsNickRegistered(sptr)) #endif + return overrideJoin + ERR_NEEDREGGEDNICK; if (find_ban(sptr, chptr->banlist)) return overrideJoin + ERR_BANNEDFROMCHAN; @@ -1422,7 +1474,11 @@ return NULL; len = strlen(chname); +#if defined(DDB) + if ((!cptr || MyUser(cptr)) && len > CHANNELLEN) +#else if (MyUser(cptr) && len > CHANNELLEN) +#endif { len = CHANNELLEN; *(chname + CHANNELLEN) = '\0'; @@ -1440,7 +1496,11 @@ GlobalChannelList->prev = chptr; chptr->prev = NULL; chptr->next = GlobalChannelList; +#if defined(DDB) + chptr->creationtime = (!cptr || MyUser(cptr)) ? TStime() : (time_t) 0; +#else chptr->creationtime = MyUser(cptr) ? TStime() : (time_t) 0; +#endif GlobalChannelList = chptr; hAddChannel(chptr); } @@ -1689,9 +1749,13 @@ MODE_TOPICLIMIT, 't', MODE_INVITEONLY, 'i', MODE_NOPRIVMSGS, 'n', - MODE_REGONLY, 'r', - MODE_DELJOINS, 'D', - MODE_WASDELJOINS, 'd', +#if defined(DDB) || defined(SERVICES) + MODE_REGCHAN, 'r', +/* MODE_OWNER, 'q', */ +#endif + MODE_REGONLY, 'R', + MODE_DELJOINS, 'D', + MODE_WASDELJOINS, 'd', /* MODE_KEY, 'k', */ /* MODE_BAN, 'b', */ MODE_LIMIT, 'l', @@ -1764,13 +1828,36 @@ bufptr_i = &rembuf_i; } +#if defined(DDB) || defined(SERVICES) + if (MB_TYPE(mbuf, i) & (MODE_OWNER | MODE_CHANOP | MODE_VOICE)) { +#else if (MB_TYPE(mbuf, i) & (MODE_CHANOP | MODE_VOICE)) { +#endif tmp = strlen(cli_name(MB_CLIENT(mbuf, i))); if ((totalbuflen - IRCD_MAX(5, tmp)) <= 0) /* don't overflow buffer */ MB_TYPE(mbuf, i) |= MODE_SAVE; /* save for later */ else { - bufptr[(*bufptr_i)++] = MB_TYPE(mbuf, i) & MODE_CHANOP ? 'o' : 'v'; + char mode_char = 0; +#if defined(DDB) || defined(SERVICES) + switch(MB_TYPE(mbuf, i) & (MODE_OWNER | MODE_CHANOP | MODE_VOICE)) +#else + switch(MB_TYPE(mbuf, i) & (MODE_CHANOP | MODE_VOICE)) +#endif + { +#if defined(DDB) || defined(SERVICES) + case MODE_OWNER: + mode_char = 'q'; + break; +#endif + case MODE_CHANOP: + mode_char = 'o'; + break; + case MODE_VOICE: + mode_char = 'v'; + break; + } + bufptr[(*bufptr_i)++] = mode_char; totalbuflen -= IRCD_MAX(5, tmp) + 1; } #if defined(UNDERNET) @@ -1855,7 +1942,11 @@ } /* deal with clients... */ +#if defined(DDB) || defined(SERVICES) + if (MB_TYPE(mbuf, i) & (MODE_OWNER | MODE_CHANOP | MODE_VOICE)) +#else if (MB_TYPE(mbuf, i) & (MODE_CHANOP | MODE_VOICE)) +#endif build_string(strptr, strptr_i, cli_name(MB_CLIENT(mbuf, i)), 0, ' '); /* deal with bans... */ @@ -1919,10 +2010,21 @@ addbuf_i ? "+" : "", addbuf, remstr, addstr); if (mbuf->mb_dest & MODEBUF_DEST_CHANNEL) - sendcmdto_channel_butserv_butone(app_source, CMD_MODE, mbuf->mb_channel, NULL, 0, - "%H %s%s%s%s%s%s", mbuf->mb_channel, - rembuf_i ? "-" : "", rembuf, - addbuf_i ? "+" : "", addbuf, remstr, addstr); + { +#if defined(DDB) + if (mbuf->mb_dest & MODEBUF_DEST_BOTMODE) + sendcmdbotto_channel_butserv_butone(ddb_get_botname(mbuf->mb_botname), + CMD_MODE, mbuf->mb_channel, NULL, 0, + "%H %s%s%s%s%s%s", mbuf->mb_channel, + rembuf_i ? "-" : "", rembuf, + addbuf_i ? "+" : "", addbuf, remstr, addstr); + else +#endif /* defined(DDB) */ + sendcmdto_channel_butserv_butone(app_source, CMD_MODE, mbuf->mb_channel, NULL, 0, + "%H %s%s%s%s%s%s", mbuf->mb_channel, + rembuf_i ? "-" : "", rembuf, + addbuf_i ? "+" : "", addbuf, remstr, addstr); + } } /* Now are we supposed to propagate to other servers? */ @@ -1952,7 +2054,11 @@ } /* deal with modes that take clients */ +#if defined(DDB) || defined(SERVICES) + if (MB_TYPE(mbuf, i) & (MODE_OWNER | MODE_CHANOP | MODE_VOICE)) +#else if (MB_TYPE(mbuf, i) & (MODE_CHANOP | MODE_VOICE)) +#endif build_string(strptr, strptr_i, NumNick(MB_CLIENT(mbuf, i)), ' '); /* deal with modes that take strings */ @@ -1998,6 +2104,15 @@ mbuf->mb_channel, addbuf_i ? "-" : "", addbuf, rembuf_i ? "+" : "", rembuf, addstr, remstr, mbuf->mb_channel->creationtime); +#if defined(DDB) + } else if (mbuf->mb_dest & MODEBUF_DEST_BOTMODE) { + sendcmdto_serv_butone(mbuf->mb_source, CMD_BMODE, mbuf->mb_connect, + "%s %H %s%s%s%s%s%s %Tu", mbuf->mb_botname, mbuf->mb_channel, + rembuf_i ? "-" : "", rembuf, addbuf_i ? "+" : "", + addbuf, remstr, addstr, + (mbuf->mb_dest & MODEBUF_DEST_HACK4) ? 0 : + mbuf->mb_channel->creationtime); +#endif /* defined(DDB) */ } else { /* * We're propagating a normal MODE command to the rest of the network; @@ -2075,6 +2190,9 @@ mbuf->mb_source = source; mbuf->mb_connect = connect; mbuf->mb_channel = chan; +#if defined(DDB) + mbuf->mb_botname = 0; +#endif mbuf->mb_dest = dest; mbuf->mb_count = 0; @@ -2100,6 +2218,9 @@ mode &= (MODE_ADD | MODE_DEL | MODE_PRIVATE | MODE_SECRET | MODE_MODERATED | MODE_TOPICLIMIT | MODE_INVITEONLY | MODE_NOPRIVMSGS | MODE_REGONLY | +#if defined(DDB) || defined(SERVICES) +/* MODE_REGCHAN | */ +#endif MODE_DELJOINS | MODE_WASDELJOINS); if (!(mode & ~(MODE_ADD | MODE_DEL))) /* don't add empty modes... */ @@ -2245,8 +2366,12 @@ #endif /* MODE_BAN, 'b', */ MODE_LIMIT, 'l', - MODE_REGONLY, 'r', - MODE_DELJOINS, 'D', +#if defined(DDB) || defined(SERVICES) + MODE_REGCHAN, 'r', +/* MODE_OWNER, 'q', */ +#endif + MODE_REGONLY, 'R', + MODE_DELJOINS, 'D', 0x0, 0x0 }; unsigned int add; @@ -3205,12 +3330,20 @@ if (IsDelayedJoin(member)) RevealDelayedJoin(member); member->status |= (state->cli_change[i].flag & +#if defined(DDB) || defined(SERVICES) + (MODE_OWNER |MODE_CHANOP | MODE_VOICE)); +#else (MODE_CHANOP | MODE_VOICE)); +#endif if (state->cli_change[i].flag & MODE_CHANOP) ClearDeopped(member); } else member->status &= ~(state->cli_change[i].flag & +#if defined(DDB) || defined(SERVICES) + (MODE_OWNER | MODE_CHANOP | MODE_VOICE)); +#else (MODE_CHANOP | MODE_VOICE)); +#endif } /* accumulate the change */ @@ -3285,8 +3418,12 @@ #endif MODE_BAN, 'b', MODE_LIMIT, 'l', - MODE_REGONLY, 'r', - MODE_DELJOINS, 'D', +#if defined(DDB) || defined(SERVICES) + MODE_OWNER, 'q', + MODE_REGCHAN, 'r', +#endif + MODE_REGONLY, 'R', + MODE_DELJOINS, 'D', MODE_ADD, '+', MODE_DEL, '-', 0x0, 0x0 @@ -3373,6 +3510,21 @@ mode_parse_ban(&state, flag_p); break; +#if defined(DDB) || defined(SERVICES) +# if defined(DDB) + case 'r': + break; +# endif + case 'q': + if (!IsServer(cptr) || (state.dir == MODE_ADD && + !(mbuf->mb_dest & MODEBUF_DEST_BOTMODE))) + /* state.flags |= MODE_PARSE_NOTADD; */ + break; + + mode_parse_client(&state, flag_p); + break; +#endif + case 'o': /* deal with ops/voice */ case 'v': mode_parse_client(&state, flag_p); @@ -3570,6 +3722,11 @@ sendcmdto_serv_butone(jbuf->jb_source, CMD_JOIN, jbuf->jb_connect, "%u:%H %Tu", oplevel, chan, chan->creationtime); else +#elif defined(DDB) + if (flags & CHFL_OWNER) + sendcmdto_serv_butone(jbuf->jb_source, CMD_JOIN, jbuf->jb_connect, + "0:%H %Tu", chan, chan->creationtime); + else #endif sendcmdto_serv_butone(jbuf->jb_source, CMD_JOIN, jbuf->jb_connect, "%H %Tu", chan, chan->creationtime); @@ -3585,6 +3742,17 @@ sendcmdto_channel_butserv_butone((chan->mode.apass[0] ? &me : jbuf->jb_source), CMD_MODE, chan, NULL, 0, "%H +o %C", chan, jbuf->jb_source); +#elif defined(DDB) + if (flags & CHFL_OWNER) + { + char *botname = ddb_get_botname(DDB_CHANSERV); + + sendcmdbotto_channel_butserv_butone(botname, CMD_MODE, chan, NULL, 0, + "%H +q %C", chan, jbuf->jb_source); + } + else if (flags & CHFL_CHANOP) + sendcmdto_channel_butserv_butone(&me, CMD_MODE, chan, NULL, 0, "%H +o %C", + chan, jbuf->jb_source); #else if (flags & CHFL_CHANOP) sendcmdto_channel_butserv_butone(&me, CMD_MODE, chan, NULL, 0, "%H +o %C", Index: ircd-ircdev/ircd/ddb.c diff -u ircd-ircdev/ircd/ddb.c:1.9 ircd-ircdev/ircd/ddb.c:1.10 --- ircd-ircdev/ircd/ddb.c:1.9 Mon May 16 03:17:26 2005 +++ ircd-ircdev/ircd/ddb.c Wed May 25 09:56:24 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Implementation of Distributed DataBase. - * @version $Id: ddb.c,v 1.9 2005/05/16 10:17:26 zolty Exp $ + * @version $Id: ddb.c,v 1.10 2005/05/25 16:56:24 zolty Exp $ */ #include "config.h" @@ -202,6 +202,8 @@ * The lengths MUST be powers of 2 and do not have * to be superior to HASHSIZE. */ + ddb_resident_table[DDB_CHANDB] = 4096; + ddb_resident_table[DDB_CHANDB2] = 32768; ddb_resident_table[DDB_ILINEDB] = 256; ddb_resident_table[DDB_NICKDB] = 32768; ddb_resident_table[DDB_CONFIGDB] = 256; @@ -687,7 +689,7 @@ { struct Ddb *ddb; - ddb = ddb_find_key(DDB_CONFIGDB, DDB_NICKSERV); + ddb = ddb_find_key(DDB_CONFIGDB, bot); if (ddb) return ddb_content(ddb); else Index: ircd-ircdev/ircd/ddb_events.c diff -u ircd-ircdev/ircd/ddb_events.c:1.4 ircd-ircdev/ircd/ddb_events.c:1.5 --- ircd-ircdev/ircd/ddb_events.c:1.4 Mon May 16 03:17:27 2005 +++ ircd-ircdev/ircd/ddb_events.c Wed May 25 09:56:24 2005 @@ -21,11 +21,12 @@ */ /** @file * @brief Events of Distributed DataBases. - * @version $Id: ddb_events.c,v 1.4 2005/05/16 10:17:27 zolty Exp $ + * @version $Id: ddb_events.c,v 1.5 2005/05/25 16:56:24 zolty Exp $ */ #include "config.h" #include "ddb.h" +#include "channel.h" #include "client.h" #include "hash.h" #include "ircd.h" @@ -44,6 +45,8 @@ /** Events table engine */ ddb_events_table_td ddb_events_table[DDB_TABLE_MAX]; +static void ddb_events_table_c(char *key, char *content, int update); +static void ddb_events_table_d(char *key, char *content, int update); static void ddb_events_table_n(char *key, char *content, int update); static void ddb_events_table_z(char *key, char *content, int update); @@ -56,6 +59,8 @@ if (events_init) return; + ddb_events_table[DDB_CHANDB] = ddb_events_table_c; + ddb_events_table[DDB_CHANDB2] = ddb_events_table_d; ddb_events_table[DDB_ILINEDB] = 0; ddb_events_table[DDB_NICKDB] = ddb_events_table_n; ddb_events_table[DDB_CONFIGDB] = ddb_events_table_z; @@ -63,6 +68,159 @@ events_init = 1; } +/** Handle events on Channel Table. + * @param[in] key Key of registry. + * @param[in] content Content of registry. + * @param[in] update Update of registry or no. + */ +static void +ddb_events_table_c(char *key, char *content, int update) +{ + struct Channel *chptr; + struct Client *founder; + char *botname = &me; + +// botname = ddb_get_botname(DDB_CHANSERV); + + if (content) + { + /* Nuevos o cambios de registro */ + /* Si no existe el canal lo creamos */ + chptr = get_channel(NULL, key, CGT_CREATE); + + /* Ponemos modo +r */ + if (!(chptr->mode.mode & MODE_REGCHAN)) + { + chptr->mode.mode |= MODE_REGCHAN; + if (chptr->users) + sendcmdbotto_channel_butserv_butone(botname, CMD_MODE, chptr, + NULL, 0, "%H +r", chptr); + } + + if (chptr->users) + { + struct Membership *member; + + /* Solo si el nuevo founder es nuestro usuario */ + founder = FindUser(content); + if (founder && MyUser(founder)) + { + if (update) + { + /* Si hay una actualizacion, borramos el antiguo */ + for (member = chptr->members; member; member = member->next_member) + { + if (IsChanOwner(member)) + { + ClearChanOwner(member); + sendcmdbotto_channel_butserv_butone(botname, CMD_MODE, + member->channel, NULL, 0, "%H -q %C", + member->channel, member->user); + sendcmdto_serv_butone(&me, CMD_BMODE, NULL, "%s %H -q %C", + DDB_CHANSERV, member->channel, member->user); + break; + } + } + } + member = find_member_link(chptr, founder); + if (member) + { + SetChanOwner(member); + sendcmdbotto_channel_butserv_butone(botname, CMD_MODE, + member->channel, NULL, 0, "%H +q %C", + member->channel, member->user); + sendcmdto_serv_butone(&me, CMD_BMODE, NULL, "%s %H +q %C", + DDB_CHANSERV, member->channel, member->user); + } + } + else if (!founder) + { + for (member = chptr->members; member; member = member->next_member) + { + if (IsChanOwner(member)) + { + ClearChanOwner(member); + if (MyUser(member->user)) + { + sendcmdbotto_channel_butserv_butone(botname, CMD_MODE, + member->channel, NULL, 0, "%H -q %C", + member->channel, member->user); + sendcmdto_serv_butone(&me, CMD_BMODE, NULL, "%s %H -q %C", + DDB_CHANSERV, member->channel, member->user); + } + break; + } + } + } + } + } + else + { + /* Canal dropado */ + chptr = get_channel(NULL, key, CGT_NO_CREATE); + + /* Borramos el canal */ + if (chptr && ((chptr->mode.mode) & MODE_REGCHAN)) + { + chptr->mode.mode &= ~MODE_REGCHAN; + if (chptr->users) + { + struct Membership *member; + + /* Quitar -q */ + for (member = chptr->members; member; member = member->next_member) + { + if (IsChanOwner(member)) + { + ClearChanOwner(member); + if (MyUser(member->user)) + { + sendcmdbotto_channel_butserv_butone(botname, CMD_MODE, + member->channel, NULL, 0, "%H -q %C", + member->channel, member->user); + sendcmdto_serv_butone(&me, CMD_BMODE, NULL, "%s %H -q %C", + DDB_CHANSERV, member->channel, member->user); + } + break; + } + } + + /* quitar -r */ + sendcmdbotto_channel_butserv_butone(botname, CMD_MODE, chptr, + NULL, 0, "%H -r", chptr); + } + else + sub1_from_channel(chptr); + } + } +} + +/** Handle events on Channel Table 2. + * @param[in] key Key of registry. + * @param[in] content Content of registry. + * @param[in] update Update of registry or no. + */ +static void +ddb_events_table_d(char *key, char *content, int update) +{ +#if 0 + char *channel; + char *nick; + + strcpy(channel, key); + nick = strchr(channel, ':'); + if (nick) + *nick++ = '\0'; + + Debug((DEBUG_INFO, "DDB: channel: %s nick: %s", channel, nick ? nick : "NONE")); + + if (content && nick) + + else if (!content && nick) + +#endif +} + /** Handle events on Nick Table. * @param[in] key Key of registry. * @param[in] content Content of registry. Index: ircd-ircdev/ircd/hash.c diff -u ircd-ircdev/ircd/hash.c:1.9 ircd-ircdev/ircd/hash.c:1.10 --- ircd-ircdev/ircd/hash.c:1.9 Sat Apr 2 11:47:35 2005 +++ ircd-ircdev/ircd/hash.c Wed May 25 09:56:24 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Hash table management. - * @version $Id: hash.c,v 1.9 2005/04/02 19:47:35 zolty Exp $ + * @version $Id: hash.c,v 1.10 2005/05/25 16:56:24 zolty Exp $ * * This file used to use some very complicated hash function. Now it * uses CRC-32, but effectively remaps each input byte according to a @@ -508,7 +508,7 @@ /* Send all the matching channels in the bucket. */ for (chptr = channelTable[args->bucket]; chptr; chptr = chptr->hnext) { - if (chptr->users > args->min_users + if (chptr->users >= args->min_users && chptr->users < args->max_users && chptr->creationtime > args->min_time && chptr->creationtime < args->max_time Index: ircd-ircdev/ircd/m_bmode.c diff -u /dev/null ircd-ircdev/ircd/m_bmode.c:1.1 --- /dev/null Wed May 25 09:56:36 2005 +++ ircd-ircdev/ircd/m_bmode.c Wed May 25 09:56:24 2005 @@ -0,0 +1,80 @@ +/* + * IRC-Dev IRCD - An advanced and innovative IRC Daemon, ircd/m_bmode.c + * + * Copyright (C) 2002-2005 IRC-Dev Development Team <de...@ir...> + * Copyright (C) 2004-2005 Toni García (zoltan) zo...@ir...> + * + * 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 + * + */ +/** @file + * @brief Handlers for BMODE command (Bot Mode). + * @version $Id: m_bmode.c,v 1.1 2005/05/25 16:56:24 zolty Exp $ + */ + +#include "config.h" + +#include "channel.h" +#include "client.h" +#include "hash.h" +#include "ircd.h" +#include "ircd_reply.h" + +#include <stdlib.h> + +/** Handle a BMODE message from another server. + * + * \a parv[1] is a name of virtual bot. + * \a parv[2] is a channel. + * \a parv[3] is a modes. + * \a parv[4..n] is a parameters. + * + * See @ref m_functions for discussion of the arguments. + * @param[in] cptr Client that sent us the message. + * @param[in] sptr Original source of message. + * @param[in] parc Number of arguments. + * @param[in] parv Argument vector. + */ +int +ms_bmode(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) +{ + struct Channel *chptr; + struct ModeBuf mbuf; + + if (parc < 4) + return need_more_params(sptr, "BMODE"); + + if (!(chptr = FindChannel(parv[2]))) + return protocol_violation(sptr, "Attemped to set BMODE on inexistant channel (%s)", parv[2]); + + if (IsLocalChannel(chptr->chname)) + return protocol_violation(sptr, "Attemped to set BMODE on local channel"); + + ClrFlag(sptr, FLAG_TS8); + + modebuf_init(&mbuf, sptr, cptr, chptr, + (MODEBUF_DEST_CHANNEL | /* Send mode to clients */ + MODEBUF_DEST_SERVER | /* Send mode to servers */ + MODEBUF_DEST_BOTMODE)); /* Botmode */ + + mbuf.mb_botname = parv[1]; + + mode_parse(&mbuf, cptr, sptr, chptr, parc - 3, parv + 3, + (MODE_PARSE_SET | /* Set the mode */ + MODE_PARSE_STRICT | /* Interpret it strictly */ + MODE_PARSE_FORCE), /* And force it to be accepted */ + NULL); + return modebuf_flush(&mbuf); +} Index: ircd-ircdev/ircd/m_join.c diff -u ircd-ircdev/ircd/m_join.c:1.11 ircd-ircdev/ircd/m_join.c:1.12 --- ircd-ircdev/ircd/m_join.c:1.11 Sat May 7 15:23:40 2005 +++ ircd-ircdev/ircd/m_join.c Wed May 25 09:56:24 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_join.c,v 1.11 2005/05/07 22:23:40 zolty Exp $ + * $Id: m_join.c,v 1.12 2005/05/25 16:56:24 zolty Exp $ * */ @@ -82,6 +82,7 @@ #include "channel.h" #include "client.h" +#include "ddb.h" #include "gline.h" #include "hash.h" #include "ircd.h" @@ -258,11 +259,25 @@ flags |= CHFL_CHANOP; } } +#elif defined(DDB) + struct Ddb *ddb; + int is_owner = 0; + + ddb = ddb_find_key(DDB_CHANDB, chptr->chname); + if ((ddb) && !ircd_strcmp(ddb_content(ddb), cli_name(sptr))) + { + is_owner = 1; + flags &= ~CHFL_DEOPPED; + flags |= CHFL_OWNER; + } #endif + if (check_target_limit(sptr, chptr, chptr->chname, 0)) continue; /* exceeded target limit */ #if defined(UNDERNET) else if (!is_level0_op && (i = can_join(sptr, chptr, keys))) { +#elif defined(DDB) + else if (!is_owner && (i = can_join(sptr, chptr, keys))) { #else else if ((i = can_join(sptr, chptr, keys))) { #endif @@ -285,7 +300,7 @@ break; case ERR_NEEDREGGEDNICK: - i = 'r'; + i = 'R'; break; default: @@ -382,10 +397,14 @@ if (join0(&join, cptr, sptr, name)) /* did client do a JOIN 0? */ continue; -#if defined(UNDERNET) +#if defined(UNDERNET) || defined(DDB) if (name[0] == '0' && name[1] == ':') { +# if defined(UNDERNET) flags = CHFL_CHANOP | CHFL_CHANNEL_MANAGER; +# else + flags = CHFL_OWNER; +# endif name += 2; } else if (name[0] == '1' && name[1] == ':') @@ -394,8 +413,8 @@ name += 2; } else - flags = CHFL_DEOPPED; #endif + flags = CHFL_DEOPPED; if (IsLocalChannel(name) || !IsChannelName(name)) { Index: ircd-ircdev/ircd/m_kick.c diff -u ircd-ircdev/ircd/m_kick.c:1.8 ircd-ircdev/ircd/m_kick.c:1.9 --- ircd-ircdev/ircd/m_kick.c:1.8 Fri Apr 22 09:22:13 2005 +++ ircd-ircdev/ircd/m_kick.c Wed May 25 09:56:24 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_kick.c,v 1.8 2005/04/22 16:22:13 zolty Exp $ + * $Id: m_kick.c,v 1.9 2005/05/25 16:56:24 zolty Exp $ * */ @@ -122,8 +122,13 @@ if (!(chptr = get_channel(sptr, name, CGT_NO_CREATE))) return send_reply(sptr, ERR_NOSUCHCHANNEL, name); +#if defined(DDB) || defined(SERVICES) + if (!(member2 = find_member_link(chptr, sptr)) || IsZombie(member2) + || !(IsChanOp(member2) || IsChanOwner(member2))) +#else if (!(member2 = find_member_link(chptr, sptr)) || IsZombie(member2) || !IsChanOp(member2)) +#endif return send_reply(sptr, ERR_CHANOPRIVSNEEDED, name); if (!(who = find_chasing(sptr, parv[2], 0))) @@ -147,8 +152,13 @@ return send_reply(sptr, ERR_NOTLOWEROPLEVEL, cli_name(who), chptr->chname, OpLevel(member2), OpLevel(member), "kick", OpLevel(member) == OpLevel(member2) ? "the same" : "a higher"); +#elif defined(DDB) || defined(SERVICES) + /* Don't allow to kick channel owner */ + if (IsChanOwner(member) && !IsOper(sptr)) + return send_reply(sptr, ERR_ISCHANSERVICE, cli_name(who), chptr->chname); #endif + /* We rely on ircd_snprintf to truncate the comment */ comment = EmptyString(parv[parc - 1]) ? parv[0] : parv[parc - 1]; Index: ircd-ircdev/ircd/m_mode.c diff -u ircd-ircdev/ircd/m_mode.c:1.6 ircd-ircdev/ircd/m_mode.c:1.7 --- ircd-ircdev/ircd/m_mode.c:1.6 Mon Jan 10 04:23:02 2005 +++ ircd-ircdev/ircd/m_mode.c Wed May 25 09:56:24 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_mode.c,v 1.6 2005/01/10 12:23:02 zolty Exp $ + * $Id: m_mode.c,v 1.7 2005/05/25 16:56:24 zolty Exp $ * */ @@ -131,7 +131,11 @@ return 0; } +#if defined(DDB) || defined(SERVICES) + if (!member || !(IsChanOwner(member) || IsChanOp(member))) { +#else if (!member || !IsChanOp(member)) { +#endif if (IsLocalChannel(chptr->chname) && HasPriv(sptr, PRIV_MODE_LCHAN)) { modebuf_init(&mbuf, sptr, cptr, chptr, (MODEBUF_DEST_CHANNEL | /* Send mode to channel */ @@ -200,7 +204,12 @@ MODE_PARSE_FORCE), /* And force it to be accepted */ NULL); } else { +#if defined(DDB) || defined(SERVICES) + if (!(member = find_member_link(chptr, sptr)) || !(IsChanOwner(member) + || IsChanOp(member))) { +#else if (!(member = find_member_link(chptr, sptr)) || !IsChanOp(member)) { +#endif modebuf_init(&mbuf, sptr, cptr, chptr, (MODEBUF_DEST_SERVER | /* Send mode to server */ MODEBUF_DEST_HACK2 | /* Send a HACK(2) message */ Index: ircd-ircdev/ircd/m_names.c diff -u ircd-ircdev/ircd/m_names.c:1.8 ircd-ircdev/ircd/m_names.c:1.9 --- ircd-ircdev/ircd/m_names.c:1.8 Mon Mar 21 10:39:08 2005 +++ ircd-ircdev/ircd/m_names.c Wed May 25 09:56:24 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_names.c,v 1.8 2005/03/21 18:39:08 zolty Exp $ + * $Id: m_names.c,v 1.9 2005/05/25 16:56:24 zolty Exp $ * */ @@ -171,18 +171,22 @@ strcat(buf, "!"); idx++; } - else +#if defined(DDB) || defined(SERVICES) + else if (IsChanOwner(member)) { - if (IsChanOp(member)) - { - strcat(buf, "@"); - idx++; - } - if (HasVoice(member)) - { - strcat(buf, "+"); - idx++; - } + strcat(buf, "."); + idx++; + } +#endif + else if (IsChanOp(member)) + { + strcat(buf, "@"); + idx++; + } + else if (HasVoice(member)) + { + strcat(buf, "+"); + idx++; } strcat(buf, cli_name(c2ptr)); idx += strlen(cli_name(c2ptr)); Index: ircd-ircdev/ircd/m_whois.c diff -u ircd-ircdev/ircd/m_whois.c:1.13 ircd-ircdev/ircd/m_whois.c:1.14 --- ircd-ircdev/ircd/m_whois.c:1.13 Thu Mar 31 04:58:04 2005 +++ ircd-ircdev/ircd/m_whois.c Wed May 25 09:56:24 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_whois.c,v 1.13 2005/03/31 12:58:04 zolty Exp $ + * $Id: m_whois.c,v 1.14 2005/05/25 16:56:24 zolty Exp $ */ /* @@ -177,15 +177,16 @@ *(buf + len++) = '*'; if (IsDelayedJoin(chan) && (sptr != acptr)) *(buf + len++) = '<'; +#if defined(DDB) || defined(SERVICES) + else if (IsChanOwner(chan)) + *(buf + len++) = '.'; +#endif + else if (IsChanOp(chan)) + *(buf + len++) = '@'; + else if (HasVoice(chan)) + *(buf + len++) = '+'; else if (IsZombie(chan)) *(buf + len++) = '!'; - else - { - if (IsChanOp(chan)) - *(buf + len++) = '@'; - if (HasVoice(chan)) - *(buf + len++) = '+'; - } if (len) *(buf + len) = '\0'; strcpy(buf + len, chptr->chname); Index: ircd-ircdev/ircd/parse.c diff -u ircd-ircdev/ircd/parse.c:1.15 ircd-ircdev/ircd/parse.c:1.16 --- ircd-ircdev/ircd/parse.c:1.15 Sat Apr 2 11:47:35 2005 +++ ircd-ircdev/ircd/parse.c Wed May 25 09:56:24 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Parse input from IRC clients and other servers. - * @version $Id: parse.c,v 1.15 2005/04/02 19:47:35 zolty Exp $ + * @version $Id: parse.c,v 1.16 2005/05/25 16:56:24 zolty Exp $ */ #include "config.h" @@ -657,6 +657,13 @@ { m_unregistered, m_not_oper, ms_dbq, mo_dbq, m_ignore } }, { + MSG_BMODE, + TOK_BMODE, + 0, MAXPARA, MFLG_SLOW, 0, NULL, + /* UNREG, CLIENT, SERVER, OPER, SERVICE */ + { m_ignore, m_ignore, ms_bmode, m_ignore, m_ignore } + }, + { MSG_GHOST, TOK_GHOST, 0, MAXPARA, MFLG_SLOW, 0, NULL, Index: ircd-ircdev/ircd/s_user.c diff -u ircd-ircdev/ircd/s_user.c:1.19 ircd-ircdev/ircd/s_user.c:1.20 --- ircd-ircdev/ircd/s_user.c:1.19 Mon May 23 01:58:37 2005 +++ ircd-ircdev/ircd/s_user.c Wed May 25 09:56:24 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Miscellaneous user-related helper functions. - * @version $Id: s_user.c,v 1.19 2005/05/23 08:58:37 zolty Exp $ + * @version $Id: s_user.c,v 1.20 2005/05/25 16:56:24 zolty Exp $ */ #include "config.h" @@ -1001,6 +1001,10 @@ { const char* channel_name; struct Membership *member; +#if defined(DDB) + char *botname2; +#endif + if ((channel_name = find_no_nickchange_channel(sptr)) && !IsRenamed(flags)) { return send_reply(cptr, ERR_BANNICKCHANGE, channel_name); } @@ -1030,9 +1034,27 @@ cli_nextnick(cptr) = CurrentTime; } /* Invalidate all bans against the user so we check them again */ +#if defined(DDB) + botname2 = ddb_get_botname(DDB_CHANSERV); +#endif + for (member = (cli_user(cptr))->channel; member; member = member->next_channel) + { ClearBanValid(member); +#if defined(DDB) + if (MyUser(member->user) && IsChanOwner(member)) + { + ClearChanOwner(member); + + sendcmdbotto_channel_butserv_butone(botname2, CMD_MODE, + member->channel, NULL, 0, "%H -q %C", + member->channel, member->user); + sendcmdto_serv_butone(&me, CMD_BMODE, NULL, "%s %H -q %C", + DDB_CHANSERV, member->channel, member->user); + } +#endif + } } #if defined(DDB) Index: ircd-ircdev/ircd/send.c diff -u ircd-ircdev/ircd/send.c:1.7 ircd-ircdev/ircd/send.c:1.8 --- ircd-ircdev/ircd/send.c:1.7 Thu Mar 31 04:58:04 2005 +++ ircd-ircdev/ircd/send.c Wed May 25 09:56:25 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Send messages to certain targets. - * @version $Id: send.c,v 1.7 2005/03/31 12:58:04 zolty Exp $ + * @version $Id: send.c,v 1.8 2005/05/25 16:56:25 zolty Exp $ */ #include "config.h" @@ -308,6 +308,7 @@ msgq_clean(mb); } +#if defined(DDB) /** Send a bot command to a single client. * @param[in] botname Bot sending the command. * @param[in] cmd Long name of command (used if \a to is a user). @@ -315,7 +316,7 @@ * @param[in] to Destination of command. * @param[in] pattern Format string for command arguments. */ -void sendcmdbotto_one(char *botname, const char *cmd, const char *tok, +void sendcmdbotto_one(const char *botname, const char *cmd, const char *tok, struct Client *to, const char *pattern, ...) { struct VarData vd; @@ -335,6 +336,7 @@ msgq_clean(mb); } +#endif /* defined(DDB) */ /** Send a (prefixed) command to a single client. * @param[in] from Client sending the command. @@ -542,6 +544,48 @@ msgq_clean(mb); } +#if defined(DDB) +/** Send a bot command to all local users on a channel. + * @param[in] botname Bot sending the command. + * @param[in] cmd Long name of command. + * @param[in] tok Short name of command (ignored). + * @param[in] to Destination channel. + * @param[in] one Client direction to skip (or NULL). + * @param[in] skip Bitmask of SKIP_DEAF, SKIP_NONOPS, SKIP_NONVOICES indicating which clients to skip. + * @param[in] pattern Format string for command arguments. + */ +void sendcmdbotto_channel_butserv_butone(const char *botname, const char *cmd, + const char *tok, struct Channel *to, + struct Client *one, unsigned int skip, + const char *pattern, ...) +{ + struct VarData vd; + struct MsgBuf *mb; + struct Membership *member; + + vd.vd_format = pattern; /* set up the struct VarData for %v */ + va_start(vd.vd_args, pattern); + + /* build the buffer */ + mb = msgq_make(0, ":%s %s %v", botname, cmd, &vd); + va_end(vd.vd_args); + + /* send the buffer to each local channel member */ + for (member = to->members; member; member = member->next_member) { + if (!MyConnect(member->user) + || member->user == one + || IsZombie(member) + || (skip & SKIP_DEAF && IsDeaf(member->user)) + || (skip & SKIP_NONOPS && !IsChanOp(member)) + || (skip & SKIP_NONVOICES && !IsChanOp(member) && !HasVoice(member))) + continue; + send_buffer(member->user, mb, 0); + } + + msgq_clean(mb); +} +#endif /* defined(DDB) */ + /** Send a (prefixed) command to all local users on a channel. * @param[in] from Client originating the command. * @param[in] cmd Long name of command. Index: ircd-ircdev/ircd/whocmds.c diff -u ircd-ircdev/ircd/whocmds.c:1.8 ircd-ircdev/ircd/whocmds.c:1.9 --- ircd-ircdev/ircd/whocmds.c:1.8 Thu Mar 31 04:58:04 2005 +++ ircd-ircdev/ircd/whocmds.c Wed May 25 09:56:25 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Support functions for /WHO-like commands. - * @version $Id: whocmds.c,v 1.8 2005/03/31 12:58:04 zolty Exp $ + * @version $Id: whocmds.c,v 1.9 2005/05/25 16:56:25 zolty Exp $ */ #include "config.h" @@ -169,6 +169,10 @@ * multiple channel status flags, as this is currently the only * way to know if someone has @'s *and* is +'d. */ +#if defined(DDB) || defined(SERVICES) + if (chptr && is_chan_owner(acptr, chptr)) + *(p1++) = '.'; +#endif if (chptr && is_chan_op(acptr, chptr)) *(p1++) = '@'; if (chptr && has_voice(acptr, chptr)) @@ -177,7 +181,17 @@ *(p1++) = '!'; } else { - if (chptr && is_zombie(acptr, chptr)) +#if defined(DDB) || defined(SERVICES) + if (chptr && is_chan_owner(acptr, chptr)) + *(p1++) = '.'; + else if (chptr && is_chan_op(acptr, chptr)) +#else + if (chptr && is_chan_op(acptr, chptr)) +#endif + *(p1++) = '@'; + else if (chptr && has_voice(acptr, chptr)) + *(p1++) = '+'; + else if (chptr && is_zombie(acptr, chptr)) *(p1++) = '!'; else { ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2005-05-26 10:34:30
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-05-26 10:34:23 UTC Modified files: ChangeLog ChangeLog.es include/patchlevel.h ircd/channel.c ircd/ddb_events.c ircd/m_burst.c ircd/m_kick.c ircd/m_mode.c Log message: Author: zoltan <zo...@ir...> Log message: 2005-05-26 Toni García <zo...@ir...> 1.0.alpha38 * Fix de bugs de la release anterior ---------------------- diff included ---------------------- Index: ircd-ircdev/ChangeLog diff -u ircd-ircdev/ChangeLog:1.39 ircd-ircdev/ChangeLog:1.40 --- ircd-ircdev/ChangeLog:1.39 Wed May 25 09:56:22 2005 +++ ircd-ircdev/ChangeLog Thu May 26 03:34:12 2005 @@ -1,10 +1,13 @@ # # ChangeLog for ircd-ircdev # -# $Id: ChangeLog,v 1.39 2005/05/25 16:56:22 zolty Exp $ +# $Id: ChangeLog,v 1.40 2005/05/26 10:34:12 zolty Exp $ # # Insert new changes at beginning of the change list. # +2005-05-26 Toni García <zo...@ir...> 1.0.alpha38 + * Fix bugs last release. + 2005-05-25 Toni García <zo...@ir...> 1.0.alpha37 * Registered channels (with mode +r) * Owner/founder mode (+q) Index: ircd-ircdev/ChangeLog.es diff -u ircd-ircdev/ChangeLog.es:1.39 ircd-ircdev/ChangeLog.es:1.40 --- ircd-ircdev/ChangeLog.es:1.39 Wed May 25 09:56:22 2005 +++ ircd-ircdev/ChangeLog.es Thu May 26 03:34:13 2005 @@ -1,10 +1,13 @@ # # Log de Cambios para ircd-ircdev # -# $Id: ChangeLog.es,v 1.39 2005/05/25 16:56:22 zolty Exp $ +# $Id: ChangeLog.es,v 1.40 2005/05/26 10:34:13 zolty Exp $ # # Insertar los nuevos cambios al principio de esta lista de cambios. # +2005-05-26 Toni García <zo...@ir...> 1.0.alpha38 + * Fix de bugs de la release anterior + 2005-05-25 Toni García <zo...@ir...> 1.0.alpha37 * Canales registrados (con modo +r) * Modo owner/founder (+q) Index: ircd-ircdev/include/patchlevel.h diff -u ircd-ircdev/include/patchlevel.h:1.38 ircd-ircdev/include/patchlevel.h:1.39 --- ircd-ircdev/include/patchlevel.h:1.38 Wed May 25 09:56:23 2005 +++ ircd-ircdev/include/patchlevel.h Thu May 26 03:34:13 2005 @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: patchlevel.h,v 1.38 2005/05/25 16:56:23 zolty Exp $ + * $Id: patchlevel.h,v 1.39 2005/05/26 10:34:13 zolty Exp $ * */ -#define PATCHLEVEL ".alpha37" +#define PATCHLEVEL ".alpha38" #define RELEASE "1.0" Index: ircd-ircdev/ircd/channel.c diff -u ircd-ircdev/ircd/channel.c:1.22 ircd-ircdev/ircd/channel.c:1.23 --- ircd-ircdev/ircd/channel.c:1.22 Wed May 25 09:56:24 2005 +++ ircd-ircdev/ircd/channel.c Thu May 26 03:34:13 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Channel management and maintanance - * @version $Id: channel.c,v 1.22 2005/05/25 16:56:24 zolty Exp $ + * @version $Id: channel.c,v 1.23 2005/05/26 10:34:13 zolty Exp $ */ #include "config.h" @@ -230,10 +230,10 @@ * * @param chptr The channel to subtract one from. * - * defined(UNDERNET) + * defined(UNDERNET) || defined(DDB) * @returns true (1) if channel still has members. * false (0) if the channel is now empty. - * !defined(UNDERNET) + * else * Returns: true (1) if channel still exists * false (0) if the channel was destroyed */ @@ -277,7 +277,7 @@ #elif defined(DDB) chptr->users = 0; - if (!chptr->mode.mode & MODE_REGCHAN) + if (!(chptr->mode.mode & MODE_REGCHAN)) destruct_channel(chptr); #else @@ -303,28 +303,6 @@ assert(0 == chptr->members); -#if 0 -/* FIXME-ZOLTAN BORRAR!! - * Esto es listado de canales de /list, si se borra... se borra - * del list pendiente, pero parece ser que no es necesario ¿? */ - /* Channel became (or was) empty: Remove channel */ - if (is_listed(chptr)) - { - int i; - for (i = 0; i <= HighestFd; i++) - { - struct Client *acptr = 0; - if ((acptr = LocalClientArray[i]) && cli_listing(acptr) && - (cli_listing(acptr))->chptr == chptr) - { - list_next_channels(acptr, 1); - break; /* Only one client can list a channel */ - } - } - } -*/ -#endif - /* * Now, find all invite links from channel structure */ Index: ircd-ircdev/ircd/ddb_events.c diff -u ircd-ircdev/ircd/ddb_events.c:1.5 ircd-ircdev/ircd/ddb_events.c:1.6 --- ircd-ircdev/ircd/ddb_events.c:1.5 Wed May 25 09:56:24 2005 +++ ircd-ircdev/ircd/ddb_events.c Thu May 26 03:34:13 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Events of Distributed DataBases. - * @version $Id: ddb_events.c,v 1.5 2005/05/25 16:56:24 zolty Exp $ + * @version $Id: ddb_events.c,v 1.6 2005/05/26 10:34:13 zolty Exp $ */ #include "config.h" @@ -78,9 +78,12 @@ { struct Channel *chptr; struct Client *founder; - char *botname = &me; - -// botname = ddb_get_botname(DDB_CHANSERV); + char *botname; + + if (ddb_count_table[DDB_CONFIGDB]) + botname = ddb_get_botname(DDB_CHANSERV); + else + botname = cli_name(&me); if (content) { Index: ircd-ircdev/ircd/m_burst.c diff -u ircd-ircdev/ircd/m_burst.c:1.10 ircd-ircdev/ircd/m_burst.c:1.11 --- ircd-ircdev/ircd/m_burst.c:1.10 Mon Apr 11 01:45:00 2005 +++ ircd-ircdev/ircd/m_burst.c Thu May 26 03:34:13 2005 @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_burst.c,v 1.10 2005/04/11 08:45:00 zolty Exp $ + * $Id: m_burst.c,v 1.11 2005/05/26 10:34:13 zolty Exp $ * */ @@ -125,7 +125,7 @@ case 'l': ++parv; break; - case 'r': + case 'R': result |= MODE_REGONLY; break; } @@ -263,6 +263,8 @@ && (!(check_modes & MODE_INVITEONLY) || IsAnOper(member->user)) #if defined(UNDERNET) && (!(check_modes & MODE_REGONLY) || IsAccount(member->user))) +#elif defined (DDB) || defined(SERVICES) + && (!(check_modes & MODE_REGONLY) || IsNickRegistered(member->user))) #else ) #endif @@ -479,7 +481,13 @@ #else for (current_mode = base_mode; *ptr; ptr++) { +#if defined(DDB) || defined(SERVICES) + if (*ptr == 'q') /* has owner status */ + current_mode = (current_mode & ~(CHFL_DEOPPED | CHFL_DELAYED)) | CHFL_OWNER; + else if (*ptr == 'o') /* has oper status */ +#else if (*ptr == 'o') /* has oper status */ +#endif current_mode = (current_mode & ~(CHFL_DEOPPED | CHFL_DELAYED)) | CHFL_CHANOP; else if (*ptr == 'v') /* has voice status */ current_mode = (current_mode & ~CHFL_DELAYED) | CHFL_VOICE; @@ -544,6 +552,10 @@ #else nickstr[nickpos++] = ':'; /* add a specifier */ +#if defined(DDB) || defined(SERVICES) + if (current_mode & CHFL_OWNER) + nickstr[nickpos++] = 'q'; +#endif if (current_mode & CHFL_CHANOP) nickstr[nickpos++] = 'o'; if (current_mode & CHFL_VOICE) @@ -580,6 +592,10 @@ /* first deal with channel members */ for (member = chptr->members; member; member = member->next_member) { if (member->status & CHFL_BURST_JOINED) { /* joined during burst */ +#if defined(DDB) || defined(SERVICES) + if (member->status & CHFL_OWNER) + modebuf_mode_client(mbuf, MODE_ADD | CHFL_OWNER, member->user); +#endif #if defined(UNDERNET) if ((member->status & CHFL_CHANOP) && !(member->status & CHFL_BURST_ALREADY_OPPED)) #else @@ -600,6 +616,8 @@ member->status = (member->status #if defined(UNDERNET) & ~(CHFL_CHANNEL_MANAGER | CHFL_CHANOP | CHFL_VOICE)) +#elif defined(DDB) || defined(SERVICES) + & ~(CHFL_OWNER | CHFL_CHANOP | CHFL_VOICE)) #else & ~(CHFL_CHANOP | CHFL_VOICE)) #endif Index: ircd-ircdev/ircd/m_kick.c diff -u ircd-ircdev/ircd/m_kick.c:1.9 ircd-ircdev/ircd/m_kick.c:1.10 --- ircd-ircdev/ircd/m_kick.c:1.9 Wed May 25 09:56:24 2005 +++ ircd-ircdev/ircd/m_kick.c Thu May 26 03:34:13 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_kick.c,v 1.9 2005/05/25 16:56:24 zolty Exp $ + * $Id: m_kick.c,v 1.10 2005/05/26 10:34:13 zolty Exp $ * */ @@ -124,7 +124,7 @@ #if defined(DDB) || defined(SERVICES) if (!(member2 = find_member_link(chptr, sptr)) || IsZombie(member2) - || !(IsChanOp(member2) || IsChanOwner(member2))) + || !(IsChanOwner(member2) || IsChanOp(member2))) #else if (!(member2 = find_member_link(chptr, sptr)) || IsZombie(member2) || !IsChanOp(member2)) @@ -227,8 +227,13 @@ * here), if kicker is not on channel, or if kicker is not a channel * operator, bounce the kick */ +#if defined(DDB) || defined(SERVICES) + if (!IsServer(sptr) && member && cli_from(who) != cptr && !IsService(cli_user(sptr)->server) && + (!(sptr_link = find_member_link(chptr, sptr)) || !(IsChanOwner(sptr_link) || IsChanOp(sptr_link)))) { +#else if (!IsServer(sptr) && member && cli_from(who) != cptr && (!(sptr_link = find_member_link(chptr, sptr)) || !IsChanOp(sptr_link))) { +#endif sendto_opmask_butone(0, SNO_HACK2, "HACK: %C KICK %H %C %s", sptr, chptr, who, comment); Index: ircd-ircdev/ircd/m_mode.c diff -u ircd-ircdev/ircd/m_mode.c:1.7 ircd-ircdev/ircd/m_mode.c:1.8 --- ircd-ircdev/ircd/m_mode.c:1.7 Wed May 25 09:56:24 2005 +++ ircd-ircdev/ircd/m_mode.c Thu May 26 03:34:13 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_mode.c,v 1.7 2005/05/25 16:56:24 zolty Exp $ + * $Id: m_mode.c,v 1.8 2005/05/26 10:34:13 zolty Exp $ * */ @@ -205,7 +205,16 @@ NULL); } else { #if defined(DDB) || defined(SERVICES) - if (!(member = find_member_link(chptr, sptr)) || !(IsChanOwner(member) + if (IsService(cli_user(sptr)->server)) { + modebuf_init(&mbuf, sptr, cptr, chptr, + (MODEBUF_DEST_CHANNEL | /* Send mode to clients */ + MODEBUF_DEST_SERVER)); /* Send mode to servers */ + mode_parse(&mbuf, cptr, sptr, chptr, parc - 2, parv + 2, + (MODE_PARSE_SET | /* Set the mode */ + MODE_PARSE_STRICT | /* Interpret it strictly */ + MODE_PARSE_FORCE), /* And force it to be accepted */ + NULL); + } else if (!(member = find_member_link(chptr, sptr)) || !(IsChanOwner(member) || IsChanOp(member))) { #else if (!(member = find_member_link(chptr, sptr)) || !IsChanOp(member)) { ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2005-05-26 12:46:18
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-05-26 12:46:07 UTC Modified files: TODO.es Log message: Actualizacion TODO ---------------------- diff included ---------------------- Index: ircd-ircdev/TODO.es diff -u ircd-ircdev/TODO.es:1.25 ircd-ircdev/TODO.es:1.26 --- ircd-ircdev/TODO.es:1.25 Mon May 23 01:53:04 2005 +++ ircd-ircdev/TODO.es Thu May 26 05:45:57 2005 @@ -1,7 +1,7 @@ # # TODO para ircd-ircdev # -# $Id: TODO.es,v 1.25 2005/05/23 08:53:04 zolty Exp $ +# $Id: TODO.es,v 1.26 2005/05/26 12:45:57 zolty Exp $ # # Insertar las nuevas entradas al principio de la lista TODO. # @@ -63,6 +63,8 @@ - [G] Mirar el tema de control de Ilines por rangos, el tema es que con un /64 actualmente deja X clones para cada IP de ese rango, deberia haber alguna forma de que sea por rango. + - [D] Soporte de levels, mlock, topic, entrymsg de canales en la DDB. + - [G] Modo HalfOp (+h). [18:11:32] <Tor> quote opmode torcum #opers,#lala [18:11:38] <Tor> quote opmode #opers +nk lalala @@ -232,5 +234,4 @@ * Default: "ntCN" AUTOCHANMODES_LIST should contain the default channelmodes (e.g. -"ntCN") which will - be set by default on new channels. +"ntCN") which will be set by default on new channels. ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2005-05-26 15:50:14
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-05-26 15:50:06 UTC Modified files: TODO.es Log message: Actualizacion TODO ---------------------- diff included ---------------------- Index: ircd-ircdev/TODO.es diff -u ircd-ircdev/TODO.es:1.26 ircd-ircdev/TODO.es:1.27 --- ircd-ircdev/TODO.es:1.26 Thu May 26 05:45:57 2005 +++ ircd-ircdev/TODO.es Thu May 26 08:49:56 2005 @@ -1,7 +1,7 @@ # # TODO para ircd-ircdev # -# $Id: TODO.es,v 1.26 2005/05/26 12:45:57 zolty Exp $ +# $Id: TODO.es,v 1.27 2005/05/26 15:49:56 zolty Exp $ # # Insertar las nuevas entradas al principio de la lista TODO. # @@ -22,14 +22,14 @@ notices de auth y dnslookup al conectar. - [D] Virtualhost personalizado a traves de la DDB. - [D] U-lines a traves de la DDB. + - [D] Mejorar la inicializacion de las DDB con los eventos. PRIORIDAD MEDIA -------------------------------------------------------------------------------------- - [D] DDB: compactado. - [G] Caracter '~' en los nicks. - - [G] Los clientes con +k han de poder "hablar" en canales. - - [G] Mostrar tiempo en formato humano en las G-lines. + - [G] Mostrar tiempo en formato humano en las G-lines y Jupes. - [G] Enviar un Closing Link en los QUIT. - [G] Cuando nos silencian, que salga un numerico. - [G] Estudiar sobre la conveniencia de mandar privmsg globales al nick en vez de a @@ -100,6 +100,9 @@ 15/Mar/2005 - [G] Bajo en ciertas circunstancias desconocidas del ircd.conf no pueden entrar clientes al IRCD. Investigar eso. +26/May/2005 + - [D] Los cambios de modos en canal, a veces hay desyncs. Investigar el origen + - [D] Antes de un netjoin, un /mode #canal mostraba +r, despues ya no. Leyenda: [G] General ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2005-05-31 11:11:22
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-05-31 11:11:12 UTC Modified files: ircd/test/Makefile.in ircd/test/channel-1.cmd ircd/test/client-1.cmd ircd/test/gline-1.cmd ircd/test/ircd-t1.conf ircd/test/run-tests.sh ircd/test/stats-1.cmd ircd/test/test-driver.pl ircd/test/test_stub.c Added files: ircd/test/commands-1.cmd ircd/test/feature-1.cmd ircd/test/ircd-t1-2.conf ircd/test/ircd-t2.conf ircd/test/ircd_match_t.c ircd/test/jupe-1.cmd ircd/test/kill-block-1.cmd Log message: Nuevos tests ---------------------- diff included ---------------------- Index: ircd-ircdev/ircd/test/Makefile.in diff -u ircd-ircdev/ircd/test/Makefile.in:1.3 ircd-ircdev/ircd/test/Makefile.in:1.4 --- ircd-ircdev/ircd/test/Makefile.in:1.3 Wed Jan 26 09:19:48 2005 +++ ircd-ircdev/ircd/test/Makefile.in Tue May 31 04:10:52 2005 @@ -18,7 +18,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA -# $Id: Makefile.in,v 1.3 2005/01/26 17:19:48 zolty Exp $ +# $Id: Makefile.in,v 1.4 2005/05/31 11:10:52 zolty Exp $ top_srcdir = @top_srcdir@ srcdir = @srcdir@ @@ -29,12 +29,14 @@ TESTPROGS = \ ircd_chattr_t \ - ircd_string_t \ ircd_in_addr_t + ircd_match_t \ + ircd_string_t DEP_SRC = \ ircd_chattr_t.c \ ircd_in_addr_t.c \ + ircd_match_t.c \ ircd_string_t.c \ test_stub.c @@ -56,15 +58,19 @@ IRCD_CHATTR_T_OBJS = ircd_chattr_t.o test_stub.o ../ircd_string.o ircd_chattr_t: $(IRCD_CHATTR_T_OBJS) - ${CC} -o $@ $(IRCD_CHATTR_T_OBJS) - -IRCD_STRING_T_OBJS = ircd_string_t.o test_stub.o ../ircd_string.o -ircd_string_t: $(IRCD_STRING_T_OBJS) - ${CC} -o $@ $(IRCD_STRING_T_OBJS) + ${CC} -o $@ $(LDFLAGS) $(IRCD_CHATTR_T_OBJS) IRCD_IN_ADDR_T_OBJS = ircd_in_addr_t.o test_stub.o ../ircd_alloc.o ../ircd_string.o ../match.o ../numnicks.o ircd_in_addr_t: $(IRCD_IN_ADDR_T_OBJS) - ${CC} -o $@ $(IRCD_IN_ADDR_T_OBJS) + ${CC} -o $@ $(LDFLAGS) $(IRCD_IN_ADDR_T_OBJS) + +IRCD_MATCH_T_OBJS = ircd_match_t.o test_stub.o ../ircd_string.o ../match.o +ircd_match_t: $(IRCD_MATCH_T_OBJS) + ${CC} -o $@ $(LDFLAGS) $(IRCD_MATCH_T_OBJS) + +IRCD_STRING_T_OBJS = ircd_string_t.o test_stub.o ../ircd_string.o +ircd_string_t: $(IRCD_STRING_T_OBJS) + ${CC} -o $@ $(LDFLAGS) $(IRCD_STRING_T_OBJS) .c.o: ${CC} ${CFLAGS} ${CPPFLAGS} -c $< -o $@ Index: ircd-ircdev/ircd/test/channel-1.cmd diff -u ircd-ircdev/ircd/test/channel-1.cmd:1.1 ircd-ircdev/ircd/test/channel-1.cmd:1.2 --- ircd-ircdev/ircd/test/channel-1.cmd:1.1 Mon May 16 04:31:20 2005 +++ ircd-ircdev/ircd/test/channel-1.cmd Tue May 31 04:11:01 2005 @@ -1,29 +1,50 @@ -define srv localhost:7701 +define srv localhost -connect cl1 Alex alex %srv% :Test client 1 -connect cl2 Bubb bubb %srv% :Test client 2 +connect cl1 Alex alex %srv%:7701 :Test client 1 +connect cl2 Bubb bubb %srv%:7711 :Test client 2 :cl1 join #test :cl1 join #test2 :cl1 mode #test +bb *!*@127.0.0.1 *!*@127.0.0.2 :cl2 wait cl1 -:cl2 join #test -:cl1 wait cl2 +:cl2 raw :away :I'm not here, go away. I'm not here, go away. I'm not here, go away. I'm not here, go away. I'm not here, go away. I'm not here, go away. I'm not here, go away. I'm not here, go away. I'm not here, go away. I'm not here, go away. +:cl2 raw :away :I'm not here, go away. +:cl2 join #test,#test3,#test4,+local +:cl1 wait cl2 +:cl1 join #test3 +:cl1 raw :invite Bubb +:cl1 raw :invite #test +:cl1 invite Bubb #non-existent-channel +:cl1 invite Bubb #test3 +:cl1 invite Bubb #test4 :cl1 invite Bubb #test :cl2 expect *cl1 invite #test +:cl2 mode #test3 +o Alex +:cl2 raw :invite :cl2 join #test :cl2 privmsg #test :Hello, *cl1. +:cl2 notice #test :Hello, *cl1 (via notice). +:cl2 notice @#test :Hello, *cl1 (via wallchops). +:cl2 privmsg #test5 :Hello, *cl1. :cl2 nick Buba :cl2 mode #test +l 15 :cl1 wait cl2 :cl1 privmsg #test :Hello, *cl2. +:cl1 raw :cprivmsg bubb #test :Hello, bubb. +:cl1 raw :cnotice bubb #test :Hello, bubb. :cl1 mode #test -b+kv *!*@127.0.0.1 secret Bubb :cl1 mode #test +b foo!bar@baz :cl1 mode #test +b :cl1 mode #test : :cl1 mode #test -:cl1 raw who #test %lfuh +:cl1 raw :names +:cl1 raw :names #test +:cl1 raw :names +local +:cl1 raw :names +local test-2.* +:cl1 raw :who #test %lfuh :cl2 wait cl1 +:cl2 raw :part :cl2 part #test +:cl2 part #test5 :cl1 wait cl2 :cl2 join #test public :cl2 join #test secret @@ -45,4 +66,9 @@ :cl2 wait cl1 :cl2 mode #test2 -D :cl2 mode #test +v Alex +:cl1 raw :kick #test bubb +:cl2 raw :squit test-1.* +:cl2 sleep 1 +:cl2 raw :connect test-1.* +:cl2 raw :away : :cl1 wait cl2 Index: ircd-ircdev/ircd/test/client-1.cmd diff -u ircd-ircdev/ircd/test/client-1.cmd:1.1 ircd-ircdev/ircd/test/client-1.cmd:1.2 --- ircd-ircdev/ircd/test/client-1.cmd:1.1 Mon May 16 04:31:20 2005 +++ ircd-ircdev/ircd/test/client-1.cmd Tue May 31 04:11:01 2005 @@ -1,9 +1,12 @@ -define srv localhost:7701 +define srv localhost -connect cl1 Alex alex %srv% :Test client 1 +connect cl1 Alex alex %srv%:7701 :Test client 1 :cl1 oper oper1 oper1 -connect cl2 Bubb bubb %srv% :Test client 2 +:cl1 oper oper1 oper1 +connect cl2 Bubb bubb %srv%:7711 :Test client 2 +:cl1 raw :time :cl2 oper oper3 oper4 +:cl1 raw :version :cl2 oper oldoper wrongpass :cl2 oper md5oper wrongpass :cl2 oper cryptoper wrongpass @@ -13,3 +16,10 @@ :cl1 raw :privs Bubb :cl1 nick A :cl1 nick Alexey +:cl1 raw :privmsg : +:cl1 raw :privmsg Alexey : +:cl1 raw :privmsg Bubb :hello Bubb +:cl1 raw :privmsg $*.net :Hello all *.net servers. +:cl1 raw :notice $*.net :Hello all *.net servers. +:cl1 raw :kill Bubb :goodbye Bubb +:cl1 raw :whowas Alex,Bubb 5 Index: ircd-ircdev/ircd/test/commands-1.cmd diff -u /dev/null ircd-ircdev/ircd/test/commands-1.cmd:1.1 --- /dev/null Tue May 31 04:11:12 2005 +++ ircd-ircdev/ircd/test/commands-1.cmd Tue May 31 04:11:01 2005 @@ -0,0 +1,43 @@ +define srv localhost:7701 + +connect cl1 Alex alex %srv% :Test client 1 +connect cl2 Bubb bubb %srv% :Test client 2 +:cl1 raw :help +:cl1 raw :admin +:cl1 raw :admin test-2.* +:cl1 raw :info +:cl1 raw :wallops :HELLO OPERZ!!! +:cl1 wait cl2 +:cl1 raw :ison alex,bubb,alex,bubb,alex,bubb +:cl1 raw :who b*b +:cl1 raw :burst the bubble +:cl1 raw :server huh huh i'm a server +:cl1 raw :links +:cl1 raw :map +:cl1 raw :nick +:cl1 raw :nick ~ +:cl1 raw :nick -dude- +:cl1 raw :nick alex +:cl1 raw :nick Bubb +:cl1 raw :ping alex test-1.* + +:cl1 oper oper1 oper1 +:cl1 raw :admin +:cl1 raw :admin test-2.* +:cl1 raw :asll +:cl1 raw :asll test-2.* +:cl1 raw :info +:cl1 raw :info test-2.* +:cl1 raw :who x b*b +:cl1 raw :close +:cl1 raw :map +:cl1 raw :links +:cl1 raw :links test-2.* +:cl1 raw :lusers +:cl1 raw :lusers test-2.* +:cl1 raw :motd +:cl1 raw :motd test-2.* +:cl1 raw :ping alex test-2.* +:cl1 raw :rping test-2.* + +:cl2 raw :quit Index: ircd-ircdev/ircd/test/feature-1.cmd diff -u /dev/null ircd-ircdev/ircd/test/feature-1.cmd:1.1 --- /dev/null Tue May 31 04:11:12 2005 +++ ircd-ircdev/ircd/test/feature-1.cmd Tue May 31 04:11:01 2005 @@ -0,0 +1,18 @@ +define srv localhost:7701 + +connect cl1 Alex alex %srv% :Test client 1 +:cl1 oper oper1 oper1 +:cl1 raw :GET LOG +:cl1 raw :RESET LOG +:cl1 raw :GET RANDOM_SEED +:cl1 raw :SET RANDOM_SEED +:cl1 raw :SET RANDOM_SEED abcdefghijklmnop +:cl1 raw :GET DEFAULT_LIST_PARAM +:cl1 raw :SET DEFAULT_LIST_PARAM FALSE +:cl1 raw :SET DEFAULT_LIST_PARAM TRUE +:cl1 nick Alexey +:cl1 nick Amdahl +:cl1 nick Andy +:cl1 nick Aon +:cl1 nick Apple +:cl1 raw :SET NICKNAMEHISTORYLENGTH 4 Index: ircd-ircdev/ircd/test/gline-1.cmd diff -u ircd-ircdev/ircd/test/gline-1.cmd:1.1 ircd-ircdev/ircd/test/gline-1.cmd:1.2 --- ircd-ircdev/ircd/test/gline-1.cmd:1.1 Mon May 16 04:31:20 2005 +++ ircd-ircdev/ircd/test/gline-1.cmd Tue May 31 04:11:01 2005 @@ -7,6 +7,9 @@ :cl1 raw :gline !+127.2.* 3600 :Localclone? :cl1 sleep 5 :cl1 raw :gline !+127.2.* 3600 :Localclone? +:cl1 raw :gline !+127.2.*/15 3600 :Localclone? +:cl1 raw :gline !+127.2.0.0/33 3600 :Localclone? +:cl1 raw :gline !+127.2.0.0/15 3600 :Localclone? connect cl2 Bubb bubb %srv% :Test client 2 :cl1 raw :gline :cl1 raw :gline $Rbubb Index: ircd-ircdev/ircd/test/ircd-t1-2.conf diff -u /dev/null ircd-ircdev/ircd/test/ircd-t1-2.conf:1.1 --- /dev/null Tue May 31 04:11:12 2005 +++ ircd-ircdev/ircd/test/ircd-t1-2.conf Tue May 31 04:11:01 2005 @@ -0,0 +1,93 @@ +General { + name = "test-1.example.net"; + vhost = "127.0.0.1"; + vhost = "::1"; + description = "Test Server 1"; + numeric = 1; +}; + +Admin { + location = "Somewhere"; + contact = "Someone"; +}; + +Class { + name = "Server"; + pingfreq = 180 seconds; + connectfreq = 300 seconds; + maxlinks = 1; + sendq = 9000000; +}; + +Class { + name = "others"; + pingfreq = 180 seconds; + sendq = 160000; + maxlinks = 100; + usermode = "+oiwx"; +}; + +Class { + name = "Opers"; + pingfreq = 180 seconds; + sendq = 160000; + maxlinks = 10; + local = no; +}; + +Connect { + name = "bogus.example.net"; + host = "example.net"; + password = "bogus_example"; + port = 7700; + class = "Server"; + maxhops = 2; + hub = "*.example.net"; + autoconnect = yes; # forces a DNS resolution attempt +}; + +CRule { + server = "bogus.example.net"; + all = yes; + rule = "connected(*)"; +}; + +CRule { + server = "bogus.example.net"; + all = no; + rule = "directcon(*)"; +}; + +UWorld { + name = "uworld.example.net"; + name = "uworld2.example.net"; +}; + +Jupe { + nick = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q"; + nick = "R,S,T,U,V,W,X,Y,Z,{,|,},~,-,_,`"; +}; + +Operator { name = "oper1"; host = "*@*"; password = "$PLAIN$oper1"; class = "Opers"; }; +Operator { name = "oper2"; host = "*@*"; password = "$PLAIN$oper2"; class = "Opers"; local = yes; }; +Operator { name = "oldoper"; host = "*@*"; password = "Xlfc26b4eYGWs"; class = "Opers"; }; +Operator { name = "md5oper"; host = "*@*"; password = "$SMD5$2O$4O.rSAmhE4Fg05MmG.047/"; class = "Opers"; }; +Operator { name = "cryptoper"; host = "*@*"; password = "$CRYPT$41ndrxPQu3B66"; class = "Opers"; }; + +Kill { username = "sub7"; realname = "s*7*"; reason = "You are infected with a Trojan"; }; +Kill { realname = "Chloe"; reason = "drones"; }; +Kill { username = "sub7"; reason = "You are infected with a Trojan"; }; + +Client { class = "others"; ip = "*"; }; + +Port { server = yes; port = 7700; }; +Port { server = no; port = 7702; }; + +Quarantine { + "#shells" = "Thou shalt not support the h4><0rz"; +}; + +Features { + "HIS_STATS_k" = "FALSE"; + "PPATH" = "ircd-t1.pid"; +}; Index: ircd-ircdev/ircd/test/ircd-t1.conf diff -u ircd-ircdev/ircd/test/ircd-t1.conf:1.1 ircd-ircdev/ircd/test/ircd-t1.conf:1.2 --- ircd-ircdev/ircd/test/ircd-t1.conf:1.1 Mon May 16 04:31:20 2005 +++ ircd-ircdev/ircd/test/ircd-t1.conf Tue May 31 04:11:01 2005 @@ -46,6 +46,15 @@ autoconnect = yes; # forces a DNS resolution attempt }; +Connect { + name = "test-2.example.net"; + host = "::1"; + password = "bogus_example"; + port = 7710; + class = "Server"; + autoconnect = no; +}; + CRule { server = "bogus.example.net"; all = yes; @@ -94,4 +103,5 @@ Features { "HIS_STATS_k" = "FALSE"; + "PPATH" = "ircd-t1.pid"; }; Index: ircd-ircdev/ircd/test/ircd-t2.conf diff -u /dev/null ircd-ircdev/ircd/test/ircd-t2.conf:1.1 --- /dev/null Tue May 31 04:11:12 2005 +++ ircd-ircdev/ircd/test/ircd-t2.conf Tue May 31 04:11:01 2005 @@ -0,0 +1,95 @@ +General { + name = "test-2.example.net"; + vhost = "127.0.0.1"; + vhost = "::1"; + description = "Test Server 2"; + numeric = 2; +}; + +Admin { + location = "Somewhere"; + contact = "Someone"; +}; + +Class { + name = "Server"; + pingfreq = 180 seconds; + connectfreq = 300 seconds; + maxlinks = 1; + sendq = 9000000; +}; + +Class { + name = "others"; + pingfreq = 180 seconds; + sendq = 160000; + maxlinks = 100; + usermode = "+oiwx"; +}; + +Class { + name = "Opers"; + pingfreq = 180 seconds; + sendq = 160000; + maxlinks = 10; + local = no; +}; + +Connect { + name = "test-1.example.net"; + host = "::1"; + password = "bogus_example"; + port = 7700; + class = "Server"; + maxhops = 2; + hub = "*.example.net"; + autoconnect = yes; +}; + +CRule { + server = "bogus.example.net"; + all = yes; + rule = "connected(*)"; +}; + +CRule { + server = "bogus.example.net"; + all = no; + rule = "directcon(*)"; +}; + +UWorld { + name = "uworld.example.net"; + name = "uworld2.example.net"; +}; + +Jupe { + nick = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q"; + nick = "R,S,T,U,V,W,X,Y,Z,{,|,},~,-,_,`"; +}; + +Operator { name = "oper1"; host = "*@*"; password = "$PLAIN$oper1"; class = "Opers"; }; +Operator { name = "oper2"; host = "*@*"; password = "$PLAIN$oper2"; class = "Opers"; local = yes; }; + +Kill { realname = "Chloe"; reason = "drones"; }; +Kill { username = "sub7"; reason = "You are infected with a Trojan"; }; + +Client { class = "others"; ip = "*"; }; + +Port { server = yes; port = 7710; }; +Port { server = no; port = 7711; mask = "127.0.0.0/8"; }; + +Quarantine { + "#shells" = "Thou shalt not support the h4><0rz"; +}; + +Pseudo "X" { + name = "X"; + nick = "X...@ch..."; +}; + +Features { + "PPATH" = "ircd-t2.pid"; + "LOG" = "SYSTEM" "FILE" "ircd-t2.log"; + "LOG" = "SYSTEM" "LEVEL" "NOTICE"; +}; Index: ircd-ircdev/ircd/test/ircd_match_t.c diff -u /dev/null ircd-ircdev/ircd/test/ircd_match_t.c:1.1 --- /dev/null Tue May 31 04:11:12 2005 +++ ircd-ircdev/ircd/test/ircd_match_t.c Tue May 31 04:11:01 2005 @@ -0,0 +1,74 @@ +/* + * ircd_match_t.c - test cases for irc glob matching + */ + +#include "ircd_log.h" +#include "match.h" +#include <stdio.h> +#include <string.h> + +struct match_test { + const char *glob; + const char *should_match; + const char *shouldnt_match; +}; + +const struct match_test match_tests[] = { + { "\\*", + "*\0", + "a\0*PeacefuL*\0" }, + { "*a*", + "a\0pizza\0abe\0brack\0", + "b\0" }, + { "?", + "*\0a\0?\0", + "*PeacefuL*\0pizza\0???\0" }, + { "abc", + "abc\0", + "abcd\0cabc\0" }, + { "*abc", + "abc\0fooabc\0ababc\0", + "abra\0abcd\0" }, + { "\\?", + "?\0", + "a\0" }, + { NULL, NULL, NULL } +}; + +void do_match_test(const struct match_test *test) +{ + const char *candidate; + unsigned int matched, not_matched; + int res; + + for (candidate = test->should_match, matched = 0; + *candidate; + candidate += strlen(candidate) + 1, ++matched) { + res = match(test->glob, candidate); + if (res != 0) { + fprintf(stderr, "\"%s\" failed to match \"%s\".\n", test->glob, candidate); + assert(0); + } + } + + for (candidate = test->shouldnt_match, not_matched = 0; + *candidate; + candidate += strlen(candidate) + 1, ++not_matched) { + res = match(test->glob, candidate); + if (res == 0) { + fprintf(stderr, "\"%s\" incorrectly matched \"%s\".\n", test->glob, candidate); + assert(0); + } + } + + printf("Passed: %s (%u matches, %u non-matches)\n", + test->glob, matched, not_matched); +} + +int main(int argc, char *argv[]) +{ + const struct match_test *match; + for (match = match_tests; match->glob; ++match) + do_match_test(match); + return 0; +} Index: ircd-ircdev/ircd/test/jupe-1.cmd diff -u /dev/null ircd-ircdev/ircd/test/jupe-1.cmd:1.1 --- /dev/null Tue May 31 04:11:12 2005 +++ ircd-ircdev/ircd/test/jupe-1.cmd Tue May 31 04:11:01 2005 @@ -0,0 +1,8 @@ +define srv localhost:7701 + +connect cl1 Alex alex %srv% :Test client 1 +:cl1 oper oper1 oper1 +:cl1 raw :jupe +irc-3.example.net 3600 :Server 3 not welcome here. +:cl1 raw :jupe -irc-3.example.net 3600 :Server 3 not welcome here. +:cl1 raw :jupe +irc-3.example.net * 3600 :Server 3 not welcome here. +:cl1 raw :jupe -irc-3.example.net * 3600 :Server 3 not welcome here. Index: ircd-ircdev/ircd/test/kill-block-1.cmd diff -u /dev/null ircd-ircdev/ircd/test/kill-block-1.cmd:1.1 --- /dev/null Tue May 31 04:11:12 2005 +++ ircd-ircdev/ircd/test/kill-block-1.cmd Tue May 31 04:11:01 2005 @@ -0,0 +1,4 @@ +define srv localhost:7701 + +connect cl1 Alex sub7 %srv% :s7server +connect cl2 Chloe chloe %srv% :Chloe Index: ircd-ircdev/ircd/test/run-tests.sh diff -u ircd-ircdev/ircd/test/run-tests.sh:1.1 ircd-ircdev/ircd/test/run-tests.sh:1.2 --- ircd-ircdev/ircd/test/run-tests.sh:1.1 Mon May 16 04:31:20 2005 +++ ircd-ircdev/ircd/test/run-tests.sh Tue May 31 04:11:01 2005 @@ -1,12 +1,27 @@ #! /bin/sh set -e srcdir=$1 -for script in channel-1 client-1 stats-1 gline-1 ; do +cp ${srcdir}/ircd-t1.conf ircd-t1.conf +cp ${srcdir}/ircd-t2.conf ircd-t2.conf +echo "Testing one-shot ircd invocations." +../ircd -v +../ircd -x 6 -k -d . -f ircd-t1.conf -c user@127.0.0.1 +echo "Starting ircd." +../ircd -d . -f ircd-t1.conf +../ircd -d . -f ircd-t2.conf +sleep 10 +# stats-1 is out of alphabetical order to avoid triggering IPcheck. +for script in channel-1 client-1 command-1 feature-1 gline-1 stats-1 jupe-1 kill-block-1 ; do echo "Running test $script." ${srcdir}/test-driver.pl ${srcdir}/${script}.cmd done -echo "Terminating server." -${srcdir}/test-driver.pl ${srcdir}/die.cmd -../ircd -? -../ircd -v -../ircd -x 6 -k -d ${srcdir} -f ircd-t1.conf -c user@127.0.0.1 +echo "Sending signals to server." +cp ${srcdir}/ircd-t1-2.conf ircd-t1.conf +kill -HUP `cat ircd-t1.pid` +sleep 1 +kill -INT `cat ircd-t1.pid` +# A long sleep is necessary to make the server flush its IPcheck entries. +sleep 610 +kill -TERM `cat ircd-t1.pid` `cat ircd-t2.pid` +sleep 1 +../ircd -? || true Index: ircd-ircdev/ircd/test/stats-1.cmd diff -u ircd-ircdev/ircd/test/stats-1.cmd:1.1 ircd-ircdev/ircd/test/stats-1.cmd:1.2 --- ircd-ircdev/ircd/test/stats-1.cmd:1.1 Mon May 16 04:31:20 2005 +++ ircd-ircdev/ircd/test/stats-1.cmd Tue May 31 04:11:01 2005 @@ -33,6 +33,9 @@ :cl1 raw :stats z :cl1 raw :stats * +# Remote stats requests +:cl1 raw :stats f test-2.* + # Named stats commands :cl1 raw :stats nameservers :cl1 raw :stats connect @@ -65,6 +68,9 @@ :cl1 raw :stats memory :cl1 raw :stats help :cl1 raw :hash +:cl1 raw :rehash m +:cl1 raw :rehash l +:cl1 raw :rehash q :cl1 raw :rehash :cl1 nick Alexey Index: ircd-ircdev/ircd/test/test-driver.pl diff -u ircd-ircdev/ircd/test/test-driver.pl:1.1 ircd-ircdev/ircd/test/test-driver.pl:1.2 --- ircd-ircdev/ircd/test/test-driver.pl:1.1 Mon May 16 04:31:20 2005 +++ ircd-ircdev/ircd/test/test-driver.pl Tue May 31 04:11:01 2005 @@ -4,7 +4,7 @@ # collection isn't broken. POE is sometimes too clever for our good # in finding references to sessions, and keeps running even after we # want to stop. -# $Id: test-driver.pl,v 1.1 2005/05/16 11:31:20 zolty Exp $ +# $Id: test-driver.pl,v 1.2 2005/05/31 11:11:01 zolty Exp $ # This interprets a simple scripting language. Lines starting with a # hash mark (#, aka octothorpe, pound sign, etc) are ignored. The @@ -103,8 +103,11 @@ irc_nick => sub {}, irc_part => sub {}, irc_ping => sub {}, + irc_pong => sub {}, + irc_rpong => sub {}, irc_quit => sub {}, irc_topic => sub {}, + irc_plugin_add => sub {}, irc_error => \&irc_error, irc_disconnected => \&irc_disconnected, irc_socketerr => \&irc_socketerr, @@ -316,7 +319,8 @@ } return undef; } - print "ERROR: Unexpected event $state to test driver (from ".$sender->ID.")\n"; + print "ERROR: Unexpected event $state to test driver (from ".$sender->ID.")\n" + unless $state eq '_signal'; return undef; } Index: ircd-ircdev/ircd/test/test_stub.c diff -u ircd-ircdev/ircd/test/test_stub.c:1.2 ircd-ircdev/ircd/test/test_stub.c:1.3 --- ircd-ircdev/ircd/test/test_stub.c:1.2 Mon Mar 21 10:39:12 2005 +++ ircd-ircdev/ircd/test/test_stub.c Tue May 31 04:11:01 2005 @@ -17,6 +17,7 @@ va_start(args, fmt); vfprintf(stderr, fmt, args); + fputc('\n', stderr); va_end(args); } @@ -27,6 +28,7 @@ va_start(args, form); vfprintf(stdout, form, args); + fputc('\n', stdout); va_end(args); } ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2005-06-22 07:54:50
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-06-22 07:54:40 UTC Modified files: ChangeLog ChangeLog.es include/channel.h include/class.h include/ddb.h include/ircd_string.h include/list.h include/numeric.h include/patchlevel.h include/watch.h ircd/IPcheck.c ircd/channel.c ircd/class.c ircd/client.c ircd/ddb.c ircd/ddb_events.c ircd/ircd.c ircd/ircd_res.c ircd/ircd_string.c ircd/list.c ircd/m_burst.c ircd/m_clearmode.c ircd/m_dbq.c ircd/m_endburst.c ircd/m_invite.c ircd/m_server.c ircd/m_topic.c ircd/match.c ircd/s_bsd.c ircd/s_conf.c ircd/s_debug.c ircd/s_err.c ircd/s_serv.c ircd/s_stats.c ircd/s_user.c ircd/send.c ircd/watch.c ircd/test/.cvsignore ircd/test/Makefile.in ircd/test/kill-block-1.cmd ircd/test/run-tests.sh Log message: Author: zoltan <zo...@ir...> Log message: 2005-06-22 Toni García <zo...@ir...> 1.0.alpha39 * Limpieza * Fixs de bugs estéticos ---------------------- diff included ---------------------- Index: ircd-ircdev/ChangeLog diff -u ircd-ircdev/ChangeLog:1.40 ircd-ircdev/ChangeLog:1.41 --- ircd-ircdev/ChangeLog:1.40 Thu May 26 03:34:12 2005 +++ ircd-ircdev/ChangeLog Wed Jun 22 00:54:28 2005 @@ -1,10 +1,14 @@ # # ChangeLog for ircd-ircdev # -# $Id: ChangeLog,v 1.40 2005/05/26 10:34:12 zolty Exp $ +# $Id: ChangeLog,v 1.41 2005/06/22 07:54:28 zolty Exp $ # # Insert new changes at beginning of the change list. # +2005-06-22 Toni García <zo...@ir...> 1.0.alpha39 + * Cleanups + * Estetic bugfixes + 2005-05-26 Toni García <zo...@ir...> 1.0.alpha38 * Fix bugs last release. Index: ircd-ircdev/ChangeLog.es diff -u ircd-ircdev/ChangeLog.es:1.40 ircd-ircdev/ChangeLog.es:1.41 --- ircd-ircdev/ChangeLog.es:1.40 Thu May 26 03:34:13 2005 +++ ircd-ircdev/ChangeLog.es Wed Jun 22 00:54:29 2005 @@ -1,10 +1,14 @@ # # Log de Cambios para ircd-ircdev # -# $Id: ChangeLog.es,v 1.40 2005/05/26 10:34:13 zolty Exp $ +# $Id: ChangeLog.es,v 1.41 2005/06/22 07:54:29 zolty Exp $ # # Insertar los nuevos cambios al principio de esta lista de cambios. # +2005-06-22 Toni García <zo...@ir...> 1.0.alpha39 + * Limpieza + * Fixs de bugs estéticos + 2005-05-26 Toni García <zo...@ir...> 1.0.alpha38 * Fix de bugs de la release anterior Index: ircd-ircdev/include/channel.h diff -u ircd-ircdev/include/channel.h:1.10 ircd-ircdev/include/channel.h:1.11 --- ircd-ircdev/include/channel.h:1.10 Wed May 25 09:56:23 2005 +++ ircd-ircdev/include/channel.h Wed Jun 22 00:54:29 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Channel management and maintenance. - * @version $Id: channel.h,v 1.10 2005/05/25 16:56:23 zolty Exp $ + * @version $Id: channel.h,v 1.11 2005/06/22 07:54:29 zolty Exp $ */ #ifndef INCLUDED_channel_h #define INCLUDED_channel_h @@ -319,14 +319,14 @@ /** A single ban for a channel. */ struct Ban { - struct Ban* next; /**< next ban in the channel */ + struct Ban* next; /**< next ban in the channel */ struct irc_in_addr address; /**< addres for BAN_IPMASK bans */ - time_t when; /**< timestamp when ban was added */ - unsigned short flags; /**< modifier flags for the ban */ - unsigned char nu_len; /**< length of nick!user part of banstr */ - unsigned char addrbits; /**< netmask length for BAN_IPMASK bans */ - char *who; /**< name of client that set the ban */ - char *banstr; /**< hostmask that the ban matches */ + time_t when; /**< timestamp when ban was added */ + unsigned short flags; /**< modifier flags for the ban */ + unsigned char nu_len; /**< length of nick!user part of banstr */ + unsigned char addrbits; /**< netmask length for BAN_IPMASK bans */ + char who[NICKLEN+1]; /**< name of client that set the ban */ + char banstr[NICKLEN+USERLEN+HOSTLEN+3]; /**< hostmask that the ban matches */ }; /** Information about a channel */ Index: ircd-ircdev/include/class.h diff -u ircd-ircdev/include/class.h:1.6 ircd-ircdev/include/class.h:1.7 --- ircd-ircdev/include/class.h:1.6 Mon Jan 10 04:21:59 2005 +++ ircd-ircdev/include/class.h Wed Jun 22 00:54:29 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Declarations and interfaces for handling connection classes. - * @version $Id: class.h,v 1.6 2005/01/10 12:21:59 zolty Exp $ + * @version $Id: class.h,v 1.7 2005/06/22 07:54:29 zolty Exp $ */ #ifndef INCLUDED_class_h #define INCLUDED_class_h @@ -103,7 +103,6 @@ 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 char *get_conf_class(const struct ConfItem *aconf); extern int get_conf_ping(const struct ConfItem *aconf); extern char *get_client_class(struct Client *acptr); Index: ircd-ircdev/include/ddb.h diff -u ircd-ircdev/include/ddb.h:1.9 ircd-ircdev/include/ddb.h:1.10 --- ircd-ircdev/include/ddb.h:1.9 Wed May 25 09:56:23 2005 +++ ircd-ircdev/include/ddb.h Wed Jun 22 00:54:29 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Distributed DataBases structures, macros and functions. - * @version $Id: ddb.h,v 1.9 2005/05/25 16:56:23 zolty Exp $ + * @version $Id: ddb.h,v 1.10 2005/06/22 07:54:29 zolty Exp $ */ #ifndef INCLUDED_ddb_h #define INCLUDED_ddb_h @@ -149,6 +149,7 @@ extern void ddb_reload(void); extern void ddb_die(const char *pattern, ...); extern void ddb_report_stats(struct Client* to, const struct StatDesc* sd, char* param); +extern void ddb_count_memory(size_t* count_out, size_t* bytes_out); /* ddb_db_*.c externs */ extern void ddb_db_init(void); Index: ircd-ircdev/include/ircd_string.h diff -u ircd-ircdev/include/ircd_string.h:1.5 ircd-ircdev/include/ircd_string.h:1.6 --- ircd-ircdev/include/ircd_string.h:1.5 Mon Jan 10 04:22:00 2005 +++ ircd-ircdev/include/ircd_string.h Wed Jun 22 00:54:29 2005 @@ -21,7 +21,7 @@ */ /** @file ircd_string.h * @brief Public declarations and APIs for string operations. - * @version $Id: ircd_string.h,v 1.5 2005/01/10 12:22:00 zolty Exp $ + * @version $Id: ircd_string.h,v 1.6 2005/06/22 07:54:29 zolty Exp $ */ #ifndef INCLUDED_ircd_string_h #define INCLUDED_ircd_string_h @@ -30,6 +30,8 @@ #include "ircd_chattr.h" #endif +#include <string.h> /* for DupString()'s strcpy, strlen */ + struct irc_in_addr; /* @@ -38,13 +40,6 @@ /** Check whether \a x is a NULL or empty string. */ #define EmptyString(x) (!(x) || !(*x)) -/* - * initialize recognizers - */ -extern int init_string(void); - -extern int string_is_hostname(const char* str); -extern int string_is_address(const char* str); extern int string_has_wildcards(const char* str); extern char* ircd_strncpy(char* dest, const char* src, size_t len); @@ -139,9 +134,4 @@ #endif #endif /* FORCEINLINE */ -/* - * Proto types of other externally visible functions - */ -extern int strnChattr(const char *s, const size_t n); - #endif /* INCLUDED_ircd_string_h */ Index: ircd-ircdev/include/list.h diff -u ircd-ircdev/include/list.h:1.5 ircd-ircdev/include/list.h:1.6 --- ircd-ircdev/include/list.h:1.5 Mon Jan 10 04:22:00 2005 +++ ircd-ircdev/include/list.h Wed Jun 22 00:54:29 2005 @@ -21,7 +21,7 @@ */ /** @file list.h * @brief Singly and doubly linked list manipulation interface. - * @version $Id: list.h,v 1.5 2005/01/10 12:22:00 zolty Exp $ + * @version $Id: list.h,v 1.6 2005/06/22 07:54:29 zolty Exp $ */ #ifndef INCLUDED_list_h #define INCLUDED_list_h @@ -71,7 +71,6 @@ extern void free_link(struct SLink *lp); extern struct SLink *make_link(void); -extern struct SLink *find_user_link(struct SLink *lp, struct Client *ptr); extern void init_list(void); extern struct Client *make_client(struct Client *from, int status); extern void free_connection(struct Connection *con); Index: ircd-ircdev/include/numeric.h diff -u ircd-ircdev/include/numeric.h:1.13 ircd-ircdev/include/numeric.h:1.14 --- ircd-ircdev/include/numeric.h:1.13 Sat May 7 15:23:39 2005 +++ ircd-ircdev/include/numeric.h Wed Jun 22 00:54:29 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Declarations of numeric replies and supporting functions. - * @version $Id: numeric.h,v 1.13 2005/05/07 22:23:39 zolty Exp $ + * @version $Id: numeric.h,v 1.14 2005/06/22 07:54:29 zolty Exp $ */ #ifndef INCLUDED_numeric_h #define INCLUDED_numeric_h @@ -121,12 +121,12 @@ #define RPL_STATSALINE 226 /* Hybrid, Undernet */ #define RPL_STATSQLINE 228 /* Undernet extension */ -#define RPL_SERVICEINFO 231 /* unused */ -#define RPL_ENDOFSERVICES 232 /* unused */ +/* RPL_SERVICEINFO 231 unused */ +/* RPL_ENDOFSERVICES 232 unused */ /* RPL_RULES 232 unreal */ -#define RPL_SERVICE 233 /* unused */ -#define RPL_SERVLIST 234 /* unused */ -#define RPL_SERVLISTEND 235 /* unused */ +/* RPL_SERVICE 233 unused */ +/* RPL_SERVLIST 234 unused */ +/* RPL_SERVLISTEND 235 unused */ #define RPL_STATSVERBOSE 236 /* Undernet verbose server list */ #define RPL_STATSENGINE 237 /* Undernet engine name */ @@ -161,7 +161,7 @@ #define RPL_ADMINLOC2 258 #define RPL_ADMINEMAIL 259 -#define RPL_TRACELOG 261 /* unused */ +/* RPL_TRACELOG 261 unused */ #define RPL_TRACEEND 262 /* efnet/IRCnet */ /* RPL_LOAD_THROTTLED 263 efnet/hybrid */ /* RPL_TRYAGAIN 263 Numerics List: IRCnet */ @@ -206,11 +206,11 @@ /* RPL_END_CHANINFO 299 aircd */ -#define RPL_NONE 300 /* unused */ +/* RPL_NONE 300 unused */ #define RPL_AWAY 301 #define RPL_USERHOST 302 #define RPL_ISON 303 -#define RPL_TEXT 304 /* unused */ +/* RPL_TEXT 304 unused */ #define RPL_UNAWAY 305 #define RPL_NOWAWAY 306 /* NotAway, aircd */ @@ -276,7 +276,7 @@ See also RPL_ENDOFWHO */ #define RPL_DELNAMREPLY 355 /* QuakeNet extension */ -#define RPL_KILLDONE 361 /* not used */ +/* RPL_KILLDONE 361 not used */ #define RPL_CLOSING 362 #define RPL_CLOSEEND 363 #define RPL_LINKS 364 @@ -303,12 +303,12 @@ #define RPL_YOUREOPER 381 #define RPL_REHASHING 382 /* RPL_YOURSERVICE 383 Numeric List: various */ -#define RPL_MYPORTIS 384 /* not used */ -#define RPL_NOTOPERANYMORE 385 /* Extension to RFC1459, not used */ +/* RPL_MYPORTIS 384 not used */ +/* RPL_NOTOPERANYMORE 385 Extension to RFC1459, not used */ /* RPL_QLIST 386 unreal */ /* RPL_ENDOFQLIST 387 unreal */ /* RPL_ALIST 388 unreal */ -/* RPL_ENDOFALIST 389 unreal */ +/* RPL_ENDOFALIST 389 unreal */ #define RPL_WHOISSUSPEND 390 /* IRC-Dev extension */ #define RPL_TIME 391 @@ -322,7 +322,7 @@ * Errors are in the range from 400-599 currently and are grouped by what * commands they come from. */ -#define ERR_FIRSTERROR 400 /* unused */ +/* ERR_FIRSTERROR 400 unused */ #define ERR_NOSUCHNICK 401 #define ERR_NOSUCHSERVER 402 #define ERR_NOSUCHCHANNEL 403 Index: ircd-ircdev/include/patchlevel.h diff -u ircd-ircdev/include/patchlevel.h:1.39 ircd-ircdev/include/patchlevel.h:1.40 --- ircd-ircdev/include/patchlevel.h:1.39 Thu May 26 03:34:13 2005 +++ ircd-ircdev/include/patchlevel.h Wed Jun 22 00:54:29 2005 @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: patchlevel.h,v 1.39 2005/05/26 10:34:13 zolty Exp $ + * $Id: patchlevel.h,v 1.40 2005/06/22 07:54:29 zolty Exp $ * */ -#define PATCHLEVEL ".alpha38" +#define PATCHLEVEL ".alpha39" #define RELEASE "1.0" Index: ircd-ircdev/include/watch.h diff -u ircd-ircdev/include/watch.h:1.3 ircd-ircdev/include/watch.h:1.4 --- ircd-ircdev/include/watch.h:1.3 Mon Jan 10 04:22:00 2005 +++ ircd-ircdev/include/watch.h Wed Jun 22 00:54:29 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: watch.h,v 1.3 2005/01/10 12:22:00 zolty Exp $ + * $Id: watch.h,v 1.4 2005/06/22 07:54:29 zolty Exp $ * */ #ifndef INCLUDED_watch_h @@ -65,6 +65,6 @@ extern int add_nick_watch(struct Client *sptr, char *nick); extern int del_nick_watch(struct Client *sptr, char *nick); extern int del_list_watch(struct Client *sptr); -extern int watch_memory_count(size_t *wt_size); +extern void watch_count_memory(size_t* count_out, size_t* bytes_out); #endif /* INCLUDED_watch_h */ Index: ircd-ircdev/ircd/IPcheck.c diff -u ircd-ircdev/ircd/IPcheck.c:1.10 ircd-ircdev/ircd/IPcheck.c:1.11 --- ircd-ircdev/ircd/IPcheck.c:1.10 Mon Mar 21 10:39:05 2005 +++ ircd-ircdev/ircd/IPcheck.c Wed Jun 22 00:54:29 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Code to count users connected from particular IP addresses. - * @version $Id: IPcheck.c,v 1.10 2005/03/21 18:39:05 zolty Exp $ + * @version $Id: IPcheck.c,v 1.11 2005/06/22 07:54:29 zolty Exp $ */ #include "config.h" @@ -30,11 +30,11 @@ #include "ircd.h" #include "match.h" #include "msg.h" -#include "numnicks.h" /* NumNick, NumServ (GODMODE) */ #include "ircd_alloc.h" #include "ircd_events.h" #include "ircd_features.h" #include "ircd_log.h" +#include "ircd_string.h" /* ircd_ntoa */ #include "s_debug.h" /* Debug */ #include "s_user.h" /* TARGET_DELAY */ #include "send.h" @@ -222,6 +222,7 @@ /* * expired */ + Debug((DEBUG_DNS, "IPcheck expiring registry for %s (no clients connected).", ircd_ntoa(&entry->addr))); ip_registry_remove(entry); ip_registry_delete_entry(entry); } @@ -278,16 +279,18 @@ entry = ip_registry_new_entry(); ip_registry_canonicalize(&entry->addr, addr); ip_registry_add(entry); + Debug((DEBUG_DNS, "IPcheck added new registry for local connection from %s.", ircd_ntoa(&entry->addr))); return 1; } - /* Note that this also connects server connects. + /* Note that this also counts server connects. * It is hard and not interesting, to change that. * - * Don't allow more then 255 connects from one IP number, ever + * Refuse connection if it would overflow the counter. */ if (0 == ++entry->connected) { entry->connected--; + Debug((DEBUG_DNS, "IPcheck refusing local connection from %s: counter overflow.", ircd_ntoa(&entry->addr))); return 0; } @@ -305,17 +308,17 @@ *next_target_out = CurrentTime - (TARGET_DELAY * free_targets - 1); } else if ((CurrentTime - cli_since(&me)) > IPCHECK_CLONE_DELAY) { - /* + /* * Don't refuse connection when we just rebooted the server */ -#ifdef NOTHROTTLE - return 1; -#else +#ifndef NOTHROTTLE assert(entry->connected > 0); --entry->connected; + Debug((DEBUG_DNS, "IPcheck refusing local connection from %s: too fast.", ircd_ntoa(&entry->addr))); return 0; -#endif +#endif } + Debug((DEBUG_DNS, "IPcheck accepting local connection from %s.", ircd_ntoa(&entry->addr))); return 1; } @@ -335,8 +338,10 @@ * Mark that we did add/update an IPregistry entry */ SetIPChecked(cptr); - if (!irc_in_addr_valid(&cli_ip(cptr))) + if (!irc_in_addr_valid(&cli_ip(cptr))) { + Debug((DEBUG_DNS, "IPcheck accepting remote connection from invalid %s.", ircd_ntoa(&cli_ip(cptr)))); return 1; + } entry = ip_registry_find(&cli_ip(cptr)); if (0 == entry) { entry = ip_registry_new_entry(); @@ -344,27 +349,27 @@ if (is_burst) entry->attempts = 0; ip_registry_add(entry); + Debug((DEBUG_DNS, "IPcheck added new registry for remote connection from %s.", ircd_ntoa(&entry->addr))); + return 1; } - else { - if (0 == ++entry->connected) { - /* - * Don't allow more then 255 connects from one IP number, ever + /* Avoid overflowing the connection counter. */ + if (0 == ++entry->connected) { + Debug((DEBUG_DNS, "IPcheck refusing remote connection from %s: counter overflow.", ircd_ntoa(&entry->addr))); + return 0; + } + if (CONNECTED_SINCE(entry->last_connect) > IPCHECK_CLONE_PERIOD) + entry->attempts = 0; + if (!is_burst) { + if (0 == ++entry->attempts) { + /* + * Check for overflow */ - return 0; - } - if (CONNECTED_SINCE(entry->last_connect) > IPCHECK_CLONE_PERIOD) - entry->attempts = 0; - if (!is_burst) { - if (0 == ++entry->attempts) { - /* - * Check for overflow - */ - --entry->attempts; - } - ip_registry_update_free_targets(entry); - entry->last_connect = NOW; + --entry->attempts; } + ip_registry_update_free_targets(entry); + entry->last_connect = NOW; } + Debug((DEBUG_DNS, "IPcheck counting remote connection from %s.", ircd_ntoa(&entry->addr))); return 1; } @@ -376,10 +381,9 @@ void ip_registry_connect_fail(const struct irc_in_addr *addr) { struct IPRegistryEntry* entry = ip_registry_find(addr); - if (entry) - { - if (0 == --entry->attempts) - ++entry->attempts; + if (entry && 0 == --entry->attempts) { + Debug((DEBUG_DNS, "IPcheck noting local connection failure for %s.", ircd_ntoa(&entry->addr))); + ++entry->attempts; } } @@ -395,15 +399,13 @@ unsigned int free_targets = STARTTARGETS; struct IPRegistryEntry* entry = ip_registry_find(&cli_ip(cptr)); - if (!entry) { - Debug((DEBUG_ERROR, "Missing registry entry for: %s", cli_sock_ip(cptr))); - return; - } + assert(entry); if (entry->target) { memcpy(cli_targets(cptr), entry->target->targets, MAXTARGETS); free_targets = entry->target->count; tr = " tr"; } + Debug((DEBUG_DNS, "IPcheck noting local connection success for %s.", ircd_ntoa(&entry->addr))); sendcmdto_one(&me, CMD_NOTICE, cptr, "%C :on %u ca %u(%u) ft %u(%u)%s", cptr, entry->connected, entry->attempts, IPCHECK_CLONE_LIMIT, free_targets, STARTTARGETS, tr); @@ -417,17 +419,16 @@ void ip_registry_disconnect(struct Client *cptr) { struct IPRegistryEntry* entry = ip_registry_find(&cli_ip(cptr)); - if (0 == entry) { - /* - * trying to find an entry for a server causes this to happen, - * servers should never have FLAG_IPCHECK set - */ + if (!irc_in_addr_valid(&cli_ip(cptr))) { + Debug((DEBUG_DNS, "IPcheck noting dicconnect from invalid %s.", ircd_ntoa(&cli_ip(cptr)))); return; } + assert(entry); + assert(entry->connected > 0); + Debug((DEBUG_DNS, "IPcheck noting disconnect from %s.", ircd_ntoa(&entry->addr))); /* * If this was the last one, set `last_connect' to disconnect time (used for expiration) */ - /* assert(entry->connected > 0); */ if (0 == --entry->connected) { if (CONNECTED_SINCE(entry->last_connect) > IPCHECK_CLONE_LIMIT * IPCHECK_CLONE_PERIOD) { /* Index: ircd-ircdev/ircd/channel.c diff -u ircd-ircdev/ircd/channel.c:1.23 ircd-ircdev/ircd/channel.c:1.24 --- ircd-ircdev/ircd/channel.c:1.23 Thu May 26 03:34:13 2005 +++ ircd-ircdev/ircd/channel.c Wed Jun 22 00:54:29 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Channel management and maintanance - * @version $Id: channel.c,v 1.23 2005/05/26 10:34:13 zolty Exp $ + * @version $Id: channel.c,v 1.24 2005/06/22 07:54:29 zolty Exp $ */ #include "config.h" @@ -70,6 +70,10 @@ static struct Membership* membershipFreeList; /** Freelist for struct Ban*'s */ static struct Ban* free_bans; +/** Number of ban structures allocated. */ +static size_t bans_alloc; +/** Number of ban structures in use. */ +static size_t bans_inuse; #if !defined(NDEBUG) /** return the length (>=0) of a chain of links. @@ -94,10 +98,9 @@ set_ban_mask(struct Ban *ban, const char *banstr) { char *sep; - MyFree(ban->banstr); - if (!banstr) - return; - DupString(ban->banstr, banstr); + + assert(banstr != NULL); + ircd_strncpy(ban->banstr, banstr, sizeof(ban->banstr) - 1); sep = strrchr(banstr, '@'); if (sep) { ban->nu_len = sep - banstr; @@ -120,6 +123,9 @@ } else if (!(ban = MyMalloc(sizeof(*ban)))) return NULL; + else + bans_alloc++; + bans_inuse++; memset(ban, 0, sizeof(*ban)); set_ban_mask(ban, banstr); return ban; @@ -131,12 +137,24 @@ void free_ban(struct Ban *ban) { - MyFree(ban->who); - MyFree(ban->banstr); ban->next = free_bans; free_bans = ban; + bans_inuse--; } +/** Report ban usage to \a cptr. + * @param[in] cptr Client requesting information. + */ +void bans_send_meminfo(struct Client *cptr) +{ + struct Ban *ban; + size_t num_free; + for (num_free = 0, ban = free_bans; ban; ban = ban->next) + num_free++; + send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Bans: inuse %zu(%zu) free %zu alloc %zu", + bans_inuse, bans_inuse * sizeof(*ban), num_free, bans_alloc); + } + /** return the struct Membership* that represents a client on a channel * This function finds a struct Membership* which holds the state about * a client on a specific channel. The code is smart enough to iterate @@ -741,9 +759,9 @@ struct Membership *member; assert(0 != cptr); /* - * Servers can always speak on channels. + * Servers and channel services can always speak on channels. */ - if (IsServer(cptr)) + if (IsServer(cptr) || IsChannelService(cptr)) return 1; member = find_channel_member(cptr, chptr); @@ -847,7 +865,11 @@ *mbuf++ = 'k'; if (previous_parameter) strcat(pbuf, " "); +#if defined(DDB) || defined(SERVICES) + if (is_chan_owner(cptr, chptr) || is_chan_op(cptr, chptr) || IsServer(cptr)) { +#else if (is_chan_op(cptr, chptr) || IsServer(cptr)) { +#endif strcat(pbuf, chptr->mode.key); } else strcat(pbuf, "*"); @@ -2951,8 +2973,6 @@ if (!bmatch(ban, newban)) { if (do_free) free_ban(newban); - else - MyFree(newban); return 1; } if (!(ban->flags & (BAN_OVERLAPPED|BAN_DEL))) { @@ -2983,14 +3003,10 @@ /* If no matches were found, fail. */ if (do_free) free_ban(newban); - else - MyFree(newban->banstr); return 3; } if (do_free) free_ban(newban); - else - MyFree(newban->banstr); return 4; } @@ -3047,9 +3063,8 @@ newban->next = 0; newban->flags = ((state->dir == MODE_ADD) ? BAN_ADD : BAN_DEL) | (*flag_p == MODE_BAN ? 0 : BAN_EXCEPTION); - newban->banstr = NULL; set_ban_mask(newban, collapse(pretty_mask(t_str))); - newban->who = cli_name(state->sptr); + ircd_strncpy(newban->who, cli_name(state->sptr), HOSTLEN); newban->when = TStime(); apply_ban(&state->chptr->banlist, newban, 0); } @@ -3081,12 +3096,13 @@ count--; len -= banlen; - MyFree(ban->banstr); - continue; } else if (ban->flags & BAN_DEL) { /* Deleted a ban? */ + char *bandup; + + DupString(bandup, ban->banstr); modebuf_mode_string(state->mbuf, MODE_DEL | MODE_BAN, - ban->banstr, 1); + bandup, 1); if (state->flags & MODE_PARSE_SET) { /* Ok, make it take effect */ if (prevban) /* clip it out of the list... */ @@ -3096,9 +3112,6 @@ count--; len -= banlen; - - ban->banstr = NULL; /* modebuf_mode_string() gave ownership of - * the ban string to state->mbuf */ free_ban(ban); changed++; @@ -3116,7 +3129,6 @@ !(state->flags & MODE_PARSE_BOUNCE)) { count--; len -= banlen; - MyFree(ban->banstr); } else { if (state->flags & MODE_PARSE_SET && MyUser(state->sptr) && (len > (feature_int(FEAT_AVBANLEN) * feature_int(FEAT_MAXBANS)) || @@ -3125,15 +3137,17 @@ ban->banstr); count--; len -= banlen; - MyFree(ban->banstr); } else { + char *bandup; + /* add the ban to the buffer */ + DupString(bandup, ban->banstr); modebuf_mode_string(state->mbuf, MODE_ADD | MODE_BAN, - ban->banstr, 1); + bandup, 1); if (state->flags & MODE_PARSE_SET) { /* create a new ban */ newban = make_ban(ban->banstr); - DupString(newban->who, ban->who); + strcpy(newban->who, ban->who); newban->when = ban->when; newban->flags = ban->flags & BAN_IPMASK; @@ -3149,13 +3163,6 @@ prevban = ban; } /* for (prevban = 0, ban = state->chptr->banlist; ban; ban = nextban) { */ - /* Release all masks of removed bans */ - for (count = 0; count < state->numbans; ++count) { - ban = state->banlist + count; - if (ban->flags & BAN_DEL) - MyFree(ban->banstr); - } - if (changed) /* if we changed the ban list, we must invalidate the bans */ mode_ban_invalidate(state->chptr); } @@ -3436,7 +3443,7 @@ for (i = 0; i < MAXPARA; i++) { /* initialize ops/voices arrays */ state.banlist[i].next = 0; - state.banlist[i].who = 0; + state.banlist[i].who[0] = '\0'; state.banlist[i].when = 0; state.banlist[i].flags = 0; state.cli_change[i].flag = 0; @@ -3819,7 +3826,8 @@ /* RevealDelayedJoin: sends a join for a hidden user */ -void RevealDelayedJoin(struct Membership *member) { +void RevealDelayedJoin(struct Membership *member) +{ ClearDelayedJoin(member); sendcmdto_channel_butserv_butone(member->user, CMD_JOIN, member->channel, member->user, 0, ":%H", member->channel); @@ -3828,14 +3836,15 @@ /* CheckDelayedJoins: checks and clear +d if necessary */ -void CheckDelayedJoins(struct Channel *chan) { +void CheckDelayedJoins(struct Channel *chan) +{ struct Membership *memb2; - + if (chan->mode.mode & MODE_WASDELJOINS) { for (memb2=chan->members;memb2;memb2=memb2->next_member) if (IsDelayedJoin(memb2)) break; - + if (!memb2) { /* clear +d */ chan->mode.mode &= ~MODE_WASDELJOINS; Index: ircd-ircdev/ircd/class.c diff -u ircd-ircdev/ircd/class.c:1.7 ircd-ircdev/ircd/class.c:1.8 --- ircd-ircdev/ircd/class.c:1.7 Fri Apr 22 09:22:13 2005 +++ ircd-ircdev/ircd/class.c Wed Jun 22 00:54:29 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Implementation of connection class handling functions. - * @version $Id: class.c,v 1.7 2005/04/22 16:22:13 zolty Exp $ + * @version $Id: class.c,v 1.8 2005/06/22 07:54:29 zolty Exp $ */ #include "config.h" @@ -199,19 +199,6 @@ return "(null-class)"; } -/** Get connection interval for a connection class. - * @param[in] clptr Connection class to check (or NULL). - * @return If \a clptr != NULL, its connection frequency; else default - * connection frequency. - */ -unsigned int get_con_freq(struct ConnectionClass * clptr) -{ - if (clptr) - return (ConFreq(clptr)); - else - return feature_int(FEAT_CONNECTFREQUENCY); -} - /** Make sure we have a connection class named \a name. * If one does not exist, create it. Then set its ping frequency, * connection frequency, maximum link count, and max SendQ according Index: ircd-ircdev/ircd/client.c diff -u ircd-ircdev/ircd/client.c:1.8 ircd-ircdev/ircd/client.c:1.9 --- ircd-ircdev/ircd/client.c:1.8 Wed Mar 9 10:12:34 2005 +++ ircd-ircdev/ircd/client.c Wed Jun 22 00:54:29 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Implementation of functions for handling local clients. - * @version $Id: client.c,v 1.8 2005/03/09 18:12:34 zolty Exp $ + * @version $Id: client.c,v 1.9 2005/06/22 07:54:29 zolty Exp $ */ #include "config.h" @@ -232,8 +232,8 @@ P(GLINE), P(LOCAL_GLINE), P(JUPE), P(LOCAL_JUPE), P(OPMODE), P(LOCAL_OPMODE), P(SET), P(WHOX), P(BADCHAN), P(LOCAL_BADCHAN), P(SEE_CHAN), P(PROPAGATE), - P(DISPLAY), P(SEE_OPERS), P(FORCE_OPMODE), P(FORCE_LOCAL_OPMODE), - P(WIDE_GLINE), + P(DISPLAY), P(SEE_OPERS), P(WIDE_GLINE), P(LIST_CHAN), + P(FORCE_OPMODE), P(FORCE_LOCAL_OPMODE), P(APASS_OPMODE), #undef P { 0, 0 } }; Index: ircd-ircdev/ircd/ddb.c diff -u ircd-ircdev/ircd/ddb.c:1.10 ircd-ircdev/ircd/ddb.c:1.11 --- ircd-ircdev/ircd/ddb.c:1.10 Wed May 25 09:56:24 2005 +++ ircd-ircdev/ircd/ddb.c Wed Jun 22 00:54:29 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Implementation of Distributed DataBase. - * @version $Id: ddb.c,v 1.10 2005/05/25 16:56:24 zolty Exp $ + * @version $Id: ddb.c,v 1.11 2005/06/22 07:54:29 zolty Exp $ */ #include "config.h" @@ -56,6 +56,8 @@ * TODO, explicacion del sistema */ +/** Count of allocated Ddb structures. */ +static int ddbCount = 0; /** DDB registers cache. */ static struct Ddb ddb_buf_cache[DDB_BUF_CACHE]; /** Buffer cache. */ @@ -396,6 +398,7 @@ ddb_next(ddb) = ddb_data_table[table][hashi]; ddb_data_table[table][hashi] = ddb; ddb_count_table[table]++; + ddbCount++; return delete; } @@ -426,6 +429,7 @@ delete = 1; DdbFree(ddb); ddb_count_table[table]--; + ddbCount--; break; } ddb3 = &(ddb_next(ddb)); @@ -791,3 +795,15 @@ } } } + +/** Find number of DDB structs allocated and memory used by them. + * @param[out] count_out Receives number of DDB structs allocated. + * @param[out] bytes_out Receives number of bytes used by DDB structs. + */ +void ddb_count_memory(size_t* count_out, size_t* bytes_out) +{ + assert(0 != count_out); + assert(0 != bytes_out); + *count_out = ddbCount; + *bytes_out = ddbCount * sizeof(struct Ddb); +} Index: ircd-ircdev/ircd/ddb_events.c diff -u ircd-ircdev/ircd/ddb_events.c:1.6 ircd-ircdev/ircd/ddb_events.c:1.7 --- ircd-ircdev/ircd/ddb_events.c:1.6 Thu May 26 03:34:13 2005 +++ ircd-ircdev/ircd/ddb_events.c Wed Jun 22 00:54:29 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Events of Distributed DataBases. - * @version $Id: ddb_events.c,v 1.6 2005/05/26 10:34:13 zolty Exp $ + * @version $Id: ddb_events.c,v 1.7 2005/06/22 07:54:29 zolty Exp $ */ #include "config.h" @@ -173,18 +173,15 @@ /* Quitar -q */ for (member = chptr->members; member; member = member->next_member) { - if (IsChanOwner(member)) + if (IsChanOwner(member) && MyUser(member->user)) { ClearChanOwner(member); - if (MyUser(member->user)) - { - sendcmdbotto_channel_butserv_butone(botname, CMD_MODE, - member->channel, NULL, 0, "%H -q %C", - member->channel, member->user); - sendcmdto_serv_butone(&me, CMD_BMODE, NULL, "%s %H -q %C", - DDB_CHANSERV, member->channel, member->user); - } - break; + sendcmdbotto_channel_butserv_butone(botname, CMD_MODE, + member->channel, NULL, 0, "%H -q %C", + member->channel, member->user); + sendcmdto_serv_butone(&me, CMD_BMODE, NULL, "%s %H -q %C", + DDB_CHANSERV, member->channel, member->user); + break; } } Index: ircd-ircdev/ircd/ircd.c diff -u ircd-ircdev/ircd/ircd.c:1.19 ircd-ircdev/ircd/ircd.c:1.20 --- ircd-ircdev/ircd/ircd.c:1.19 Mon May 16 04:22:50 2005 +++ ircd-ircdev/ircd/ircd.c Wed Jun 22 00:54:29 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Entry point and other initialization functions for the daemon. - * @version $Id: ircd.c,v 1.19 2005/05/16 11:22:50 zolty Exp $ + * @version $Id: ircd.c,v 1.20 2005/06/22 07:54:29 zolty Exp $ */ #include "config.h" @@ -691,11 +691,6 @@ log_init(*argv); set_nomem_handler(outofmemory); - if (!init_string()) { - log_write(LS_SYSTEM, L_CRIT, 0, "Failed to initialize string module"); - return 6; - } - initload(); init_list(); init_hash(); Index: ircd-ircdev/ircd/ircd_res.c diff -u ircd-ircdev/ircd/ircd_res.c:1.8 ircd-ircdev/ircd/ircd_res.c:1.9 --- ircd-ircdev/ircd/ircd_res.c:1.8 Sat Apr 2 11:47:35 2005 +++ ircd-ircdev/ircd/ircd_res.c Wed Jun 22 00:54:29 2005 @@ -22,8 +22,8 @@ * */ /* - * A rewrite of Darren Reeds original res.c As there is nothing - * left of Darrens original code, this is now licensed by the hybrid group. + * A rewrite of Darren Reed's original res.c As there is nothing + * left of Darren's original code, this is now licensed by the hybrid group. * (Well, some of the function names are the same, and bits of the structs..) * You can use it where it is useful, free even. Buy us a beer and stuff. * @@ -41,7 +41,7 @@ */ /** @file * @brief IRC resolver functions. - * @version $Id: ircd_res.c,v 1.8 2005/04/02 19:47:35 zolty Exp $ + * @version $Id: ircd_res.c,v 1.9 2005/06/22 07:54:29 zolty Exp $ */ #include "client.h" #include "ircd_alloc.h" @@ -749,7 +749,13 @@ * but its possible its just a broken nameserver with still * valid answers. But lets do some rudimentary logging for now... */ - log_write(LS_RESOLVER, L_ERROR, 0, "irc_res.c bogus type %d", type); + log_write(LS_RESOLVER, L_ERROR, 0, "irc_res.c bogus type %d", type); + + if ((char*)current + rd_length >= (char*)current) + current += rd_length; + else + return(0); + break; } } @@ -780,6 +786,12 @@ return; /* + * check against possibly fake replies + */ + if (!res_ourserver(&lsin)) + return; + + /* * convert DNS reply reader from Network byte order to CPU byte order. */ header = (HEADER *)buf; @@ -795,12 +807,6 @@ if (0 == (request = find_id(header->id))) return; - /* - * check against possibly fake replies - */ - if (!res_ourserver(&lsin)) - return; - if ((header->rcode != NO_ERRORS) || (header->ancount == 0)) { if (SERVFAIL == header->rcode) Index: ircd-ircdev/ircd/ircd_string.c diff -u ircd-ircdev/ircd/ircd_string.c:1.10 ircd-ircdev/ircd/ircd_string.c:1.11 --- ircd-ircdev/ircd/ircd_string.c:1.10 Mon Apr 11 01:45:00 2005 +++ ircd-ircdev/ircd/ircd_string.c Wed Jun 22 00:54:29 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Implementation of string operations. - * @version $Id: ircd_string.c,v 1.10 2005/04/11 08:45:00 zolty Exp $ + * @version $Id: ircd_string.c,v 1.11 2005/06/22 07:54:29 zolty Exp $ */ #include "config.h" @@ -32,7 +32,6 @@ #include "res.h" /* #include <assert.h> -- Now using assert in ircd_log.h */ -#include <string.h> #include <regex.h> #include <sys/types.h> #include <netinet/in.h> @@ -42,68 +41,6 @@ */ #include "chattr.tab.c" - -/* - * Disallow a hostname label to contain anything but a [-a-zA-Z0-9]. - * It may not start or end on a '.'. - * A label may not end on a '-', the maximum length of a label is - * 63 characters. - * On top of that (which seems to be the RFC) we demand that the - * top domain does not contain any digits. - */ -/** Regular expression to match a hostname. - * Matches zero or more alphanumeric labels followed by '.' and a - * final label that may only contain alphabetic characters. - */ -static const char* hostExpr = "^([-0-9A-Za-z]*[0-9A-Za-z]\\.)+[A-Za-z]+$"; -/** Compiled regex to match a hostname. Built from #hostExpr. */ -static regex_t hostRegex; - -/** Regular expression to match an IP address. */ -static const char* addrExpr = - "^((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\\.){1,3}" - "(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])$"; -/** Compiled regex to match an IP address. Built from #addrExpr. */ -static regex_t addrRegex; - -/** Initialize the string matching code. */ -int init_string(void) -{ - /* - * initialize matching expressions - * XXX - expressions MUST be correct, don't change expressions - * without testing them. Might be a good idea to exit if these fail, - * important code depends on them. - * TODO: use regerror for an error message - */ - if (regcomp(&hostRegex, hostExpr, REG_EXTENDED | REG_NOSUB)) - return 0; - - if (regcomp(&addrRegex, addrExpr, REG_EXTENDED | REG_NOSUB)) - return 0; - return 1; -} - -/** Check whether \a str looks like a hostname. - * @param[in] str String that might be a hostname. - * @return Non-zero if it conforms to the rules, zero if not. - */ -int string_is_hostname(const char* str) -{ - assert(0 != str); - return (strlen(str) <= HOSTLEN && 0 == regexec(&hostRegex, str, 0, 0, 0)); -} - -/** Check whether \a str looks like an IP address. - * @param[in] str String that might be an address. - * @return Non-zero if it conforms to the rules, zero if not. - */ -int string_is_address(const char* str) -{ - assert(0 != str); - return (0 == regexec(&addrRegex, str, 0, 0, 0)); -} - /** Check whether \a str contains wildcard characters. * @param[in] str String that might contain wildcards. * @return Non-zero if \a str contains naked (non-escaped) wildcards, @@ -235,21 +172,6 @@ * Other functions visible externally */ -/** Find common character attributes for the start of a string. - * @param[in] s Input string to scan. - * @param[in] n Maximum number of bytes to check. - * @return Bitmask of all character attributes shared by the start of \a s. - */ -int strnChattr(const char *s, const size_t n) -{ - const char *rs = s; - unsigned int x = ~0; - int r = n; - while (*rs && r--) - x &= IRCD_CharAttrTab[*rs++ - CHAR_MIN]; - return x; -} - /** Case insensitive string comparison. * @param[in] a First string to compare. * @param[in] b Second string to compare. Index: ircd-ircdev/ircd/list.c diff -u ircd-ircdev/ircd/list.c:1.7 ircd-ircdev/ircd/list.c:1.8 --- ircd-ircdev/ircd/list.c:1.7 Mon Mar 21 10:39:08 2005 +++ ircd-ircdev/ircd/list.c Wed Jun 22 00:54:29 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Singly and doubly linked list manipulation implementation. - * @version $Id: list.c,v 1.7 2005/03/21 18:39:08 zolty Exp $ + * @version $Id: list.c,v 1.8 2005/06/22 07:54:29 zolty Exp $ */ #include "config.h" @@ -52,25 +52,19 @@ #include <unistd.h> /* close */ #include <string.h> -#ifdef DEBUGMODE /** Stores linked list statistics for various types of lists. */ static struct liststats { - int inuse; -} clients, connections, users, servs, links; -#endif + size_t alloc; /**< Number of structures ever allocated. */ + size_t inuse; /**< Number of structures currently in use. */ + size_t mem; /**< Memory used by in-use structures. */ +} clients, connections, servs, links; -/** Count of allocated Client structures. */ -static unsigned int clientAllocCount; /** Linked list of currently unused Client structures. */ static struct Client* clientFreeList; -/** Count of allocated Connection structures. */ -static unsigned int connectionAllocCount; /** Linked list of currently unused Connection structures. */ static struct Connection* connectionFreeList; -/** Count of allocated SLink structures. */ -static unsigned int slinkAllocCount; /** Linked list of currently unused SLink structures. */ static struct SLink* slinkFreeList; @@ -89,21 +83,14 @@ cptr = (struct Client*) MyMalloc(sizeof(struct Client)); cli_next(cptr) = clientFreeList; clientFreeList = cptr; - ++clientAllocCount; + clients.alloc++; con = (struct Connection*) MyMalloc(sizeof(struct Connection)); con_next(con) = connectionFreeList; connectionFreeList = con; - ++connectionAllocCount; + connections.alloc++; } -#ifdef DEBUGMODE - memset(&clients, 0, sizeof(clients)); - memset(&connections, 0, sizeof(connections)); - memset(&users, 0, sizeof(users)); - memset(&servs, 0, sizeof(servs)); - memset(&links, 0, sizeof(links)); -#endif } /** Allocate a new Client structure. @@ -117,13 +104,11 @@ if (!cptr) { cptr = (struct Client*) MyMalloc(sizeof(struct Client)); - ++clientAllocCount; + clients.alloc++; } else clientFreeList = cli_next(cptr); -#ifdef DEBUGMODE clients.inuse++; -#endif memset(cptr, 0, sizeof(struct Client)); @@ -138,9 +123,7 @@ assert(cli_verify(cptr)); assert(0 == cli_connect(cptr)); -#ifdef DEBUGMODE --clients.inuse; -#endif cli_next(cptr) = clientFreeList; clientFreeList = cptr; @@ -159,13 +142,11 @@ if (!con) { con = (struct Connection*) MyMalloc(sizeof(struct Connection)); - ++connectionAllocCount; + connections.alloc++; } else connectionFreeList = con_next(con); -#ifdef DEBUGMODE connections.inuse++; -#endif memset(con, 0, sizeof(struct Connection)); timer_init(&(con_proc(con))); @@ -199,9 +180,7 @@ if (con_listener(con)) release_listener(con_listener(con)); -#ifdef DEBUGMODE --connections.inuse; -#endif con_next(con) = connectionFreeList; connectionFreeList = con; @@ -339,9 +318,8 @@ serv = (struct Server*) MyMalloc(sizeof(struct Server)); assert(0 != serv); memset(serv, 0, sizeof(struct Server)); /* All variables are 0 by default */ -#ifdef DEBUGMODE servs.inuse++; -#endif + servs.alloc++; cli_serv(cptr) = serv; cli_serv(cptr)->lag = 60000; *serv->by = '\0'; @@ -398,9 +376,8 @@ MyFree(cli_serv(cptr)->client_list); MyFree(cli_serv(cptr)->last_error_msg); MyFree(cli_serv(cptr)); -#ifdef DEBUGMODE --servs.inuse; -#endif + --servs.alloc; } free_client(cptr); } @@ -444,30 +421,13 @@ assert(cli_prev(client) == prev); /* Verify that the list hasn't become circular */ assert(cli_next(client) != GlobalClientList); - assert(visited <= clientAllocCount); + assert(visited <= client.alloc); /* Remember what should precede us */ prev = client; } } #endif /* DEBUGMODE */ -/** Find the list element that corresponds to a client. - * @param[in] lp Head of singly linked list. - * @param[in] ptr %Client to search for. - * @return SLink element from \a lp that contains \a ptr, or NULL if none exist. - */ -struct SLink *find_user_link(struct SLink *lp, struct Client *ptr) -{ - if (ptr) { - while (lp) { - if (lp->value.cptr == ptr) - return (lp); - lp = lp->next; - } - } - return NULL; -} - /** Allocate a new SLink element. * Pulls from #slinkFreeList if it contains anything, else it * allocates a new one from the heap. @@ -480,12 +440,10 @@ slinkFreeList = lp->next; else { lp = (struct SLink*) MyMalloc(sizeof(struct SLink)); - ++slinkAllocCount; + links.alloc++; } assert(0 != lp); -#ifdef DEBUGMODE links.inuse++; -#endif return lp; } @@ -498,9 +456,7 @@ lp->next = slinkFreeList; slinkFreeList = lp; } -#ifdef DEBUGMODE links.inuse--; -#endif } /** Add an element to a doubly linked list. @@ -541,42 +497,54 @@ MyFree(lp); } -#ifdef DEBUGMODE +/** Report memory usage of a list to \a cptr. + * @param[in] cptr Client requesting information. + * @param[in] lstats List statistics descriptor. + * @param[in] itemname Plural name of item type. + * @param[in,out] totals If non-null, accumulates item counts and memory usage. + */ +void send_liststats(struct Client *cptr, const struct liststats *lstats, + const char *itemname, struct liststats *totals) +{ + send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":%s: inuse %zu(%zu) alloc %zu", + itemname, lstats->inuse, lstats->mem, lstats->alloc); + if (totals) + { + totals->inuse += lstats->inuse; + totals->alloc += lstats->alloc; + totals->mem += lstats->mem; + } +} + /** Report memory usage of list elements to \a cptr. * @param[in] cptr Client requesting information. * @param[in] name Unused pointer. */ void send_listinfo(struct Client *cptr, char *name) { - int inuse = 0, mem = 0, tmp = 0; + struct liststats total; + struct liststats confs; + struct ConfItem *conf; - send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Clients: inuse: %d(%d)", - clients.inuse, tmp = clients.inuse * sizeof(struct Client)); - mem += tmp; - inuse += clients.inuse; - send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, "Connections: inuse: %d(%d)", - connections.inuse, - tmp = connections.inuse * sizeof(struct Connection)); - mem += tmp; - inuse += connections.inuse; - send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Users: inuse: %d(%d)", - users.inuse, tmp = users.inuse * sizeof(struct User)); - mem += tmp; - inuse += users.inuse; - send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Servs: inuse: %d(%d)", - servs.inuse, tmp = servs.inuse * sizeof(struct Server)); - mem += tmp; - inuse += servs.inuse; - send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Links: inuse: %d(%d)", - links.inuse, tmp = links.inuse * sizeof(struct SLink)); - mem += tmp; - inuse += links.inuse; - send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Confs: inuse: %d(%d)", - GlobalConfCount, tmp = GlobalConfCount * sizeof(struct ConfItem)); - mem += tmp; - inuse += GlobalConfCount; - send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Totals: inuse %d %d", - inuse, mem); -} + memset(&total, 0, sizeof(total)); + + clients.mem = clients.inuse * sizeof(struct Client); + send_liststats(cptr, &clients, "Clients", &total); + + connections.mem = connections.inuse * sizeof(struct Connection); + send_liststats(cptr, &connections, "Connections", &total); -#endif + servs.mem = servs.inuse * sizeof(struct Server); + send_liststats(cptr, &servs, "Servers", &total); + + links.mem = links.inuse * sizeof(struct SLink); + send_liststats(cptr, &links, "Links", &total); + + confs.alloc = GlobalConfCount; + confs.mem = confs.alloc * sizeof(GlobalConfCount); + for (confs.inuse = 0, conf = GlobalConfList; conf; conf = conf->next) + confs.inuse++; + send_liststats(cptr, &confs, "Confs", &total); + + send_liststats(cptr, &total, "Totals", NULL); +} Index: ircd-ircdev/ircd/m_burst.c diff -u ircd-ircdev/ircd/m_burst.c:1.11 ircd-ircdev/ircd/m_burst.c:1.12 --- ircd-ircdev/ircd/m_burst.c:1.11 Thu May 26 03:34:13 2005 +++ ircd-ircdev/ircd/m_burst.c Wed Jun 22 00:54:29 2005 @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_burst.c,v 1.11 2005/05/26 10:34:13 zolty Exp $ + * $Id: m_burst.c,v 1.12 2005/06/22 07:54:29 zolty Exp $ * */ @@ -397,8 +397,11 @@ newban = make_ban(ban); /* create new ban */ - DupString(newban->who, + strcpy(newban->who, cli_name(feature_bool(FEAT_HIS_BANWHO) ? &me : sptr)); + /* Original Unet, TODO-ZOLTAN + strcpy(newban->who, "*"); + */ newban->when = TStime(); newban->flags = BAN_BURSTED; /* set flags */ @@ -632,9 +635,11 @@ /* remove ban from channel */ if (lp->flags & (BAN_OVERLAPPED | BAN_BURST_WIPEOUT)) { + char *bandup; + + DupString(bandup, lp->banstr); modebuf_mode_string(mbuf, MODE_DEL | MODE_BAN, - lp->banstr, 1); /* let it free banstr */ - lp->banstr = NULL; /* do not free this string */ + bandup, 1); /* let it free banstr */ *lp_p = lp->next; /* clip out of list */ free_ban(lp); continue; Index: ircd-ircdev/ircd/m_clearmode.c diff -u ircd-ircdev/ircd/m_clearmode.c:1.8 ircd-ircdev/ircd/m_clearmode.c:1.9 --- ircd-ircdev/ircd/m_clearmode.c:1.8 Mon Mar 21 10:39:08 2005 +++ ircd-ircdev/ircd/m_clearmode.c Wed Jun 22 00:54:29 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_clearmode.c,v 1.8 2005/03/21 18:39:08 zolty Exp $ + * $Id: m_clearmode.c,v 1.9 2005/06/22 07:54:29 zolty Exp $ * */ @@ -175,12 +175,13 @@ */ if (del_mode & MODE_BAN) { for (link = chptr->banlist; link; link = next) { + char *bandup; + next = link->next; + DupString(bandup, link->banstr); modebuf_mode_string(&mbuf, MODE_DEL | MODE_BAN, /* delete ban */ - link->banstr, 1); - link->banstr = NULL; /* modebuf_mode_string() gave ownership of - * banstr to mbuf */ + bandup, 1); free_ban(link); } Index: ircd-ircdev/ircd/m_dbq.c diff -u ircd-ircdev/ircd/m_dbq.c:1.4 ircd-ircdev/ircd/m_dbq.c:1.5 --- ircd-ircdev/ircd/m_dbq.c:1.4 Mon May 16 03:17:27 2005 +++ ircd-ircdev/ircd/m_dbq.c Wed Jun 22 00:54:29 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Handlers for DBQ command. - * @version $Id: m_dbq.c,v 1.4 2005/05/16 10:17:27 zolty Exp $ + * @version $Id: m_dbq.c,v 1.5 2005/06/22 07:54:29 zolty Exp $ */ #include "config.h" @@ -108,7 +108,8 @@ } } - + sendwallto_group_butone(&me, WALL_WALLOPS, 0, + "Remote DBQ %c %s From %#C", table, key, sptr); log_write(LS_DDB, L_INFO, 0, "Remote DBQ %c %s From %#C", table, key, sptr); if (!ddb_table_is_resident(table)) @@ -197,6 +198,8 @@ } } + sendwallto_group_butone(&me, WALL_WALLOPS, 0, + "DBQ %c %s From %#C", table, key, sptr); log_write(LS_DDB, L_INFO, 0, "DBQ %c %s From %#C", table, key, cptr); if (!ddb_table_is_resident(table)) Index: ircd-ircdev/ircd/m_endburst.c diff -u ircd-ircdev/ircd/m_endburst.c:1.5 ircd-ircdev/ircd/m_endburst.c:1.6 --- ircd-ircdev/ircd/m_endburst.c:1.5 Mon Jan 10 04:23:02 2005 +++ ircd-ircdev/ircd/m_endburst.c Wed Jun 22 00:54:29 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_endburst.c,v 1.5 2005/01/10 12:23:02 zolty Exp $ + * $Id: m_endburst.c,v 1.6 2005/06/22 07:54:29 zolty Exp $ * */ @@ -126,16 +126,17 @@ for (chan = GlobalChannelList; chan; chan = next_chan) { next_chan = chan->next; - if (!chan->members) { /* empty channel */ - if ((chan->mode.mode & MODE_BURSTADDED)) - sub1_from_channel(chan); /* New empty channel, schedule it for removal. */ - /* FIX-ZOLTAN Añadido */ - else - sendto_opmask_butone(0, SNO_OLDSNO, "Empty channel %H not added by " - "BURST!", chan); + if (!chan->members && (chan->mode.mode & MODE_BURSTADDED)) { + /* Newly empty channel, schedule it for removal. */ + chan->mode.mode &= ~MODE_BURSTADDED; + sub1_from_channel(chan); + } else { + chan->mode.mode &= ~MODE_BURSTADDED; +#if !defined(UNDERNET) && !defined(DDB) + sendto_opmask_butone(0, SNO_OLDSNO, "Empty channel %H not added by " + "BURST!", chan); +#endif } - - chan->mode.mode &= ~MODE_BURSTADDED; } return 0; Index: ircd-ircdev/ircd/m_invite.c diff -u ircd-ircdev/ircd/m_invite.c:1.11 ircd-ircdev/ircd/m_invite.c:1.12 --- ircd-ircdev/ircd/m_invite.c:1.11 Sat May 7 15:23:40 2005 +++ ircd-ircdev/ircd/m_invite.c Wed Jun 22 00:54:29 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_invite.c,v 1.11 2005/05/07 22:23:40 zolty Exp $ + * $Id: m_invite.c,v 1.12 2005/06/22 07:54:29 zolty Exp $ * */ @@ -147,7 +147,7 @@ return 0; if (!(chptr = FindChannel(parv[2]))) { - send_reply(sptr, ERR_NOTONCHANNEL, parv[2]); + send_reply(sptr, ERR_NOSUCHCHANNEL, parv[2]); return 0; } Index: ircd-ircdev/ircd/m_server.c diff -u ircd-ircdev/ircd/m_server.c:1.8 ircd-ircdev/ircd/m_server.c:1.9 --- ircd-ircdev/ircd/m_server.c:1.8 Sat Apr 2 11:47:35 2005 +++ ircd-ircdev/ircd/m_server.c Wed Jun 22 00:54:29 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Handlers for the SERVER command. - * @version $Id: m_server.c,v 1.8 2005/04/02 19:47:35 zolty Exp $ + * @version $Id: m_server.c,v 1.9 2005/06/22 07:54:29 zolty Exp $ */ #include "config.h" @@ -588,7 +588,7 @@ log_write(LS_NETWORK, L_NOTICE, LOG_NOSNOTICE, "Received unauthorized " "connection from %C [%s]", cptr, ircd_ntoa(&cli_ip(cptr))); - return exit_client(cptr, cptr, &me, "No C:line"); + return exit_client(cptr, cptr, &me, "No Connect block"); } host = cli_name(cptr); Index: ircd-ircdev/ircd/m_topic.c diff -u ircd-ircdev/ircd/m_topic.c:1.7 ircd-ircdev/ircd/m_topic.c:1.8 --- ircd-ircdev/ircd/m_topic.c:1.7 Mon Jan 10 04:23:03 2005 +++ ircd-ircdev/ircd/m_topic.c Wed Jun 22 00:54:30 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_topic.c,v 1.7 2005/01/10 12:23:03 zolty Exp $ + * $Id: m_topic.c,v 1.8 2005/06/22 07:54:30 zolty Exp $ * */ @@ -110,7 +110,12 @@ { /* allow off-channel services to set the topic of any channel */ } +#if defined(DDB) || defined(SERVICES) + else if ((chptr->mode.mode & MODE_TOPICLIMIT) && + !(is_chan_owner(sptr, chptr) || is_chan_op(sptr, chptr))) +#else else if ((chptr->mode.mode & MODE_TOPICLIMIT) && !is_chan_op(sptr, chptr)) +#endif { /* if +t and not @'d, return an error and ignore the topic */ send_reply(sptr, ERR_CHANOPRIVSNEEDED, chptr->chname); Index: ircd-ircdev/ircd/match.c diff -u ircd-ircdev/ircd/match.c:1.9 ircd-ircdev/ircd/match.c:1.10 --- ircd-ircdev/ircd/match.c:1.9 Fri Apr 22 09:22:13 2005 +++ ircd-ircdev/ircd/match.c Wed Jun 22 00:54:30 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Functions to match strings against IRC mask strings. - * @version $Id: match.c,v 1.9 2005/04/22 16:22:13 zolty Exp $ + * @version $Id: match.c,v 1.10 2005/06/22 07:54:30 zolty Exp $ */ #include "config.h" @@ -194,59 +194,56 @@ { const char *m = mask, *n = name; const char *m_tmp = mask, *n_tmp = name; - int wild = 0; - - for (;;) - { - if (*m == '*') { - while (*m == '*') /* clean up any additional wildcards */ - m++; - - m_tmp = m; - n_tmp = n; - wild = 1; - } - if (*m == '\\') /* next wildcard is disregarded */ - m++; - - if (!*m) { - if (!*n) - return 0; /* match */ - - for (m--; (m > mask) && (*m == '?'); m--); - ; - - if (*m == '*' && (m > mask)) - return 0; /* match */ - - if (!wild) - return 1; - - m = m_tmp; - n = ++n_tmp; - } - else if (!*n) { - while (*m == '*') /* clean up any additional wildcards */ - m++; + int star_p; - return (*m != 0); - } - if (ToLower(*m) != ToLower(*n) && *m != '?') { - if (!wild) - return 1; /* failure! */ - - m = m_tmp; - n = ++n_tmp; + for (;;) switch (*m) { + case '\0': + if (!*n) + return 0; + backtrack: + if (m_tmp == mask) + return 1; + m = m_tmp; + n = ++n_tmp; + break; + case '\\': + m++; + /* allow escaping to force capitalization */ + if (*m++ != *n++) + return 1; + break; + case '*': case '?': + for (star_p = 0; ; m++) { + if (*m == '*') + star_p = 1; + else if (*m == '?') { + if (!*n++) + goto backtrack; + } else break; } - else { - if (*m) - m++; - if (*n) - n++; + if (star_p) { + if (!*m) + return 0; + else if (*m == '\\') { + m_tmp = ++m; + if (!*m) + return 1; + for (n_tmp = n; *n && *n != *m; n++) ; + } else { + m_tmp = m; + for (n_tmp = n; *n && ToLower(*n) != ToLower(*m); n++) ; + } } + /* and fall through */ + default: + if (!*n) + return *m != '\0'; + if (ToLower(*m) != ToLower(*n)) + goto backtrack; + m++; + n++; + break; } - - return 1; /* no match! */ } /* @@ -889,7 +886,7 @@ if (mask[0] == '.' || mask[0] == '/') return 0; for (p = mask; *p; ++p) - if (*p != '*' && *p != '?' && *p != '.' && *p != '/') + if (*p != '*' && *p != '.' && *p != '/') { if (!IsDigit(*p)) return 0; Index: ircd-ircdev/ircd/s_bsd.c diff -u ircd-ircdev/ircd/s_bsd.c:1.14 ircd-ircdev/ircd/s_bsd.c:1.15 --- ircd-ircdev/ircd/s_bsd.c:1.14 Mon May 16 03:17:27 2005 +++ ircd-ircdev/ircd/s_bsd.c Wed Jun 22 00:54:30 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Functions that now (or in the past) relied on BSD APIs. - * @version $Id: s_bsd.c,v 1.14 2005/05/16 10:17:27 zolty Exp $ + * @version $Id: s_bsd.c,v 1.15 2005/06/22 07:54:30 zolty Exp $ */ #include "config.h" @@ -793,10 +793,10 @@ if (!find_conf_byhost(cli_confs(cptr), aconf->host, CONF_SERVER)) { sendto_opmask_butone(0, SNO_OLDSNO, "Host %s is not enabled for " - "connecting: no C-line", aconf->name); + "connecting: no Connect block", aconf->name); if (by && IsUser(by) && !MyUser(by)) { sendcmdto_one(&me, CMD_NOTICE, by, "%C :Connect to host %s failed: no " - "C-line", by, aconf->name); + "Connect block", by, aconf->name); } det_confs_butmask(cptr, 0); free_client(cptr); Index: ircd-ircdev/ircd/s_conf.c diff -u ircd-ircdev/ircd/s_conf.c:1.17 ircd-ircdev/ircd/s_conf.c:1.18 --- ircd-ircdev/ircd/s_conf.c:1.17 Mon May 23 01:58:37 2005 +++ ircd-ircdev/ircd/s_conf.c Wed Jun 22 00:54:30 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief ircd configuration file driver - * @version $Id: s_conf.c,v 1.17 2005/05/23 08:58:37 zolty Exp $ + * @version $Id: s_conf.c,v 1.18 2005/06/22 07:54:30 zolty Exp $ */ #include "config.h" @@ -133,9 +133,7 @@ aconf = (struct ConfItem*) MyMalloc(sizeof(struct ConfItem)); assert(0 != aconf); -#ifdef DEBUGMODE ++GlobalConfCount; -#endif memset(aconf, 0, sizeof(struct ConfItem)); aconf->status = type; aconf->next = GlobalConfList; @@ -163,9 +161,7 @@ MyFree(aconf->name); MyFree(aconf->hub_limit); MyFree(aconf); -#ifdef DEBUGMODE --GlobalConfCount; -#endif } /** Disassociate configuration from the client. @@ -1170,7 +1166,8 @@ if (IsConnecting(cptr) || IsHandshake(cptr)) { c_conf = find_conf_byname(lp, cli_name(cptr), CONF_SERVER); if (!c_conf) { - sendto_opmask_butone(0, SNO_OLDSNO, "Connect Error: lost C:line for %s", + sendto_opmask_butone(0, SNO_OLDSNO, + "Connect Error: lost Connect block for %s", cli_name(cptr)); det_confs_butmask(cptr, 0); return -1; Index: ircd-ircdev/ircd/s_debug.c diff -u ircd-ircdev/ircd/s_debug.c:1.9 ircd-ircdev/ircd/s_debug.c:1.10 --- ircd-ircdev/ircd/s_debug.c:1.9 Wed Mar 23 10:34:52 2005 +++ ircd-ircdev/ircd/s_debug.c Wed Jun 22 00:54:30 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Debug support for the ircd. - * @version $Id: s_debug.c,v 1.9 2005/03/23 18:34:52 zolty Exp $ + * @version $Id: s_debug.c,v 1.10 2005/06/22 07:54:30 zolty Exp $ */ #include "config.h" @@ -29,6 +29,7 @@ #include "channel.h" #include "class.h" #include "client.h" +#include "ddb.h" #include "gline.h" #include "hash.h" #include "ircd_alloc.h" @@ -39,6 +40,7 @@ #include "ircd.h" #include "jupe.h" #include "list.h" +#include "listener.h" #include "motd.h" #include "msgq.h" #include "numeric.h" @@ -47,6 +49,7 @@ #include "s_bsd.h" #include "s_conf.h" #include "s_stats.h" +#include "s_user.h" #include "send.h" #include "struct.h" #include "sys.h" @@ -218,7 +221,6 @@ struct Client *acptr; struct SLink *link; struct Ban *ban; -/* struct Watch *watch; */ struct Channel *chptr; struct ConfItem *aconf; const struct ConnectionClass* cltmp; @@ -229,12 +231,12 @@ cn = 0, /* connections */ ch = 0, /* channels */ lcc = 0, /* local client conf links */ - us = 0, /* user structs */ chi = 0, /* channel invites */ chb = 0, /* channel bans */ wwu = 0, /* whowas users */ cl = 0, /* classes */ co = 0, /* conf lines */ + listeners = 0, /* listeners */ memberships = 0; /* channel memberships */ int usi = 0, /* users invited */ @@ -247,9 +249,17 @@ chbm = 0, /* memory used by channel bans */ cm = 0, /* memory used by clients */ cnm = 0, /* memory used by connections */ + us = 0, /* user structs */ + usm = 0, /* memory used by user structs */ awm = 0, /* memo... [truncated message content] |
From: Toni G. <zo...@us...> - 2005-06-22 09:59:10
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-06-22 09:59:03 UTC Modified files: ChangeLog ChangeLog.es include/channel.h include/ddb.h include/patchlevel.h ircd/ddb.c ircd/ddb_events.c ircd/hash.c ircd/m_list.c ircd/s_user.c Log message: Author: zoltan <zo...@ir...> Log message: 2005-06-22 Toni García <zo...@ir...> 1.0.alpha40 * Tabla v de Vhosts * /LIST con comodines ---------------------- diff included ---------------------- Index: ircd-ircdev/ChangeLog diff -u ircd-ircdev/ChangeLog:1.41 ircd-ircdev/ChangeLog:1.42 --- ircd-ircdev/ChangeLog:1.41 Wed Jun 22 00:54:28 2005 +++ ircd-ircdev/ChangeLog Wed Jun 22 02:58:52 2005 @@ -1,10 +1,14 @@ # # ChangeLog for ircd-ircdev # -# $Id: ChangeLog,v 1.41 2005/06/22 07:54:28 zolty Exp $ +# $Id: ChangeLog,v 1.42 2005/06/22 09:58:52 zolty Exp $ # # Insert new changes at beginning of the change list. # +2005-06-22 Toni García <zo...@ir...> 1.0.alpha40 + * Vhosts table v + * /LIST with wildcards + 2005-06-22 Toni García <zo...@ir...> 1.0.alpha39 * Cleanups * Estetic bugfixes Index: ircd-ircdev/ChangeLog.es diff -u ircd-ircdev/ChangeLog.es:1.41 ircd-ircdev/ChangeLog.es:1.42 --- ircd-ircdev/ChangeLog.es:1.41 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/ChangeLog.es Wed Jun 22 02:58:52 2005 @@ -1,10 +1,14 @@ # # Log de Cambios para ircd-ircdev # -# $Id: ChangeLog.es,v 1.41 2005/06/22 07:54:29 zolty Exp $ +# $Id: ChangeLog.es,v 1.42 2005/06/22 09:58:52 zolty Exp $ # # Insertar los nuevos cambios al principio de esta lista de cambios. # +2005-06-22 Toni García <zo...@ir...> 1.0.alpha40 + * Tabla v de Vhosts + * /LIST con comodines + 2005-06-22 Toni García <zo...@ir...> 1.0.alpha39 * Limpieza * Fixs de bugs estéticos Index: ircd-ircdev/include/channel.h diff -u ircd-ircdev/include/channel.h:1.11 ircd-ircdev/include/channel.h:1.12 --- ircd-ircdev/include/channel.h:1.11 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/include/channel.h Wed Jun 22 02:58:52 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Channel management and maintenance. - * @version $Id: channel.h,v 1.11 2005/06/22 07:54:29 zolty Exp $ + * @version $Id: channel.h,v 1.12 2005/06/22 09:58:52 zolty Exp $ */ #ifndef INCLUDED_channel_h #define INCLUDED_channel_h @@ -192,6 +192,7 @@ #define LISTARG_TOPICLIMITS 0x0001 #define LISTARG_SHOWSECRET 0x0002 +#define LISTARG_NEGATEWILDCARD 0x0004 /** * Maximum acceptable lag time in seconds: A channel younger than @@ -361,6 +362,7 @@ time_t max_topic_time; time_t min_topic_time; unsigned int bucket; + char wildcard[CHANNELLEN]; }; struct ModeBuf { Index: ircd-ircdev/include/ddb.h diff -u ircd-ircdev/include/ddb.h:1.10 ircd-ircdev/include/ddb.h:1.11 --- ircd-ircdev/include/ddb.h:1.10 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/include/ddb.h Wed Jun 22 02:58:52 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Distributed DataBases structures, macros and functions. - * @version $Id: ddb.h,v 1.10 2005/06/22 07:54:29 zolty Exp $ + * @version $Id: ddb.h,v 1.11 2005/06/22 09:58:52 zolty Exp $ */ #ifndef INCLUDED_ddb_h #define INCLUDED_ddb_h @@ -55,6 +55,8 @@ #define DDB_ILINEDB 'i' /** Nicks table of %DDB Distributed Databases. */ #define DDB_NICKDB 'n' +/** Vhost table of %DDB Distributed Databases. */ +#define DDB_VHOSTDB 'v' /** Config table of %DDB Distributed Databases. */ #define DDB_CONFIGDB 'z' /** Last table of %DDB Distributed Databases. */ Index: ircd-ircdev/include/patchlevel.h diff -u ircd-ircdev/include/patchlevel.h:1.40 ircd-ircdev/include/patchlevel.h:1.41 --- ircd-ircdev/include/patchlevel.h:1.40 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/include/patchlevel.h Wed Jun 22 02:58:52 2005 @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: patchlevel.h,v 1.40 2005/06/22 07:54:29 zolty Exp $ + * $Id: patchlevel.h,v 1.41 2005/06/22 09:58:52 zolty Exp $ * */ -#define PATCHLEVEL ".alpha39" +#define PATCHLEVEL ".alpha40" #define RELEASE "1.0" Index: ircd-ircdev/ircd/ddb.c diff -u ircd-ircdev/ircd/ddb.c:1.11 ircd-ircdev/ircd/ddb.c:1.12 --- ircd-ircdev/ircd/ddb.c:1.11 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/ircd/ddb.c Wed Jun 22 02:58:52 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Implementation of Distributed DataBase. - * @version $Id: ddb.c,v 1.11 2005/06/22 07:54:29 zolty Exp $ + * @version $Id: ddb.c,v 1.12 2005/06/22 09:58:52 zolty Exp $ */ #include "config.h" @@ -151,7 +151,7 @@ unsigned int buffer[129 * sizeof(unsigned int)]; unsigned int *p = buffer; unsigned int x[2], v[2], k[2]; - char *p2; +/* char *p2; */ char buf[1024]; /* ID Mask Key Content */ @@ -208,6 +208,7 @@ ddb_resident_table[DDB_CHANDB2] = 32768; ddb_resident_table[DDB_ILINEDB] = 256; ddb_resident_table[DDB_NICKDB] = 32768; + ddb_resident_table[DDB_VHOSTDB] = 256; ddb_resident_table[DDB_CONFIGDB] = 256; for (table = DDB_INIT; table <= DDB_END; table++) Index: ircd-ircdev/ircd/ddb_events.c diff -u ircd-ircdev/ircd/ddb_events.c:1.7 ircd-ircdev/ircd/ddb_events.c:1.8 --- ircd-ircdev/ircd/ddb_events.c:1.7 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/ircd/ddb_events.c Wed Jun 22 02:58:52 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Events of Distributed DataBases. - * @version $Id: ddb_events.c,v 1.7 2005/06/22 07:54:29 zolty Exp $ + * @version $Id: ddb_events.c,v 1.8 2005/06/22 09:58:52 zolty Exp $ */ #include "config.h" @@ -48,6 +48,7 @@ static void ddb_events_table_c(char *key, char *content, int update); static void ddb_events_table_d(char *key, char *content, int update); static void ddb_events_table_n(char *key, char *content, int update); +static void ddb_events_table_v(char *key, char *content, int update); static void ddb_events_table_z(char *key, char *content, int update); @@ -63,6 +64,7 @@ ddb_events_table[DDB_CHANDB2] = ddb_events_table_d; ddb_events_table[DDB_ILINEDB] = 0; ddb_events_table[DDB_NICKDB] = ddb_events_table_n; + ddb_events_table[DDB_VHOSTDB] = ddb_events_table_v; ddb_events_table[DDB_CONFIGDB] = ddb_events_table_z; events_init = 1; @@ -342,6 +344,42 @@ } } +/** Handle events on Vhosts Table. + * @param[in] key Key of registry. + * @param[in] content Content of registry. + * @param[in] update Update of registry or no. + */ +static void +ddb_events_table_v(char *key, char *content, int update) +{ + struct Client *cptr; + + if (((cptr = FindUser(key))) && IsNickRegistered(cptr)) + { + /* Droping Key */ + if (!content) + { + /* + if (IsHiddenHost(cptr)) + { + ircd_snprintf(0, cli_user(cptr)->host, HOSTLEN, "SINIP"); + hide_hostmask(cptr, FLAG_HIDDENHOST); + + } + */ + } + else if (content) + { + if (IsHiddenHost(cptr)) + { + ircd_snprintf(0, cli_user(cptr)->host, HOSTLEN, content); + hide_hostmask(cptr, FLAG_NICKREG); + + } + } + } + +} /** Handle events on Config Table. * @param[in] key Key of registry. * @param[in] content Content of registry. Index: ircd-ircdev/ircd/hash.c diff -u ircd-ircdev/ircd/hash.c:1.10 ircd-ircdev/ircd/hash.c:1.11 --- ircd-ircdev/ircd/hash.c:1.10 Wed May 25 09:56:24 2005 +++ ircd-ircdev/ircd/hash.c Wed Jun 22 02:58:52 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Hash table management. - * @version $Id: hash.c,v 1.10 2005/05/25 16:56:24 zolty Exp $ + * @version $Id: hash.c,v 1.11 2005/06/22 09:58:52 zolty Exp $ * * This file used to use some very complicated hash function. Now it * uses CRC-32, but effectively remaps each input byte according to a @@ -512,6 +512,10 @@ && chptr->users < args->max_users && chptr->creationtime > args->min_time && chptr->creationtime < args->max_time + && (!args->wildcard[0] || (args->flags & LISTARG_NEGATEWILDCARD) || + (!match(args->wildcard, chptr->chname))) + && (!(args->flags & LISTARG_NEGATEWILDCARD) || + match(args->wildcard, chptr->chname)) && (!(args->flags & LISTARG_TOPICLIMITS) || (chptr->topic[0] && chptr->topic_time > args->min_topic_time Index: ircd-ircdev/ircd/m_list.c diff -u ircd-ircdev/ircd/m_list.c:1.7 ircd-ircdev/ircd/m_list.c:1.8 --- ircd-ircdev/ircd/m_list.c:1.7 Mon Mar 21 10:39:08 2005 +++ ircd-ircdev/ircd/m_list.c Wed Jun 22 02:58:52 2005 @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * - * $Id: m_list.c,v 1.7 2005/03/21 18:39:08 zolty Exp $ + * $Id: m_list.c,v 1.8 2005/06/22 09:58:52 zolty Exp $ * */ @@ -108,10 +108,11 @@ 0, /* min_time */ 4294967295U, /* max_users */ 0, /* min_users */ - 0, /* topic_limits */ + 0, /* flags */ 2147483647, /* max_topic_time */ 0, /* min_topic_time */ - 0 /* chptr */ + 0, /* bucket */ + {0} /* wildcard */ }; static struct ListingArgs la_default = { @@ -119,10 +120,11 @@ 0, /* min_time */ 4294967295U, /* max_users */ 0, /* min_users */ - 0, /* topic_limits */ + 0, /* flags */ 2147483647, /* max_topic_time */ 0, /* min_topic_time */ - 0 /* chptr */ + 0, /* bucket */ + {0} /* wildcard */ }; static int @@ -151,17 +153,25 @@ " \002C>\002\037min_minutes\037 ; Channels that exist more " "than \037min_minutes\037."); send_reply(sptr, RPL_LISTUSAGE, - " \002T<\002\037max_minutes\037 ; Channels with a topic last " - "set less than \037max_minutes\037 ago."); + " \002T<\002\037max_minutes\037 ; Channels with a topic last " + "set less than \037max_minutes\037 ago."); send_reply(sptr, RPL_LISTUSAGE, - " \002T>\002\037min_minutes\037 ; Channels with a topic last " - "set more than \037min_minutes\037 ago."); + " \002T>\002\037min_minutes\037 ; Channels with a topic last " + "set more than \037min_minutes\037 ago."); + send_reply(sptr, RPL_LISTUSAGE, + " \037pattern\037 ; Channels with names matching " + "\037pattern\037. "); + send_reply(sptr, RPL_LISTUSAGE, + " !\037pattern\037 ; Channels with names not " + "matching \037pattern\037. "); + send_reply(sptr, RPL_LISTUSAGE, "Note: Patterns may contain * and ?. " + "You may only give one pattern match constraint."); if (IsAnOper(sptr)) send_reply(sptr, RPL_LISTUSAGE, " \002S\002 ; Show secret channels."); send_reply(sptr, RPL_LISTUSAGE, - "Example: LIST <3,>1,C<10,T>0 ; 2 users, younger than 10 " - "min., topic set."); + "Example: LIST <3,>1,C<10,T>0,#a* ; 2 users, younger than 10 " + "min., topic set., starts with #a"); return LPARAM_ERROR; /* return error condition */ } @@ -173,6 +183,7 @@ int is_time = 0; char dir; unsigned int val; + char *tmp1, *tmp2; assert(0 != args); @@ -246,7 +257,47 @@ return show_usage(sptr); break; - default: /* channel name? */ + default: + /* It might be a wildcard... */ + if (strchr(param, '*') || + strchr(param, '?')) + { + if (param[0] == '!') + { + param++; + args->flags |= LISTARG_NEGATEWILDCARD; + } + + /* Only one wildcard allowed... */ + if (args->wildcard[0] != 0) + return show_usage(sptr); + + /* If its not going to match anything, don't bother. */ + if (param[0] != '*' && + param[0] != '?' && + param[0] != '#' && + param[0] != '&') + return show_usage(sptr); + + tmp1 = strchr(param, ','); + tmp2 = strchr(param, ' '); + if (tmp2 && (!tmp1 || (tmp2 < tmp1))) + tmp1 = tmp2; + + if (tmp1) + *tmp1++ = 0; + + ircd_strncpy(args->wildcard, param, CHANNELLEN-1); + args->wildcard[CHANNELLEN-1] = 0; + + if (tmp1 == NULL) + return LPARAM_SUCCESS; + + param = tmp1; + continue; + } + + /* channel name? */ if (!permit_chan || !IsChannelName(param)) return show_usage(sptr); Index: ircd-ircdev/ircd/s_user.c diff -u ircd-ircdev/ircd/s_user.c:1.21 ircd-ircdev/ircd/s_user.c:1.22 --- ircd-ircdev/ircd/s_user.c:1.21 Wed Jun 22 00:54:30 2005 +++ ircd-ircdev/ircd/s_user.c Wed Jun 22 02:58:52 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Miscellaneous user-related helper functions. - * @version $Id: s_user.c,v 1.21 2005/06/22 07:54:30 zolty Exp $ + * @version $Id: s_user.c,v 1.22 2005/06/22 09:58:52 zolty Exp $ */ #include "config.h" @@ -1141,6 +1141,10 @@ if (!IsNickEquivalent(flags)) { #if defined(DDB) + struct Ddb *ddbv; + + ddbv = ddb_find_key(DDB_VHOSTDB, cli_name(sptr)); + if (MyConnect(sptr)) { struct Flags oldflags; @@ -1154,9 +1158,17 @@ else SetNickRegistered(sptr); + if (ddbv && !IsHiddenHost(sptr)) + SetHiddenHost(sptr); + send_umode_out(cptr, sptr, &oldflags, IsRegistered(sptr)); } } + if (ddbv) + { + ircd_snprintf(0, cli_user(sptr)->host, HOSTLEN, ddb_content(ddbv)); + hide_hostmask(sptr, FLAG_HIDDENHOST); + } #endif /* defined(DDB) */ /* Notify change nick local/remote user */ @@ -1415,6 +1427,13 @@ chan = chan->next_channel) ClearBanValid(chan); break; +#elsif defined(DDB) || defined(SERVICES) + case FLAG_NICKREG: + /* Invalidate all bans against the user so we check them again */ + for (chan = (cli_user(cptr))->channel; chan; + chan = chan->next_channel) + ClearBanValid(chan); + break; #endif default: return 0; @@ -1423,17 +1442,23 @@ SetFlag(cptr, flag); #if defined(UNDERNET) if (!HasFlag(cptr, FLAG_HIDDENHOST) || !HasFlag(cptr, FLAG_ACCOUNT)) +#elsif defined(DDB) || defined(SERVICES) + if (!HasFlag(cptr, FLAG_HIDDENHOST) || !HasFlag(cptr, FLAG_NICKREG)) #else if (!HasFlag(cptr, FLAG_HIDDENHOST)) #endif return 0; +#if defined(UNDERNET) || defined(SERVICES) sendcmdto_common_channels_butone(cptr, CMD_QUIT, cptr, ":Registered"); ircd_snprintf(0, cli_user(cptr)->host, HOSTLEN, "%s.%s", -#if defined(UNDERNET) +# if defined(UNDERNET) cli_user(cptr)->account, feature_str(FEAT_HIDDEN_HOST)); -#else +# else cli_yxx(cptr), feature_str(FEAT_HIDDEN_HOST)); +# endif +#else + sendcmdto_common_channels_butone(cptr, CMD_QUIT, cptr, ":Changing virtualhost"); #endif /* ok, the client is now fully hidden, so let them know -- hikari */ @@ -1452,13 +1477,23 @@ if (!IsDelayedJoin(chan)) sendcmdto_channel_butserv_butone(cptr, CMD_JOIN, chan->channel, cptr, 0, "%H", chan->channel); - if (IsChanOp(chan) && HasVoice(chan)) + +#if defined(DDB) || defined(SERVICES) + if (IsChanOwner(chan) || IsChanOp(chan) || HasVoice(chan)) sendcmdto_channel_butserv_butone(&me, CMD_MODE, chan->channel, cptr, 0, - "%H +ov %C %C", chan->channel, cptr, + "%H +%s%s%s %C %C", chan->channel, cptr, + IsChanOwner(chan) ? "q" : "", + IsChanOp(chan) ? "o" : "", + HasVoice(chan) ? "v" : "", cptr); - else if (IsChanOp(chan) || HasVoice(chan)) +#else + if (IsChanOp(chan) || HasVoice(chan)) sendcmdto_channel_butserv_butone(&me, CMD_MODE, chan->channel, cptr, 0, - "%H +%c %C", chan->channel, IsChanOp(chan) ? 'o' : 'v', cptr); + "%H +%s%s %C %C", chan->channel, cptr, + IsChanOp(chan) ? "o" : "", + HasVoice(chan) ? "v" : "", + cptr); +#endif } return 0; } ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2005-06-22 10:01:41
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-06-22 10:01:35 UTC Modified files: TODO.es include/patchlevel.h Log message: actualizacion todo ---------------------- diff included ---------------------- Index: ircd-ircdev/TODO.es diff -u ircd-ircdev/TODO.es:1.27 ircd-ircdev/TODO.es:1.28 --- ircd-ircdev/TODO.es:1.27 Thu May 26 08:49:56 2005 +++ ircd-ircdev/TODO.es Wed Jun 22 03:01:25 2005 @@ -1,7 +1,7 @@ # # TODO para ircd-ircdev # -# $Id: TODO.es,v 1.27 2005/05/26 15:49:56 zolty Exp $ +# $Id: TODO.es,v 1.28 2005/06/22 10:01:25 zolty Exp $ # # Insertar las nuevas entradas al principio de la lista TODO. # @@ -20,7 +20,6 @@ - [G] ¿Modo +M de canales?. - [G] Poner uuna Feature para elegir entre salir o no el nombre del servidor en los notices de auth y dnslookup al conectar. - - [D] Virtualhost personalizado a traves de la DDB. - [D] U-lines a traves de la DDB. - [D] Mejorar la inicializacion de las DDB con los eventos. Index: ircd-ircdev/include/patchlevel.h diff -u ircd-ircdev/include/patchlevel.h:1.41 ircd-ircdev/include/patchlevel.h:1.42 --- ircd-ircdev/include/patchlevel.h:1.41 Wed Jun 22 02:58:52 2005 +++ ircd-ircdev/include/patchlevel.h Wed Jun 22 03:01:25 2005 @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: patchlevel.h,v 1.41 2005/06/22 09:58:52 zolty Exp $ + * $Id: patchlevel.h,v 1.42 2005/06/22 10:01:25 zolty Exp $ * */ -#define PATCHLEVEL ".alpha40" +#define PATCHLEVEL ".alpha41" #define RELEASE "1.0" ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2005-07-03 18:45:09
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-07-03 18:45:02 UTC Modified files: ChangeLog ChangeLog.es include/ddb.h include/s_user.h ircd/ddb.c ircd/ddb_events.c ircd/s_conf.c ircd/s_user.c Log message: Author: zoltan <zo...@ir...> Log message: 2005-07-03 Toni García <zo...@ir...> 1.0.alpha41 * IPs cifradas (sólo IPv4) ---------------------- diff included ---------------------- Index: ircd-ircdev/ChangeLog diff -u ircd-ircdev/ChangeLog:1.42 ircd-ircdev/ChangeLog:1.43 --- ircd-ircdev/ChangeLog:1.42 Wed Jun 22 02:58:52 2005 +++ ircd-ircdev/ChangeLog Sun Jul 3 11:44:51 2005 @@ -1,10 +1,13 @@ # # ChangeLog for ircd-ircdev # -# $Id: ChangeLog,v 1.42 2005/06/22 09:58:52 zolty Exp $ +# $Id: ChangeLog,v 1.43 2005/07/03 18:44:51 zolty Exp $ # # Insert new changes at beginning of the change list. # +2005-07-03 Toni García <zo...@ir...> 1.0.alpha41 + * Crypted ips (only IPv4) + 2005-06-22 Toni García <zo...@ir...> 1.0.alpha40 * Vhosts table v * /LIST with wildcards Index: ircd-ircdev/ChangeLog.es diff -u ircd-ircdev/ChangeLog.es:1.42 ircd-ircdev/ChangeLog.es:1.43 --- ircd-ircdev/ChangeLog.es:1.42 Wed Jun 22 02:58:52 2005 +++ ircd-ircdev/ChangeLog.es Sun Jul 3 11:44:51 2005 @@ -1,10 +1,13 @@ # # Log de Cambios para ircd-ircdev # -# $Id: ChangeLog.es,v 1.42 2005/06/22 09:58:52 zolty Exp $ +# $Id: ChangeLog.es,v 1.43 2005/07/03 18:44:51 zolty Exp $ # # Insertar los nuevos cambios al principio de esta lista de cambios. # +2005-07-03 Toni García <zo...@ir...> 1.0.alpha41 + * IPs cifradas (sólo IPv4) + 2005-06-22 Toni García <zo...@ir...> 1.0.alpha40 * Tabla v de Vhosts * /LIST con comodines Index: ircd-ircdev/include/ddb.h diff -u ircd-ircdev/include/ddb.h:1.11 ircd-ircdev/include/ddb.h:1.12 --- ircd-ircdev/include/ddb.h:1.11 Wed Jun 22 02:58:52 2005 +++ ircd-ircdev/include/ddb.h Sun Jul 3 11:44:51 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Distributed DataBases structures, macros and functions. - * @version $Id: ddb.h,v 1.11 2005/06/22 09:58:52 zolty Exp $ + * @version $Id: ddb.h,v 1.12 2005/07/03 18:44:51 zolty Exp $ */ #ifndef INCLUDED_ddb_h #define INCLUDED_ddb_h @@ -70,7 +70,8 @@ #define DDB_CONFIGDB_MAX_CLONES_PER_IP "maxclones" /** Message to clients with too many clones from your ip */ #define DDB_CONFIGDB_MSG_TOO_MANY_FROM_IP "msgmanyperip" - +/** Key to crypt ips */ +#define DDB_CONFIGDB_IP_CRYPT_KEY "ipcryptkey" /* * PseudoBots @@ -163,6 +164,12 @@ extern void ddb_db_hash_write(unsigned char table); extern void ddb_db_end(void); +/* PROVISIONAL */ +extern int max_clones; +extern char *msg_many_clones; +extern char *ip_crypt_key; +extern unsigned int binary_ip_crypt_key[2]; + #endif /* defined(DDB) */ #endif /* INCLUDED_ddb_h */ Index: ircd-ircdev/include/s_user.h diff -u ircd-ircdev/include/s_user.h:1.7 ircd-ircdev/include/s_user.h:1.8 --- ircd-ircdev/include/s_user.h:1.7 Thu Mar 31 04:58:03 2005 +++ ircd-ircdev/include/s_user.h Sun Jul 3 11:44:51 2005 @@ -21,7 +21,7 @@ */ /** @file s_user.h * @brief Miscellaneous user-related helper functions. - * @version $Id: s_user.h,v 1.7 2005/03/31 12:58:03 zolty Exp $ + * @version $Id: s_user.h,v 1.8 2005/07/03 18:44:51 zolty Exp $ */ #ifndef INCLUDED_s_user_h #define INCLUDED_s_user_h @@ -123,7 +123,7 @@ extern void send_user_info(struct Client* to, char* names, int rpl, InfoFormatter fmt); -extern int hide_hostmask(struct Client *cptr, unsigned int flags); +extern int hide_hostmask(struct Client *cptr, const char *vhost, unsigned int flags); 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); Index: ircd-ircdev/ircd/ddb.c diff -u ircd-ircdev/ircd/ddb.c:1.12 ircd-ircdev/ircd/ddb.c:1.13 --- ircd-ircdev/ircd/ddb.c:1.12 Wed Jun 22 02:58:52 2005 +++ ircd-ircdev/ircd/ddb.c Sun Jul 3 11:44:52 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Implementation of Distributed DataBase. - * @version $Id: ddb.c,v 1.12 2005/06/22 09:58:52 zolty Exp $ + * @version $Id: ddb.c,v 1.13 2005/07/03 18:44:52 zolty Exp $ */ #include "config.h" @@ -344,9 +344,7 @@ else ddb_del_key(table, keytemp); - /* TODO */ - /* Ejecutamos los eventos */ - /* if (!cptr && ddb_events_table[table]) */ +/* if (cptr && ddb_events_table[table]) */ if (ddb_events_table[table]) ddb_events_table[table](key, content, update); } Index: ircd-ircdev/ircd/ddb_events.c diff -u ircd-ircdev/ircd/ddb_events.c:1.8 ircd-ircdev/ircd/ddb_events.c:1.9 --- ircd-ircdev/ircd/ddb_events.c:1.8 Wed Jun 22 02:58:52 2005 +++ ircd-ircdev/ircd/ddb_events.c Sun Jul 3 11:44:52 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Events of Distributed DataBases. - * @version $Id: ddb_events.c,v 1.8 2005/06/22 09:58:52 zolty Exp $ + * @version $Id: ddb_events.c,v 1.9 2005/07/03 18:44:52 zolty Exp $ */ #include "config.h" @@ -38,6 +38,7 @@ #include "send.h" #include <stdio.h> +#include <stdlib.h> #include <string.h> /** It indicates events is initialized */ @@ -51,6 +52,11 @@ static void ddb_events_table_v(char *key, char *content, int update); static void ddb_events_table_z(char *key, char *content, int update); +/* PROVISIONAL */ +int max_clones; +char *msg_many_clones; +char *ip_crypt_key; +unsigned int binary_ip_crypt_key[2]; /** Initialize events module of %DDB Distributed DataBases. */ @@ -359,24 +365,18 @@ /* Droping Key */ if (!content) { - /* if (IsHiddenHost(cptr)) { - ircd_snprintf(0, cli_user(cptr)->host, HOSTLEN, "SINIP"); - hide_hostmask(cptr, FLAG_HIDDENHOST); - + hide_hostmask(cptr, 0, FLAG_NICKREG); } - */ } - else if (content) + else if (content && update) { - if (IsHiddenHost(cptr)) - { - ircd_snprintf(0, cli_user(cptr)->host, HOSTLEN, content); - hide_hostmask(cptr, FLAG_NICKREG); - - } - } + if (strcmp(content, cli_user(cptr)->host)) + hide_hostmask(cptr, content, FLAG_NICKREG); + } + else + hide_hostmask(cptr, content, FLAG_NICKREG); } } @@ -388,4 +388,38 @@ static void ddb_events_table_z(char *key, char *content, int update) { + if (content) + { + if (!strcmp(key, DDB_CONFIGDB_MAX_CLONES_PER_IP)) + max_clones = atoi(content); + else if (!strcmp(key, DDB_CONFIGDB_MSG_TOO_MANY_FROM_IP)) + msg_many_clones = content; + else if (!strcmp(key, DDB_CONFIGDB_IP_CRYPT_KEY)) + { + char keytmp[12 + 1]; + char c; + + ip_crypt_key = content; + strncpy(keytmp, content, 12); + keytmp[12] = '\0'; + c = keytmp[6]; + keytmp[6] = '\0'; + binary_ip_crypt_key[0] = base64toint(keytmp); + keytmp[6] = c; + binary_ip_crypt_key[1] = base64toint(keytmp + 6); + } + } + else + { + if (!strcmp(key, DDB_CONFIGDB_MAX_CLONES_PER_IP)) + max_clones = 0; + else if (!strcmp(key, DDB_CONFIGDB_MSG_TOO_MANY_FROM_IP)) + msg_many_clones = NULL; + else if (!strcmp(key, DDB_CONFIGDB_IP_CRYPT_KEY)) + { + ip_crypt_key = NULL; + binary_ip_crypt_key[0] = 0; + binary_ip_crypt_key[1] = 0; + } + } } Index: ircd-ircdev/ircd/s_conf.c diff -u ircd-ircdev/ircd/s_conf.c:1.18 ircd-ircdev/ircd/s_conf.c:1.19 --- ircd-ircdev/ircd/s_conf.c:1.18 Wed Jun 22 00:54:30 2005 +++ ircd-ircdev/ircd/s_conf.c Sun Jul 3 11:44:52 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief ircd configuration file driver - * @version $Id: s_conf.c,v 1.18 2005/06/22 07:54:30 zolty Exp $ + * @version $Id: s_conf.c,v 1.19 2005/07/03 18:44:52 zolty Exp $ */ #include "config.h" @@ -375,20 +375,17 @@ ddb = ddb_find_key(DDB_ILINEDB, (char *)ircd_ntoa(&cli_ip(cptr))); if (ddb && (clones = atoi(ddb_content(ddb)))) maxclones = clones; - else if ((ddb = ddb_find_key(DDB_CONFIGDB, DDB_CONFIGDB_MAX_CLONES_PER_IP)) - && (clones = atoi(ddb_content(ddb)))) - maxclones = clones; + else if (max_clones) /* DDB */ + maxclones = max_clones; else maxclones = aconf->maximum; if (IPcheck_nr(cptr) > maxclones) { - ddb = ddb_find_key(DDB_CONFIGDB, DDB_CONFIGDB_MSG_TOO_MANY_FROM_IP); - sendcmdto_one(&me, CMD_NOTICE, cptr, "%C :In the %s IRC Network only allows %d clones for your IP (%s)%s%s", cptr, feature_str(FEAT_NETWORK), maxclones, ircd_ntoa(&cli_ip(cptr)), - ddb ? ". " : "", ddb ? ddb_content(ddb) : ""); + msg_many_clones ? ". " : "", msg_many_clones ? msg_many_clones : ""); return ACR_TOO_MANY_FROM_IP; } #else Index: ircd-ircdev/ircd/s_user.c diff -u ircd-ircdev/ircd/s_user.c:1.22 ircd-ircdev/ircd/s_user.c:1.23 --- ircd-ircdev/ircd/s_user.c:1.22 Wed Jun 22 02:58:52 2005 +++ ircd-ircdev/ircd/s_user.c Sun Jul 3 11:44:52 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Miscellaneous user-related helper functions. - * @version $Id: s_user.c,v 1.22 2005/06/22 09:58:52 zolty Exp $ + * @version $Id: s_user.c,v 1.23 2005/07/03 18:44:52 zolty Exp $ */ #include "config.h" @@ -1165,10 +1165,8 @@ } } if (ddbv) - { - ircd_snprintf(0, cli_user(sptr)->host, HOSTLEN, ddb_content(ddbv)); - hide_hostmask(sptr, FLAG_HIDDENHOST); - } + hide_hostmask(sptr, ddb_content(ddbv), FLAG_HIDDENHOST); + #endif /* defined(DDB) */ /* Notify change nick local/remote user */ @@ -1406,11 +1404,12 @@ /** Set \a flag on \a cptr and possibly hide the client's hostmask. * @param[in,out] cptr User who is getting a new flag. + * @param[in] vhost Vhost of the user. * @param[in] flag Some flag that affects host-hiding (FLAG_HIDDENHOST, FLAG_ACCOUNT). * @return Zero. */ int -hide_hostmask(struct Client *cptr, unsigned int flag) +hide_hostmask(struct Client *cptr, const char *vhost, unsigned int flag) { struct Membership *chan; @@ -1443,7 +1442,8 @@ #if defined(UNDERNET) if (!HasFlag(cptr, FLAG_HIDDENHOST) || !HasFlag(cptr, FLAG_ACCOUNT)) #elsif defined(DDB) || defined(SERVICES) - if (!HasFlag(cptr, FLAG_HIDDENHOST) || !HasFlag(cptr, FLAG_NICKREG)) + /* if (!HasFlag(cptr, FLAG_HIDDENHOST) || !HasFlag(cptr, FLAG_NICKREG)) */ + if (1 == 0) #else if (!HasFlag(cptr, FLAG_HIDDENHOST)) #endif @@ -1459,6 +1459,53 @@ # endif #else sendcmdto_common_channels_butone(cptr, CMD_QUIT, cptr, ":Changing virtualhost"); + if (!vhost) + { + char ipcrypted[HOSTLEN + 1]; + + if (!ip_crypt_key) + { + strncpy(ipcrypted, "No.there.is.a.crypt.key", HOSTLEN); + } + /* IPv4 */ + else if (irc_in_addr_is_ipv4(&cli_ip(cptr))) + { + unsigned int v[2], x[2]; + unsigned int ts = 0; + + do { + x[0] = x[1] = 0; + v[0] = (binary_ip_crypt_key[0] & 0xffff0000) + ts; + v[1] = (ntohl(cli_ip(cptr).in6_16[6]) << 16) | ntohl(cli_ip(cptr).in6_16[7]); + + ircd_tea(v, binary_ip_crypt_key, x); + + /* Virtualhost format: qWeRty.AsDfGh.v4 */ + inttobase64(ipcrypted, x[0], 6); + ipcrypted[6] = '.'; + inttobase64(ipcrypted + 7, x[1], 6); + strncpy(ipcrypted + 13, ".v4", HOSTLEN); + log_write(LS_SYSTEM, L_CRIT, 0, "%u - %u", x[0], x[1]); + + /* No debería ocurrir nunca... */ + if (++ts == 65535) + { + strncpy(ipcrypted, cli_user(cptr)->realhost, HOSTLEN); + strncat(ipcrypted, ".v4", HOSTLEN); + break; + } + } while (strchr(ipcrypted, ']') || strchr(ipcrypted, '[')); + } + /* IPv6 */ + else + { + strncpy(ipcrypted, cli_user(cptr)->realhost, HOSTLEN); + strncat(ipcrypted, ".v6", HOSTLEN); + } + ircd_snprintf(0, cli_user(cptr)->host, HOSTLEN, ipcrypted); + } + else + ircd_snprintf(0, cli_user(cptr)->host, HOSTLEN, vhost); #endif /* ok, the client is now fully hidden, so let them know -- hikari */ @@ -1480,19 +1527,25 @@ #if defined(DDB) || defined(SERVICES) if (IsChanOwner(chan) || IsChanOp(chan) || HasVoice(chan)) + /* TODO-zoltan: Optimizar esto */ sendcmdto_channel_butserv_butone(&me, CMD_MODE, chan->channel, cptr, 0, - "%H +%s%s%s %C %C", chan->channel, cptr, + "%H +%s%s%s %s%s%s%s%s", chan->channel, IsChanOwner(chan) ? "q" : "", IsChanOp(chan) ? "o" : "", HasVoice(chan) ? "v" : "", - cptr); + IsChanOwner(chan) ? cli_name(cptr) : "", + IsChanOwner(chan) ? " " : "", + IsChanOp(chan) ? cli_name(cptr) : "", + IsChanOp(chan) ? " " : "", + HasVoice(chan) ? cli_name(cptr) : ""); #else - if (IsChanOp(chan) || HasVoice(chan)) + if (IsChanOp(chan) && HasVoice(chan)) sendcmdto_channel_butserv_butone(&me, CMD_MODE, chan->channel, cptr, 0, - "%H +%s%s %C %C", chan->channel, cptr, - IsChanOp(chan) ? "o" : "", - HasVoice(chan) ? "v" : "", + "%H +ov %C %C", chan->channel, cptr, cptr); + else if (IsChanOp(chan) || HasVoice(chan)) + sendcmdto_channel_butserv_butone(&me, CMD_MODE, chan->channel, cptr, 0, + "%H +%c %C", chan->channel, IsChanOp(chan) ? 'o' : 'v', cptr); #endif } return 0; @@ -1768,7 +1821,7 @@ if (!FlagHas(&setflags, FLAG_INVISIBLE) && IsInvisible(sptr)) ++UserStats.inv_clients; if (!FlagHas(&setflags, FLAG_HIDDENHOST) && do_host_hiding) - hide_hostmask(sptr, FLAG_HIDDENHOST); + hide_hostmask(sptr, 0, FLAG_HIDDENHOST); /* TODO-ZOLTAN */ send_umode_out(cptr, sptr, &setflags, prop); return 0; ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2005-07-03 20:22:01
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-07-03 20:21:52 UTC Modified files: ChangeLog ChangeLog.es include/client.h include/patchlevel.h include/res.h include/s_bsd.h include/s_misc.h ircd/hash.c ircd/ircd_auth.c ircd/ircd_crypt.c ircd/ircd_res.c ircd/list.c ircd/m_invite.c ircd/s_auth.c ircd/s_bsd.c ircd/s_conf.c ircd/s_misc.c ircd/s_serv.c ircd/s_user.c Log message: Author: zoltan <zo...@ir...> Log message: 2005-07-03 Toni García <zo...@ir...> 1.0.alpha42 * Sincronización Undernet ---------------------- diff included ---------------------- Index: ircd-ircdev/ChangeLog diff -u ircd-ircdev/ChangeLog:1.43 ircd-ircdev/ChangeLog:1.44 --- ircd-ircdev/ChangeLog:1.43 Sun Jul 3 11:44:51 2005 +++ ircd-ircdev/ChangeLog Sun Jul 3 13:21:41 2005 @@ -1,10 +1,13 @@ # # ChangeLog for ircd-ircdev # -# $Id: ChangeLog,v 1.43 2005/07/03 18:44:51 zolty Exp $ +# $Id: ChangeLog,v 1.44 2005/07/03 20:21:41 zolty Exp $ # # Insert new changes at beginning of the change list. # +2005-07-03 Toni García <zo...@ir...> 1.0.alpha42 + * Undernet synchronization + 2005-07-03 Toni García <zo...@ir...> 1.0.alpha41 * Crypted ips (only IPv4) Index: ircd-ircdev/ChangeLog.es diff -u ircd-ircdev/ChangeLog.es:1.43 ircd-ircdev/ChangeLog.es:1.44 --- ircd-ircdev/ChangeLog.es:1.43 Sun Jul 3 11:44:51 2005 +++ ircd-ircdev/ChangeLog.es Sun Jul 3 13:21:41 2005 @@ -1,10 +1,13 @@ # # Log de Cambios para ircd-ircdev # -# $Id: ChangeLog.es,v 1.43 2005/07/03 18:44:51 zolty Exp $ +# $Id: ChangeLog.es,v 1.44 2005/07/03 20:21:41 zolty Exp $ # # Insertar los nuevos cambios al principio de esta lista de cambios. # +2005-07-03 Toni García <zo...@ir...> 1.0.alpha42 + * Sincronización Undernet + 2005-07-03 Toni García <zo...@ir...> 1.0.alpha41 * IPs cifradas (sólo IPv4) Index: ircd-ircdev/include/client.h diff -u ircd-ircdev/include/client.h:1.15 ircd-ircdev/include/client.h:1.16 --- ircd-ircdev/include/client.h:1.15 Mon Apr 11 01:44:59 2005 +++ ircd-ircdev/include/client.h Sun Jul 3 13:21:41 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Structures and functions for handling local clients. - * @version $Id: client.h,v 1.15 2005/04/11 08:44:59 zolty Exp $ + * @version $Id: client.h,v 1.16 2005/07/03 20:21:41 zolty Exp $ */ #ifndef INCLUDED_client_h #define INCLUDED_client_h @@ -225,8 +225,6 @@ struct SLink* con_confs; /**< Associated configuration records. */ HandlerType con_handler; /**< Message index into command table for parsing. */ - struct DNSReply* con_dns_reply; /**< DNS reply received during client - registration. */ struct ListingArgs* con_listing; /**< Current LIST status. */ unsigned long con_unreg; /**< Indicate what still needs to be done */ unsigned int con_max_sendq; /**< cached max send queue for client */ @@ -382,8 +380,6 @@ #define cli_confs(cli) con_confs(cli_connect(cli)) /** Get handler type for client. */ #define cli_handler(cli) con_handler(cli_connect(cli)) -/** Get DNS reply for client. */ -#define cli_dns_reply(cli) con_dns_reply(cli_connect(cli)) /** Get LIST status for client. */ #define cli_listing(cli) con_listing(cli_connect(cli)) /** Get cached max SendQ for client. */ @@ -463,8 +459,6 @@ #define con_confs(con) ((con)->con_confs) /** Get command handler for the connection. */ #define con_handler(con) ((con)->con_handler) -/** Get DNS reply for the connection. */ -#define con_dns_reply(con) ((con)->con_dns_reply) /** Get the LIST status for the connection. */ #define con_listing(con) ((con)->con_listing) /** Get remining steps before registration completes. */ Index: ircd-ircdev/include/patchlevel.h diff -u ircd-ircdev/include/patchlevel.h:1.42 ircd-ircdev/include/patchlevel.h:1.43 --- ircd-ircdev/include/patchlevel.h:1.42 Wed Jun 22 03:01:25 2005 +++ ircd-ircdev/include/patchlevel.h Sun Jul 3 13:21:41 2005 @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: patchlevel.h,v 1.42 2005/06/22 10:01:25 zolty Exp $ + * $Id: patchlevel.h,v 1.43 2005/07/03 20:21:41 zolty Exp $ * */ -#define PATCHLEVEL ".alpha41" +#define PATCHLEVEL ".alpha42" #define RELEASE "1.0" Index: ircd-ircdev/include/res.h diff -u ircd-ircdev/include/res.h:1.7 ircd-ircdev/include/res.h:1.8 --- ircd-ircdev/include/res.h:1.7 Mon Jan 10 04:22:00 2005 +++ ircd-ircdev/include/res.h Sun Jul 3 13:21:41 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief IRC resolver API. - * @version $Id: res.h,v 1.7 2005/01/10 12:22:00 zolty Exp $ + * @version $Id: res.h,v 1.8 2005/07/03 20:21:41 zolty Exp $ */ #ifndef INCLUDED_res_h @@ -88,19 +88,8 @@ unsigned short port; /**< Port number, host-endian. */ }; -/** DNS reply structure. */ -struct DNSReply -{ - char *h_name; /**< Hostname. */ - struct irc_in_addr addr; /**< IP address. */ -}; - -/** DNS callback structure. */ -struct DNSQuery -{ - void *vptr; /**< pointer used by callback to identify request */ - void (*callback)(void* vptr, struct DNSReply *reply); /**< callback to call */ -}; +/** DNS callback function signature. */ +typedef void (*dns_callback_f)(void *vptr, const struct irc_in_addr *addr, const char *h_name); /** DNS query and response header. */ typedef struct @@ -145,8 +134,8 @@ extern size_t cres_mem(struct Client* cptr); extern void delete_resolver_queries(const void *vptr); extern void report_dns_servers(struct Client *source_p, const struct StatDesc *sd, char *param); -extern void gethost_byname(const char *name, const struct DNSQuery *query); -extern void gethost_byaddr(const struct irc_in_addr *addr, const struct DNSQuery *query); +extern void gethost_byname(const char *name, dns_callback_f callback, void *ctx); +extern void gethost_byaddr(const struct irc_in_addr *addr, dns_callback_f callback, void *ctx); /** Evaluate to non-zero if \a ADDR is a valid address (not all 0s and not all 1s). */ #define irc_in_addr_valid(ADDR) (((ADDR)->in6_16[0] && ~(ADDR)->in6_16[0]) \ Index: ircd-ircdev/include/s_bsd.h diff -u ircd-ircdev/include/s_bsd.h:1.6 ircd-ircdev/include/s_bsd.h:1.7 --- ircd-ircdev/include/s_bsd.h:1.6 Mon Jan 10 04:22:00 2005 +++ ircd-ircdev/include/s_bsd.h Sun Jul 3 13:21:41 2005 @@ -21,7 +21,7 @@ */ /** @file s_bsd.h * @brief Wrapper functions to avoid direct use of BSD APIs. - * @version $Id: s_bsd.h,v 1.6 2005/01/10 12:22:00 zolty Exp $ + * @version $Id: s_bsd.h,v 1.7 2005/07/03 20:21:41 zolty Exp $ */ #ifndef INCLUDED_s_bsd_h #define INCLUDED_s_bsd_h @@ -81,7 +81,6 @@ */ extern unsigned int deliver_it(struct Client *cptr, struct MsgQ *buf); extern int connect_server(struct ConfItem* aconf, struct Client* by); -extern void release_dns_reply(struct Client* cptr); extern int net_close_unregistered_connections(struct Client* source); extern void close_connection(struct Client *cptr); extern void add_connection(struct Listener* listener, int fd); Index: ircd-ircdev/include/s_misc.h diff -u ircd-ircdev/include/s_misc.h:1.4 ircd-ircdev/include/s_misc.h:1.5 --- ircd-ircdev/include/s_misc.h:1.4 Mon Jan 10 04:22:00 2005 +++ ircd-ircdev/include/s_misc.h Sun Jul 3 13:21:41 2005 @@ -21,7 +21,7 @@ */ /** @file s_misc.h * @brief Miscellaneous support functions and declarations. - * @version $Id: s_misc.h,v 1.4 2005/01/10 12:22:00 zolty Exp $ + * @version $Id: s_misc.h,v 1.5 2005/07/03 20:21:41 zolty Exp $ */ #ifndef INCLUDED_s_misc_h #define INCLUDED_s_misc_h @@ -105,7 +105,6 @@ struct Client *sptr, const char *pattern, ...); extern void initstats(void); extern char *date(time_t clock); -extern void get_sockhost(struct Client *cptr, char *host); extern int vexit_client_msg(struct Client *cptr, struct Client *bcptr, struct Client *sptr, const char *pattern, va_list vl); extern void tstats(struct Client *cptr, const struct StatDesc *sd, Index: ircd-ircdev/ircd/hash.c diff -u ircd-ircdev/ircd/hash.c:1.11 ircd-ircdev/ircd/hash.c:1.12 --- ircd-ircdev/ircd/hash.c:1.11 Wed Jun 22 02:58:52 2005 +++ ircd-ircdev/ircd/hash.c Sun Jul 3 13:21:42 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Hash table management. - * @version $Id: hash.c,v 1.11 2005/06/22 09:58:52 zolty Exp $ + * @version $Id: hash.c,v 1.12 2005/07/03 20:21:42 zolty Exp $ * * This file used to use some very complicated hash function. Now it * uses CRC-32, but effectively remaps each input byte according to a @@ -40,6 +40,7 @@ #include "ircd_reply.h" #include "ircd_string.h" #include "ircd.h" +#include "match.h" #include "msg.h" #include "numeric.h" #include "random.h" Index: ircd-ircdev/ircd/ircd_auth.c diff -u ircd-ircdev/ircd/ircd_auth.c:1.6 ircd-ircdev/ircd/ircd_auth.c:1.7 --- ircd-ircdev/ircd/ircd_auth.c:1.6 Sat May 7 15:23:40 2005 +++ ircd-ircdev/ircd/ircd_auth.c Sun Jul 3 13:21:42 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief IAuth client implementation for an IRC server. - * @version $Id: ircd_auth.c,v 1.6 2005/05/07 22:23:40 zolty Exp $ + * @version $Id: ircd_auth.c,v 1.7 2005/07/03 20:21:42 zolty Exp $ */ #include "config.h" #include "client.h" @@ -84,7 +84,6 @@ struct Timer i_reconn_timer; /**< when to reconnect the connection */ struct Timer i_request_timer; /**< when the current request times out */ struct IAuthFlags i_flags; /**< connection state/status/flags */ - struct DNSQuery i_query; /**< DNS lookup for iauth server */ unsigned int i_recvM; /**< messages received */ unsigned int i_sendM; /**< messages sent */ unsigned int i_recvK; /**< kilobytes received */ @@ -408,13 +407,13 @@ * @param[in] vptr Pointer to the IAuth struct. * @param[in] he DNS reply parameters. */ -static void iauth_dns_callback(void *vptr, struct DNSReply *he) +static void iauth_dns_callback(void *vptr, const struct irc_in_addr *addr, const char *h_name) { struct IAuth *iauth = vptr; - if (!he) { + if (!addr) { log_write(LS_IAUTH, L_NOTICE, 0, "IAuth connection to %s failed: host lookup failed", i_host(iauth)); } else { - memcpy(&i_addr(iauth).addr, &he->addr, sizeof(i_addr(iauth).addr)); + memcpy(&i_addr(iauth).addr, &addr, sizeof(i_addr(iauth).addr)); if (!irc_in_addr_valid(&i_addr(iauth).addr)) { log_write(LS_IAUTH, L_NOTICE, 0, "IAuth connection to %s failed: host came back as unresolved", i_host(iauth)); return; @@ -463,9 +462,7 @@ log_write(LS_IAUTH, L_DEBUG, 0, "IAuth attempt connection to %s port %p.", i_host(iauth), i_port(iauth)); if (!irc_in_addr_valid(&i_addr(iauth).addr) && !ircd_aton(&i_addr(iauth).addr, i_host(iauth))) { - i_query(iauth).vptr = iauth; - i_query(iauth).callback = iauth_dns_callback; - gethost_byname(i_host(iauth), &i_query(iauth)); + gethost_byname(i_host(iauth), iauth_dns_callback, iauth); return; } local = irc_in_addr_is_ipv4(&i_addr(iauth).addr) ? &VirtualHost_v4 : &VirtualHost_v6; Index: ircd-ircdev/ircd/ircd_crypt.c diff -u ircd-ircdev/ircd/ircd_crypt.c:1.4 ircd-ircdev/ircd/ircd_crypt.c:1.5 --- ircd-ircdev/ircd/ircd_crypt.c:1.4 Mon Mar 21 10:39:07 2005 +++ ircd-ircdev/ircd/ircd_crypt.c Sun Jul 3 13:21:42 2005 @@ -22,7 +22,7 @@ /** * @file * @brief Core password encryption routines. - * @version $Id: ircd_crypt.c,v 1.4 2005/03/21 18:39:07 zolty Exp $ + * @version $Id: ircd_crypt.c,v 1.5 2005/07/03 20:21:42 zolty Exp $ * * This is a new look crypto API for ircu, it can handle different * password formats by the grace of magic tokens at the beginning of the @@ -202,9 +202,13 @@ /* try to use native crypt for an old-style (untagged) password */ if (strlen(salt) > 2) { + char *s; temp_hashed_pass = (char*)ircd_crypt_native(key, salt); if (!ircd_strcmp(temp_hashed_pass, salt)) - return strdup(temp_hashed_pass); + { + DupString(s, temp_hashed_pass); + return s; + } } return NULL; Index: ircd-ircdev/ircd/ircd_res.c diff -u ircd-ircdev/ircd/ircd_res.c:1.9 ircd-ircdev/ircd/ircd_res.c:1.10 --- ircd-ircdev/ircd/ircd_res.c:1.9 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/ircd/ircd_res.c Sun Jul 3 13:21:42 2005 @@ -41,7 +41,7 @@ */ /** @file * @brief IRC resolver functions. - * @version $Id: ircd_res.c,v 1.9 2005/06/22 07:54:29 zolty Exp $ + * @version $Id: ircd_res.c,v 1.10 2005/07/03 20:21:42 zolty Exp $ */ #include "client.h" #include "ircd_alloc.h" @@ -137,17 +137,19 @@ time_t timeout; /**< When this request times out. */ struct irc_in_addr addr; /**< Address for this request. */ char *name; /**< Hostname for this request. */ - struct DNSQuery query; /**< Query callback for this request. */ + dns_callback_f callback; /**< Callback function on completion. */ + void *callback_ctx; /**< Context pointer for callback. */ }; /** Base of request list. */ static struct dlink request_list; static void rem_request(struct reslist *request); -static struct reslist *make_request(const struct DNSQuery *query); -static void do_query_name(const struct DNSQuery *query, + +static struct reslist *make_request(dns_callback_f callback, void *ctx); +static void do_query_name(dns_callback_f callback, void *ctx, const char* name, struct reslist *request, int); -static void do_query_number(const struct DNSQuery *query, +static void do_query_number(dns_callback_f callback, void *ctx, const struct irc_in_addr *, struct reslist *request); static void query_name(const char *name, int query_class, int query_type, @@ -156,7 +158,6 @@ static void resend_query(struct reslist *request); static int proc_answer(struct reslist *request, HEADER *header, char *, char *); static struct reslist *find_id(int id); -static struct DNSReply *make_dnsreply(struct reslist *request); static void res_readreply(struct Event *ev); static void timeout_resolver(struct Event *notused); @@ -270,7 +271,7 @@ * @return Newly allocated and linked-in reslist. */ static struct reslist * -make_request(const struct DNSQuery* query) +make_request(dns_callback_f callback, void *ctx) { struct reslist *request; @@ -286,7 +287,8 @@ request->resend = 1; request->timeout = feature_int(FEAT_IRCD_RES_TIMEOUT); memset(&request->addr, 0, sizeof(request->addr)); - memcpy(&request->query, query, sizeof(request->query)); + request->callback = callback; + request->callback_ctx = ctx; add_dlink(&request->node, &request_list); return(request); @@ -335,7 +337,7 @@ if (--request->retries <= 0) { Debug((DEBUG_DNS, "Request %p out of retries; destroying", request)); - (*request->query.callback)(request->query.vptr, 0); + (*request->callback)(request->callback_ctx, NULL, NULL); rem_request(request); continue; } @@ -374,7 +376,7 @@ { next_ptr = ptr->next; request = (struct reslist*)ptr; - if (vptr == request->query.vptr) { + if (vptr == request->callback_ctx) { Debug((DEBUG_DNS, "Removing request %p with vptr %p", request, vptr)); rem_request(request); } @@ -439,9 +441,9 @@ * @param[in] query Callback information. */ void -gethost_byname(const char *name, const struct DNSQuery *query) +gethost_byname(const char *name, dns_callback_f callback, void *ctx) { - do_query_name(query, name, NULL, T_AAAA); + do_query_name(callback, ctx, name, NULL, T_AAAA); } /** Try to look up hostname for an address. @@ -449,9 +451,9 @@ * @param[in] query Callback information. */ void -gethost_byaddr(const struct irc_in_addr *addr, const struct DNSQuery *query) +gethost_byaddr(const struct irc_in_addr *addr, dns_callback_f callback, void *ctx) { - do_query_number(query, addr, NULL); + do_query_number(callback, ctx, addr, NULL); } /** Send a query to look up the address for a name. @@ -461,7 +463,7 @@ * @param[in] type Preferred request type. */ static void -do_query_name(const struct DNSQuery *query, const char *name, +do_query_name(dns_callback_f callback, void *ctx, const char *name, struct reslist *request, int type) { char host_name[HOSTLEN + 1]; @@ -471,7 +473,7 @@ if (request == NULL) { - request = make_request(query); + request = make_request(callback, ctx); DupString(request->name, host_name); #ifdef IPV6 if (type != T_A) @@ -492,7 +494,7 @@ * @param[in] request DNS lookup structure (may be NULL). */ static void -do_query_number(const struct DNSQuery *query, const struct irc_in_addr *addr, +do_query_number(dns_callback_f callback, void *ctx, const struct irc_in_addr *addr, struct reslist *request) { char ipbuf[128]; @@ -537,7 +539,7 @@ } if (request == NULL) { - request = make_request(query); + request = make_request(callback, ctx); request->state= REQ_PTR; request->type = T_PTR; memcpy(&request->addr, addr, sizeof(request->addr)); @@ -597,15 +599,15 @@ switch(request->type) { case T_PTR: - do_query_number(NULL, &request->addr, request); + do_query_number(NULL, NULL, &request->addr, request); break; case T_A: - do_query_name(NULL, request->name, request, request->type); + do_query_name(NULL, NULL, request->name, request, request->type); break; case T_AAAA: /* didn't work, try A */ if (request->state == REQ_AAAA) - do_query_name(NULL, request->name, request, T_A); + do_query_name(NULL, NULL, request->name, request, T_A); default: break; } @@ -774,7 +776,6 @@ char buf[sizeof(HEADER) + MAXPACKET]; HEADER *header; struct reslist *request = NULL; - struct DNSReply *reply = NULL; unsigned int rc; int answer_count; @@ -837,7 +838,7 @@ * send any more (no retries granted). */ Debug((DEBUG_DNS, "Request %p has bad response (state %d type %d rcode %d)", request, request->state, request->type, header->rcode)); - (*request->query.callback)(request->query.vptr, 0); + (*request->callback)(request->callback_ctx, NULL, NULL); rem_request(request); } } @@ -861,7 +862,7 @@ * don't bother trying again, the client address doesn't resolve */ Debug((DEBUG_DNS, "Request %p PTR had empty name", request)); - (*request->query.callback)(request->query.vptr, reply); + (*request->callback)(request->callback_ctx, NULL, NULL); rem_request(request); return; } @@ -872,10 +873,10 @@ */ #ifdef IPV6 if (!irc_in_addr_is_ipv4(&request->addr)) - do_query_name(&request->query, request->name, NULL, T_AAAA); + do_query_name(request->callback, request->callback_ctx, request->name, NULL, T_AAAA); else #endif - do_query_name(&request->query, request->name, NULL, T_A); + do_query_name(request->callback, request->callback_ctx, request->name, NULL, T_A); Debug((DEBUG_DNS, "Request %p switching to forward resolution", request)); rem_request(request); } @@ -884,8 +885,7 @@ /* * got a name and address response, client resolved */ - reply = make_dnsreply(request); - (*request->query.callback)(request->query.vptr, (reply) ? reply : 0); + (*request->callback)(request->callback_ctx, &request->addr, request->name); Debug((DEBUG_DNS, "Request %p got forward resolution", request)); rem_request(request); } @@ -903,23 +903,6 @@ } } -/** Build a DNSReply for a completed request. - * @param[in] request Completed DNS request. - * @return Newly allocated DNSReply containing host name and address. - */ -static struct DNSReply * -make_dnsreply(struct reslist *request) -{ - struct DNSReply *cp; - assert(request != 0); - - cp = (struct DNSReply *)MyMalloc(sizeof(struct DNSReply)); - - DupString(cp->h_name, request->name); - memcpy(&cp->addr, &request->addr, sizeof(cp->addr)); - return(cp); -} - /** Statistics callback to list DNS servers. * @param[in] source_p Client requesting statistics. * @param[in] sd Stats descriptor for request (ignored). Index: ircd-ircdev/ircd/list.c diff -u ircd-ircdev/ircd/list.c:1.8 ircd-ircdev/ircd/list.c:1.9 --- ircd-ircdev/ircd/list.c:1.8 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/ircd/list.c Sun Jul 3 13:21:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Singly and doubly linked list manipulation implementation. - * @version $Id: list.c,v 1.8 2005/06/22 07:54:29 zolty Exp $ + * @version $Id: list.c,v 1.9 2005/07/03 20:21:42 zolty Exp $ */ #include "config.h" @@ -168,10 +168,6 @@ Debug((DEBUG_LIST, "Deallocating connection %p", con)); - if (con_dns_reply(con)) { - MyFree(con_dns_reply(con)); - con_dns_reply(con) = 0; - } if (-1 < con_fd(con)) close(con_fd(con)); MsgQClear(&(con_sendQ(con))); Index: ircd-ircdev/ircd/m_invite.c diff -u ircd-ircdev/ircd/m_invite.c:1.12 ircd-ircdev/ircd/m_invite.c:1.13 --- ircd-ircdev/ircd/m_invite.c:1.12 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/ircd/m_invite.c Sun Jul 3 13:21:42 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_invite.c,v 1.12 2005/06/22 07:54:29 zolty Exp $ + * $Id: m_invite.c,v 1.13 2005/07/03 20:21:42 zolty Exp $ * */ @@ -179,7 +179,7 @@ if (MyConnect(acptr)) { add_invite(acptr, chptr); sendcmdto_one(sptr, CMD_INVITE, acptr, "%s %H", cli_name(acptr), chptr); - } else { + } else if (!IsLocalChannel(chptr->chname)) { sendcmdto_one(sptr, CMD_INVITE, acptr, "%s %H %Tu", cli_name(acptr), chptr, chptr->creationtime); } Index: ircd-ircdev/ircd/s_auth.c diff -u ircd-ircdev/ircd/s_auth.c:1.11 ircd-ircdev/ircd/s_auth.c:1.12 --- ircd-ircdev/ircd/s_auth.c:1.11 Mon Mar 21 10:39:11 2005 +++ ircd-ircdev/ircd/s_auth.c Sun Jul 3 13:21:42 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Implementation of DNS and ident lookups. - * @version $Id: s_auth.c,v 1.11 2005/03/21 18:39:11 zolty Exp $ + * @version $Id: s_auth.c,v 1.12 2005/07/03 20:21:42 zolty Exp $ */ #include "config.h" @@ -106,7 +106,7 @@ * @return Non-zero if the hostname is valid. */ static int -auth_verify_hostname(char *host, int maxlen) +auth_verify_hostname(const char *host, int maxlen) { int i; @@ -299,7 +299,7 @@ * @param vptr The pending struct AuthRequest. * @param hp Pointer to the DNS reply (or NULL, if lookup failed). */ -static void auth_dns_callback(void* vptr, struct DNSReply* hp) +static void auth_dns_callback(void* vptr, const struct irc_in_addr *addr, const char *h_name) { struct AuthRequest* auth = (struct AuthRequest*) vptr; assert(auth); @@ -310,31 +310,30 @@ */ ClearDNSPending(auth); - if (hp) { + if (addr) { /* * Verify that the host to ip mapping is correct both ways and that * the ip#(s) for the socket is listed for the host. */ - if (irc_in_addr_cmp(&hp->addr, &cli_ip(auth->client))) { + if (irc_in_addr_cmp(addr, &cli_ip(auth->client))) { if (IsUserPort(auth->client)) sendheader(auth->client, REPORT_IP_MISMATCH); sendto_opmask_butone(0, SNO_IPMISMATCH, "IP# Mismatch: %s != %s[%s]", - cli_sock_ip(auth->client), hp->h_name, - ircd_ntoa(&hp->addr)); + cli_sock_ip(auth->client), h_name, + ircd_ntoa(addr)); if (feature_bool(FEAT_KILL_IPMISMATCH)) { auth_kill_client(auth); return; } } - else if (!auth_verify_hostname(hp->h_name, HOSTLEN)) + else if (!auth_verify_hostname(h_name, HOSTLEN)) { if (IsUserPort(auth->client)) sendheader(auth->client, REPORT_INVAL_DNS); } else { - cli_dns_reply(auth->client) = hp; - ircd_strncpy(cli_sockhost(auth->client), hp->h_name, HOSTLEN); + ircd_strncpy(cli_sockhost(auth->client), h_name, HOSTLEN); if (IsUserPort(auth->client)) sendheader(auth->client, REPORT_FIN_DNS); } @@ -549,15 +548,9 @@ if (irc_in_addr_is_loopback(&cli_ip(client))) strcpy(cli_sockhost(client), cli_name(&me)); else { - struct DNSQuery query; - - query.vptr = auth; - query.callback = auth_dns_callback; - if (IsUserPort(auth->client)) sendheader(client, REPORT_DO_DNS); - - gethost_byaddr(&cli_ip(client), &query); + gethost_byaddr(&cli_ip(client), auth_dns_callback, auth); SetDNSPending(auth); } } Index: ircd-ircdev/ircd/s_bsd.c diff -u ircd-ircdev/ircd/s_bsd.c:1.15 ircd-ircdev/ircd/s_bsd.c:1.16 --- ircd-ircdev/ircd/s_bsd.c:1.15 Wed Jun 22 00:54:30 2005 +++ ircd-ircdev/ircd/s_bsd.c Sun Jul 3 13:21:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Functions that now (or in the past) relied on BSD APIs. - * @version $Id: s_bsd.c,v 1.15 2005/06/22 07:54:30 zolty Exp $ + * @version $Id: s_bsd.c,v 1.16 2005/07/03 20:21:42 zolty Exp $ */ #include "config.h" @@ -175,14 +175,13 @@ * @param vptr The struct ConfItem representing the Connect block. * @param hp A pointer to the DNS lookup results (NULL on failure). */ -static void connect_dns_callback(void* vptr, struct DNSReply* hp) +static void connect_dns_callback(void* vptr, const struct irc_in_addr *addr, const char *h_name) { struct ConfItem* aconf = (struct ConfItem*) vptr; assert(aconf); aconf->dns_pending = 0; - if (hp) { - memcpy(&aconf->address, &hp->addr, sizeof(aconf->address)); - MyFree(hp); + if (addr) { + memcpy(&aconf->address, addr, sizeof(aconf->address)); connect_server(aconf, 0); } else @@ -326,21 +325,6 @@ return bytes_written; } -/** Free the client's DNS reply, if any. - * @param cptr Client to operate on. - */ -void release_dns_reply(struct Client* cptr) -{ - assert(0 != cptr); - assert(MyConnect(cptr)); - - if (cli_dns_reply(cptr)) { - MyFree(cli_dns_reply(cptr)->h_name); - MyFree(cli_dns_reply(cptr)); - cli_dns_reply(cptr) = 0; - } -} - /** Complete non-blocking connect()-sequence. Check access and * terminate connection, if trouble detected. * @param cptr Client to which we have connected, with all ConfItem structs attached. @@ -541,27 +525,32 @@ */ os_disable_options(fd); - /* - * Add this local client to the IPcheck registry. - * - * If they're throttled, murder them, but tell them why first. - */ - if (!IPcheck_local_connect(&addr.addr, &next_target) && !listener->server) + if (listener->server) { - ++ServerStats->is_ref; - write(fd, throttle_message, strlen(throttle_message)); - close(fd); - return; + new_client = make_client(0, STAT_UNKNOWN_SERVER); + } + else + { + /* + * Add this local client to the IPcheck registry. + * + * If they're throttled, murder them, but tell them why first. + */ + if (!IPcheck_local_connect(&addr.addr, &next_target)) + { + ++ServerStats->is_ref; + write(fd, throttle_message, strlen(throttle_message)); + close(fd); + return; + } + new_client = make_client(0, STAT_UNKNOWN_USER); + SetIPChecked(new_client); } - - new_client = make_client(0, ((listener->server) ? - STAT_UNKNOWN_SERVER : STAT_UNKNOWN_USER)); /* * Copy ascii address to 'sockhost' just in case. Then we have something * valid to put into error messages... */ - SetIPChecked(new_client); ircd_ntoa_r(cli_sock_ip(new_client), &addr.addr); strcpy(cli_sockhost(new_client), cli_sock_ip(new_client)); memcpy(&cli_ip(new_client), &addr.addr, sizeof(cli_ip(new_client))); @@ -766,14 +755,8 @@ if (!irc_in_addr_valid(&aconf->address.addr) && !ircd_aton(&aconf->address.addr, aconf->host)) { char buf[HOSTLEN + 1]; - struct DNSQuery query; - - query.vptr = aconf; - query.callback = connect_dns_callback; host_from_uh(buf, aconf->host, HOSTLEN); - buf[HOSTLEN] = '\0'; - - gethost_byname(buf, &query); + gethost_byname(buf, connect_dns_callback, aconf); aconf->dns_pending = 1; return 0; } Index: ircd-ircdev/ircd/s_conf.c diff -u ircd-ircdev/ircd/s_conf.c:1.19 ircd-ircdev/ircd/s_conf.c:1.20 --- ircd-ircdev/ircd/s_conf.c:1.19 Sun Jul 3 11:44:52 2005 +++ ircd-ircdev/ircd/s_conf.c Sun Jul 3 13:21:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief ircd configuration file driver - * @version $Id: s_conf.c,v 1.19 2005/07/03 18:44:52 zolty Exp $ + * @version $Id: s_conf.c,v 1.20 2005/07/03 20:21:42 zolty Exp $ */ #include "config.h" @@ -232,16 +232,13 @@ * @param vptr Pointer to struct ConfItem for the block. * @param hp DNS reply, or NULL if the lookup failed. */ -static void conf_dns_callback(void* vptr, struct DNSReply* hp) +static void conf_dns_callback(void* vptr, const struct irc_in_addr *addr, const char *h_name) { struct ConfItem* aconf = (struct ConfItem*) vptr; assert(aconf); aconf->dns_pending = 0; - if (hp) - { - memcpy(&aconf->address.addr, &hp->addr, sizeof(aconf->address.addr)); - MyFree(hp); - } + if (addr) + memcpy(&aconf->address.addr, addr, sizeof(aconf->address.addr)); } /** Start a nameserver lookup of the conf host. If the conf entry is @@ -252,13 +249,8 @@ { if (!aconf->dns_pending) { char buf[HOSTLEN + 1]; - struct DNSQuery query; - query.vptr = aconf; - query.callback = conf_dns_callback; host_from_uh(buf, aconf->host, HOSTLEN); - buf[HOSTLEN] = '\0'; - - gethost_byname(buf, &query); + gethost_byname(buf, conf_dns_callback, aconf); aconf->dns_pending = 1; } } @@ -402,11 +394,9 @@ enum AuthorizationCheckResult attach_iline(struct Client* cptr) { struct ConfItem* aconf; - struct DNSReply* hp; assert(0 != cptr); - hp = cli_dns_reply(cptr); for (aconf = GlobalConfList; aconf; aconf = aconf->next) { if (aconf->status != CONF_CLIENT) continue; @@ -420,7 +410,7 @@ if (match(aconf->username, cli_username(cptr))) continue; } - if (aconf->host && (!hp || match(aconf->host, hp->h_name))) + if (aconf->host && match(aconf->host, cli_sockhost(cptr))) continue; if ((aconf->addrbits >= 0) && !ipmask_check(&cli_ip(cptr), &aconf->address.addr, aconf->addrbits)) @@ -1171,28 +1161,10 @@ } } - if (!c_conf) { - if (cli_dns_reply(cptr)) { - struct DNSReply* hp = cli_dns_reply(cptr); - const char* name = hp->h_name; - /* - * If we are missing a C or N line from above, search for - * it under all known hostnames we have for this ip#. - */ - if ((c_conf = find_conf_byhost(lp, hp->h_name, CONF_SERVER))) - ircd_strncpy(cli_sockhost(cptr), name, HOSTLEN); - else - c_conf = find_conf_byip(lp, &hp->addr, CONF_SERVER); - } - else { - /* - * Check for C lines with the hostname portion the ip number - * of the host the server runs on. This also checks the case where - * there is a server connecting from 'localhost'. - */ - c_conf = find_conf_byhost(lp, cli_sockhost(cptr), CONF_SERVER); - } - } + /* Try finding the Connect block by DNS name and IP next. */ + if (!c_conf && !(c_conf = find_conf_byhost(lp, cli_sockhost(cptr), CONF_SERVER))) + c_conf = find_conf_byip(lp, &cli_ip(cptr), CONF_SERVER); + /* * Attach by IP# only if all other checks have failed. * It is quite possible to get here with the strange things that can Index: ircd-ircdev/ircd/s_misc.c diff -u ircd-ircdev/ircd/s_misc.c:1.10 ircd-ircdev/ircd/s_misc.c:1.11 --- ircd-ircdev/ircd/s_misc.c:1.10 Sat May 7 15:23:40 2005 +++ ircd-ircdev/ircd/s_misc.c Sun Jul 3 13:21:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Miscellaneous support functions. - * @version $Id: s_misc.c,v 1.10 2005/05/07 22:23:40 zolty Exp $ + * @version $Id: s_misc.c,v 1.11 2005/07/03 20:21:42 zolty Exp $ */ #include "config.h" @@ -172,22 +172,6 @@ return nbuf; } -/** Set cli_sockhost(cptr) from \a host. - * If \a host contains an '@', copy starting after that byte. - * Otherwise copy all of \a host. - * @param cptr Client to operate on. - * @param host hostname or user\@hostname string. - */ -void get_sockhost(struct Client *cptr, char *host) -{ - char *s; - if ((s = strchr(host, '@'))) - s++; - else - s = host; - ircd_strncpy(cli_sockhost(cptr), s, HOSTLEN); -} - /** * Exit one client, local or remote. Assuming for local client that * all dependents already have been removed, and socket is closed. Index: ircd-ircdev/ircd/s_serv.c diff -u ircd-ircdev/ircd/s_serv.c:1.13 ircd-ircdev/ircd/s_serv.c:1.14 --- ircd-ircdev/ircd/s_serv.c:1.13 Wed Jun 22 00:54:30 2005 +++ ircd-ircdev/ircd/s_serv.c Sun Jul 3 13:21:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Miscellaneous server support functions. - * @version $Id: s_serv.c,v 1.13 2005/06/22 07:54:30 zolty Exp $ + * @version $Id: s_serv.c,v 1.14 2005/07/03 20:21:42 zolty Exp $ */ #include "config.h" @@ -139,13 +139,6 @@ cli_serv(cptr)->timestamp, MAJOR_PROTOCOL, NumServCap(&me), feature_bool(FEAT_HUB) ? "h" : "", *(cli_info(&me)) ? cli_info(&me) : "IRCers United"); - - /* - * Don't charge this IP# for connecting - * XXX - if this comes from a server port, it will not have been added - * to the IP check registry, see add_connection in s_bsd.c - */ - IPcheck_connect_fail(cptr); } det_confs_butmask(cptr, CONF_SERVER | CONF_UWORLD); @@ -155,9 +148,6 @@ SetServer(cptr); cli_handler(cptr) = SERVER_HANDLER; Count_unknownbecomesserver(UserStats); - - release_dns_reply(cptr); - SetBurst(cptr); /* nextping = CurrentTime; */ Index: ircd-ircdev/ircd/s_user.c diff -u ircd-ircdev/ircd/s_user.c:1.23 ircd-ircdev/ircd/s_user.c:1.24 --- ircd-ircdev/ircd/s_user.c:1.23 Sun Jul 3 11:44:52 2005 +++ ircd-ircdev/ircd/s_user.c Sun Jul 3 13:21:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Miscellaneous user-related helper functions. - * @version $Id: s_user.c,v 1.23 2005/07/03 18:44:52 zolty Exp $ + * @version $Id: s_user.c,v 1.24 2005/07/03 20:21:42 zolty Exp $ */ #include "config.h" @@ -565,7 +565,6 @@ SetUser(sptr); cli_handler(sptr) = CLIENT_HANDLER; - release_dns_reply(sptr); SetLocalNumNick(sptr); send_reply(sptr, RPL_WELCOME, ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2005-09-01 11:25:59
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-09-01 11:25:52 UTC Modified files: ChangeLog ChangeLog.es RELEASE.NOTES RELEASE.NOTES.es configure configure.in doc/ircd.sample-en.conf doc/ircd.sample-es.conf doc/en/features.txt doc/en/log.txt doc/en/api/features.txt doc/en/api/modebuf.txt doc/en/api/motd.txt include/channel.h include/ircd_features.h include/numeric.h include/patchlevel.h include/s_conf.h include/supported.h include/sys.h ircd/IPcheck.c ircd/channel.c ircd/class.c ircd/engine_epoll.c ircd/engine_select.c ircd/gline.c ircd/ircd.c ircd/ircd_auth.c ircd/ircd_features.c ircd/ircd_log.c ircd/ircd_parser.y ircd/listener.c ircd/m_burst.c ircd/m_join.c ircd/m_kick.c ircd/m_trace.c ircd/parse.c ircd/s_bsd.c ircd/s_conf.c ircd/s_err.c Log message: Author: zoltan <zo...@ir...> Log message: 2005-09-01 Toni García <zo...@ir...> 1.0.alpha43 * Sincronización Undernet ---------------------- diff included ---------------------- Index: ircd-ircdev/ChangeLog diff -u ircd-ircdev/ChangeLog:1.44 ircd-ircdev/ChangeLog:1.45 --- ircd-ircdev/ChangeLog:1.44 Sun Jul 3 13:21:41 2005 +++ ircd-ircdev/ChangeLog Thu Sep 1 04:25:42 2005 @@ -1,10 +1,13 @@ # # ChangeLog for ircd-ircdev # -# $Id: ChangeLog,v 1.44 2005/07/03 20:21:41 zolty Exp $ +# $Id: ChangeLog,v 1.45 2005/09/01 11:25:42 zolty Exp $ # # Insert new changes at beginning of the change list. # +2005-09-01 Toni García <zo...@ir...> 1.0.alpha43 + * Undernet synchronization + 2005-07-03 Toni García <zo...@ir...> 1.0.alpha42 * Undernet synchronization Index: ircd-ircdev/ChangeLog.es diff -u ircd-ircdev/ChangeLog.es:1.44 ircd-ircdev/ChangeLog.es:1.45 --- ircd-ircdev/ChangeLog.es:1.44 Sun Jul 3 13:21:41 2005 +++ ircd-ircdev/ChangeLog.es Thu Sep 1 04:25:42 2005 @@ -1,10 +1,13 @@ # # Log de Cambios para ircd-ircdev # -# $Id: ChangeLog.es,v 1.44 2005/07/03 20:21:41 zolty Exp $ +# $Id: ChangeLog.es,v 1.45 2005/09/01 11:25:42 zolty Exp $ # # Insertar los nuevos cambios al principio de esta lista de cambios. # +2005-09-01 Toni García <zo...@ir...> 1.0.alpha43 + * Sincronización Undernet + 2005-07-03 Toni García <zo...@ir...> 1.0.alpha42 * Sincronización Undernet Index: ircd-ircdev/RELEASE.NOTES diff -u ircd-ircdev/RELEASE.NOTES:1.2 ircd-ircdev/RELEASE.NOTES:1.3 --- ircd-ircdev/RELEASE.NOTES:1.2 Sat Apr 23 08:57:00 2005 +++ ircd-ircdev/RELEASE.NOTES Thu Sep 1 04:25:42 2005 @@ -8,7 +8,7 @@ ircu2.10.07 (based on IRC-Hispano ircdh and Terraircu). IRC-Dev ircd is only compatible with servers that implement the P10 protocol. It has been tested to link against old ircds, but some features (notably -IPv6 support) are not supported by old ircds. +IPv6 support and oplevels) are not supported by old ircds. Enhancements: @@ -34,6 +34,19 @@ and allows that external program to assign an account stamp to the incoming user. +A new channel mode, +D, has been added for auditorium-style channels. +These are channels where most users listen but do not speak or receive +ops or voice. The effect of +D is that the server waits to send the +JOIN message for new users until the user gets ops or voice or sends a +message to the channel. A list of join-delayed users in a channel may +be retrieved by using /NAMES -d #channel. The response to /NAMES -d +uses the same format as numeric 353, but uses numeric 355 instead. If +an op removes +D while there are still join-delayed users, the server +automatically sets mode +d, and removes +d when the last user's join +is shown. It is not possible to set channel mode +d manually; its +purpose is to warn channel users that there are "hidden" users in the +channel. + More than one hashing mechanism is now supported for oper passwords, and a new tool (ircd/umkpasswd) is provided to generate them. Index: ircd-ircdev/RELEASE.NOTES.es diff -u ircd-ircdev/RELEASE.NOTES.es:1.2 ircd-ircdev/RELEASE.NOTES.es:1.3 --- ircd-ircdev/RELEASE.NOTES.es:1.2 Sat Apr 23 08:57:02 2005 +++ ircd-ircdev/RELEASE.NOTES.es Thu Sep 1 04:25:42 2005 @@ -9,7 +9,7 @@ Terraircu). El ircd de IRC-Dev es compatible solamente con servidores que tengan implementado el protocolo P10. Ha sido probado el link con ircds antiguos, pero muchas caracteristicas (notablemente el soporte -IPv6) no están soportadas por ircds viejos. +IPv6 y oplevels) no están soportadas por ircds viejos. Implementaciones: @@ -36,6 +36,20 @@ el servidor y permite que ese programa externo asigne una cuenta de acceso al usuario entrante. +Un nuevo modo de canal, +d, se ha agregado para los canales estilo +auditorio. Estos son canales donde la mayoría de los usuarios escuchan +pero no hablan ni reciben ops o voz. El efecto de +D es que el servidor +espera para enviar el mensaje del JOIN para los nuevos usuarios hasta +que el usuario consigue ops o voz o envía un mensaje al canal. La lista +de usuarios con entrada retrasada en un canal se puede sacar usando +/NAMES -d #canal. La respuesta al /NAMES -d utiliza el mismo formato que +el numérico 353, pero usa el numérico 355. Si un op quita el +D mientras +que todavía hay usuarios con entrada retrasada, el servidor ajusta el modo ++d automáticamente, y quita +d cuando se muestra la entrada del ultimo +usuario. No es posible fijar el modo +d del canal manualmente; su +próposito es advertir a los usuarios del canal de que hay usuarios +"ocultos" en el canal. + Más de un mecanismo del hashing está soportado ahora para las contraseñas de operador (IRCOP), y se proporciona una herramienta nueva (ircd/umkpasswd) para generarlas. Index: ircd-ircdev/configure diff -u ircd-ircdev/configure:1.18 ircd-ircdev/configure:1.19 --- ircd-ircdev/configure:1.18 Mon May 16 04:22:48 2005 +++ ircd-ircdev/configure Thu Sep 1 04:25:42 2005 @@ -7765,6 +7765,71 @@ echo "$as_me: error: Cannot find a type with size of 64 bits" >&2;} { (exit 1); exit 1; }; } fi +echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5 +echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6 +if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/types.h> +#include <netinet/in.h> + +int +main () +{ +if ((struct sockaddr_in6 *) 0) + return 0; +if (sizeof (struct sockaddr_in6)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_struct_sockaddr_in6=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_struct_sockaddr_in6=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5 +echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6 +if test $ac_cv_type_struct_sockaddr_in6 = yes; then + unet_have_sockaddr_in6="yes" +else + unet_have_sockaddr_in6="no" +fi + + echo "$as_me:$LINENO: checking for socklen_t" >&5 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${ac_cv_type_socklen_t+set}" = set; then @@ -7776,7 +7841,9 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default +#include <sys/types.h> +#include<sys/socket.h> + int main () { @@ -7825,33 +7892,29 @@ : else -cat >>confdefs.h <<_ACEOF -#define socklen_t unsigned int -_ACEOF - -fi - -echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5 -echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6 -if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then + echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5 +echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6 + if test "${curl_cv_socklen_t_equiv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + + curl_cv_socklen_t_equiv= + for arg2 in "struct sockaddr" void ; do + for t in int size_t unsigned long "unsigned long" ; do + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <sys/types.h> -#include <netinet/in.h> - +#include <sys/socket.h> +int getpeername (int $arg2 *, $t *); int main () { -if ((struct sockaddr_in6 *) 0) - return 0; -if (sizeof (struct sockaddr_in6)) - return 0; +$t len; + getpeername(0, 0, &len); ; return 0; } @@ -7878,21 +7941,26 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_struct_sockaddr_in6=yes + curl_cv_socklen_t_equiv="$t" + break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_struct_sockaddr_in6=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done + done + fi -echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5 -echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6 -if test $ac_cv_type_struct_sockaddr_in6 = yes; then - unet_have_sockaddr_in6="yes" -else - unet_have_sockaddr_in6="no" + + echo "$as_me:$LINENO: result: $curl_cv_socklen_t_equiv" >&5 +echo "${ECHO_T}$curl_cv_socklen_t_equiv" >&6 + +cat >>confdefs.h <<_ACEOF +#define socklen_t $curl_cv_socklen_t_equiv +_ACEOF + fi Index: ircd-ircdev/configure.in diff -u ircd-ircdev/configure.in:1.17 ircd-ircdev/configure.in:1.18 --- ircd-ircdev/configure.in:1.17 Mon May 16 04:22:49 2005 +++ ircd-ircdev/configure.in Thu Sep 1 04:25:42 2005 @@ -22,7 +22,7 @@ dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl -dnl $Id: configure.in,v 1.17 2005/05/16 11:22:49 zolty Exp $ +dnl $Id: configure.in,v 1.18 2005/09/01 11:25:42 zolty Exp $ dnl dnl Make sure we are in the correct directory (someone could have run @@ -79,10 +79,35 @@ AC_STRUCT_TM AC_TYPE_UID_T unet_CHECK_TYPE_SIZES -AC_CHECK_TYPE(socklen_t, unsigned int) AC_CHECK_TYPE(struct sockaddr_in6, [unet_have_sockaddr_in6="yes"], [unet_have_sockaddr_in6="no"], [#include <sys/types.h> #include <netinet/in.h>]) +dnl Check for socklen_t. In traditional BSD this is an int, but some +dnl OSes use a different type. Test until we find something that will +dnl work properly. Test borrowed from a patch submitted for Python. +AC_CHECK_TYPE([socklen_t], ,[ + AC_MSG_CHECKING([for socklen_t equivalent]) + AC_CACHE_VAL([curl_cv_socklen_t_equiv], + [ +dnl Systems have either "struct sockaddr*" or "void*" as second +dnl arg to getpeername. + curl_cv_socklen_t_equiv= + for arg2 in "struct sockaddr" void ; do + for t in int size_t unsigned long "unsigned long" ; do + AC_TRY_COMPILE([#include <sys/types.h> +#include <sys/socket.h> +int getpeername (int $arg2 *, $t *);],[$t len; + getpeername(0, 0, &len);], [curl_cv_socklen_t_equiv="$t" + break]) + done + done + ]) + AC_MSG_RESULT($curl_cv_socklen_t_equiv) + AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv, + [type to use in place of socklen_t if not defined])], + [#include <sys/types.h> +#include<sys/socket.h>]) + dnl Checks for library functions. AC_CHECK_FUNCS([kqueue setrlimit getrusage times]) Index: ircd-ircdev/doc/en/api/features.txt diff -u ircd-ircdev/doc/en/api/features.txt:1.2 ircd-ircdev/doc/en/api/features.txt:1.3 --- ircd-ircdev/doc/en/api/features.txt:1.2 Wed Jan 5 08:38:12 2005 +++ ircd-ircdev/doc/en/api/features.txt Thu Sep 1 04:25:42 2005 @@ -1,4 +1,4 @@ -$Id: features.txt,v 1.2 2005/01/05 16:38:12 zolty Exp $ +$Id: features.txt,v 1.3 2005/09/01 11:25:42 zolty Exp $ As of u2.10.11, most of the compile-time configuration options present in previous versions of ircu have been provided via the configuration @@ -63,13 +63,13 @@ Marking Features When the configuration file is read, there must be some way to -determine if a particular F-line has been removed since the last time -the configuration file was read. The way this is done in the features -subsystem is to have a "mark" for each feature. Prior to reading the -configuration file, all marks are cleared for all features (and all -"unmark" call-backs are called). As each F-line is encountered and -processed, that feature's mark is set. Finally, when the -configuration file has been fully read, all remaining unmarked +determine if a particular Feature entry has been removed since the +last time the configuration file was read. The way this is done in +the features subsystem is to have a "mark" for each feature. Prior to +reading the configuration file, all marks are cleared for all features +(and all "unmark" call-backs are called). As each Feature entry is +encountered and processed, that feature's mark is set. Finally, when +the configuration file has been fully read, all remaining unmarked features are reset to their default values (and all "mark" call-backs are called). @@ -150,8 +150,8 @@ <function> void feature_report(struct Client* to); -Reports all F-lines to a user using RPL_STATSFLINE, except those which -the user is not permitted to see due to flag settings. +Reports all Feature entries to a user using RPL_STATSFLINE, except +those which the user is not permitted to see due to flag settings. </function> <function> Index: ircd-ircdev/doc/en/api/modebuf.txt diff -u ircd-ircdev/doc/en/api/modebuf.txt:1.2 ircd-ircdev/doc/en/api/modebuf.txt:1.3 --- ircd-ircdev/doc/en/api/modebuf.txt:1.2 Wed Jan 5 08:38:12 2005 +++ ircd-ircdev/doc/en/api/modebuf.txt Thu Sep 1 04:25:42 2005 @@ -1,4 +1,4 @@ -$Id: modebuf.txt,v 1.2 2005/01/05 16:38:12 zolty Exp $ +$Id: modebuf.txt,v 1.3 2005/09/01 11:25:42 zolty Exp $ Generating and parsing channel mode strings is often a very complicated process. The ModeBuf interface, along with the associated @@ -103,10 +103,10 @@ <macro> #define MODEBUF_DEST_HACK4 0x8000 /* Send a HACK(4) notice, TS == 0 */ -Some servers are special. When a server that has a U-line issues a -mode change, we send a "HACK(4)" message to differentiate it from an -ordinary server changing a channel mode. This is the flag that must -be passed to modebuf_init() to cause that behavior. +Some servers are special. When a server that has a Uworld entry +issues a mode change, we send a "HACK(4)" message to differentiate it +from an ordinary server changing a channel mode. This is the flag +that must be passed to modebuf_init() to cause that behavior. </macro> <function> Index: ircd-ircdev/doc/en/api/motd.txt diff -u ircd-ircdev/doc/en/api/motd.txt:1.2 ircd-ircdev/doc/en/api/motd.txt:1.3 --- ircd-ircdev/doc/en/api/motd.txt:1.2 Wed Jan 5 08:38:12 2005 +++ ircd-ircdev/doc/en/api/motd.txt Thu Sep 1 04:25:42 2005 @@ -1,4 +1,4 @@ -$Id: motd.txt,v 1.2 2005/01/05 16:38:12 zolty Exp $ +$Id: motd.txt,v 1.3 2005/09/01 11:25:42 zolty Exp $ The server has a Message of the Day (MOTD) which is often used for describing the Acceptable Usage Policy, where to get help if you have @@ -21,12 +21,11 @@ This function sends an appropriate MOTD to the client specified by _cptr_. If _cptr_ is not a local client, the remote MOTD will be -sent; otherwise, an attempt will be made to find a T-line in the -configuration file that matches the client. If no T-line can be +sent; otherwise, an attempt will be made to find a Motd entry in the +configuration file that matches the client. If no Motd entry can be found, the default MOTD will be sent to the client. This function returns 0 for the convenience of other functions that must have an -integer return value. -</function> +integer return value. </function> <function> void motd_signon(struct Client* cptr); @@ -62,7 +61,7 @@ <function> void motd_report(struct Client *to); -The motd_report() function sends a list of the T-lines stored in +The motd_report() function sends a list of the Motd entries stored in memory to the client specified by _to_. Access control should be handled by the caller. </function> Index: ircd-ircdev/doc/en/features.txt diff -u ircd-ircdev/doc/en/features.txt:1.2 ircd-ircdev/doc/en/features.txt:1.3 --- ircd-ircdev/doc/en/features.txt:1.2 Wed Jan 26 09:19:41 2005 +++ ircd-ircdev/doc/en/features.txt Thu Sep 1 04:25:42 2005 @@ -1,9 +1,9 @@ -$Id: features.txt,v 1.2 2005/01/26 17:19:41 zolty Exp $ +$Id: features.txt,v 1.3 2005/09/01 11:25:42 zolty Exp $ Many of the old compile-time options are now configured through the server configuration file, ircd.conf. This file is intended to document each of these features. Logging, although also configured -through the use of "Features" Block, is documented in doc/*/log.txt. +through the use of Feature entries, is documented in doc/*/log.txt. NOTE THAT THESE NAMES ARE CASE SENSITIVE! Values are not case sensitive unless stated otherwise in the documentation for that feature. @@ -343,6 +343,15 @@ in nickname length for a network. +CHANNELLEN + * Type: integer + * Default: 200 + +This is the allowed length of locally created channels. It may not be +larger than the CHANNELLEN #define. Like the NICKLEN feature, this is +intended to ease changes in channel name length across a network. + + AVBANLEN * Type: integer * Default: 40 @@ -439,8 +448,8 @@ This is the default frequency that the server attempts to reconnect with its uplink server if it is set to auto connect to it. Note that -this value is overridden by a "Class" block in ircd.conf if the "Connect" -block in ircd.conf assign a specific class to the connection (recommended). +this value is overridden by a "Class" block in ircd.conf if the Connect +entries in ircd.conf assign a specific class to the connection (recommended). DEFAULTMAXSENDQLENGTH @@ -449,9 +458,7 @@ This is the default value of the maximum sendQ length of connection classes (see doc/ircd.sample-*.conf for details on "Class" blocks). You will -probably always override this value in your "ircd.conf" with the -"Class" block. The given value used to be an often used value for client -sendQs. +generally override this value in your "ircd.conf" with a Class block. GLINEMAXUSERCOUNT @@ -604,13 +611,12 @@ * Type: boolean * Default: FALSE -For u2.10.11, several new oper-only features have been added that -involve changes to the server<->server protocol. Until the entire -network is running the new version, these features cannot be enabled. -This configuration option provides a single switch to prevent the use -of these features until the entire network has been upgraded. It is -not required that all servers set this to "TRUE" in order for the -features to be used. +Since u2.10.11, several new oper-only features have been added that +involve changes to the server<->server protocol. This configuration +option provides a single switch to prevent the use of these features +until the entire network has been upgraded. It is not required that +all servers set this to "TRUE" in order for the features to be used, +as long as all servers are running u2.10.11 or above. HIS_SNOTICES Index: ircd-ircdev/doc/en/log.txt diff -u ircd-ircdev/doc/en/log.txt:1.2 ircd-ircdev/doc/en/log.txt:1.3 --- ircd-ircdev/doc/en/log.txt:1.2 Sat May 7 15:23:39 2005 +++ ircd-ircdev/doc/en/log.txt Thu Sep 1 04:25:42 2005 @@ -1,10 +1,10 @@ -$Id: log.txt,v 1.2 2005/05/07 22:23:39 zolty Exp $ +$Id: log.txt,v 1.3 2005/09/01 11:25:42 zolty Exp $ Older versions of ircd had no consistent way of logging various actions. Some things, such as G-lines, were written out to log files with names compiled into the server. Others could only be logged through syslog. Some required that their log files exist beforehand. -For u2.10.11, this situation has changed dramatically. +Starting with u2.10.11, this situation has changed dramatically. All logging in the server is now unified through a single logging subsystem. Unfortunately, the server still does not generate all the @@ -139,30 +139,31 @@ The IRC server has a default facility that it uses when sending log messages to syslog. The default facility may be overridden for each individual subsystem, but the default itself can be changed with an -appropriate F-line in the configuration file. The facility normally -defaults to "USER," but may be configured to be any of AUTH, CRON, -DAEMON, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, +appropriate Feature entry in the configuration file. The facility +normally defaults to "USER," but may be configured to be any of AUTH, +CRON, DAEMON, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7, LPR, MAIL, NEWS, USER, or UUCP. Some systems also have the -AUTHPRIV facility. To configure this default, add an F-line to the -configuration file that looks like "F:LOG:<facility>"; <facility> -should be replaced with the string for the desired default syslog -facility. +AUTHPRIV facility. To configure this default, add a Feature line to +the configuration file that looks like "LOG" = "<facility>"; +<facility> should be replaced with the string for the desired default +syslog facility. Log Files Each subsystem may be configured to send its log messages to any -single log file with an F-line like "F:LOG:<subsys>:FILE:<file>"; -<subsys> should be replaced with one of the subsystem names described -above, and <file> should be a file name for the log file. The file -name may be relative to the server's data directory ("DPATH"), or it -may be an absolute path name. Note that if you're using chroot, these -absolute path names will be relative to the server's root directory. +single log file with a Feature entry like "LOG" = "<subsys>" "FILE" +"<file>"; <subsys> should be replaced with one of the subsystem names +described above, and <file> should be a file name for the log file. +The file name may be relative to the server's data directory +("DPATH"), or it may be an absolute path name. Note that if you're +using chroot, these absolute path names will be relative to the +server's root directory. Logging to Syslog By default, except for the CONFIG subsystem, no logs are sent to -syslog. This can be overridden using an F-line like -"F:LOG:<subsys>:FACILITY:<facility>"; <subsys>, as above, should be +syslog. This can be overridden using an Feature entry like "LOG" = +"<subsys>" "FACILITY" "<facility>"; <subsys>, as above, should be replaced with one of the subsystem names described above, and <facility> must be one of the facility strings mentioned under "Default Syslog Facility." The facility string may also be "NONE," to @@ -182,14 +183,14 @@ are OLDSNO, SERVKILL, OPERKILL, HACK2, HACK3, UNAUTH, TCPCOMMON, TOOMANY, HACK4, GLINE, NETWORK, IPMISMATCH, THROTTLE, OLDREALOP, CONNEXIT, and DEBUG. The special mask name "NONE" inhibits sending of -server notices for a particular subsystem. The F-line for this -configuration looks like "F:LOG:<subsys>:SNOMASK:<mask>"; again, +server notices for a particular subsystem. The Feature entry for this +configuration looks like "LOG" = "<subsys>" "SNOMASK" "<mask>"; again, <subsys> is one of the subsystems described above, and <mask> is one of the mask names. Setting Minimum Logging Level The minimum log level for a particular subsystem may be set with an -F-line like "F:LOG:<subsys>:LEVEL:<level>"; here, <subsys> is yet -again one of the subsystems described above, and <level> is one of the -level names, also described above. +Feature entry like "LOG" = "<subsys>" "LEVEL" "<level>"; here, +<subsys> is yet again one of the subsystems described above, and +<level> is one of the level names, also described above. Index: ircd-ircdev/doc/ircd.sample-en.conf diff -u ircd-ircdev/doc/ircd.sample-en.conf:1.21 ircd-ircdev/doc/ircd.sample-en.conf:1.22 --- ircd-ircdev/doc/ircd.sample-en.conf:1.21 Sat May 7 15:32:20 2005 +++ ircd-ircdev/doc/ircd.sample-en.conf Thu Sep 1 04:25:42 2005 @@ -1,6 +1,6 @@ # ircd.conf - configuration file for IRC-Dev's IRCD. # -# Last Updated: 8, May 2005. +# Last Updated: 1, Sep 2005. # # Written by Niels <ni...@un...>, based on the original example.conf, # server code and some real-life (ahem) experience. @@ -64,7 +64,7 @@ # be the address of a physical interface on the host. This address is # used for outgoing connections if the "Connect" block does not override # it. See "Port" block for listener virtual hosting. If in doubt, -# leave it out. +# leave it out -- or use "*", which has the same meaning as no vhost. # # You may specify both an IPv4 virtual host and an IPv6 virtual host, # to indicate which address should be used for outbound connections @@ -160,6 +160,12 @@ maxlinks = 100; usermode = "+iw"; }; +Class { + name = "Other"; + pingfreq = 1 minutes 30 seconds; + sendq = 160000; + maxlinks = 400; +}; Client { class = "Other"; @@ -172,12 +178,6 @@ maxlinks = 5; }; Class { - name = "Other"; - pingfreq = 1 minutes 30 seconds; - sendq = 160000; - maxlinks = 400; -}; -Class { name = "Opers"; pingfreq = 1 minutes 30 seconds; sendq = 160000; @@ -460,9 +460,9 @@ # # # The default reason is: "You are banned from this server" -# Note that K-lines are local to the server; if you ban a person or a +# Note that Kill blocks are local to the server; if you ban a person or a # whole domain from your server, they can get on IRC via any other server -# that doesn't have them K-lined (yet). +# that doesn't have them Killed (yet). # # With a simple comment, using quotes: Kill { host = "*.au"; reason = "Please use a nearer server"; }; @@ -785,6 +785,7 @@ # "KILLCHASETIMELIMIT" = "30"; # "MAXCHANNELSPERUSER" = "10"; # "NICKLEN" = "12"; +# "CHANNELLEN" = "200"; # "AVBANLEN" = "40"; # "MAXBANS" = "45"; # "MAXSILES" = "15"; Index: ircd-ircdev/doc/ircd.sample-es.conf diff -u ircd-ircdev/doc/ircd.sample-es.conf:1.16 ircd-ircdev/doc/ircd.sample-es.conf:1.17 --- ircd-ircdev/doc/ircd.sample-es.conf:1.16 Sat May 7 15:32:20 2005 +++ ircd-ircdev/doc/ircd.sample-es.conf Thu Sep 1 04:25:42 2005 @@ -1,6 +1,6 @@ # ircd.conf - archivo de configuración para el IRCD de IRC-Dev. # -# Ultima actualización: 8, May 2005. +# Ultima actualización: 1, Sep 2005. # # Escrito por Niels <ni...@un...>, basado en el archivo example.conf # original, en el código del servidor y la experiencia de la vida real. @@ -70,7 +70,8 @@ # La dirección DEBE ser la dirección de una interfaz física en el host. # Esta dirección se utiliza para las conexiones salientes si el bloque # "Connect" no la elimina. Veáse el bloque "Port" para la escucha con -# virtual hosting. En caso de duda no pongas nada. +# virtual hosting. En caso de duda no pongas nada o usa "*" que tiene el +# mismo significado que no tener vhost. # # Puedes especificar un virtualhost de IPv4 y un virtualhost de IPv6, # para indicar cuál de las direcciones se debe utilizar para las @@ -169,6 +170,12 @@ maxlinks = 100; usermode = "+iw"; }; +Class { + name = "Otros"; + pingfreq = 1 minutes 30 seconds; + sendq = 160000; + maxlinks = 400; +}; Client { class = "Otros"; @@ -181,12 +188,6 @@ maxlinks = 5; }; Class { - name = "Otros"; - pingfreq = 1 minutes 30 seconds; - sendq = 160000; - maxlinks = 400; -}; -Class { name = "Opers"; pingfreq = 1 minutes 30 seconds; sendq = 160000; @@ -482,9 +483,9 @@ # # # La razón por defecto es: "You are banned from this server" -# Notese que las "K-lines" son locales al servidor; si se prohibe a una -# persona o un dominio entero de tu servidor, aun pueden entrar al IRC -# por otro servidor que no tengan "K-lined" (aun). +# Notese que los bloques "Kill" son locales al servidor; si se prohibe +# a una persona o un dominio entero de tu servidor, aun pueden entrar +# al IRC por otro servidor que no tengan "Killed" (aun). # # Con un simple comentario, usando comillas: Kill { host = "*.au"; reason = "Por favor, use un servidor más cercano"; }; @@ -495,7 +496,7 @@ # El archivo puede contener, por ejemplo, una razón, un enlace a las normas # del servidor y una dirección de contacto. Observe la combinación del username -y el host en el campo "host". +#y el host en el campo "host". Kill { host = "*lu...@un..."; @@ -822,6 +823,7 @@ # "KILLCHASETIMELIMIT" = "30"; # "MAXCHANNELSPERUSER" = "10"; # "NICKLEN" = "12"; +# "CHANNELLEN" = "200"; # "AVBANLEN" = "40"; # "MAXBANS" = "45"; # "MAXSILES" = "15"; Index: ircd-ircdev/include/channel.h diff -u ircd-ircdev/include/channel.h:1.12 ircd-ircdev/include/channel.h:1.13 --- ircd-ircdev/include/channel.h:1.12 Wed Jun 22 02:58:52 2005 +++ ircd-ircdev/include/channel.h Thu Sep 1 04:25:42 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Channel management and maintenance. - * @version $Id: channel.h,v 1.12 2005/06/22 09:58:52 zolty Exp $ + * @version $Id: channel.h,v 1.13 2005/09/01 11:25:42 zolty Exp $ */ #ifndef INCLUDED_channel_h #define INCLUDED_channel_h @@ -49,9 +49,6 @@ #define MODEBUFLEN 200 /**< Maximum length of a mode */ #define KEYLEN 23 /**< Maximum length of a key */ -#if defined(UNDERNET) -#define PASSLEN 23 /**< Maximum length of a password */ -#endif #define CHANNELLEN 200 /**< Maximum length of a channel */ #define MAXJOINARGS 15 /**< number of slots for join buffer */ @@ -305,8 +302,8 @@ unsigned int limit; char key[KEYLEN + 1]; #if defined(UNDERNET) - char upass[PASSLEN + 1]; - char apass[PASSLEN + 1]; + char upass[KEYLEN + 1]; + char apass[KEYLEN + 1]; #endif }; Index: ircd-ircdev/include/ircd_features.h diff -u ircd-ircdev/include/ircd_features.h:1.12 ircd-ircdev/include/ircd_features.h:1.13 --- ircd-ircdev/include/ircd_features.h:1.12 Sat Apr 2 11:47:34 2005 +++ ircd-ircdev/include/ircd_features.h Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Public interfaces and declarations for dealing with configurable features. - * @version $Id: ircd_features.h,v 1.12 2005/04/02 19:47:34 zolty Exp $ + * @version $Id: ircd_features.h,v 1.13 2005/09/01 11:25:42 zolty Exp $ */ #ifndef INCLUDED_features_h #define INCLUDED_features_h @@ -29,6 +29,8 @@ struct Client; struct StatDesc; +extern struct Client his; + /** Contains all feature settings for ircu. * For documentation of each, see doc/readme.features. */ @@ -66,6 +68,7 @@ FEAT_KILLCHASETIMELIMIT, FEAT_MAXCHANNELSPERUSER, FEAT_NICKLEN, + FEAT_AVBANLEN, FEAT_MAXBANS, FEAT_MAXSILES, @@ -83,6 +86,7 @@ FEAT_IPCHECK_CLONE_LIMIT, FEAT_IPCHECK_CLONE_PERIOD, FEAT_IPCHECK_CLONE_DELAY, + FEAT_CHANNELLEN, /* Some misc. default paths */ FEAT_MPATH, Index: ircd-ircdev/include/numeric.h diff -u ircd-ircdev/include/numeric.h:1.14 ircd-ircdev/include/numeric.h:1.15 --- ircd-ircdev/include/numeric.h:1.14 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/include/numeric.h Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Declarations of numeric replies and supporting functions. - * @version $Id: numeric.h,v 1.14 2005/06/22 07:54:29 zolty Exp $ + * @version $Id: numeric.h,v 1.15 2005/09/01 11:25:42 zolty Exp $ */ #ifndef INCLUDED_numeric_h #define INCLUDED_numeric_h @@ -467,8 +467,8 @@ #define ERR_CHANSECURED 562 /* Undernet extension */ #define ERR_UPASSSET 563 /* Undernet extension */ #define ERR_UPASSNOTSET 564 /* Undernet extension */ -#define ERR_NOMANAGER_LONG 565 /* Undernet extension */ -#define ERR_NOMANAGER_SHORT 566 /* Undernet extension */ +/* ERR_NOMANAGER_LONG 565 no longer used */ +#define ERR_NOMANAGER 566 /* Undernet extension */ #define ERR_UPASS_SAME_APASS 567 /* Undernet extension */ #define RPL_LOGON 600 /* Dalnet extension */ Index: ircd-ircdev/include/patchlevel.h diff -u ircd-ircdev/include/patchlevel.h:1.43 ircd-ircdev/include/patchlevel.h:1.44 --- ircd-ircdev/include/patchlevel.h:1.43 Sun Jul 3 13:21:41 2005 +++ ircd-ircdev/include/patchlevel.h Thu Sep 1 04:25:42 2005 @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: patchlevel.h,v 1.43 2005/07/03 20:21:41 zolty Exp $ + * $Id: patchlevel.h,v 1.44 2005/09/01 11:25:42 zolty Exp $ * */ -#define PATCHLEVEL ".alpha42" +#define PATCHLEVEL ".alpha43" #define RELEASE "1.0" Index: ircd-ircdev/include/s_conf.h diff -u ircd-ircdev/include/s_conf.h:1.12 ircd-ircdev/include/s_conf.h:1.13 --- ircd-ircdev/include/s_conf.h:1.12 Thu Apr 28 15:00:08 2005 +++ ircd-ircdev/include/s_conf.h Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file s_conf.h * @brief ircd configuration file API. - * @version $Id: s_conf.h,v 1.12 2005/04/28 22:00:08 zolty Exp $ + * @version $Id: s_conf.h,v 1.13 2005/09/01 11:25:42 zolty Exp $ */ #ifndef INCLUDED_s_conf_h #define INCLUDED_s_conf_h @@ -208,6 +208,7 @@ extern void lookup_confhost(struct ConfItem *aconf); extern void conf_parse_userhost(struct ConfItem *aconf, char *host); extern struct ConfItem *conf_debug_iline(const char *client); +extern void free_mapping(struct s_map *smap); extern void yyerror(const char *msg); Index: ircd-ircdev/include/supported.h diff -u ircd-ircdev/include/supported.h:1.8 ircd-ircdev/include/supported.h:1.9 --- ircd-ircdev/include/supported.h:1.8 Wed May 25 09:56:23 2005 +++ ircd-ircdev/include/supported.h Thu Sep 1 04:25:42 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: supported.h,v 1.8 2005/05/25 16:56:23 zolty Exp $ + * $Id: supported.h,v 1.9 2005/09/01 11:25:42 zolty Exp $ * */ #ifndef INCLUDED_supported_h @@ -37,6 +37,7 @@ */ #define FEATURES1 \ "AWAYLEN=%i" \ + " MAXCHANNELLEN=%i" \ " CHANNELLEN=%i" \ " MAXNICKLEN=%i" \ " NICKLEN=%i" \ @@ -71,12 +72,12 @@ " SAFELIST" -#define FEATURESVALUES1 AWAYLEN, CHANNELLEN, NICKLEN, feature_int(FEAT_NICKLEN), TOPICLEN +#define FEATURESVALUES1 AWAYLEN, CHANNELLEN, feature_int(FEAT_CHANNELLEN), NICKLEN, feature_int(FEAT_NICKLEN), TOPICLEN #if defined(DDB) || defined(SERVICES) -#define FEATURESVALUES2 "b,k,l,imnpstrRD", feature_bool(FEAT_LOCAL_CHANNELS) ? "#&" : "#", "(qov).@+", ".@+" +#define FEATURESVALUES2 "b,k,l,imnpstrRDd", feature_bool(FEAT_LOCAL_CHANNELS) ? "#&" : "#", "(qov).@+", ".@+" #else -#define FEATURESVALUES2 "b,k,l,imnpstRD", feature_bool(FEAT_LOCAL_CHANNELS) ? "#&" : "#", "(ov)@+", "@+" +#define FEATURESVALUES2 "b,k,l,imnpstRDd", feature_bool(FEAT_LOCAL_CHANNELS) ? "#&" : "#", "(ov)@+", "@+" #endif #define FEATURESVALUES3 feature_int(FEAT_MAXCHANNELSPERUSER), feature_int(FEAT_MAXBANS), \ Index: ircd-ircdev/include/sys.h diff -u ircd-ircdev/include/sys.h:1.4 ircd-ircdev/include/sys.h:1.5 --- ircd-ircdev/include/sys.h:1.4 Mon Jan 10 04:22:00 2005 +++ ircd-ircdev/include/sys.h Thu Sep 1 04:25:42 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: sys.h,v 1.4 2005/01/10 12:22:00 zolty Exp $ + * $Id: sys.h,v 1.5 2005/09/01 11:25:42 zolty Exp $ * */ #ifndef INCLUDED_sys_h @@ -31,13 +31,6 @@ */ #define MAXCLIENTS (MAXCONNECTIONS-24) -/* Define FD_SETSIZE to what we want before including sys/types.h on BSD */ -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__bsdi__) -#if ((!defined(USE_POLL)) && (!defined(FD_SETSIZE))) -#define FD_SETSIZE ((MAXCONNECTIONS)+4) -#endif -#endif - #define IRCD_MAX(a, b) ((a) > (b) ? (a) : (b)) #define IRCD_MIN(a, b) ((a) < (b) ? (a) : (b)) Index: ircd-ircdev/ircd/IPcheck.c diff -u ircd-ircdev/ircd/IPcheck.c:1.11 ircd-ircdev/ircd/IPcheck.c:1.12 --- ircd-ircdev/ircd/IPcheck.c:1.11 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/ircd/IPcheck.c Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Code to count users connected from particular IP addresses. - * @version $Id: IPcheck.c,v 1.11 2005/06/22 07:54:29 zolty Exp $ + * @version $Id: IPcheck.c,v 1.12 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" @@ -163,7 +163,7 @@ * For members that have a sensible default value, that is used. * @return Newly allocated registry entry. */ -static struct IPRegistryEntry* ip_registry_new_entry() +static struct IPRegistryEntry* ip_registry_new_entry(void) { struct IPRegistryEntry* entry = freeList; if (entry) Index: ircd-ircdev/ircd/channel.c diff -u ircd-ircdev/ircd/channel.c:1.24 ircd-ircdev/ircd/channel.c:1.25 --- ircd-ircdev/ircd/channel.c:1.24 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/ircd/channel.c Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Channel management and maintanance - * @version $Id: channel.c,v 1.24 2005/06/22 07:54:29 zolty Exp $ + * @version $Id: channel.c,v 1.25 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" @@ -267,23 +267,15 @@ #if defined(UNDERNET) chptr->users = 0; - /* - * Also channels without Apass set need to be kept alive, - * otherwise Bad Guys(tm) would be able to takeover - * existing channels too easily, and then set an Apass! - * However, if a channel without Apass becomes empty - * then we try to be kind to them and remove possible - * limiting modes. - */ - chptr->mode.mode &= ~MODE_INVITEONLY; - chptr->mode.limit = 0; - /* - * We do NOT reset a possible key or bans because when - * the 'channel owners' can't get in because of a key - * or ban then apparently there was a fight/takeover - * on the channel and we want them to contact IRC opers - * who then will educate them on the use of Apass/upass. - */ + /* There is a semantics problem here: Assuming no fragments across a + * split, a channel without Apass could be maliciously destroyed and + * recreated, and someone could set apass on the new instance. + * + * This could be fixed by preserving the empty non-Apass channel for + * the same time as if it had an Apass (but removing +i and +l), and + * reopping the first user to rejoin. However, preventing net rides + * requires a backwards-incompatible protocol change.. + */ if (!chptr->mode.apass[0]) /* If no Apass, destroy now. */ destruct_channel(chptr); @@ -477,7 +469,7 @@ member->user = who; member->channel = chptr; member->status = flags; - member->oplevel = oplevel; + SetOpLevel(member, oplevel); member->next_member = chptr->members; if (member->next_member) @@ -708,15 +700,16 @@ #if defined(UNDERNET) /* Discourage using the Apass to get op. They should use the upass. */ - if (IsChannelManager(member) && *member->channel->mode.upass) + if (IsChannelManager(member) && member->channel->mode.apass[0]) return 0; #endif if (IsVoicedOrOpped(member)) return 1; + /* * If it's moderated, and you aren't a privileged user, you can't - * speak. + * speak. */ if (member->channel->mode.mode & MODE_MODERATED) return 0; @@ -1255,9 +1248,10 @@ user = mask; host = ++ptr; } - else if (*ptr == '.') + else if (*ptr == '.' || *ptr == ':') { - /* Case 2: Found last '.' (without finding a '!' or '@' yet) */ + /* Case 2: Found character specific to IP or hostname (without + * finding a '!' or '@' yet) */ last_dot = ptr; continue; } @@ -1435,7 +1429,8 @@ int i; for (i = 0; cn[i]; i++) { - if (i >= CHANNELLEN || !IsChannelChar(cn[i])) { + if (i >= IRCD_MIN(CHANNELLEN, feature_int(FEAT_CHANNELLEN)) + || !IsChannelChar(cn[i])) { cn[i] = '\0'; return; } @@ -2588,14 +2583,24 @@ } } +/** Helper function to clean key-like parameters. */ +static void +clean_key(char *s) +{ + int t_len = KEYLEN; + + while (*s > ' ' && *s != ':' && *s != ',' && t_len--) + s++; + *s = '\0'; +} + /* * Helper function to convert keys */ static void mode_parse_key(struct ParseState *state, int *flag_p) { - char *t_str, *s; - int t_len; + char *t_str; if (MyUser(state->sptr) && state->max_args <= 0) /* drop if too many args */ return; @@ -2621,15 +2626,9 @@ return; state->done |= DONE_KEY; - t_len = KEYLEN; - /* clean up the key string */ - s = t_str; - while (*s > ' ' && *s != ':' && *s != ',' && t_len--) - s++; - *s = '\0'; - - if (!*t_str) { /* warn if empty */ + clean_key(t_str); + if (!*t_str || *t_str == ':') { /* warn if empty */ if (MyUser(state->sptr)) need_more_params(state->sptr, state->dir == MODE_ADD ? "MODE +k" : "MODE -k"); @@ -2683,8 +2682,7 @@ static void mode_parse_upass(struct ParseState *state, int *flag_p) { - char *t_str, *s; - int t_len; + char *t_str; if (MyUser(state->sptr) && state->max_args <= 0) /* drop if too many args */ return; @@ -2719,10 +2717,8 @@ if (*state->chptr->mode.apass) { send_reply(state->sptr, ERR_NOTMANAGER, state->chptr->chname, state->chptr->chname); - } else if (TStime() - state->chptr->creationtime >= 171000) { - send_reply(state->sptr, ERR_NOMANAGER_LONG, state->chptr->chname); } else { - send_reply(state->sptr, ERR_NOMANAGER_SHORT, state->chptr->chname); + send_reply(state->sptr, ERR_NOMANAGER, state->chptr->chname); } return; } @@ -2731,15 +2727,9 @@ return; state->done |= DONE_UPASS; - t_len = PASSLEN + 1; - /* clean up the upass string */ - s = t_str; - while (*++s > ' ' && *s != ':' && --t_len) - ; - *s = '\0'; - - if (!*t_str) { /* warn if empty */ + clean_key(t_str); + if (!*t_str || *t_str == ':') { /* warn if empty */ if (MyUser(state->sptr)) need_more_params(state->sptr, state->dir == MODE_ADD ? "MODE +U" : "MODE -U"); @@ -2784,7 +2774,7 @@ if (state->flags & MODE_PARSE_SET) { if (state->dir == MODE_ADD) /* set the new upass */ - ircd_strncpy(state->chptr->mode.upass, t_str, PASSLEN); + ircd_strncpy(state->chptr->mode.upass, t_str, KEYLEN); else /* remove the old upass */ *state->chptr->mode.upass = '\0'; } @@ -2796,8 +2786,8 @@ static void mode_parse_apass(struct ParseState *state, int *flag_p) { - char *t_str, *s; - int t_len; + struct Membership *memb; + char *t_str; if (MyUser(state->sptr) && state->max_args <= 0) /* drop if too many args */ return; @@ -2828,7 +2818,9 @@ } /* Don't allow to change the Apass if the channel is older than 48 hours. */ - if (TStime() - state->chptr->creationtime >= 172800 && !IsAnOper(state->sptr)) { + if (MyUser(state->sptr) + && TStime() - state->chptr->creationtime >= 172800 + && !IsAnOper(state->sptr)) { send_reply(state->sptr, ERR_CHANSECURED, state->chptr->chname); return; } @@ -2838,10 +2830,8 @@ if (*state->chptr->mode.apass) { send_reply(state->sptr, ERR_NOTMANAGER, state->chptr->chname, state->chptr->chname); - } else if (TStime() - state->chptr->creationtime >= 171000) { - send_reply(state->sptr, ERR_NOMANAGER_LONG, state->chptr->chname); } else { - send_reply(state->sptr, ERR_NOMANAGER_SHORT, state->chptr->chname); + send_reply(state->sptr, ERR_NOMANAGER, state->chptr->chname); } return; } @@ -2850,15 +2840,9 @@ return; state->done |= DONE_APASS; - t_len = PASSLEN + 1; - /* clean up the apass string */ - s = t_str; - while (*++s > ' ' && *s != ':' && --t_len) - ; - *s = '\0'; - - if (!*t_str) { /* warn if empty */ + clean_key(t_str); + if (!*t_str || *t_str == ':') { /* warn if empty */ if (MyUser(state->sptr)) need_more_params(state->sptr, state->dir == MODE_ADD ? "MODE +A" : "MODE -A"); @@ -2898,16 +2882,24 @@ if (state->flags & MODE_PARSE_SET) { if (state->dir == MODE_ADD) { /* set the new apass */ /* Make it VERY clear to the user that this is a one-time password */ - ircd_strncpy(state->chptr->mode.apass, t_str, PASSLEN); + ircd_strncpy(state->chptr->mode.apass, t_str, KEYLEN); if (MyUser(state->sptr)) { send_reply(state->sptr, RPL_APASSWARN_SET, state->chptr->mode.apass); send_reply(state->sptr, RPL_APASSWARN_SECRET, state->chptr->chname, state->chptr->mode.apass); } + /* Give the channel manager level 0 ops. */ + if (!(state->flags & MODE_PARSE_FORCE) && IsChannelManager(state->member)) + SetOpLevel(state->member, 0); } else { /* remove the old apass */ *state->chptr->mode.apass = '\0'; if (MyUser(state->sptr)) send_reply(state->sptr, RPL_APASSWARN_CLEAR); + /* Revert everyone to MAXOPLEVEL. */ + for (memb = state->chptr->members; memb; memb = memb->next_member) { + if (memb->status & MODE_CHANOP) + SetOpLevel(memb, MAXOPLEVEL); + } } } } @@ -3064,7 +3056,7 @@ newban->flags = ((state->dir == MODE_ADD) ? BAN_ADD : BAN_DEL) | (*flag_p == MODE_BAN ? 0 : BAN_EXCEPTION); set_ban_mask(newban, collapse(pretty_mask(t_str))); - ircd_strncpy(newban->who, cli_name(state->sptr), HOSTLEN); + ircd_strncpy(newban->who, IsUser(state->sptr) ? cli_name(state->sptr) : "*", NICKLEN); newban->when = TStime(); apply_ban(&state->chptr->banlist, newban, 0); } @@ -3294,14 +3286,14 @@ /* set op-level of member being opped */ if ((state->cli_change[i].flag & (MODE_ADD | MODE_CHANOP)) == (MODE_ADD | MODE_CHANOP)) { - /* If being opped by an outsider, get oplevel 0 for an apass + /* If being opped by an outsider, get oplevel 1 for an apass * channel, else MAXOPLEVEL. * Otherwise, if not an apass channel, or state->member has * MAXOPLEVEL, get oplevel MAXOPLEVEL. * Otherwise, get state->member's oplevel+1. */ if (!state->member) - SetOpLevel(member, state->chptr->mode.apass[0] ? 0 : MAXOPLEVEL); + SetOpLevel(member, state->chptr->mode.apass[0] ? 1 : MAXOPLEVEL); else if (!state->chptr->mode.apass[0] || OpLevel(state->member) == MAXOPLEVEL) SetOpLevel(member, MAXOPLEVEL); else @@ -3481,12 +3473,12 @@ #if defined(UNDERNET) case 'A': /* deal with Admin passes */ - if (feature_bool(FEAT_OPLEVELS)) + if (IsServer(cptr) || feature_bool(FEAT_OPLEVELS)) mode_parse_apass(&state, flag_p); break; case 'U': /* deal with user passes */ - if (feature_bool(FEAT_OPLEVELS)) + if (IsServer(cptr) || feature_bool(FEAT_OPLEVELS)) mode_parse_upass(&state, flag_p); break; #endif @@ -3703,10 +3695,11 @@ if (jbuf->jb_type != JOINBUF_TYPE_CREATE && !IsLocalChannel(chan->chname)) { #if defined(UNDERNET) - if (flags & CHFL_CHANOP) + if (flags & CHFL_CHANOP) { + assert(oplevel == 0 || oplevel == 1); sendcmdto_serv_butone(jbuf->jb_source, CMD_JOIN, jbuf->jb_connect, "%u:%H %Tu", oplevel, chan, chan->creationtime); - else + } else #elif defined(DDB) if (flags & CHFL_OWNER) sendcmdto_serv_butone(jbuf->jb_source, CMD_JOIN, jbuf->jb_connect, Index: ircd-ircdev/ircd/class.c diff -u ircd-ircdev/ircd/class.c:1.8 ircd-ircdev/ircd/class.c:1.9 --- ircd-ircdev/ircd/class.c:1.8 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/ircd/class.c Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Implementation of connection class handling functions. - * @version $Id: class.c,v 1.8 2005/06/22 07:54:29 zolty Exp $ + * @version $Id: class.c,v 1.9 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" @@ -104,7 +104,7 @@ MaxLinks(connClassList) = feature_int(FEAT_MAXIMUM_LINKS); MaxSendq(connClassList) = feature_int(FEAT_DEFAULTMAXSENDQLENGTH); connClassList->valid = 1; - Links(connClassList) = 0; + Links(connClassList) = 1; connClassList->next = 0; } @@ -260,7 +260,7 @@ for (cltmp = connClassList; cltmp; cltmp = cltmp->next) send_reply(sptr, RPL_STATSYLINE, 'Y', ConClass(cltmp), PingFreq(cltmp), ConFreq(cltmp), MaxLinks(cltmp), MaxSendq(cltmp), - Links(cltmp)); + Links(cltmp) - 1); } /** Return maximum SendQ length for a client. Index: ircd-ircdev/ircd/engine_epoll.c diff -u ircd-ircdev/ircd/engine_epoll.c:1.10 ircd-ircdev/ircd/engine_epoll.c:1.11 --- ircd-ircdev/ircd/engine_epoll.c:1.10 Sat May 7 15:23:40 2005 +++ ircd-ircdev/ircd/engine_epoll.c Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Linux epoll_*() event engine. - * @version $Id: engine_epoll.c,v 1.10 2005/05/07 22:23:40 zolty Exp $ + * @version $Id: engine_epoll.c,v 1.11 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" @@ -51,11 +51,7 @@ /* Oh, did we mention that some glibc releases do not even define the * syscall numbers? */ #if !defined(__NR_epoll_create) -#if defined(__i386__) -#define __NR_epoll_create 254 -#define __NR_epoll_ctl 255 -#define __NR_epoll_wait 256 -#elif defined(__ia64__) +#if defined(__ia64__) #define __NR_epoll_create 1243 #define __NR_epoll_ctl 1244 #define __NR_epoll_wait 1245 @@ -63,6 +59,34 @@ #define __NR_epoll_create 214 #define __NR_epoll_ctl 233 #define __NR_epoll_wait 232 +#elif defined(__sparc64__) || defined(__sparc__) +#define __NR_epoll_create 193 +#define __NR_epoll_ctl 194 +#define __NR_epoll_wait 195 +#elif defined(__s390__) || defined(__m68k__) +#define __NR_epoll_create 249 +#define __NR_epoll_ctl 250 +#define __NR_epoll_wait 251 +#elif defined(__ppc64__) || defined(__ppc__) +#define __NR_epoll_create 236 +#define __NR_epoll_ctl 237 +#define __NR_epoll_wait 238 +#elif defined(__parisc__) || defined(__arm26__) || defined(__arm__) +#define __NR_epoll_create 224 +#define __NR_epoll_ctl 225 +#define __NR_epoll_wait 226 +#elif defined(__alpha__) +#define __NR_epoll_create 407 +#define __NR_epoll_ctl 408 +#define __NR_epoll_wait 409 +#elif defined(__sh64__) +#define __NR_epoll_create 282 +#define __NR_epoll_ctl 283 +#define __NR_epoll_wait 284 +#elif defined(__i386__) || defined(__sh__) || defined(__m32r__) || defined(__h8300__) || defined(__frv__) +#define __NR_epoll_create 254 +#define __NR_epoll_ctl 255 +#define __NR_epoll_wait 256 #else /* cpu types */ #error No system call numbers defined for epoll family. #endif /* cpu types */ Index: ircd-ircdev/ircd/engine_select.c diff -u ircd-ircdev/ircd/engine_select.c:1.5 ircd-ircdev/ircd/engine_select.c:1.6 --- ircd-ircdev/ircd/engine_select.c:1.5 Mon Jan 10 04:22:58 2005 +++ ircd-ircdev/ircd/engine_select.c Thu Sep 1 04:25:42 2005 @@ -21,23 +21,23 @@ */ /** @file * @brief BSD sockets select() event engine. - * @version $Id: engine_select.c,v 1.5 2005/01/10 12:22:58 zolty Exp $ + * @version $Id: engine_select.c,v 1.6 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" -#include "ircd_events.h" - -#include "ircd.h" -#include "ircd_log.h" -#include "s_debug.h" - /* On BSD, define FD_SETSIZE to what we want before including sys/types.h */ #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__bsdi__) # if !defined(FD_SETSIZE) -# define FD_SETSIZE MAXCONNECTIONS +# define FD_SETSIZE ((MAXCONNECTIONS)+4) # endif #endif +#include "ircd_events.h" + +#include "ircd.h" +#include "ircd_log.h" +#include "s_debug.h" + /* #include <assert.h> -- Now using assert in ircd_log.h */ #include <errno.h> #include <string.h> /* needed for bzero() on OS X */ @@ -47,6 +47,20 @@ #include <time.h> #include <unistd.h> +#if FD_SETSIZE < (MAXCONNECTIONS + 4) +/* + * Sanity check + * + * All operating systems work when MAXCONNECTIONS <= 252. + * Most operating systems work when MAXCONNECTIONS <= 1020 and FD_SETSIZE is + * updated correctly in the system headers (on BSD systems sys/types.h might + * have abruptly redefined it so the check is still done), you might + * already need to recompile your kernel. + * For larger FD_SETSIZE your mileage may vary (kernel patches may be needed). + */ +# error FD_SETSIZE is too small or MAXCONNECTIONS too large. +#endif + #define SELECT_ERROR_THRESHOLD 20 /**< after 20 select errors, restart */ #define ERROR_EXPIRE_TIME 3600 /**< expire errors after an hour */ Index: ircd-ircdev/ircd/gline.c diff -u ircd-ircdev/ircd/gline.c:1.14 ircd-ircdev/ircd/gline.c:1.15 --- ircd-ircdev/ircd/gline.c:1.14 Fri Apr 22 09:22:13 2005 +++ ircd-ircdev/ircd/gline.c Thu Sep 1 04:25:42 2005 @@ -23,7 +23,7 @@ */ /** @file * @brief Implementation of Gline manipulation functions. - * @version $Id: gline.c,v 1.14 2005/04/22 16:22:13 zolty Exp $ + * @version $Id: gline.c,v 1.15 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" @@ -404,7 +404,12 @@ /* uh, what to do here? */ /* The answer, my dear Watson, is we throw a protocol_violation() -- hikari */ - return protocol_violation(sptr,"%s has been smoking the sweet leaf and sent me a whacky gline",cli_name(sptr)); + if (IsServer(cptr)) + return protocol_violation(sptr,"%s has been smoking the sweet leaf and sent me a whacky gline",cli_name(sptr)); + else { + sendto_opmask_butone(NULL, SNO_GLINE, "%s has been smoking the sweet leaf and sent me a whacky gline", cli_name(sptr)); + return 0; + } break; } user = (*userhost =='$' ? userhost : userhost+2); Index: ircd-ircdev/ircd/ircd.c diff -u ircd-ircdev/ircd/ircd.c:1.20 ircd-ircdev/ircd/ircd.c:1.21 --- ircd-ircdev/ircd/ircd.c:1.20 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/ircd/ircd.c Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Entry point and other initialization functions for the daemon. - * @version $Id: ircd.c,v 1.20 2005/06/22 07:54:29 zolty Exp $ + * @version $Id: ircd.c,v 1.21 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" @@ -495,6 +495,9 @@ #ifdef USE_DEVPOLL printf("/dev/poll "); #endif +#ifdef USE_EPOLL + printf("epoll_*() "); +#endif #ifdef USE_POLL printf("poll()"); #else Index: ircd-ircdev/ircd/ircd_auth.c diff -u ircd-ircdev/ircd/ircd_auth.c:1.7 ircd-ircdev/ircd/ircd_auth.c:1.8 --- ircd-ircdev/ircd/ircd_auth.c:1.7 Sun Jul 3 13:21:42 2005 +++ ircd-ircdev/ircd/ircd_auth.c Thu Sep 1 04:25:42 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief IAuth client implementation for an IRC server. - * @version $Id: ircd_auth.c,v 1.7 2005/07/03 20:21:42 zolty Exp $ + * @version $Id: ircd_auth.c,v 1.8 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" #include "client.h" @@ -367,7 +367,7 @@ assert(format != 0); vd.vd_format = format; va_start(vd.vd_args, format); - sendwallto_group_butone(&me, WALL_DESYNCH, NULL, "IAuth protocol violation: %v", &vd); + sendto_opmask_butone(NULL, SNO_CONNEXIT, "IAuth protocol violation: %v", &vd); va_end(vd.vd_args); } Index: ircd-ircdev/ircd/ircd_features.c diff -u ircd-ircdev/ircd/ircd_features.c:1.14 ircd-ircdev/ircd/ircd_features.c:1.15 --- ircd-ircdev/ircd/ircd_features.c:1.14 Sat Apr 2 11:47:35 2005 +++ ircd-ircdev/ircd/ircd_features.c Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Implementation of configurable feature support. - * @version $Id: ircd_features.c,v 1.14 2005/04/02 19:47:35 zolty Exp $ + * @version $Id: ircd_features.c,v 1.15 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" @@ -323,6 +323,7 @@ F_I(IPCHECK_CLONE_LIMIT, 0, 4, 0), F_I(IPCHECK_CLONE_PERIOD, 0, 40, 0), F_I(IPCHECK_CLONE_DELAY, 0, 600, 0), + F_I(CHANNELLEN, 0, 200, 0), /* Some misc. default paths */ F_S(MPATH, FEAT_CASE | FEAT_MYOPER, "ircd.motd", motd_init), Index: ircd-ircdev/ircd/ircd_log.c diff -u ircd-ircdev/ircd/ircd_log.c:1.11 ircd-ircdev/ircd/ircd_log.c:1.12 --- ircd-ircdev/ircd/ircd_log.c:1.11 Mon May 16 03:17:27 2005 +++ ircd-ircdev/ircd/ircd_log.c Thu Sep 1 04:25:42 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief IRC logging implementation. - * @version $Id: ircd_log.c,v 1.11 2005/05/16 10:17:27 zolty Exp $ + * @version $Id: ircd_log.c,v 1.12 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" @@ -198,10 +198,8 @@ { /* only open the file if we haven't already */ if (lf && lf->fd < 0) { - alarm(3); /* if NFS hangs, we hang only for 3 seconds */ lf->fd = open(lf->file, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR); - alarm(0); } } Index: ircd-ircdev/ircd/ircd_parser.y diff -u ircd-ircdev/ircd/ircd_parser.y:1.21 ircd-ircdev/ircd/ircd_parser.y:1.22 --- ircd-ircdev/ircd/ircd_parser.y:1.21 Mon May 16 04:22:50 2005 +++ ircd-ircdev/ircd/ircd_parser.y Thu Sep 1 04:25:42 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: ircd_parser.y,v 1.21 2005/05/16 11:22:50 zolty Exp $ + * $Id: ircd_parser.y,v 1.22 2005/09/01 11:25:42 zolty Exp $ * */ %{ @@ -262,11 +262,14 @@ jupenick: NICK '=' QSTRING ';' { addNickJupes($3); - MyFree($3); -}; + MyFree($3);}; -generalblock: GENERAL '{' generalitems '}' ';' +generalblock: GENERAL { + /* Zero out the vhost addresses, in case they were removed. */ + memset(&VirtualHost_v4.addr, 0, sizeof(VirtualHost_v4.addr)); + memset(&VirtualHost_v6.addr, 0, sizeof(VirtualHost_v6.addr)); +} '{' generalitems '}' ';' { if (localConf.name == NULL) parse_error("Your General block must contain a name."); if (localConf.numeric == 0) @@ -305,8 +308,11 @@ generalvhost: VHOST '=' QSTRING ';' { struct irc_in_addr addr; - if (!ircd_aton(&addr, $3)) - parse_error("Invalid virtual host '%s'.", $3); + if (!strcmp($3, "*")) { + /* This traditionally meant bind to all interfaces and connect + * from the default. */ + } else if (!ircd_aton(&addr, $3)) + parse_error("Invalid virtual host '%s'.", $3); else if (irc_in_addr_is_ipv4(&addr)) memcpy(&VirtualHost_v4.addr, &addr, sizeof(addr)); else @@ -955,16 +961,7 @@ } else { - struct nick_host *nh, *next; - for (nh = smap->services; nh; nh = next) - { - next = nh->next; - MyFree(nh); - } - MyFree(smap->name); - MyFree(smap->command); - MyFree(smap->prepend); - MyFree(smap); + free_mapping(smap); } smap = NULL; }; Index: ircd-ircdev/ircd/listener.c diff -u ircd-ircdev/ircd/listener.c:1.8 ircd-ircdev/ircd/listener.c:1.9 --- ircd-ircdev/ircd/listener.c:1.8 Mon Jan 10 04:23:01 2005 +++ ircd-ircdev/ircd/listener.c Thu Sep 1 04:25:42 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Implementation for handling listening sockets. - * @version $Id: listener.c,v 1.8 2005/01/10 12:23:01 zolty Exp $ + * @version $Id: listener.c,v 1.9 2005/09/01 11:25:42 zolty Exp $ */ #include "config.h" @@ -333,7 +333,7 @@ } /** Close all inactive listeners. */ -void close_listeners() +void close_listeners(void) { struct Listener* listener; struct Listener* listener_next = 0; Index: ircd-ircdev/ircd/m_burst.c diff -u ircd-ircdev/ircd/m_burst.c:1.12 ircd-ircdev/ircd/m_burst.c:1.13 --- ircd-ircdev/ircd/m_burst.c:1.12 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/ircd/m_burst.c Thu Sep 1 04:25:42 2005 @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_burst.c,v 1.12 2005/06/22 07:54:29 zolty Exp $ + * $Id: m_burst.c,v 1.13 2005/09/01 11:25:42 zolty Exp $ * */ @@ -548,7 +548,7 @@ member->status |= CHFL_BURST_ALREADY_VOICED; /* Synchronize with the burst. */ member->status |= CHFL_BURST_JOINED | (current_mode & (CHFL_CHANOP|CHFL_VOICE)); - member->oplevel = oplevel; + SetOpLevel(member, oplevel); } Index: ircd-ircdev/ircd/m_join.c diff -u ircd-ircdev/ircd/m_join.c:1.12 irc... [truncated message content] |
From: Toni G. <zo...@us...> - 2005-09-01 11:34:14
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-09-01 11:34:08 UTC Modified files: TODO.es Log message: Mas TODO ---------------------- diff included ---------------------- Index: ircd-ircdev/TODO.es diff -u ircd-ircdev/TODO.es:1.28 ircd-ircdev/TODO.es:1.29 --- ircd-ircdev/TODO.es:1.28 Wed Jun 22 03:01:25 2005 +++ ircd-ircdev/TODO.es Thu Sep 1 04:33:58 2005 @@ -1,7 +1,7 @@ # # TODO para ircd-ircdev # -# $Id: TODO.es,v 1.28 2005/06/22 10:01:25 zolty Exp $ +# $Id: TODO.es,v 1.29 2005/09/01 11:33:58 zolty Exp $ # # Insertar las nuevas entradas al principio de la lista TODO. # @@ -15,7 +15,7 @@ ALTA PRIORIDAD -------------------------------------------------------------------------------------- - [G] Soporte de E-lines (excepciones a K-lines). - - [G] Modo +X de ver ips. + - [G] Modo +X de ver ips. Hacerlo por privilegios daria problemas. - [G] Modo +R de usuarios. - [G] ¿Modo +M de canales?. - [G] Poner uuna Feature para elegir entre salir o no el nombre del servidor en los @@ -98,7 +98,8 @@ -------------------------------------------------------------------------------------- 15/Mar/2005 - [G] Bajo en ciertas circunstancias desconocidas del ircd.conf no pueden - entrar clientes al IRCD. Investigar eso. + entrar clientes al IRCD. Investigar eso. Parece ser que si se pilla el + sample en castellano y no funciona pero... si comentas lo iauth entonces ya funciona. 26/May/2005 - [D] Los cambios de modos en canal, a veces hay desyncs. Investigar el origen - [D] Antes de un netjoin, un /mode #canal mostraba +r, despues ya no. ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2005-09-01 11:38:14
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-09-01 11:38:07 UTC Modified files: doc/history/Undernet/ChangeLog-u2.10.12 Log message: ChangeLog ---------------------- diff included ---------------------- Index: ircd-ircdev/doc/history/Undernet/ChangeLog-u2.10.12 diff -u ircd-ircdev/doc/history/Undernet/ChangeLog-u2.10.12:1.3 ircd-ircdev/doc/history/Undernet/ChangeLog-u2.10.12:1.4 --- ircd-ircdev/doc/history/Undernet/ChangeLog-u2.10.12:1.3 Wed Mar 9 10:12:32 2005 +++ ircd-ircdev/doc/history/Undernet/ChangeLog-u2.10.12 Thu Sep 1 04:37:57 2005 @@ -1,3 +1,1320 @@ +2005-08-30 Michael Poole <md...@tr...> + + * include/channel.h (PASSLEN): Remove; use KEYLEN instead. + + * ircd/channel.c (mode_parse_upass): Likewise. + (mode_parse_apass): Likewise. + The inconsistency (in clean_key()) was reported by Reed. + +2005-08-30 Michael Poole <md...@tr...> + + * RELEASE.NOTES: Document +D and +d channel modes. + +2005-08-29 Michael Poole <md...@tr...> + + * include/numeric.h (ERR_NOMANAGER_LONG): Undefine. + (ERR_NOMANAGER_SHORT): Rename to ERR_NOMANAGER. + + * ircd/s_err.c (replyTable): Change to reflect that. + + * ircd/channel.c (clean_key): New function. + (mode_parse_key): Use it, and check that keys do not start with :. + (mode_parse_upass): Likewise, and adjust for ERR_NOMANAGER. + (mode_parse_apass): Likewise. + The key and password changes fix bugs reported by coekie. + +2005-08-27 Michael Poole <md...@tr...> + + * ircd/channel.c (add_user_to_channel): Use SetOpLevel() instead + of assigning directly to member->oplevel. + (mode_parse_apass): Likewise. + (mode_process_clients): Users opped by outsiders should get + oplevel 1, since they are not channel managers. + + * ircd/m_burst.c (ms_burst): Use SetOpLevel() instead of assigning + directly to member->oplevel. + +2005-08-25 Michael Poole <md...@tr...> + + * ircd/channel.c (member_can_send_to_channel): At coekie's + suggestion, disallow channel manager talking after Apass is set, + so they set and use Upass sooner. + + * ircd/class.c (init_class): Default class should have 1 link. + (report_classes): Return links count minus one to match old output. + + * ircd/m_trace.c (do_trace): Fix links count here, too (spotted by + Reed). + +2005-08-25 Michael Poole <md...@tr...> + + * ircd/channel.c (mode_parse): Accept +A/+U from servers + regardless of FEAT_OPLEVELS. + +2005-08-24 Michael Poole <md...@tr...> + + * ircd/ircd.c (parse_command_line): Mention epoll engine when run + with -v. + +2005-08-24 Michael Poole <md...@tr...> + + * include/patchlevel.h (PATCHLEVEL): Increment. + + * ircd/channel.c (joinbuf_join): Double check that oplevel is 0 or + 1 when propagating JOIN <level>:#channel, to avoid PV on receiver. + + * ircd/engine_epoll.c: Add system call numbers for more CPU types. + + * ircd/ircd_log.c (log_open): Remove NFS-oriented alarm() calls; + anyone who writes logs over NFS is mental. (Thanks to D. Bruce.) + +2005-08-21 Michael Poole <md...@tr...> + + * include/s_conf.h (free_mapping): Declare new function. + + * ircd/ircd_parser.y (pseudoblock): Use it. + + * ircd/s_conf.c (free_mapping): Define it. + (close_mappings): New function. + (rehash): Call close_mappings() before reading file. + + * ircd/m_kill.c (do_kill): Revert 2005-08-18 change. + +2005-08-19 Michael Poole <md...@tr...> + + * ircd/parse.c (tok_tree): Re-add token tree structure. + (initmsgtree): Populate it. + (parse_server): Prefer it to full message tree. + +2005-08-18 Michael Poole <md...@tr...> + + * ircd/m_kill.c (do_kill): When FEAT_HIS_KILLWHO, change apparent + source of KILLs to &his instead of &me. + +2005-08-16 Michael Poole <md...@tr...> + + * ircd/channel.c (mode_parse_ban): Avoid overwriting part of + newban->banstr[] when the source is a server. (Spotted by jcq.) + +2005-08-16 Michael Poole <md...@tr...> + + * ircd/channel.c (joinbuf_join): Switch to &his instead of &me for + announcements to local users in a channel. + + * ircd/m_burst.c (ms_burst): Likewise. + + * ircd/m_invite.c (m_invite): Likewise. + (ms_invite): Likewise. + + * ircd/m_kick.c (ms_kick): Likewise. + + * ircd/m_topic.c (do_settopic): Another &me -> &his change for + HIS, and use that apparent source for the channel localcast. + +2005-08-16 Jukka Ollila <jao...@ni...> + + * ircd/s_user.c (hide_hostmask): Use HIS_SERVERNAME instead of the + real thing for the post-mode-x rejoin. + +2005-08-15 Michael Poole <md...@tr...> + + * include/supported.h (FEATURESVALUES2): Add +d channel mode. + + * ircd/IPcheck.c (ip_registry_new_entry): Clarify that this is not + a varadic function. (Suggested by Ian Kumlien.) + + * ircd/convert-conf.c (finish_operators): Likewise. + + * ircd/listener.c (close_listeners): Likewise. + + * ircd/channel.c (CheckDelayedJoins): Use HIS server name to + remove channel mode +d. + +2005-08-12 Michael Poole <md...@tr...> + + * ircd/channel.c (pretty_mask): Recognize ':' as unique to the + host part of a ban mask. + +2005-08-03 Jan Krueger <ja...@he...> + + * ircd/m_kick.c (m_kick): Send JOIN prior to confirming KICK on + invisible member. + +2005-08-08 Michael Poole <md...@tr...> + + * ircd/channel.c (find_ban): For non-IPmask bans, match the ban + string against the string form of the client's IP address. + +2005-07-16 Michael Poole <md...@tr...> + + * configure.in: Apply a test for socklen_t that Reed found. + + * configure: Regenerate. + +2005-07-16 Michael Poole <md...@tr...> + + * RELEASE.NOTES: Mention that 2.10.11 does not support oplevels. + + * README.FreeBSD: Remove (merged into README). + + * README.Solaris: Remove (merged into README). + + * README: Merge in the above; also update for 2.10.12. + + * doc/example.conf: Change mention of K-lines to say Kill blocks + instead. + + * doc/iauth.txt: Remove (out of date). + + * doc/readme.features: Update to reflect that 2.10.11 is not the + current release. Change mention of various config lines to use + the equivalent config entries or blocks instead. + + * doc/readme.log: Likewise. + + * doc/api/features.txt: Change F-line mentions to say Feature + entry instead. + + * doc/api/modebuf.txt: Change U-line mention to say Uworld entry. + + * doc/api/motd.txt: Change T-line mentions to say Motd entry. + +2005-07-15 Michael Poole <md...@tr...> + + * ircd/ircd_features.c (feature_init): Always call + feature_notify_server*() so that 'his' is initialized. + + * ircd/m_whois.c (do_whois): Unswap sense of comparison to choose + between user->server and &his. + +2005-07-14 Michael Poole <md...@tr...> + + * ircd/channel.c (mode_parse_apass): Update oplevels when setting + or removing the +A password. Partial credit goes to Reed Loden. + +2005-07-14 Michael Poole <md...@tr...> + + * include/ircd_features.h: Declare new "his" pseudo-server to hold + FEAT_HIS_SERVERNAME and FEAT_HIS_SERVERINFO in a convenient place. + + * ircd/ircd_features.c: Initialize and update it. + + * ircd/channel.c (modebuf_flush_int): Use it as the apparent + source for opmodes and server mode changes (also when the source + is me). + + * ircd/m_burst.c (ms_burst): Use it as the apparent source for net + rider kicks. + + * ircd/m_whois.c (do_whois): Use it to simplify code here. + + * ircd/s_misc.c (exit_client): Use it as the apparent killer. + +2005-07-14 Michael Poole <md...@tr...> + + * doc/example.conf (General): Update comment about vhost to match + the code change below. + + * ircd/ircd_parser.y (generalvhost): Accept vhost="*"; as a + synonym for the default behavior (for backwards compatibility). + Spotted by Kev. + + * ircd/channel.c (sub1_from_channel): Remove stale code and + comment, replacing with an up-to-date comment. Spotted by skx. + +2005-07-11 Michael Poole <md...@tr...> + + * ircd/engine_select.c: Remove outdated comment about USE_POLL. + + * ircd/parse.c (msgtab): #if out CAP handler until we have caps. + + * RELEASE.NOTES: Remove mention of capabilities for now. + +2005-07-11 Stephan Peijnik <spe...@gm...> + + * ircd/gline.c (gline_add): It's only a protocol violation when a + server issues a "whacky" gline. If it's an oper, only tell opers + with SNO_GLINE. + + * ircd/ircd_auth.c (iauth_protocol_violation): Likewise, the whole + network is not likely to care about IAuth PVs, so only tell opers + with SNO_CONNEXIT. + +2005-07-11 Michael Poole <md...@tr...> + + * doc/readme.features: Document FEAT_CHANNELLEN. + + * doc/example.conf: Give an example of it. + + * ircd/m_join.c (ms_join): Do not clean channel names from remote + servers, to avoid desynchs. + + * ircd/m_names.c (ms_names): Likewise. + +2005-07-11 Stephan Peijnik <spe...@gm...> + + * include/ircd_features.h: Declare new FEAT_CHANNELLEN. + + * include/supported.h: Add it to the ISUPPORT display. + + * ircd/channel.c (clean_channelname): Impose the lower limit + between FEAT_CHANNELLEN and CHANNELLEN. + + * ircd/ircd_features.c: Define FEAT_CHANNELLEN. + +2005-07-11 Reed Loden <re...@re...> + + * include/sys.h: Move FD_SETSIZE redefinition to engine_select.c. + + * ircd/s_bsd.c: Move FD_SETSIZE sanity check to engine_select.c + Remove unused #include <sys/poll.h>. + + * ircd/engine_select.c: Put FD_SETSIZE redefinition and sanity + checks here, since they are not used elsewhere in the daemon. + [Order slightly changed by Michael Poole to compile.] + +2005-07-03 Michael Poole <md...@tr...> + + * ircd/convert-conf.c: New file. + + * ircd/Makefile: Compile it. + +2005-06-27 Michael Poole <md...@tr...> + + * ircd/s_bsd.c (add_connection): Split logic for server versus + client listeners; only do IPcheck for client connections. + + * ircd/s_serv.c (server_estab): There is no longer a need to + remove IPcheck reference, so don't. + +2005-06-27 Michael Poole <md...@tr...> + + * include/client.h (struct Connection): Remove con_dns_reply (and + associated macros). + + * include/res.h (gethost_byname): Change calling signature to + clarify memory ownership. + (gethost_byaddr): Likewise. + + * include/s_bsd.h (release_dns_reply): Remove function. + + * ircd/hash.c: #include "match.h" to quash warning. + + * ircd/ircd_auth.c (struct IAuth): Remove i_query field. + (iauth_dns_callback): Adjust for new gethost_byname signature. + (iauth_reconnect): Likewise. + + * ircd/ircd_res.c (struct reslist): Make elements of query field + inline rather than in a contained structure. + (make_request): Reflect removal of DNSQuery. + (do_query_name): Likewise. + (do_query_number): Likewise. + (make_dnsreply): Remove now-unused function. + (timeout_resolver): Adjust to new callback signature. + (delete_resolver_queries): Reflect removal of DNSQuery. + (gethost_byname): Update to new signature. + (gethost_byaddr): Likewise. + (res_readreply): Reflect removal of DNSReply. + + * ircd/list.c (dealloc_connection): con_dns_reply no longer + exists, so do not free it. + + * ircd/s_auth.c (auth_verify_hostname): constify. + (auth_dns_callback): Adjust to new callback signature. + (start_auth): Adjust to new gethost_byaddr() signature. + + * ircd/s_bsd.c (connect_dns_callback): Adjust to new callback + signature. + (release_dns_reply): Remove unused function. + (connect_server): Adjust to new gethost_byname() signature. + + * ircd/s_conf.c (conf_dns_callback): Adjust to new callback + signature. + (conf_dns_lookup): Adjust to new gethost_byname() signature. + (attach_iline): Use cli_sockhost() instead of DNS reply. + (conf_check_server): Simplify use of DNS results. + + * ircd/s_serv.c (server_estab): Remove call to removed function. + + * ircd/s_user.c (register_user): Remove call to removed function. + +2005-06-27 Michael Poole <md...@tr...> + + * include/s_misc.h (get_sockhost): Remove the unused (and + deceptively named) get_sockhost(). + + * ircd/s_misc.c (get_sockhost): Likewise. + +2005-06-25 Andrew Miller <a1...@am...> + + * ircd/ircd_crypt.c (ircd_crypt): strdup is not allowed, change to + DupStr so memdebug works. + + * doc/debug_memleak_gc.patch : Update to gc6.5 + +2005-06-24 Andrew Miller <a1...@am...> + * ircd/m_invite.c (m_invite): Don't propagate invites to local channels. + +2005-06-21 Andrew Miller <a1...@am...> + + * ircd/m_list.c (param_parse): Add support for channel wildcards. + * ircd/m_list.c (show_usage): Document the new format. + * ircd/hash.c (list_next_channels): Check channel wildcard in list. + * include/channel.h (ListingArgs): Add the wildcard member. + +2005-06-19 Andrew Miller <a1...@am...> + + * ircd/ircd_res.c (proc_answer): Deal with unexpected record types more + gracefully. + + * ircd/ircd_res.c (res_readreply): Check res_ourserver before walking + the pending request list, to make DoS attacks harder. + + * ircd/m_invite.c (m_invite): Give no such channel rather than not on + channel when the channel being invited to does not exist. + +2005-06-18 Michael Poole <md...@tr...> + + * ircd/s_debug.c (count_memory): Consolidate several lines; make + initial letter capitalization consistent. + +2005-06-19 Andrew Miller <a1...@am...> + + * ircd/s_stats.c: Remove the "debug only" label on memusage stats, + since it no longer applies. + +2005-05-16 Michael Poole <md...@tr...> + + * include/channel.h (struct Ban): Make 'who' and 'banstr' direct + arrays, rather than pointers. + + * ircd/channel.c (bans_alloc): New variable to count number of ban + structures allocated. + (bans_inuse): New variable to count number of ban structures + currently in use. + (set_banmask): Adapt to changes in struct Ban. + (make_ban): Likewise, and update ban counts. + (free_ban): Likewise. + (bans_send_meminfo): New function. + (apply_ban): Adapt to changes in struct Ban. + (mode_parse_ban): Likewise. + (mode_process_bans): Likewise. + (mode_parse): Likewise. + (RevealDelayedJoin): Fix brace placement. + (CheckDelayedJoins): Fix brace placement and whitespace. + + * ircd/list.c (struct liststats): Add new fields to eliminate the + separate count variables. + (init_list): Adapt to those changes. + (alloc_client): Likewise. + (dealloc_client): Likewise. + (alloc_connection): Likewise. + (dealloc_connection): Likewise. + (make_server): Likewise. + (remove_client_from_list): Likewise. + (verify_client_list): Likewise. + (make_link): Likewise. + (free_link): Likewise. + (send_liststats): New function. + (send_listinfo): Rewrite to use new struct liststats layout. + + * ircd/m_burst.c (ms_burst): Adapt to changes in struct Ban. + + * ircd/m_clearmode.c (do_clearmode): Adapt to changes in struct + Ban. + + * ircd/s_stats.c (stats_meminfo): Define unconditionally and call + bans_send_meminfo(). + (statsinfo): Always give access to stats_meminfo. + +2005-06-16 Michael Poole <md...@tr...> + + * include/ircd_string.h: Include necessary <string.h> header. + + * ircd/test/.cvsignore: Ignore log output files. + + * ircd/test/Makefile.in: Remove log output files. + + * ircd/test/kill-block-1.cmd: Add sleeps to try to trigger Kills. + + * ircd/test/run-tests.sh: Switch sense of argument. Send an IRC + debug dump to log files. + +2005-06-13 Michael Poole <md...@tr...> + + * ircd/s_user.c (make_user): Unconditionally increment userCount. + (free_user): Unconditionally decrement it here. + + * ircd/s_conf.c (make_conf): Unconditionally increment + GlobalConfCount. + (free_conf): Unconditionally decrement it here. + + * ircd/s_debug.c (count_memory): Fix termination condition for + ban-walking loop. Add missing "e" to "members". + + +2005-06-10 Michael Poole <md...@tr...> + + * ircd/match.c (check_if_ipmask): Strings that contain '?' cannot + be true IP masks. + +2005-05-30 Michael Poole <md...@tr...> + + * ircd/test/Makefile.in: Add LDFLAGS variable for profiling purposes. + + * ircd/test/ircd_match_t.c: Test recovery from backtracking. + + * ircd/test/channel-1.cmd: Modify to improve code coverage. + + * ircd/test/client-1.cmd: Likewise. + + * ircd/test/gline-1.cmd: Likewise. + + * ircd/test/ircd-t1.conf: Likewise. + + * ircd/test/stats-1.cmd: Likewise. + + * ircd/test/run-tests.sh: Explicitly start ircds. Add new test scripts. + + * ircd/test/test-driver.pl: Silently handle more signals from IRC. + + * ircd/test/commands-1.cmd: New test script. + + * ircd/test/feature-1.cmd: New test script. + + * ircd/test/jupe-1.cmd: New test script. + + * ircd/test/kill-block-1.cmd: New test script. + + * ircd/test/ircd-t1-2.conf: New configuration file for test scripts. + + * ircd/test/ircd-t2.conf: Likewise. + +2005-05-30 Michael Poole <md...@tr...> + + * ircd/s_debug.c (count_memory): Use count_listener_memory() to + report memory used by listener structures. + +2005-05-30 Michael Poole <md...@tr...> + + * include/class.h (get_con_freq): Remove unused function. + + * include/list.h (find_user_link): Remove unused function. + + * include/class.c (get_con_freq): Remove. + + * ircd/list.c (find_user_link): Remove. + + * include/string.h (string_is_hostname, string_is_address, + strnChattr): Remove unused functions. + (init_string): Remove function that becomes a noop. + + * ircd/string.h (init_string): Remove. + (string_is_hostname, string_is_address, strnChattr): Likewise. + + * ircd/ircd.c (main): Remove call to init_string(). + +2005-05-30 Michael Poole <md...@tr...> + + * include/numeric.h (RPL_TRACELOG, RPL_MYPORTIS, + RPL_NOTOPERANYMORE): Undefine unused numeric replies. + + * ircd/s_err.c (replyTable): Fix format fields for certain numeric + arguments. Remove some unused entries. + + * ircd/s_stats.c (stats_configured_links): Move invariant + parameters to message format string. + +2005-05-30 Michael Poole <md...@tr...> + + * ircd/client.c (privtab): Add missing LIST_CHAN privilege, move + WIDE_GLINE to reflect its enumerated value. + + * ircd/s_debug.c (count_memory): Use user_count_memory() function + to count User structs in-use. + + * ircd/m_server.c (mr_server): Change "C:line" to "Connect block". + + * ircd/s_bsd.c (connect_server): Likewise. + + * ircd/s_conf.c (conf_check_server): Likewise. + + * ircd/s_err.c (replyTable): Change "O-lines" to "Operator block". + +2005-05-30 Michael Poole <md...@tr...> + + * ircd/match.c (match): Rewrite to handle globs that end in an + escaped wildcard (and hopefully clarify the code). + + * ircd/test/Makefile.in: Add new ircd_match_t test program. + + * ircd/test/ircd_match_t.c: New file. + + * ircd/test/test_stub.c: Emite newlines after log and debug + messages. + +2005-05-25 Reed Loden <re...@re...> + + * ircd/s_err.c (replyTable): Allow for the specification of 'O' or + 'o' in RPL_STATSOLINE. + + * ircd/s_stats.c (stats_configured_links): In /stats o/O, display + 'O' if either the oper block or the connection class has + PRIV_PROPAGATE (global oper) and 'o' if neither has PRIV_PROPAGATE + (local oper). + +2005-05-30 Michael Poole <md...@tr...> + + * ircd/IPcheck.c: Add Debug()s to try to track why the connected + count underflows. + + * ircd/m_endburst.c (ms_endofburst): Avoid dereferencing 'chan' + after it may be freed (in sub1_from_channel). + + * ircd/s_user.c (register_user): Rearrange code to reduce number + of "if (MyConnect(sptr))" checks. + +2005-05-12 Michael Poole <md...@tr...> + + * configure.in: Do not try to outsmart the default CFLAGS. + Simply add parameters explicitly requested by the user. + + * configure: Regenerate. + + * ircd/ircd_crypt_native.c: Use _XOPEN_SOURCE 600 (which is + used in os_generic.c) to get crypt() on NetBSD. + +2005-05-11 Kevin L. Mitchell <kl...@mi...> + + * ircd/ircd.c: if debugging is enabled (both DEBUGMODE defined and + -x given), reserve fd 2 for the use of the debugging log; + otherwise, some engines may attempt to use fd 2, which would end + up getting closed by debug_init() (actually, by + log_debug_reopen(), called by log_debug_init(), called by + debug_init()) + +2005-08-10 Michael Poole <md...@tr...> + + * ircd/channel.c (joinbuf_join): Do not send a MODE +o when a + local user creates a channel. + + * ircd/umkpasswd.c (crypt_pass): Allocate the proper amount of + memory for the tagged output string. + + * ircd/test/test-driver.pl: Add -vhost=... option. + + * ircd/test/ircd-t1.conf: Add new Operator blocks. + + * ircd/test/*.cmd: Rearrange and add more coverage tests. + +2005-08-09 Michael Poole <md...@tr...> + + * ircd/ircd_parser.y: Move error tokens to top level of parse, and + make ';' a synchronizing token for them. This avoids crashes in + situations like missing ';' between two Kill blocks. Move several + ';'s earlier for earlier detection of syntax errors. + + * ircd/motd.c (motd_memory_count): Use size_t for memory counts to + match the format strings used for those variables. + + * ircd/msgq.c (msgq_histogram): tmp.sizes[] is an array of + unsigned int, not unsigned long; use correct format string. + + * ircd/s_stats.c (stats_crule_list): Restore display of 'D' vs 'd' + based on crule type, rather than query type. + (statsinfo): Remove STAT_FLAG_VARPARAM from the "modules" and + "help" stats, which don't use the varparam. + + * ircd/test/test-driver.pl: Interpreter for test scripts.b + + * ircd/test/ircd-t1.conf: Configuration file for test scripts. + + * ircd/test/*.cmd: New test scripts for test-driver.pl. + +2005-05-08 Jukka Ollila <jao...@ni...> + (Adapted slightly by Michael Poole.) + + * ircd/os_generic.c (sockaddr_to_irc): Change to use v4compat + addresses event when !defined(IPV6). + +2005-05-07 Michael Poole <md...@tr...> + + * ircd/channel.c (joinbuf_join): Be smarter about what source to + use when opping a user that joins a channel. + +2005-05-04 Reed Loden <re...@re...> + + * ircd/m_trace.c (do_trace): Show the real nickname instead of the + numnick. + +2005-05-02 Jan Krueger <ja...@he...> + + * ircd/channel.c (member_can_send_to_channel): if the channel can only + be joined by users with accounts (+r), do not allow users without + accounts to speak. + +2005-05-07 Michael Poole <md...@tr...> + + * ircd/numnicks.c (base64toip): Fix bugs in parsing IPv6 + addresses. + * ircd/test/ircd_in_addr_t.c (test_addrs): Add new entry. + (test_address): Test base64toip() as well. + +2005-05-05 Michael Poole <md...@tr...> + + * ircd/s_user.c (umode_str): Only clear the operator flag when not + propagating; never set it. + +2005-05-04 Michael Poole <md...@tr...> + + * ircd/channel.c (joinbuf_join): Include channel manager flag in + determination of oplevel. If opping the user for a non-local + non-create, include oplevel in message to other servers. Send + "MODE +o <client>" to local users whenever opping the client. + + * ircd/m_join.c (m_join): Remove logic that moved into + joinbuf_join(). + (ms_join): Look for level 0 and 1 joins from remote servers + and adjust value of 'flags' appropriately. + +2005-05-04 Michael Poole <md...@tr...> + + * include/numeric.h: Remap oplevel numerics to new range. + + * ircd/s_err.c: Likewise. + +2005-05-03 Michael Poole <md...@tr...> + + * ircd/s_stats.c (stats_access): Update to use new CONF_CLIENT + fields, fixing crash found by nighty. + +2005-05-02 Michael Poole <md...@tr...> + + * include/numeric.h (ERR_UPASS_SAME_APASS): New error message when + trying to set +U pass to the same as the +A pass. + + * ircd/channel.c (mode_parse_upass): Use it. + + * ircd/ircd_auth.c (iauth_exit_client): Only send ExitUser if + there is an active IAuth connection, fixing PR#1193808. + (iauth_dispose_request): Only delete the timer if it is active. + + * ircd/m_invite.c (m_invite): Always forward the invite in the + correct direction, and then skip it as 'one' if announcing. + (ms_invite): Likewise. + + * ircd/numnicks.c (base64toip): Do not interpret AAAAAA as + ::ffff:0.0.0.0; keep it as ::. + + * ircd/s_err.c (replyTable): Add ERR_UPASS_SAME_APASS. + +2005-05-01 Michael Poole <md...@tr...> + + * doc/readme.log: Document IAUTH log target, remove docs for + OLDLOG log target. + + * include/ircd_log.h: Add LS_IAUTH target, remove LS_OLDLOG. + + * ircd/ircd_log.c (logDesc): Likewise. + + * ircd/engine_epoll.c (engine_loop): Handle EPOLLHUP for all + sockets (e.g. when connecting) and do not generate read/write + events in the same pass as error or EOF events. + + * ircd/ircd_auth.c: Convert old sendto and debug messages to use + the LS_IAUTH log target. Consistently use IAUTH_CONNECTED flag + instead of comparing fd to -1. + (iauth_reconnect): If already connected, disconnect and schedule a + reconnect later, since an immediate reconnect can cause assertion + failure in the event engine. Also schedule a reconnect when the + connection attempt fails. + (iauth_read): Reconnect on IO_FAILURE. + (iauth_sock_callback): Disconnect and schedule a reconnect on both + error (after reporting the error) and EOF. + (iauth_start_client): Record the IAuth request in the client. + (iauth_exit_client): Report the client exit. + + * ircd/s_misc.c (exit_one_client): Fix formatting. + +2005-04-30 Michael Poole <md...@tr...> + + * ircd/ircd_auth.c (iauth_connect): Initialize (but do not add) + timer here and set fd to -1. + (iauth_schedule_reconnect): Rewrite to handle previously + initialized timer. + (iauth_reconnect): If server is connected, disconnect first. + Update socket generator fd before calling socket_add(). + (iauth_read): When reading 0 bytes (EOF), reconnect. + +2005-04-27 Michael Poole <md...@tr...> + + * ircd/ircd_parser.y: Report non-existent class names as errors + earlier, and do not fall back to "default" for Client blocks. + +2005-04-25 Reed Loden <re...@re...> + + * ircd/ircd_lexer.l: Add missing header to squash a warning. + +2005-04-25 Michael Poole <md...@tr...> + + * ircd/s_user.c (register_user): Replace call with set_user_mode() + with a direct parsing of user modes. To match this, revert the + initial display of usermode to how it was done before. + +2005-04-24 Michael Poole <md...@tr...> + + * doc/example.conf: Document new autoconnect field of Connect. + + * include/s_conf.h: Add CONF_AUTOCONNECT and field for it. + + * ircd/ircd.c (try_connections): Skip non-autoconnect servers. + + * ircd/ircd_lexer.l: Recognize autoconnect token. + + * ircd/ircd_parser.y: Add autoconnect= option to Connect block. + + * ircd/m_invite.c (m_invite): Avoid sending channel timestamp to + user being invited. + (ms_invite): Likewise. + + * ircd/s_user.c (register_user): Show class name rather than + pointer-as-integer. + +2005-04-24 Michael Poole <md...@tr...> + + * ircd/ircd_parser.y: Rewrite so each error condition gets its own + error message, and so that invalid parameters are printed out. + +2005-04-23 Michael Poole <md...@tr...> + + * ircd/channel.c (apply_ban): Consistently free newban->banstr + when the function fails. + (mode_process_bans): Free banstr for all BAN_DEL bans. + + * ircd/ircd_parser.y: Fix a few memory leaks from previous commit. + +2005-04-23 Michael Poole <md...@tr...> + + * include/patchlevel.h: Bump to being a beta. + + * ircd/ircd_lexer.l (QSTRING): Return a copy of the string so that + parser actions don't have to be immediately after a QSTRING. + + * ircd/ircd_parser.y (FNAME): Remove unused token. + (QSTRING): Adjust for QSTRING being an already-copied version. + +2005-04-23 Michael Poole <md...@tr...> + + * doc/example.conf (UWorld): Illustrate new config extension. + + * ircd/ircd_parser.y (uworldblock): Do the expected thing when + multiple name= entries are present. + +2005-04-22 Michael Poole <md...@tr...> + + * RELEASE.NOTES: Silence exceptions use ~, not -. Oops! + + * doc/example.conf: Fix typo in example Kill block. + + * ircd/channel.c (mode_parse_ban): Use correct test for flag_p. + + * ircd/m_silence.c (apply_silence): Make mask pretty so that later + processing does not convert * to @ (and match no one). + +2005-04-21 Kevin L. Mitchell <kl...@mi...> + + * ircd/m_userip.c (userip_formatter): /userip should *never* + report the user's real IP unless its answering the user + him/herself + + * ircd/m_userhost.c (userhost_formatter): /userhost should *never* + report the user's real host unless its answering the user + him/herself + +2005-04-20 Michael Poole <md...@tr...> + + * ircd/ircd.c (parse_command_line): Update usage text. + + * ircd/numnicks.c (base64toip): Use v4mapped address range instead + of v4compat address range, fixing IPv4-based /who. + +2005-04-19 Michael Poole <md...@tr...> + + * configure.in: When --enable-profile, add -pg to LDFLAGS. + + * configure: Regenerate. + +2005-04-19 Michael Poole <md...@tr...> + + * ircd/match.c (check_if_ipmask): Fix brown-paper-bag typo. + + * ircd/s_conf.c (conf_debug_iline): Look for matching Kill blocks + once a matching Client block is found. + + * ircd/m_whowas.c (m_whowas): Change strcmp() to ircd_strcmp(). + +2005-04-18 Michael Poole <md...@tr...> + + * ircd/match.c (check_if_ipmask): Do not interpret masks that + start with . or / as IP-based host masks. + +2005-04-17 Michael Poole <md...@tr...> + + * ircd/channel.c (mode_process_clients): Only prohibit deops of + users with the same or higher oplevel where apass is set. + Likewise, when opping users, give them MAXOPLEVEL for non-apass + channels. + (joinbuf_join): Give new ops MAXOPLEVEL for non-apass channels. + + * ircd/m_kick.c (m_kick): Only prohibit kicks of users with the + same or higher oplevel where apass is set. + + * ircd/s_user.c (register_user): Fix order of server version vs + various mode strings. + + * tools/linesync/linesync.sh: Add revision id field. + +2005-04-17 Michael Poole <md...@tr...> + + * tools/linesync/linesync.sh: Fix typo comment. Check for + multiple blocks per line in the linesync input. + +2005-04-17 Dan <da...@un...> + + * tools/linesync/linesync.sh: Update to support new syntax and to + avoid rehashing the ircd when the config is the same. + + * tools/linesync/linesync.conf: Update allowed conf items. + +2005-04-16 Michael Poole <md...@tr...> + + * doc/example.conf (Kill): Document newly supported syntax. + + * include/s_conf.h (DenyConf): Split realname mask into its own + field. Remove the unused DENY_FLAGS_{IP,REALNAME}. + + * ircd/ircd_parser.y (Kill): Only require one of usermask, + hostmask, realmask to be set for a valid block. + (killitem): Add new production killusername. + + * ircd/s_conf.c (conf_erase_deny_list): Free realmask field. + (find_kill): Rearrange slightly to clarify control flow. + + * ircd/s_err.c (RPL_STATSKLINE): Stick usermask before hostmask, + so the old usermask field can be adopted for realname mask. Add + double quotes around the realmask field. + + * ircd/s_stats.c (report_deny_list): Do so. + (stats_klines): Likewise. + +2005-04-17 Perry Lorier <is...@un...> + + * tools/convert-conf.py: Fix lots of conversion problems with + oper privielges (now they are converted), + features (deprecated features commented out, most converted to + priviliges), + realname klines (also add host= lines) + quarintines (generate blocks for them), + connect blocks (don't generate empty port config lines) + etc... + +2005-04-16 Michael Poole <md...@tr...> + + * ircd/gline.c (do_gline): Fix typo when activating IP-based + G-lines. + +2005-04-16 Michael Poole <md...@tr...> + + * ircd/class.c (free_class): Free default_umode field. + + * ircd/ircd_parser.y (classblock): Free default_umode field before + overwriting it. + + * ircd/s_conf.c (free_conf): Free username, origin_name, hub_limit + fields. + (find_kill): Realname Kill blocks no longer have $R at the start, + so do not skip over the first two characters of the mask. + +2005-04-15 Michael Poole <md...@tr...> + + * doc/example.conf (Operator): Properly qualify plaintext password. + (Quarantine): Document (new) syntax. + + * ircd/ircd.c: Add <sys/time.h> to make <sys/resource.h> compile + correctly on BSDs. + + * ircd/ircd_parser.y (qconf): Remove global variable. + (killuhost): Null terminate username when present. + (quarantineblock): Replace with a syntax that works. + + * ircd/s_stats.c: #include <querycmds.h> for UserStats. + (stats_server_verbose): Reinstate check for UserStats. + +2005-04-09 Kevin L. Mitchell <kl...@mi...> + + * ircd/ircd.c: conditionally include sys/resource.h; otherwise, + RLIMIT_CORE will not be defined and so set_core_limit() will never + be defined, much less run. + + * configure.in: add sys/resource.h to the list of headers to + search for + + * configure: regenerate configure + + * config.h.in: rerun autoheader to add HAVE_SYS_RESOURCE_H to + config.h.in + +2005-04-08 Michael Poole <md...@tr...> + + * include/s_conf.h (conf_debug_iline): Declare new function. + + * ircd/ircd.c (dbg_client): New file-scoped variable. + (parse_command_line): Set it from the new -c option. + (main): If dbg_client is set during chkconf, use it. + + * ircd/ircd_string.c (ircd_aton): Generate IPv4-mapped addresses, + not IPv4-compatible addresses, to match ipmask_parse(). + + * ircd/m_whowas.c (m_whowas): Split display of real host to a + separate line, in hopes of not confusing opers in the future. + + * ircd/s_conf.c (conf_debug_iline): Implement new function. + +2005-04-06 Michael Poole <md...@tr...> + + * ircd/m_burst.c (ms_burst): Clear channel manager bit when wiping + out locally opped and voiced channel members. + +2005-04-06 Michael Poole <md...@tr...> + + * include/numeric.h (RPL_APASSWARN): Replace with three distinct + values. + (ERR_NOMANAGER_LONG): Assign new numeric. + (ERR_NOMANAGER_SHORT): Assign new numeric. + + * ircd/channel.c (parse_mode_upass): Adapt to new formats for + ERR_NOTMANAGER separation. + (parse_mode_apass): Likewise. Also adapt to RPL_APASSWARN split. + + * ircd/s_err.c (RPL_APASSWARN): Replace with three message + strings, to avoid embedding long message strings in the logic + implementation. + (ERR_NOTMANAGER): Likewise (but not the same strings). + +2005-04-06 Michael Poole <md...@tr...> + + * ircd/ircd_parser.y (clientblock): Use the password field. + + * ircd/s_user.c (register_user): Allow aconf->password to be a + single digit, since per-IP limit is now in a separate field. + +2005-04-06 Michael Poole <md...@tr...> + + * acinclude.m4 (unet_PIPE_CFLAGS): Remove; -pipe is obsolete in + current gcc releases and is slower than files for previous + releases on most OSes. + + * configure.in (AC_PREREQ): Bump to 2.59 because of AS_HELP_STRING. + (unet_PIPE_CFLAGS): Remove use of macro. + + * aclocal.m4: Regenerate. + + * configure: Likewise. + +2005-04-04 Michael Poole <md...@tr...> + + * configure.in: For developers' ease, allow passing an option to + configure to persistently set optimization CFLAGS. + + * configure: Regenerate. + +2005-04-04 Michael Poole <md...@tr...> + + * doc/example.conf (Jupe): Make the default Jupe block follow + CFV-0255. (Thanks to FrankP for pointing me at this and to DinTn + for getting me a copy of the CFV.) + +2005-04-04 Michael Poole <md...@tr...> + + * include/capab.h (CAPFL_STICKY): Define. + (CAPLIST): Remove the entries used for testing. + + * include/client.h (Connection): Clarify comment about the + distinction between con_capab and con_active. + + * ircd/m_cap.c: Add doxygen comments and replace the long + discussion of m_handler functions with an xref to it. + (send_caplist): Add new parameters and change the terminal vs + non-terminal line distinction to make compliant with current draft + specification. + (cap_empty): Rename to cap_ls(). + (cap_req): Track modified capabilities bitwise, so that the + responding ACK contains all the appropriate flags. + (cap_ack): Add comment explaining why there is no response. + (cap_clear): Build and send a list of cleared capabilities, as + required by the current draft. + (cap_list): Send capability list using LIST subcommand. + (cmdlist): Add handler for LS subcommand. Remove entries for the + empty and LSL subcommands, which are no longer allowed. + (m_cap): Require at least one argument from user. + +2005-04-01 Michael Poole <md...@tr...> + + * include/s_conf.h (SMAP_FAST): Define. + (s_map): Add 'flags' field. + + * ircd/ircd_lexer.l: Recognize 'FAST' token. + + * ircd/ircd_parser.y (FAST): New token. + (pseudoitem): Add pseudoflags alternative. + (pseudoflags): New production, recognizing FAST token. + + * ircd/parse.c (register_mapping): Set MFLG_SLOW conditionally. + Remove outdated comment. + +2005-04-01 Michael Poole <md...@tr...> + + * include/handlers.h (ms_privs): Declare. + + * include/msg.h (TOK_PRIVS): Assign token. + (CMD_PRIVS): Define. + + * ircd/m_privs.c: Add doxygen comments and replace the long + discussion of m_handler functions with an xref to it. + (mo_privs): Forward requests for non-local users + to their own server. + (ms_privs): Implement. + + * ircd/parse.c (PRIVS): Dispatch to ms_privs when a server sends + the message. + +2005-03-30 Michael Poole <md...@tr...> + + * include/client.h (struct Client): Explain where cli_username + comes from. + + * include/struct.h (struct User): Explain where this username + comes from, too + + * ircd/ircd_res.c (timeout_resolver): Update parameter name in + Doxygen comment, too. + + * ircd/s_misc.c (get_client_name): Reorganize to have less + indentation and behave like 2.10.11 when client is not idented. + +2005-03-29 Michael Poole <md...@tr...> + + * doc/example.conf: Remove no-longer-used HIS_STATS_h. + + * doc/readme.features: Likewise. + + * include/ircd_features.h: Likewise. + + * ircd/ircd_features.c: Likewise. + +2005-03-20 Reed Loden <re...@re...> + + * include/ircd_features.h: Alphabetize HIS_STATS_? features. + + * ircd/ircd_features.c: Likewise. + +2005-03-29 Michael Poole <md...@tr...> + (The previously unapplied part of another patch (by Carlo Wood?).) + + * ircd/m_part.c (ms_part): Remove a check that should already be + done by the user's own server. + +2005-03-29 Michael Poole <md...@tr...> + + * doc/example.conf: Add HIS_STATS_J entry. + + * doc/readme.features: Likewise. + +2005-03-25 Reed Loden <re...@re...> + + * include/hash.h: Add needed prototypes for new + stats_nickjupes() function. + + * include/ircd_features.h: Add FEAT_HIS_STATS_J. + + * include/numeric.h: Add RPL_STATSJLINE (222) for new nick + jupes stats. Correct a typo in a comment. + + * ircd/hash.c: Add stats_nickjupes() function to report all + nick jupes to an oper. Because of the nature of hash tables, + there is no way to sort this list so the results look weird. + + * ircd/ircd_features.c: Add FEAT_HIS_STATS_J (default: TRUE). + + * ircd/s_err.c: Add RPL_STATSJLINE (222) for new nick jupes + stats. + + * ircd/s_stats.c: Add RPL_STATSJLINE (222) for new nick jupes + stats. Make 'j' case sensitive. Modify the comment for stats + uworld. + +2005-03-27 Michael Poole <md...@tr...> + + * ircd/m_burst.c (ms_burst): Do not send numeric oplevels in a -A + channel when forwarding a channel burst line. + +2005-03-25 Michael Poole <md...@tr...> + + * ircd/m_server.c (set_server_flags): New function. Unlike the + old code, this recognizes the IPv6 flag. (Spotted by Reed.) + (mr_server): Use the new function. + (ms_server): Likewise. Also don't show "Net junction:" message if + any closer server is still bursting (also spotted by Reed). + Finally, forward the +6 flag to other servers. + + * ircd/s_serv.c (server_estab): Forward the +6 flag here, too. + + * ircd/s_bsd.c (client_sock_callback): Re-set cli_error() after it + may be cleared by completed_connection(). + +2005-03-23 Michael Poole <md...@tr...> + + * ircd/m_burst.c (ms_burst): Remove limit and keys when a channel + is wiped out during burst. + +2005-03-22 Michael Poole <md...@tr...> + + * ircd/ircd_res.c (check_resolver_timeout): I give up. Use the + kludgy earlier version of the timeout fix. + +2005-03-22 Michael Poole <md...@tr...> + + * ircd/channel.c (send_channel_modes): Fix test for when to send + membership mode suffix, to avoid sending it more than once. + +2005-03-22 Michael Poole <md...@tr...> + (Many thanks to nex and Reed for helping hunt this down and + doing the testing of various patches.) + + * ircd/ircd_events.c (timer_chg): Properly change a timer that is + in the middle of executing its expiration event. + + * ircd/ircd_res.c (check_resolver_timeout): Simplify the test for + whether to use timer_chg() or timer_add(). + On second thought, use timer_add() unconditionally; the server + connection loop does. + (timeout_resolver): Do not try to re-schedule the DNS timeout + unless it is the expiration event. + (do_query_number): Properly initialize request->state. + (res_readreply): Mention the response code that was bad. + +2005-03-22 Michael Poole <md...@tr...> + + * ircd/engine_kqueue.c (engine_delete): The kernel removes + close()'d FDs from the activity list, so don't try to remove the + FD here (the caller may have already close()'d it). + +2005-03-20 Michael Poole <md...@tr...> + + * ircd/IPcheck.c: Fix typos in comments and strings to reduce + future slumming for credit. + + * ircd/channel.c, ircd/crule.c, ircd/engine_epoll.c: Likewise. + * ircd/fileio.c, ircd/hash.c, ircd/ircd.c: Likewise. + * ircd/ircd_auth.c, ircd/ircd_crypt.c: Likewise. + * ircd/ircd_crypt_native.c, ircd/ircd_crypt_smd5.c: Likewise. + * ircd/ircd_features.c, ircd/ircd_log.c: Likewise. + * ircd/ircd_parser.y, ircd/ircd_res.c: Likewise. + * ircd/ircd_reslib.c, ircd/ircd_string.c, ircd/list.c: Likewise. + * ircd/m_burst.c, ircd/m_clearmode.c, ircd/m_destruct.c: Likewise. + * ircd/m_invite.c, ircd/m_ison.c, ircd/m_kill.c: Likewise. + * ircd/m_server.c, ircd/m_squit.c, ircd/m_topic.c: Likewise. + * ircd/m_who.c, ircd/m_whois.c, ircd/m_whowas.c: Likewise. + * ircd/match.c, ircd/msgq.c, ircd/numnicks.c: Likewise. + * ircd/os_generic.c, ircd/parse.c, ircd/s_auth.c: Likewise. + * ircd/s_bsd.c, ircd/s_conf.c, ircd/s_debug.c: Likewise. + * ircd/s_misc.c, ircd/s_numeric.c, ircd/s_serv.c: Likewise. + * ircd/s_stats.c, ircd/s_user.c, ircd/table_gen.c: Likewise. + * ircd/umkpasswd.c, ircd/uping.c, ircd/whowas.c: Likewise. + + * ircd/test/test_stub.c: Make exit_client() argument list + consistent with that in s_misc.c so doxygen is not confused. + +2005-03-20 Michael Poole <md...@tr...> + (Thanks to Reed Loden for pointing these out.) + + * ircd/channel.c: Fix typos in comments. + + * ircd/m_create.c: Likewise. + + * ircd/m_list.c: Likewise. + + * ircd/m_names.c: Likewise. + + * ircd/numnicks.c: Likewise. + + * ircd/s_bsd.c: Likewise. + +2005-03-20 Michael Poole <md...@tr...> + (Thanks to Reed Loden for pointing these out.) + + * doc/Configure.help: Remove outdated file. + + * doc/exaconf.2: Likewise. + + * doc/snomask.html: Add missing <tr>, SNO_AUTO, SNO_DEBUG, and + update SNO_OPERDEFAULT list. + + * tools/mkpasswd.c: Remove outdated file (use ircd/umkpasswd + instead). + + * tools/Makefile.crypt: Remove outdated file. + + * tools/mkpasswd.c: Likewise. + + * tools/transition: Likewise. + +2005-03-19 Michael Poole <md...@tr...> + + * ircd/channel.c (sub1_from_channel): Check apass rather than mode + to determine whether an apass is set (MODE_KEY/APASS/UPASS are not + set in mode.mode). + (send_channel_modes): Use the same change when determining how to + send oplevels for channels. + +2005-03-19 Michael Poole <md...@tr...> + + * include/IPcheck.h (IPcheck_connect_fail): Take a Client + parameter instead of irc_in_addr. + + * ircd/IPcheck.c (IPcheck_connect_fail): Likewise. Assert that + the client has been IP-checked. + (IPcheck_remote_connect): Assert that the client has not yet been + charged for connecting. + (IPcheck_connect_succeeded): Assert that the client has been + charged for connecting. + (IPcheck_disconnect): Likewise. + + * ircd/m_nick.c (m_nick): Pass rejected client to + IPcheck_connect_fail() when somebody takes the nick first. + (ms_nick): Likewise. + + * ircd/s_serv.c (server_estab): Pass new server to + IPcheck_connect_fail(). + + * ircd/s_user.c (register_user): When rejecting a user, pass + the struct Client to IPcheck_connect_fail(). + +2005-03-19 Michael Poole <md...@tr...> + + * doc/example.conf (Connect): Remove a buggy comment about leaf + directives; refer the reader to the Connect block instead. + + * tools/convert-conf.py: Set "leaf;" rather than "leaf = yes;" + +2005-03-19 Michael Poole <md...@tr...> + + * doc/example.conf (Operator): Correct the comment explaining + hashed passwords. + + * ircd/m_oper.c (oper_password_match): Check correct variable to + determine whether the hashed password matched. + 2005-03-08 Michael Poole <md...@tr...> * ircd/match.c (ipmask_parse): Explicitly zero-initialize the mask ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2005-10-13 10:02:18
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-10-13 10:02:08 UTC Modified files: TODO.es Log message: actualizacion todo ---------------------- diff included ---------------------- Index: ircd-ircdev/TODO.es diff -u ircd-ircdev/TODO.es:1.29 ircd-ircdev/TODO.es:1.30 --- ircd-ircdev/TODO.es:1.29 Thu Sep 1 04:33:58 2005 +++ ircd-ircdev/TODO.es Thu Oct 13 03:01:58 2005 @@ -1,10 +1,14 @@ # # TODO para ircd-ircdev # -# $Id: TODO.es,v 1.29 2005/09/01 11:33:58 zolty Exp $ +# $Id: TODO.es,v 1.30 2005/10/13 10:01:58 zolty Exp $ # # Insertar las nuevas entradas al principio de la lista TODO. # +URGENTISIMO + - Pasar el codigo de alpha a BETA. Hay que revisar codigo por .c por +.c. Esto es debido a que la base del ircd ya se utiliza en producción. + URGENTE -------------------------------------------------------------------------------------- ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2005-10-17 14:02:50
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-10-17 14:02:42 UTC Modified files: ChangeLog ChangeLog.es doc/ircd.sample-en.conf doc/ircd.sample-es.conf include/channel.h include/ircd_string.h include/match.h include/patchlevel.h ircd/Makefile.in ircd/channel.c ircd/ddb_db_native.c ircd/gline.c ircd/ircd.c ircd/ircd_string.c ircd/m_burst.c ircd/m_invite.c ircd/m_join.c ircd/m_mode.c ircd/m_names.c ircd/m_opmode.c ircd/m_ping.c ircd/match.c ircd/s_conf.c ircd/test/ircd_in_addr_t.c Added files: ircd/convert-conf.c Log message: Author: zoltan <zo...@ir...> Log message: 2005-10-17 Toni García <zo...@ir...> 1.0.alpha44 * Sincronización Undernet ---------------------- diff included ---------------------- Index: ircd-ircdev/ChangeLog diff -u ircd-ircdev/ChangeLog:1.45 ircd-ircdev/ChangeLog:1.46 --- ircd-ircdev/ChangeLog:1.45 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/ChangeLog Mon Oct 17 07:02:32 2005 @@ -1,10 +1,13 @@ # # ChangeLog for ircd-ircdev # -# $Id: ChangeLog,v 1.45 2005/09/01 11:25:42 zolty Exp $ +# $Id: ChangeLog,v 1.46 2005/10/17 14:02:32 zolty Exp $ # # Insert new changes at beginning of the change list. # +2005-10-17 Toni García <zo...@ir...> 1.0.alpha44 + * Undernet synchronization + 2005-09-01 Toni García <zo...@ir...> 1.0.alpha43 * Undernet synchronization Index: ircd-ircdev/ChangeLog.es diff -u ircd-ircdev/ChangeLog.es:1.45 ircd-ircdev/ChangeLog.es:1.46 --- ircd-ircdev/ChangeLog.es:1.45 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/ChangeLog.es Mon Oct 17 07:02:32 2005 @@ -1,10 +1,13 @@ # # Log de Cambios para ircd-ircdev # -# $Id: ChangeLog.es,v 1.45 2005/09/01 11:25:42 zolty Exp $ +# $Id: ChangeLog.es,v 1.46 2005/10/17 14:02:32 zolty Exp $ # # Insertar los nuevos cambios al principio de esta lista de cambios. # +2005-10-17 Toni García <zo...@ir...> 1.0.alpha44 + * Sincronización Undernet + 2005-09-01 Toni García <zo...@ir...> 1.0.alpha43 * Sincronización Undernet Index: ircd-ircdev/doc/ircd.sample-en.conf diff -u ircd-ircdev/doc/ircd.sample-en.conf:1.22 ircd-ircdev/doc/ircd.sample-en.conf:1.23 --- ircd-ircdev/doc/ircd.sample-en.conf:1.22 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/doc/ircd.sample-en.conf Mon Oct 17 07:02:32 2005 @@ -800,7 +800,7 @@ # "GLINEMAXUSERCOUNT" = "20"; # "SOCKSENDBUF" = "61440"; # "SOCKRECVBUF" = "61440"; -# "IPCHECK_CLONE_LIMIT = 24"; +# "IPCHECK_CLONE_LIMIT = "24"; # "IPCHECK_CLONE_PERIOD = "40"; # "IPCHECK_CLONE_DELAY = "600"; # "MPATH" = "ircd.motd"; @@ -859,7 +859,7 @@ # "HIS_BANWHO" = "TRUE"; # "HIS_KILLWHO" = "TRUE"; # "HIS_REWRITE" = "TRUE"; -# "HIS_REMOTE" = 1; +# "HIS_REMOTE" = "1"; # "HIS_NETSPLIT" = TRUE"; # "HIS_SERVERNAME" = "*.irc-dev.net"; # "HIS_SERVERINFO" = "IRC-Dev.Net, Desarrollo de IRC / IRC Development"; Index: ircd-ircdev/doc/ircd.sample-es.conf diff -u ircd-ircdev/doc/ircd.sample-es.conf:1.17 ircd-ircdev/doc/ircd.sample-es.conf:1.18 --- ircd-ircdev/doc/ircd.sample-es.conf:1.17 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/doc/ircd.sample-es.conf Mon Oct 17 07:02:32 2005 @@ -838,7 +838,7 @@ # "GLINEMAXUSERCOUNT" = "20"; # "SOCKSENDBUF" = "61440"; # "SOCKRECVBUF" = "61440"; -# "IPCHECK_CLONE_LIMIT = 24"; +# "IPCHECK_CLONE_LIMIT = "24"; # "IPCHECK_CLONE_PERIOD = "40"; # "IPCHECK_CLONE_DELAY = "600"; # "MPATH" = "ircd.motd"; @@ -897,7 +897,7 @@ # "HIS_BANWHO" = "TRUE"; # "HIS_KILLWHO" = "TRUE"; # "HIS_REWRITE" = "TRUE"; -# "HIS_REMOTE" = 1; +# "HIS_REMOTE" = "1"; # "HIS_NETSPLIT" = TRUE"; # "HIS_SERVERNAME" = "*.irc-dev.net"; # "HIS_SERVERINFO" = "IRC-Dev.Net, Desarrollo de IRC / IRC Development"; Index: ircd-ircdev/include/channel.h diff -u ircd-ircdev/include/channel.h:1.13 ircd-ircdev/include/channel.h:1.14 --- ircd-ircdev/include/channel.h:1.13 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/include/channel.h Mon Oct 17 07:02:32 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Channel management and maintenance. - * @version $Id: channel.h,v 1.13 2005/09/01 11:25:42 zolty Exp $ + * @version $Id: channel.h,v 1.14 2005/10/17 14:02:32 zolty Exp $ */ #ifndef INCLUDED_channel_h #define INCLUDED_channel_h @@ -213,10 +213,6 @@ */ #define MAGIC_REMOTE_JOIN_TS 1270080000 -/** - * used in can_join to determine if an oper forced a join on a channel - */ -#define MAGIC_OPER_OVERRIDE 1000 extern const char* const PartFmt1; @@ -430,7 +426,6 @@ /* * Proto types */ -extern void clean_channelname(char* name); extern void channel_modes(struct Client *cptr, char *mbuf, char *pbuf, int buflen, struct Channel *chptr, struct Membership *member); @@ -445,7 +440,6 @@ const struct Client* cptr); extern int sub1_from_channel(struct Channel* chptr); extern int destruct_channel(struct Channel* chptr); -extern int can_join(struct Client *sptr, struct Channel *chptr, char *key); extern void add_user_to_channel(struct Channel* chptr, struct Client* who, unsigned int flags, int oplevel); extern void make_zombie(struct Membership* member, struct Client* who, Index: ircd-ircdev/include/ircd_string.h diff -u ircd-ircdev/include/ircd_string.h:1.6 ircd-ircdev/include/ircd_string.h:1.7 --- ircd-ircdev/include/ircd_string.h:1.6 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/include/ircd_string.h Mon Oct 17 07:02:32 2005 @@ -21,7 +21,7 @@ */ /** @file ircd_string.h * @brief Public declarations and APIs for string operations. - * @version $Id: ircd_string.h,v 1.6 2005/06/22 07:54:29 zolty Exp $ + * @version $Id: ircd_string.h,v 1.7 2005/10/17 14:02:32 zolty Exp $ */ #ifndef INCLUDED_ircd_string_h #define INCLUDED_ircd_string_h @@ -51,7 +51,8 @@ char** vector, int size); extern const char* ircd_ntoa(const struct irc_in_addr* addr); extern const char* ircd_ntoa_r(char* buf, const struct irc_in_addr* addr); -extern int ircd_aton(struct irc_in_addr *addr, const char *str); +#define ircd_aton(ADDR, STR) ipmask_parse((STR), (ADDR), NULL) +extern int ipmask_parse(const char *in, struct irc_in_addr *mask, unsigned char *bits_ptr); extern char* host_from_uh(char* buf, const char* userhost, size_t len); extern char* ircd_strtok(char** save, char* str, char* fs); Index: ircd-ircdev/include/match.h diff -u ircd-ircdev/include/match.h:1.4 ircd-ircdev/include/match.h:1.5 --- ircd-ircdev/include/match.h:1.4 Mon Jan 10 04:22:00 2005 +++ ircd-ircdev/include/match.h Mon Oct 17 07:02:32 2005 @@ -21,7 +21,7 @@ */ /** @file match.h * @brief Interface for matching strings to IRC masks. - * @version $Id: match.h,v 1.4 2005/01/10 12:22:00 zolty Exp $ + * @version $Id: match.h,v 1.5 2005/10/17 14:02:32 zolty Exp $ */ #ifndef INCLUDED_match_h #define INCLUDED_match_h @@ -51,8 +51,6 @@ extern int matchdecomp(char *mask, const char *cmask); extern int mmexec(const char *wcm, int wminlen, const char *rcm, int rminlen); -extern int check_if_ipmask(const char *mask); -extern int ipmask_parse(const char *in, struct irc_in_addr *mask, unsigned char *bits_ptr); extern int ipmask_check(const struct irc_in_addr *addr, const struct irc_in_addr *mask, unsigned char bits); #endif /* INCLUDED_match_h */ Index: ircd-ircdev/include/patchlevel.h diff -u ircd-ircdev/include/patchlevel.h:1.44 ircd-ircdev/include/patchlevel.h:1.45 --- ircd-ircdev/include/patchlevel.h:1.44 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/include/patchlevel.h Mon Oct 17 07:02:32 2005 @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: patchlevel.h,v 1.44 2005/09/01 11:25:42 zolty Exp $ + * $Id: patchlevel.h,v 1.45 2005/10/17 14:02:32 zolty Exp $ * */ -#define PATCHLEVEL ".alpha43" +#define PATCHLEVEL ".alpha44" #define RELEASE "1.0" Index: ircd-ircdev/ircd/Makefile.in diff -u ircd-ircdev/ircd/Makefile.in:1.27 ircd-ircdev/ircd/Makefile.in:1.28 --- ircd-ircdev/ircd/Makefile.in:1.27 Wed May 25 09:56:23 2005 +++ ircd-ircdev/ircd/Makefile.in Mon Oct 17 07:02:32 2005 @@ -18,7 +18,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA -# $Id: Makefile.in,v 1.27 2005/05/25 16:56:23 zolty Exp $ +# $Id: Makefile.in,v 1.28 2005/10/17 14:02:32 zolty Exp $ #### Start of system configuration section. #### @@ -69,6 +69,9 @@ PURIFY = RINGLOG_O = +CONVERT_CONF_SRC = \ + convert-conf.c + ENGINE_SRC = \ engine_devpoll.c \ engine_epoll.c \ @@ -261,6 +264,8 @@ UMKPASSWD_OBJS = ${UMKPASSWD_SRC:%.c=%.o} +CONVERT_CONF_OBJS = ${CONVERT_CONF_SRC:%.c=%.o} + DEP_SRC = ${IRCD_SRC} ${UNDERNET_SRC} ${DDB_SRC} ${SERVICES_SRC} ${ENGINE_SRC} ${CRYPTO_SRC} all: @@ -271,13 +276,16 @@ .c.o: ${CC} ${CFLAGS} ${CPPFLAGS} -c $< -o $@ -build: ircd +build: ircd convert-conf ircd: ${OBJS} ../include/patchlevel.h version.o ${PURIFY} ${CC} ${OBJS} version.o ${RINGLOG_O} ${LDFLAGS} ${LIBS} \ -o ircd ${CHMOD} ${IRCDMODE} ircd +convert-conf: ${CONVERT_CONF_OBJS} + ${PURIFY} ${CC} ${CONVERT_CONF_OBJS} ${LDFLAGS} -o convert-conf + # # Make sure the anti hack checksums get included when things change # bleah @@ -356,7 +364,7 @@ @echo "Please remove the contents of ${DPATH} manually" clean: - ${RM} -f *.o *.bak ircd version.c umkpasswd ircd_osdep.c chattr.tab.c table_gen y.tab.* lex.yy.* + ${RM} -f *.o *.bak ircd version.c umkpasswd convert-conf chattr.tab.c table_gen y.tab.* lex.yy.* distclean: clean ${RM} -f Makefile stamp-m Index: ircd-ircdev/ircd/channel.c diff -u ircd-ircdev/ircd/channel.c:1.25 ircd-ircdev/ircd/channel.c:1.26 --- ircd-ircdev/ircd/channel.c:1.25 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/ircd/channel.c Mon Oct 17 07:02:32 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Channel management and maintanance - * @version $Id: channel.c,v 1.25 2005/09/01 11:25:42 zolty Exp $ + * @version $Id: channel.c,v 1.26 2005/10/17 14:02:32 zolty Exp $ */ #include "config.h" @@ -368,12 +368,15 @@ #if defined(UNDERNET) char tmphost[HOSTLEN + 1]; #endif + char iphost[SOCKIPLEN + 1]; + char *hostmask; char *sr; struct Ban *found; /* Build nick!user and alternate host names. */ ircd_snprintf(0, nu, sizeof(nu), "%s!%s", cli_name(cptr), cli_user(cptr)->username); + ircd_ntoa_r(iphost, &cli_ip(cptr)); #if defined(UNDERNET) if (!IsAccount(cptr)) @@ -403,11 +406,13 @@ if (res) continue; /* Compare host portion of ban. */ + hostmask = banlist->banstr + banlist->nu_len + 1; if (!((banlist->flags & BAN_IPMASK) && ipmask_check(&cli_ip(cptr), &banlist->address, banlist->addrbits)) - && match(banlist->banstr + banlist->nu_len + 1, cli_user(cptr)->host) - && !(sr && match(banlist->banstr + banlist->nu_len + 1, sr) == 0)) + && match(hostmask, cli_user(cptr)->host) + && !(sr && match(hostmask, sr))) continue; + /* If an exception matches, no ban can match. */ if (banlist->flags & BAN_EXCEPTION) return NULL; @@ -1320,106 +1325,6 @@ send_reply(cptr, RPL_ENDOFBANLIST, chptr->chname); } -/** Check a key against a keyring. - * We are now treating the key part of /join channellist key as a key - * ring; that is, we try one key against the actual channel key, and if that - * doesn't work, we try the next one, and so on. -Kev -Texaco - * Returns: 0 on match, 1 otherwise - * This version contributed by SeKs \<in...@in...\> - * - * @param key Key to check - * @param keyring Comma separated list of keys - * - * @returns True if the key was found and matches, false otherwise. - */ -static int compall(char *key, char *keyring) -{ - char *p1; - -top: - p1 = key; /* point to the key... */ - while (*p1 && *p1 == *keyring) - { /* step through the key and ring until they - don't match... */ - p1++; - keyring++; - } - - if (!*p1 && (!*keyring || *keyring == ',')) - /* ok, if we're at the end of the and also at the end of one of the keys - in the keyring, we have a match */ - return 0; - - if (!*keyring) /* if we're at the end of the key ring, there - weren't any matches, so we return 1 */ - return 1; - - /* Not at the end of the key ring, so step - through to the next key in the ring: */ - while (*keyring && *(keyring++) != ','); - - goto top; /* and check it against the key */ -} - -/** Returns if a user can join a channel with a specific key. - * - * @param sptr The client trying to join - * @param chptr The channel to join - * @param key The key to use - * - * @returns any error that occurred bitwised OR'd with MAGIC_OPER_OVERRIDE - * if the oper used the magic key, 0 if no error occured. - */ -int can_join(struct Client *sptr, struct Channel *chptr, char *key) -{ - int overrideJoin = 0; - - /* - * Now a banned user CAN join if invited -- Nemesi - * Now a user CAN escape channel limit if invited -- bfriendly - * Now a user CAN escape anything if invited -- Isomer - */ - - if (IsInvited(sptr, chptr)) - return 0; - - /* An oper can force a join on a local channel using "OVERRIDE" as the key. - 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",chptr->mode.key) != 0 && - compall("OVERRIDE",key) == 0) - overrideJoin = MAGIC_OPER_OVERRIDE; - - if (chptr->mode.mode & MODE_INVITEONLY) - return overrideJoin + ERR_INVITEONLYCHAN; - - if (chptr->mode.limit && chptr->users >= chptr->mode.limit) - return overrideJoin + ERR_CHANNELISFULL; - - if ((chptr->mode.mode & MODE_REGONLY) && -#if defined(UNDERNET) - !IsAccount(sptr)) -#elif defined(DDB) || defined(SERVICES) - !IsNickRegistered(sptr)) -#endif - return overrideJoin + ERR_NEEDREGGEDNICK; - - if (find_ban(sptr, chptr->banlist)) - return overrideJoin + ERR_BANNEDFROMCHAN; - - /* - * now using compall (above) to test against a whole key ring -Kev - */ - if (*chptr->mode.key && (EmptyString(key) || compall(chptr->mode.key, key))) - return overrideJoin + ERR_BADCHANNELKEY; - - if (overrideJoin) - return ERR_DONTCHEAT; - - return 0; -} - /** Remove bells and commas from channel name * * @param cn Channel name to clean, modified in place. @@ -3639,9 +3544,7 @@ assert(0 != jbuf); if (!chan) { - if (jbuf->jb_type == JOINBUF_TYPE_JOIN) - sendcmdto_serv_butone(jbuf->jb_source, CMD_JOIN, jbuf->jb_connect, "0"); - + sendcmdto_serv_butone(jbuf->jb_source, CMD_JOIN, jbuf->jb_connect, "0"); return; } Index: ircd-ircdev/ircd/convert-conf.c diff -u /dev/null ircd-ircdev/ircd/convert-conf.c:1.1 --- /dev/null Mon Oct 17 07:02:43 2005 +++ ircd-ircdev/ircd/convert-conf.c Mon Oct 17 07:02:32 2005 @@ -0,0 +1,650 @@ +/* + * IRC-Dev IRCD - An advanced and innovative IRC Daemon, ircd/convert-conf.c + * + * Copyright (C) 2002-2005 IRC-Dev Development Team <de...@ir...> + * Copyright (C) 2005 Michael Poole + * + * 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: convert-conf.c,v 1.1 2005/10/17 14:02:32 zolty Exp $ + * convert-conf.c - Convert ircu2.10.11 ircd.conf to ircu2.10.12 format. + * + */ + +#include <ctype.h> /* tolower(), toupper(), isdigit() */ +#include <stdio.h> /* *printf(), fgets() */ +#include <stdlib.h> /* free(), strtol() */ +#include <string.h> /* strlen(), memcpy(), strchr(), strspn() */ + +#define MAX_FIELDS 5 + +const char *admin_names[] = { "location", "contact", "contact", 0 }, + *connect_names[] = { "host", "password", "name", "#port", "class", 0 }, + *crule_names[] = { "server", "", "rule", 0 }, + *general_names[] = { "name", "vhost", "description", "", "#numeric", 0 }, + *motd_names[] = { "host", "file", 0 }, + *class_names[] = { "name", "#pingfreq", "#connectfreq", "#maxlinks", "#sendq", 0 }, + *removed_features[] = { "VIRTUAL_HOST", "OPERS_SEE_IN_SECRET_CHANNELS", "LOCOP_SEE_IN_SECRET_CHANNELS", 0 }; +char orig_line[512], line[512], dbuf[512]; +char *fields[MAX_FIELDS + 1]; +unsigned int nfields; +unsigned int lineno; + +/*** GENERIC SUPPORT CODE ***/ + +static int split_line(char *input, char **output) +{ + size_t quoted = 0, jj; + char *dest = dbuf, ch; + + nfields = 1; + output[0] = dest; + while (*input != '\0' && *input != '#') switch (ch = *input++) { + case ':': + if (quoted) + *dest++ = ch; + else { + *dest++ = '\0'; + if (nfields >= MAX_FIELDS) + return nfields; + output[nfields++] = dest; + } + break; + case '\\': + switch (ch = *input++) { + case 'b': *dest++ = '\b'; break; + case 'f': *dest++ = '\f'; break; + case 'n': *dest++ = '\n'; break; + case 'r': *dest++ = '\r'; break; + case 't': *dest++ = '\t'; break; + case 'v': *dest++ = '\v'; break; + default: *dest++ = ch; break; + } + break; + case '"': quoted = !quoted; break; + default: *dest++ = ch; break; + } + + *dest = '\0'; + for (jj = nfields; jj < MAX_FIELDS; ++jj) + output[jj] = dest; + return nfields; +} + +static void simple_line(const char *block, const char **names, const char *extra) +{ + size_t ii; + + /* Print the current line and start the new block. */ + fprintf(stdout, "# %s\n%s {\n", orig_line, block); + + /* Iterate over fields in input line, formatting each. */ + for (ii = 0; ii < nfields && names[ii]; ++ii) { + if (!fields[ii][0] || !names[ii][0]) + continue; + else if (names[ii][0] == '#') + fprintf(stdout, "\t%s = %s;\n", names[ii] + 1, fields[ii]); + else + fprintf(stdout, "\t%s = \"%s\";\n", names[ii], fields[ii]); + } + + /* Close the new block (including any fixed-form text). */ + if (extra) + fprintf(stdout, "\t%s\n", extra); + fputs("};\n", stdout); +} + +#define dupstring(TARGET, SOURCE) do { free(TARGET); if (SOURCE) { size_t len = strlen(SOURCE); (TARGET) = malloc(len+1); memcpy((TARGET), (SOURCE), len); } else (TARGET) = 0; } while(0) + +/*** MANAGING LISTS OF STRINGS ***/ + +struct string_list { + struct string_list *next; + char *origin; + char *extra; + char value[1]; +}; + +static struct string_list *string_get(struct string_list **list, const char *value) +{ + struct string_list *curr; + size_t len = strlen(value), ii; + + while ((curr = *list)) { + for (ii = 0; tolower(curr->value[ii]) == tolower(value[ii]) && ii < len; ++ii) ; + if (curr->value[ii] == '\0' && value[ii] == '\0') + return curr; + list = &curr->next; + } + + *list = calloc(1, sizeof(**list) + len); + memcpy((*list)->value, value, len); + return *list; +} + +/*** SERVER CONNECTION RELATED CODE ***/ + +struct connect { + char *host; + char *password; + char *port; + char *class; + char *hub; + char *maximum; + struct connect *next; + struct string_list *origins; + char name[1]; +} *connects; + +static struct connect *get_connect(const char *name) +{ + struct connect *conn; + size_t ii, nlen; + + /* Look for a pre-existing connection with the same name. */ + nlen = strlen(name); + for (conn = connects; conn; conn = conn->next) + { + for (ii = 0; tolower(name[ii]) == conn->name[ii] && ii < nlen; ++ii) ; + if (conn->name[ii] == '\0' && name[ii] == '\0') + break; + } + + /* If none was found, create a new one. */ + if (!conn) + { + conn = calloc(1, sizeof(*conn) + nlen); + for (ii = 0; ii < nlen; ++ii) + conn->name[ii] = tolower(name[ii]); + conn->next = connects; + connects = conn; + } + + /* Return the connection. */ + return conn; +} + +static void do_connect(void) +{ + struct connect *conn = get_connect(fields[2]); + dupstring(conn->host, fields[0]); + dupstring(conn->password, fields[1]); + dupstring(conn->port, fields[3]); + dupstring(conn->class, fields[4]); + string_get(&conn->origins, orig_line); +} + +static void do_hub(void) +{ + struct connect *conn = get_connect(fields[2]); + dupstring(conn->hub, fields[0]); + dupstring(conn->maximum, fields[3]); + string_get(&conn->origins, orig_line); +} + +static void do_leaf(void) +{ + struct connect *conn = get_connect(fields[2]); + free(conn->hub); + conn->hub = 0; + string_get(&conn->origins, orig_line); +} + +static void finish_connects(void) +{ + struct connect *conn; + struct string_list *sl; + + for (conn = connects; conn; conn = conn->next) + { + for (sl = conn->origins; sl; sl = sl->next) + fprintf(stdout, "# %s\n", sl->value); + fprintf(stdout, + "Connect {\n\tname =\"%s\";\n\thost = \"%s\";\n" + "\tpassword = \"%s\";\n\tclass = \"%s\";\n", + conn->name, conn->host, conn->password, conn->class); + if (conn->port && conn->port[0] != '\0') + fprintf(stdout, "\tport = %s;\n", conn->port); + else + fprintf(stdout, + "# Every Connect block should have a port number.\n" + "# To prevent autoconnects, set autoconnect = no.\n" + "#\tport = 4400;\n" + "\tautoconnect = no;\n"); + if (conn->maximum && conn->maximum[0] != '\0') + fprintf(stdout, "\tmaxhops = %s;\n", conn->maximum); + if (conn->hub && conn->hub[0] != '\0') + fprintf(stdout, "\thub = \"%s\";\n", conn->hub); + fprintf(stdout, "};\n\n"); + + } +} + +/*** FEATURE MANAGEMENT CODE ***/ + +struct feature { + struct string_list *values; + struct string_list *origins; + struct feature *next; + char name[1]; +} *features; + +struct remapped_feature { + const char *name; + const char *privilege; + int flags; /* 2 = global, 1 = local */ + struct feature *feature; +} remapped_features[] = { + /* Specially handled privileges: If you change the index of + * anything with NULL privilege, change the code in + * finish_operators() to match! + */ + { "CRYPT_OPER_PASSWORD", NULL, 0, 0 }, /* default: true */ + { "OPER_KILL", NULL, 2, 0 }, /* default: true */ + { "LOCAL_KILL_ONLY", NULL, 2, 0 }, /* default: false */ + /* remapped features that affect all opers */ + { "OPER_NO_CHAN_LIMIT", "chan_limit", 3, 0 }, + { "OPER_MODE_LCHAN", "mode_lchan", 3, 0 }, + { "OPER_WALK_THROUGH_LMODES", "walk_lchan", 3, 0 }, + { "NO_OPER_DEOP_LCHAN", "deop_lchan", 3, 0 }, + { "SHOW_INVISIBLE_USERS", "show_invis", 3, 0 }, + { "SHOW_ALL_INVISIBLE_USERS", "show_all_invis", 3, 0 }, + { "UNLIMIT_OPER_QUERY", "unlimit_query", 3, 0 }, + /* remapped features affecting only global opers */ + { "OPER_REHASH", "rehash", 2, 0 }, + { "OPER_RESTART", "restart", 2, 0 }, + { "OPER_DIE", "die", 2, 0 }, + { "OPER_GLINE", "gline", 2, 0 }, + { "OPER_LGLINE", "local_gline", 2, 0 }, + { "OPER_JUPE", "jupe", 2, 0 }, + { "OPER_LJUPE", "local_jupe", 2, 0 }, + { "OPER_OPMODE", "opmode", 2, 0 }, + { "OPER_LOPMODE", "local_opmode", 2, 0 }, + { "OPER_FORCE_OPMODE", "force_opmode", 2, 0 }, + { "OPER_FORCE_LOPMODE", "force_local_opmode", 2, 0 }, + { "OPER_BADCHAN", "badchan", 2, 0 }, + { "OPER_LBADCHAN", "local_badchan", 2, 0 }, + { "OPER_SET", "set", 2, 0 }, + { "OPER_WIDE_GLINE", "wide_gline", 2, 0 }, + /* remapped features affecting only local opers */ + { "LOCOP_KILL", "kill", 1, 0 }, + { "LOCOP_REHASH", "rehash", 1, 0 }, + { "LOCOP_RESTART", "restart", 1, 0 }, + { "LOCOP_DIE", "die", 1, 0 }, + { "LOCOP_LGLINE", "local_gline", 1, 0 }, + { "LOCOP_LJUPE", "local_jupe", 1, 0 }, + { "LOCOP_LOPMODE", "local_opmode", 1, 0 }, + { "LOCOP_FORCE_LOPMODE", "force_local_opmode", 1, 0 }, + { "LOCOP_LBADCHAN", "local_badchan", 1, 0 }, + { "LOCOP_WIDE_GLINE", "wide_gline", 1, 0 }, + { 0, 0, 0, 0 } +}; + +static void do_feature(void) +{ + struct feature *feat; + size_t ii; + + ii = strlen(fields[0]); + feat = calloc(1, sizeof(*feat) + ii); + while (ii-- > 0) + feat->name[ii] = toupper(fields[0][ii]); + feat->next = features; + features = feat; + string_get(&feat->origins, orig_line); + for (ii = 1; fields[ii] && fields[ii][0]; ++ii) + string_get(&feat->values, fields[ii]); +} + +static void finish_features(void) +{ + struct remapped_feature *rmf; + struct string_list *sl; + struct feature *feat; + size_t ii; + + fputs("Features {\n\t\"OPLEVELS\" = \"FALSE\";\n", stdout); + + for (feat = features; feat; feat = feat->next) { + /* See if the feature was remapped to an oper privilege. */ + for (rmf = remapped_features; rmf->name; rmf++) + if (0 == strcmp(feat->name, rmf->name)) + break; + if (rmf->name) { + rmf->feature = feat; + fprintf(stdout, "# Above feature mapped to an oper privilege.\n"); + continue; + } + + /* Was it removed? */ + for (ii = 0; removed_features[ii]; ++ii) + if (0 == strcmp(feat->name, removed_features[ii])) + break; + if (removed_features[ii]) { + fprintf(stdout, "# Above feature no longer exists.\n"); + continue; + } + + /* Wasn't remapped, wasn't removed: print it out. */ + fprintf(stdout, "\t\"%s\" =", feat->name); + for (sl = feat->values; sl; sl = sl->next) + fprintf(stdout, " \"%s\"", sl->value); + fprintf(stdout, ";\n"); + } + fputs("};\n\n", stdout); + +} + +/*** OPERATOR BLOCKS ***/ + +struct operator { + char *name; + char *host; + char *password; + char *class; + char *origin; + int is_local; + struct operator *next; +} *operators; + +static void do_operator(int is_local) +{ + struct operator *oper; + + oper = calloc(1, sizeof(*oper)); + dupstring(oper->host, fields[0]); + dupstring(oper->password, fields[1]); + dupstring(oper->name, fields[2]); + dupstring(oper->class, fields[4]); + dupstring(oper->origin, orig_line); + oper->is_local = is_local; + oper->next = operators; + operators = oper; +} + +static void finish_operators(void) +{ + struct remapped_feature *remap; + struct operator *oper; + struct feature *feat; + char *pw_salt = ""; + int global_kill = 0, mask = 0; + size_t ii; + + if ((feat = remapped_features[0].feature) && feat->values + && 0 == strcmp(feat->values->value, "FALSE")) + pw_salt = "$PLAIN$"; + + if ((feat = remapped_features[1].feature) && feat->values + && 0 == strcmp(feat->values->value, "FALSE")) + global_kill = 1; + else if ((feat = remapped_features[2].feature) && feat->values + && 0 == strcmp(feat->values->value, "FALSE")) + global_kill = 2; + + for (oper = operators; oper; oper = oper->next) { + fprintf(stdout, "# %s\nOperator {\n\tname = \"%s\";\n" + "\thost = \"%s\";\n\tpassword = \"%s%s\";\n" + "\tclass = \"%s\";\n", + oper->origin, oper->name, oper->host, pw_salt, + oper->password, oper->class); + if (oper->is_local) { + fputs("\tlocal = yes;\n", stdout); + mask = 1; + } else { + fputs("\tlocal = no;\n", stdout); + if (global_kill == 1) + fputs("\tkill = no;\n\tlocal_kill = no;\n", stdout); + else if (global_kill == 2) + fputs("\tkill = no;\n\tlocal_kill = yes;\n", stdout); + mask = 2; + } + for (ii = 0; (remap = &remapped_features[ii++])->name; ) { + if (!remap->feature || !remap->privilege + || !remap->feature->values || !remap->flags & mask) + continue; + fprintf(stdout, "\t%s = %s;\n", remap->privilege, + strcmp(remap->feature->values->value, "TRUE") ? "no" : "yes"); + } + fputs("};\n\n", stdout); + } +} + +/*** OTHER CONFIG TRANSFORMS ***/ + +static void do_kill(void) +{ + const char *host = fields[0], *reason = fields[1], *user = fields[2]; + + if (!memcmp(host, "$R", 3)) { + fprintf(stderr, "Empty realname K: line at line %u.\n", lineno); + return; + } + + /* Print the current line and start the new block. */ + fprintf(stdout, "# %s\nKill {\n", orig_line); + + /* Translate the user-matching portions. */ + if (host[0] == '$' && host[1] == 'R') { + /* Realname kill, possibly with a username */ + fprintf(stdout, "\trealname = \"%s\";\n", host + 2); + if (user[0] != '\0' && (user[0] != '*' || user[1] != '\0')) + fprintf(stdout, "\thost = \"%s@*\";\n", user); + } else { + /* Normal host or IP-based kill */ + if (user[0] != '\0' && (user[0] != '*' || user[1] != '\0')) + fprintf(stdout, "\thost = \"%s@%s\";\n", user, host); + else + fprintf(stdout, "\thost = \"%s\";\n", host); + } + + /* Translate the reason section. */ + if (reason[0] == '!') + fprintf(stdout, "\tfile = \"%s\";\n", reason + 1); + else + fprintf(stdout, "\treason = \"%s\";\n", reason); + + /* Close the block. */ + fprintf(stdout, "};\n"); +} + +static void do_port(void) +{ + const char *ipmask = fields[0], *iface = fields[1], *flags = fields[2], *port = fields[3]; + + /* Print the current line and start the new block. */ + fprintf(stdout, "# %s\nPort {\n", orig_line); + + /* Print the easy fields. */ + fprintf(stdout, "\tport = %s;\n", port); + if (iface && iface[0] != '\0') + fprintf(stdout, "\tvhost = \"%s\";\n", iface); + if (ipmask && ipmask[0] != '\0') + fprintf(stdout, "\tmask = \"%s\";\n", ipmask); + + /* Translate flag field. */ + while (*flags) switch (*flags++) { + case 'C': case 'c': /* client port is default state */; break; + case 'S': case 's': fprintf(stdout, "\tserver = yes;\n"); break; + case 'H': case 'h': fprintf(stdout, "\thidden = yes;\n"); break; + } + + /* Close the block. */ + fprintf(stdout, "};\n"); +} + +struct string_list *quarantines; + +static void do_quarantine(void) +{ + struct string_list *q; + q = string_get(&quarantines, fields[0]); + dupstring(q->origin, orig_line); + dupstring(q->extra, fields[1]); +} + +static void finish_quarantines(void) +{ + struct string_list *sl; + + if (quarantines) + { + fputs("Quarantine {\n", stdout); + for (sl = quarantines; sl; sl = sl->next) + fprintf(stdout, "# %s\n\t\"%s\" = \"%s\";\n", sl->origin, sl->value, sl->extra); + fputs("};\n\n", stdout); + } +} + +static void do_uworld(void) +{ + fprintf(stdout, "# %s\n", orig_line); + if (fields[0] && fields[0][0]) + fprintf(stdout, "Uworld { name = \"%s\"; };\n", fields[0]); + if (fields[1] && fields[1][0]) + fprintf(stdout, "Jupe { nick = \"%s\"; };\n", fields[1]); +} + +static void emit_client(const char *mask, const char *passwd, const char *class, long maxlinks, int is_ip) +{ + char *delim; + size_t len; + + delim = strchr(mask, '@'); + if (delim) { + *delim++ = '\0'; + if (is_ip) { + len = strspn(delim, "0123456789.*"); + if (delim[len]) { + fprintf(stderr, "Invalid IP mask on line %u.\n", lineno); + return; + } + fprintf(stdout, "Client {\n\tusername = \"%s\";\n\tip = \"%s\";\n", mask, delim); + } else { + fprintf(stdout, "Client {\n\tusername =\"%s\";\n\thost = \"%s\";\n", mask, delim); + } + } else if (is_ip) { + len = strspn(mask, "0123456789.*"); + if (mask[len]) + return; + fprintf(stdout, "Client {\n\tip = \"%s\";\n", mask); + } else { + if (!strchr(mask, '.') && !strchr(mask, '*')) + return; + fprintf(stdout, "Client {\n\thost = \"%s\";\n", mask); + } + + if (passwd) + fprintf(stdout, "\tpassword = \"%s\";\n", passwd); + + if (maxlinks >= 0) + fprintf(stdout, "\tmaxlinks = %ld;\n", maxlinks); + + fprintf(stdout, "\tclass = \"%s\";\n};\n", class); +} + +static void do_client(void) +{ + char *passwd = NULL, *delim; + long maxlinks; + + /* Print the current line. */ + fprintf(stdout, "# %s\n", orig_line); + + /* See if the password is really a maxlinks count. */ + maxlinks = strtol(fields[1], &delim, 10); + if (fields[1][0] == '\0') + maxlinks = -1; + else if (maxlinks < 0 || maxlinks > 99 || *delim != '\0') + passwd = fields[1]; + + /* Translate the IP and host mask fields into blocks. */ + emit_client(fields[0], passwd, fields[4], maxlinks, 1); + emit_client(fields[2], passwd, fields[4], maxlinks, 0); +} + +int main(int argc, char *argv[]) +{ + FILE *ifile; + + if (argc < 2) + ifile = stdin; + else if (!(ifile = fopen(argv[1], "rt"))) { + fprintf(stderr, "Unable to open file %s for input.\n", argv[1]); + return 1; + } + + for (lineno = 1; fgets(line, sizeof(line), ifile); ++lineno) { + /* Read line and pass comments through. */ + size_t len = strlen(line); + if (line[0] == '#') { + fputs(line, stdout); + continue; + } + /* Strip EOL character(s) and pass blank lines through. */ + while (len > 0 && (line[len-1] == '\n' || line[len-1] == '\r')) + line[--len] = '\0'; + if (len == 0) { + fputc('\n', stdout); + continue; + } + /* Skip but report invalid lines. */ + if (line[1] != ':') { + fprintf(stdout, "# %s\n", line); + fprintf(stderr, "Invalid input line %d.\n", lineno); + continue; + } + /* Copy the original line into a reusable variable. */ + strcpy(orig_line, line); + /* Split line into fields. */ + nfields = split_line(line + 2, fields); + + /* Process the input line. */ + switch (line[0]) { + case 'A': case 'a': simple_line("Admin", admin_names, NULL); break; + case 'C': case 'c': do_connect(); break; + case 'D': simple_line("CRule", crule_names, "all = yes;"); break; + case 'd': simple_line("CRule", crule_names, NULL); break; + case 'F': case 'f': do_feature(); break; + case 'H': case 'h': do_hub(); break; + case 'I': case 'i': do_client(); break; + case 'K': case 'k': do_kill(); break; + case 'L': case 'l': do_leaf(); break; + case 'M': case 'm': simple_line("General", general_names, NULL); break; + case 'O': do_operator(0); break; + case 'o': do_operator(1); break; + case 'P': case 'p': do_port(); break; + case 'Q': case 'q': do_quarantine(); break; + case 'T': case 't': simple_line("Motd", motd_names, NULL); break; + case 'U': case 'u': do_uworld(); break; + case 'Y': case 'y': simple_line("Class", class_names, NULL); break; + default: + fprintf(stderr, "Unknown line %u with leading character '%c'.\n", lineno, line[0]); + break; + } + } + + fclose(ifile); + + fputs("\n# The following lines were intentionally moved and rearranged." + "\n# Our apologies for any inconvenience this may cause." + "\n\n", stdout); + finish_connects(); + finish_quarantines(); + finish_features(); + finish_operators(); + + return 0; +} Index: ircd-ircdev/ircd/ddb_db_native.c diff -u ircd-ircdev/ircd/ddb_db_native.c:1.4 ircd-ircdev/ircd/ddb_db_native.c:1.5 --- ircd-ircdev/ircd/ddb_db_native.c:1.4 Mon May 16 03:17:27 2005 +++ ircd-ircdev/ircd/ddb_db_native.c Mon Oct 17 07:02:32 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Native DataBase implementation of Distributed DataBases. - * @version $Id: ddb_db_native.c,v 1.4 2005/05/16 10:17:27 zolty Exp $ + * @version $Id: ddb_db_native.c,v 1.5 2005/10/17 14:02:32 zolty Exp $ */ #include "config.h" @@ -67,20 +67,15 @@ ddb_db_init(void) { char path[1024]; + struct stat *sStat; unsigned char table; int fd; - int temp; -#if 0 - temp = chdir(feature_str(FEAT_DDBPATH)); - log_write(LS_SYSTEM, L_CRIT, 0, "chdir(), resultado: %d", temp); - if (0 != temp) - /* if (0 != chdir(feature_str(FEAT_DDBPATH))) */ + if ((stat(feature_str(FEAT_DDBPATH), sStat) == 0)) { if (0 != mkdir(feature_str(FEAT_DDBPATH), 0775)) ddb_die("Error when creating %s directory", feature_str(FEAT_DDBPATH)); } -#endif /* Verify if hashes file is exist. */ ircd_snprintf(0, path, sizeof(path), "%s/hashes", feature_str(FEAT_DDBPATH)); Index: ircd-ircdev/ircd/gline.c diff -u ircd-ircdev/ircd/gline.c:1.15 ircd-ircdev/ircd/gline.c:1.16 --- ircd-ircdev/ircd/gline.c:1.15 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/ircd/gline.c Mon Oct 17 07:02:32 2005 @@ -23,7 +23,7 @@ */ /** @file * @brief Implementation of Gline manipulation functions. - * @version $Id: gline.c,v 1.15 2005/09/01 11:25:42 zolty Exp $ + * @version $Id: gline.c,v 1.16 2005/10/17 14:02:32 zolty Exp $ */ #include "config.h" @@ -167,10 +167,8 @@ else gline->gl_host = NULL; - if (*user != '$' && ipmask_parse(host, &gline->gl_addr, &gline->gl_bits)) { - Debug((DEBUG_DEBUG,"IP gline: %s/%u", ircd_ntoa(&gline->gl_addr), gline->gl_bits)); + if (*user != '$' && ipmask_parse(host, &gline->gl_addr, &gline->gl_bits)) gline->gl_flags |= GLINE_IPMASK; - } if (after) { gline->gl_next = after->gl_next; @@ -229,10 +227,6 @@ continue; if (GlineIsIpMask(gline)) { -#ifdef DEBUGMODE - char tbuf1[SOCKIPLEN], tbuf2[SOCKIPLEN]; - Debug((DEBUG_DEBUG,"IP gline: %s %s/%u", ircd_ntoa_r(tbuf1, &cli_ip(acptr)), ircd_ntoa_r(tbuf2, &gline->gl_addr), gline->gl_bits)); -#endif if (!ipmask_check(&cli_ip(acptr), &gline->gl_addr, gline->gl_bits)) continue; } @@ -696,7 +690,7 @@ gline_free(gline); continue; } - + if ((flags & GLINE_GLOBAL && gline->gl_flags & GLINE_LOCAL) || (flags & GLINE_LASTMOD && !gline->gl_lastmod)) continue; @@ -705,19 +699,12 @@ Debug((DEBUG_DEBUG,"realname gline: '%s' '%s'",gline->gl_user,cli_info(cptr))); if (match(gline->gl_user+2, cli_info(cptr)) != 0) continue; - if (!GlineIsActive(gline)) - continue; - return gline; } else { if (match(gline->gl_user, (cli_user(cptr))->username) != 0) continue; if (GlineIsIpMask(gline)) { -#ifdef DEBUGMODE - char tbuf1[SOCKIPLEN], tbuf2[SOCKIPLEN]; - Debug((DEBUG_DEBUG,"IP gline: %s %s/%u", ircd_ntoa_r(tbuf1, &cli_ip(cptr)), ircd_ntoa_r(tbuf2, &gline->gl_addr), gline->gl_bits)); -#endif if (!ipmask_check(&cli_ip(cptr), &gline->gl_addr, gline->gl_bits)) continue; } Index: ircd-ircdev/ircd/ircd.c diff -u ircd-ircdev/ircd/ircd.c:1.21 ircd-ircdev/ircd/ircd.c:1.22 --- ircd-ircdev/ircd/ircd.c:1.21 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/ircd/ircd.c Mon Oct 17 07:02:32 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Entry point and other initialization functions for the daemon. - * @version $Id: ircd.c,v 1.21 2005/09/01 11:25:42 zolty Exp $ + * @version $Id: ircd.c,v 1.22 2005/10/17 14:02:32 zolty Exp $ */ #include "config.h" @@ -280,14 +280,14 @@ || ((ajupe = jupe_find(aconf->name)) && JupeIsActive(ajupe))) continue; + /* Do we need to postpone this connection further? */ + hold = aconf->hold > CurrentTime; + /* Update next possible connection check time. */ - if (next > aconf->hold || next == 0) + if (hold && (next > aconf->hold || next == 0)) next = aconf->hold; - /* Update the next time we can consider this entry. */ cltmp = aconf->conn_class; - hold = aconf->hold > CurrentTime; /* before we update aconf->hold */ - aconf->hold = ConFreq(cltmp) ? CurrentTime + ConFreq(cltmp) : 0; /* Do not try to connect if its use is still on hold until future, * too many links in its connection class, it is already linked, Index: ircd-ircdev/ircd/ircd_string.c diff -u ircd-ircdev/ircd/ircd_string.c:1.11 ircd-ircdev/ircd/ircd_string.c:1.12 --- ircd-ircdev/ircd/ircd_string.c:1.11 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/ircd/ircd_string.c Mon Oct 17 07:02:32 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Implementation of string operations. - * @version $Id: ircd_string.c,v 1.11 2005/06/22 07:54:29 zolty Exp $ + * @version $Id: ircd_string.c,v 1.12 2005/10/17 14:02:32 zolty Exp $ */ #include "config.h" @@ -456,12 +456,13 @@ /** Attempt to parse an IPv4 address into a network-endian form. * @param[in] input Input string. * @param[out] output Network-endian representation of the address. + * @param[out] pbits Number of bits found in pbits. * @return Number of characters used from \a input, or 0 if the parse failed. */ static unsigned int -ircd_aton_ip4(const char *input, unsigned int *output) +ircd_aton_ip4(const char *input, unsigned int *output, unsigned char *pbits) { - unsigned int dots = 0, pos = 0, part = 0, ip = 0; + unsigned int dots = 0, pos = 0, part = 0, ip = 0, bits; /* Intentionally no support for bizarre IPv4 formats (plain * integers, octal or hex components) -- only vanilla dotted @@ -469,33 +470,60 @@ */ if (input[0] == '.') return 0; - while (1) { - if (IsDigit(input[pos])) { - part = part * 10 + input[pos++] - '0'; - if (part > 255) - return 0; - if ((dots == 3) && !IsDigit(input[pos])) { - *output = htonl(ip | part); - return pos; - } - } else if (input[pos] == '.') { - if (input[++pos] == '.') + bits = 32; + while (1) switch (input[pos]) { + case '\0': + if (dots < 3) + return 0; + out: + ip |= part << (24 - 8 * dots); + *output = htonl(ip); + if (pbits) + *pbits = bits; + return pos; + case '.': + if (input[++pos] == '.') + return 0; + ip |= part << (24 - 8 * dots++); + part = 0; + if (input[pos] == '*') { + while (input[++pos] == '*') ; + if (input[pos] != '\0') return 0; - ip |= part << (24 - 8 * dots++); - part = 0; - } else + if (pbits) + *pbits = dots * 8; + *output = htonl(ip); + return pos; + } + break; + case '/': + if (!pbits || !IsDigit(input[pos + 1])) + return 0; + for (bits = 0; IsDigit(input[++pos]); ) + bits = bits * 10 + input[pos] - '0'; + if (bits > 32) + return 0; + goto out; + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + part = part * 10 + input[pos++] - '0'; + if (part > 255) return 0; + break; + default: + return 0; } } /** Parse a numeric IPv4 or IPv6 address into an irc_in_addr. - * @param[out] ip Receives parsed IP address. * @param[in] input Input buffer. + * @param[out] ip Receives parsed IP address. + * @param[out] pbits If non-NULL, receives number of bits specified in address mask. * @return Number of characters used from \a input, or 0 if the * address was unparseable or malformed. */ int -ircd_aton(struct irc_in_addr *ip, const char *input) +ipmask_parse(const char *input, struct irc_in_addr *ip, unsigned char *pbits) { char *colon; char *dot; @@ -523,80 +551,104 @@ pos += 2; part_start = input + pos; } - while (ii < 8) { + while (ii < 8) switch (input[pos]) { unsigned char chval; - - switch (input[pos]) { - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - chval = input[pos] - '0'; - use_chval: - part = (part << 4) | chval; - if (part > 0xffff) + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + chval = input[pos] - '0'; + use_chval: + part = (part << 4) | chval; + if (part > 0xffff) + return 0; + pos++; + break; + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + chval = input[pos] - 'A' + 10; + goto use_chval; + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + chval = input[pos] - 'a' + 10; + goto use_chval; + case ':': + part_start = input + ++pos; + if (input[pos] == '.') + return 0; + ip->in6_16[ii++] = htons(part); + part = 0; + if (input[pos] == ':') { + if (colon < 8) return 0; + colon = ii; pos++; - break; - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - chval = input[pos] - 'A' + 10; - goto use_chval; - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - chval = input[pos] - 'a' + 10; - goto use_chval; - case ':': - part_start = input + ++pos; - if (input[pos] == '.') - return 0; - ip->in6_16[ii++] = htons(part); - part = 0; - if (input[pos] == ':') { - if (colon < 8) - return 0; - colon = ii; - pos++; - } - break; - case '.': { - uint32_t ip4; - unsigned int len; - len = ircd_aton_ip4(part_start, &ip4); - if (!len || (ii > 6)) - return 0; - ip->in6_16[ii++] = htons(ntohl(ip4) >> 16); - ip->in6_16[ii++] = htons(ntohl(ip4) & 65535); - if (colon < 8) { - unsigned int jj; - /* Shift stuff after "::" up and fill middle with zeros. */ - for (jj = 0; jj < ii - colon; jj++) - ip->in6_16[7 - jj] = ip->in6_16[ii - jj - 1]; - for (jj = 0; jj < 8 - ii; jj++) - ip->in6_16[colon + jj] = 0; - } - return part_start - input + len; - } - default: { - ip->in6_16[ii++] = htons(part); - if (colon < 8) { - unsigned int jj; - /* Shift stuff after "::" up and fill middle with zeros. */ - for (jj = 0; jj < ii - colon; jj++) - ip->in6_16[7 - jj] = ip->in6_16[ii - jj - 1]; - for (jj = 0; jj < 8 - ii; jj++) - ip->in6_16[colon + jj] = 0; - } - return pos; - } } + break; + case '.': { + uint32_t ip4; + unsigned int len; + len = ircd_aton_ip4(part_start, &ip4, pbits); + if (!len || (ii > 6)) + return 0; + ip->in6_16[ii++] = htons(ntohl(ip4) >> 16); + ip->in6_16[ii++] = htons(ntohl(ip4) & 65535); + if (pbits) + *pbits += 96; + pos = part_start + len - input; + goto finish; + } + case '/': + if (!pbits || !IsDigit(input[pos + 1])) + return 0; + ip->in6_16[ii++] = htons(part); + for (part = 0; IsDigit(input[++pos]); ) + part = part * 10 + input[pos] - '0'; + if (part > 128) + return 0; + *pbits = part; + goto finish; + case '*': + while (input[++pos] == '*') ; + if (input[pos] != '\0' || colon < 8) + return 0; + if (pbits) + *pbits = ii * 16; + return pos; + case '\0': + ip->in6_16[ii++] = htons(part); + if (colon == 8 && ii < 8) + return 0; + if (pbits) + *pbits = 128; + goto finish; + default: + return 0; + } + finish: + if (colon < 8) { + unsigned int jj; + /* Shift stuff after "::" up and fill middle with zeros. */ + for (jj = 0; jj < ii - colon; jj++) + ip->in6_16[7 - jj] = ip->in6_16[ii - jj - 1]; + for (jj = 0; jj < 8 - ii; jj++) + ip->in6_16[colon + jj] = 0; } return pos; - } else if (dot) { + } else if (dot || strchr(input, '/')) { unsigned int addr; - int len = ircd_aton_ip4(input, &addr); + int len = ircd_aton_ip4(input, &addr, pbits); if (len) { ip->in6_16[5] = htons(65535); ip->in6_16[6] = htons(ntohl(addr) >> 16); ip->in6_16[7] = htons(ntohl(addr) & 65535); - return len; + if (pbits) + *pbits += 96; } - } - return 0; /* parse failed */ + return len; + } else if (input[0] == '*') { + unsigned int pos = 0; + while (input[++pos] == '*') ; + if (input[pos] != '\0') + return 0; + if (pbits) + *pbits = 0; + return pos; + } else return 0; /* parse failed */ } Index: ircd-ircdev/ircd/m_burst.c diff -u ircd-ircdev/ircd/m_burst.c:1.13 ircd-ircdev/ircd/m_burst.c:1.14 --- ircd-ircdev/ircd/m_burst.c:1.13 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/ircd/m_burst.c Mon Oct 17 07:02:32 2005 @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_burst.c,v 1.13 2005/09/01 11:25:42 zolty Exp $ + * $Id: m_burst.c,v 1.14 2005/10/17 14:02:32 zolty Exp $ * */ @@ -403,11 +403,7 @@ strcpy(newban->who, "*"); */ newban->when = TStime(); - - newban->flags = BAN_BURSTED; /* set flags */ - if ((ptr = strrchr(ban, '@')) && check_if_ipmask(ptr + 1)) - newban->flags |= BAN_IPMASK; - + newban->flags = BAN_BURSTED; newban->next = 0; if (lp) lp->next = newban; /* link it in */ Index: ircd-ircdev/ircd/m_invite.c diff -u ircd-ircdev/ircd/m_invite.c:1.13 ircd-ircdev/ircd/m_invite.c:1.14 --- ircd-ircdev/ircd/m_invite.c:1.13 Sun Jul 3 13:21:42 2005 +++ ircd-ircdev/ircd/m_invite.c Mon Oct 17 07:02:32 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_invite.c,v 1.13 2005/07/03 20:21:42 zolty Exp $ + * $Id: m_invite.c,v 1.14 2005/10/17 14:02:32 zolty Exp $ * */ @@ -141,12 +141,9 @@ if (is_silenced(sptr, acptr)) return 0; - clean_channelname(parv[2]); - - if (!IsChannelPrefix(*parv[2])) - return 0; - - if (!(chptr = FindChannel(parv[2]))) { + if (!IsChannelName(parv[2]) + || !strIsIrcCh(parv[2]) + || !(chptr = FindChannel(parv[2]))) { send_reply(sptr, ERR_NOSUCHCHANNEL, parv[2]); return 0; } Index: ircd-ircdev/ircd/m_join.c diff -u ircd-ircdev/ircd/m_join.c:1.13 ircd-ircdev/ircd/m_join.c:1.14 --- ircd-ircdev/ircd/m_join.c:1.13 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/ircd/m_join.c Mon Oct 17 07:02:32 2005 @@ -18,66 +18,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_join.c,v 1.13 2005/09/01 11:25:42 zolty Exp $ + * $Id: m_join.c,v 1.14 2005/10/17 14:02:32 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" @@ -102,23 +46,25 @@ #include <stdlib.h> #include <string.h> -/* - * Helper function to find last 0 in a comma-separated list of - * channel names. +/** Searches for and handles a 0 in a join list. + * @param[in] cptr Client that sent us the message. + * @param[in] sptr Original source of message. + * @param[in] chanlist List of channels to join. + * @return First token in \a chanlist after the final 0 entry, which + * may be its nul terminator (if the final entry is a 0 entry). */ static char * -last0(char *chanlist) +last0(struct Client *cptr, struct Client *sptr, char *chanlist) { char *p; + int join0 = 0; for (p = chanlist; p[0]; p++) /* find last "JOIN 0" */ if (p[0] == '0' && (p[1] == ',' || p[1] == '\0' || !IsChannelChar(p[1]))) { - chanlist = p; /* we'll start parsing here */ - - if (!p[1]) /* hit the end */ - break; - - p++; + if (*++p == ',') + p++; + chanlist = p; + join0 = 1; } else { while (p[0] != ',' && p[0] != '\0') /* skip past channel name */ p++; @@ -127,43 +73,34 @@ break; } - return chanlist; -} - -/* - * Helper function to perform a JOIN 0 if needed; returns 0 if channel - * name is not 0, else removes user from all channels and returns 1. - */ -static int -join0(struct JoinBuf *join, struct Client *cptr, struct Client *sptr, - char *chan) -{ - struct Membership *member; - struct JoinBuf part; + if (join0) { + struct JoinBuf part; + struct Membership *member; + + joinbuf_init(&part, sptr, cptr, JOINBUF_TYPE_PARTALL, + "Left all channels", 0); + + joinbuf_join(&part, 0, 0); + + while ((member = cli_user(sptr)->channel)) + joinbuf_join(&part, member->channel, + IsZombie(member) ? CHFL_ZOMBIE : + IsDelayedJoin(member) ? CHFL_DELAYED : + 0); - /* is it a JOIN 0? */ - if (chan[0] != '0' || chan[1] != '\0') - return 0; - - joinbuf_join(join, 0, 0); /* join special channel 0 */ - - /* leave all channels */ - joinbuf_init(&part, sptr, cptr, JOINBUF_TYPE_PARTALL, - "Left all channels", 0); - - while ((member = cli_user(sptr)->channel)) - joinbuf_join(&part, member->channel, - IsZombie(member) ? CHFL_ZOMBIE : - IsDelayedJoin(member) ? CHFL_DELAYED : - 0); + joinbuf_flush(&part); - joinbuf_flush(&part); + } - return 1; + return chanlist; } -/* - * m_join - generic message handler +/** Handle a JOIN message from a client connection. + * See @ref m_functions for discussion of the arguments. + * @param[in] cptr Client that sent us the message. + * @param[in] sptr Original source of message. + * @param[in] parc Number of arguments. + * @param[in] parv Argument vector. */ int m_join(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) { @@ -171,8 +108,6 @@ struct JoinBuf join; struct JoinBuf create; struct Gline *gline; - unsigned int flags = 0; - int i, j, k = 0; char *p = 0; char *chanlist; char *name; @@ -184,34 +119,33 @@ joinbuf_init(&join, sptr, cptr, JOINBUF_TYPE_JOIN, 0, 0); joinbuf_init(&create, sptr, cptr, JOINBUF_TYPE_CREATE, 0, TStime()); - chanlist = last0(parv[1]); /* find last "JOIN 0" */ + chanlist = last0(cptr, sptr, parv[1]); /* find last "JOIN 0" */ keys = parv[2]; /* remember where keys are */ - for (name = ircd_strtok(&p, chanlist, ","); name; name = ircd_strtok(&p, 0, ",")) { - clean_channelname(name); + char *key = 0; - if (join0(&join, cptr, sptr, name)) /* did client do a JOIN 0? */ - continue; + /* If we have any more keys, take the first for this channel. */ + if (!BadPtr(keys) + && (keys = strchr(key = keys, ','))) + *keys++ = '\0'; + + /* Empty keys are the same as no keys. */ + if (key && !key[0]) + key = 0; - /* bad channel name */ - if (!IsChannelName(name)) + if (!IsChannelName(name) || !strIsIrcCh(name)) { + /* bad channel name */ send_reply(sptr, ERR_NOSUCHCHANNEL, name); continue; } - /* This checks if the channel contains control codes and rejects em - * until they are gone, then we will do it otherwise - *SOB Mode* - */ - for (k = 0, j = 0; name[j]; j++) - if (IsCntrl(name[j])) - k++; - if (k > 0) - { - send_reply(sptr, ERR_NOSUCHCHANNEL, name); - continue; + if (cli_user(sptr)->joined >= feature_int(FEAT_MAXCHANNELSPERUSER) + && !HasPriv(sptr, PRIV_CHAN_LIMIT)) { + send_reply(sptr, ERR_TOOMANYCHANNELS, name); + break; /* no point processing the other channels */ } /* BADCHANed channel */ @@ -221,123 +155,111 @@ continue; } - if ((chptr = FindChannel(name))) - { - if (find_member_link(chptr, sptr)) - continue; /* already on channel */ - - flags = CHFL_DEOPPED; - } - else - flags = CHFL_CHANOP; - - /* disallow creating local channels */ - if (IsLocalChannel(name) && !chptr && !feature_bool(FEAT_LOCAL_CHANNELS)) { + if (!(chptr = FindChannel(name))) { + if ((name[0] == '&') && !feature_bool(FEAT_LOCAL_CHANNELS)) { send_reply(sptr, ERR_NOSUCHCHANNEL, name); continue; - } + } - if (cli_user(sptr)->joined >= feature_int(FEAT_MAXCHANNELSPERUSER) && - !HasPriv(sptr, PRIV_CHAN_LIMIT)) { - send_reply(sptr, ERR_TOOMANYCHANNELS, chptr ? chptr->chname : name); - break; /* no point processing the other channels */ - } + if (!(chptr = get_channel(sptr, name, CGT_CREATE))) + continue; - if (chptr) { + /* Try to add the new channel as a recent target for the user. */ + if (check_target_limit(sptr, chptr, chptr->chname, 1)) { #if defined(UNDERNET) - int is_level0_op = 0; - if (!BadPtr(keys) && *chptr->mode.apass) { - /* Don't use compall for the apass, only a single key is allowed. */ - if (strcmp(chptr->mode.apass, keys) == 0) { - is_level0_op = 1; - flags &= ~CHFL_DEOPPED; - flags |= CHFL_CHANOP | CHFL_CHANNEL_MANAGER; - } - else if (*chptr->mode.upass && strcmp(chptr->mode.upass, keys) == 0) { - is_level0_op = 1; - flags &= ~CHFL_DEOPPED; - flags |= CHFL_CHANOP; - } +/* FIXME zoltan */ + chptr->members = 0; + destruct_channel(chptr); + continue; } -#elif defined(DDB) - struct Ddb *ddb; - ... [truncated message content] |
From: Toni G. <zo...@us...> - 2005-10-25 09:47:45
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-10-25 09:47:39 UTC Modified files: TODO.es Log message: Mas todo ---------------------- diff included ---------------------- Index: ircd-ircdev/TODO.es diff -u ircd-ircdev/TODO.es:1.30 ircd-ircdev/TODO.es:1.31 --- ircd-ircdev/TODO.es:1.30 Thu Oct 13 03:01:58 2005 +++ ircd-ircdev/TODO.es Tue Oct 25 02:47:29 2005 @@ -1,7 +1,7 @@ # # TODO para ircd-ircdev # -# $Id: TODO.es,v 1.30 2005/10/13 10:01:58 zolty Exp $ +# $Id: TODO.es,v 1.31 2005/10/25 09:47:29 zolty Exp $ # # Insertar las nuevas entradas al principio de la lista TODO. # @@ -26,6 +26,7 @@ notices de auth y dnslookup al conectar. - [D] U-lines a traves de la DDB. - [D] Mejorar la inicializacion de las DDB con los eventos. + - [G] Con la introduccion de &his, comprobar TODO. PRIORIDAD MEDIA @@ -73,6 +74,16 @@ [18:11:38] <Tor> quote opmode #opers +nk lalala [18:14:59] <Tor> burst de aways +[16:01:38] <Daijo> -mcpu=k8 -pipe -fomit-frame-pointer -mfpmath=sse +[16:01:45] <Daijo> -Os -mcpu=k8 -pipe -fomit-frame-pointer -mfpmath=sse +[16:01:48] <Daijo> con eso no veas como ganaria +[16:03:28] <Daijo> -O2 -march=i586 -pipe -fomit-frame-pointer +[16:03:30] <Daijo> eso es generico +[16:03:44] <Daijo> el omit-frame-pointer no es nada recomendado para depuracion +[16:04:23] <Daijo> y mi linea primera hace que compile para un binario menor (lo cual va de cabeza a la cache del +procesador), optimizando para 64 bits, y utilizando sse como funciones de coma flotante +[16:04:35] <Daijo> el -pipe hace que compile en memoria xa tardar menos + DOCUMENTACION PENDIENTE -------------------------------------------------------------------------------------- - [G] Documentar para Doxygen el Watch ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2005-10-25 09:53:03
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-10-25 09:52:53 UTC Modified files: ChangeLog ChangeLog.es RELEASE.NOTES RELEASE.NOTES.es doc/en/features.txt include/channel.h include/class.h include/ircd_features.h include/patchlevel.h include/s_stats.h include/s_user.h ircd/Makefile.in ircd/channel.c ircd/class.c ircd/client.c ircd/gline.c ircd/ircd.c ircd/ircd_features.c ircd/ircd_parser.y ircd/ircd_res.c ircd/m_burst.c ircd/m_clearmode.c ircd/m_create.c ircd/m_defaults.c ircd/m_gline.c ircd/m_invite.c ircd/m_join.c ircd/m_kick.c ircd/m_kill.c ircd/m_names.c ircd/m_proto.c ircd/m_stats.c ircd/m_topic.c ircd/m_version.c ircd/m_who.c ircd/m_whois.c ircd/parse.c ircd/s_conf.c ircd/s_misc.c ircd/s_numeric.c ircd/s_stats.c ircd/s_user.c ircd/test/Makefile.in Removed files: include/supported.h include/whocmds.h ircd/whocmds.c Log message: Author: zoltan <zo...@ir...> Log message: 2005-10-25 Toni García <zo...@ir...> 1.0.alpha45 * ISSUPORT dinámico ---------------------- diff included ---------------------- Index: ircd-ircdev/ChangeLog diff -u ircd-ircdev/ChangeLog:1.46 ircd-ircdev/ChangeLog:1.47 --- ircd-ircdev/ChangeLog:1.46 Mon Oct 17 07:02:32 2005 +++ ircd-ircdev/ChangeLog Tue Oct 25 02:52:43 2005 @@ -1,10 +1,13 @@ # # ChangeLog for ircd-ircdev # -# $Id: ChangeLog,v 1.46 2005/10/17 14:02:32 zolty Exp $ +# $Id: ChangeLog,v 1.47 2005/10/25 09:52:43 zolty Exp $ # # Insert new changes at beginning of the change list. # +2005-10-25 Toni García <zo...@ir...> 1.0.alpha45 + * Dynamic ISSUPORT + 2005-10-17 Toni García <zo...@ir...> 1.0.alpha44 * Undernet synchronization Index: ircd-ircdev/ChangeLog.es diff -u ircd-ircdev/ChangeLog.es:1.46 ircd-ircdev/ChangeLog.es:1.47 --- ircd-ircdev/ChangeLog.es:1.46 Mon Oct 17 07:02:32 2005 +++ ircd-ircdev/ChangeLog.es Tue Oct 25 02:52:43 2005 @@ -1,10 +1,13 @@ # # Log de Cambios para ircd-ircdev # -# $Id: ChangeLog.es,v 1.46 2005/10/17 14:02:32 zolty Exp $ +# $Id: ChangeLog.es,v 1.47 2005/10/25 09:52:43 zolty Exp $ # # Insertar los nuevos cambios al principio de esta lista de cambios. # +2005-10-25 Toni García <zo...@ir...> 1.0.alpha45 + * ISSUPORT dinámico + 2005-10-17 Toni García <zo...@ir...> 1.0.alpha44 * Sincronización Undernet Index: ircd-ircdev/RELEASE.NOTES diff -u ircd-ircdev/RELEASE.NOTES:1.3 ircd-ircdev/RELEASE.NOTES:1.4 --- ircd-ircdev/RELEASE.NOTES:1.3 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/RELEASE.NOTES Tue Oct 25 02:52:43 2005 @@ -1,5 +1,5 @@ Release notes for IRC-Dev IRCD version 1.0 -Last updated: 23 Apr 2005 +Last updated: 25 October 2005 Written by Toni Garcia <zo...@ir...> Based on earlier documents by Kev <kl...@mi...>, Braden <db...@ya...> and Michael Poole <md...@tr...> @@ -11,6 +11,16 @@ IPv6 support and oplevels) are not supported by old ircds. +Semantic Changes (TAKE NOTE): + +Channel keys and passwords (see the "oplevels" enhancement below) +listed in a JOIN are now only checked against the corresponding +channel. In an old ircd, "JOIN #a,#b key" would attempt to use "key" +as the key for both #a and #b. IRC-Dev IRCD will only attempt to use +it as the key for #a. IRC-Dev IRCD's behavior matches that documented +in RFC 1459. + + Enhancements: The configuration file format has changed to one that is easier to @@ -78,6 +88,11 @@ The server will no longer kick "net riders" in keyed (+k) channels if both sides of the net join have the same key. +IP masks (as used in bans, G-lines, etc) are now parsed in a more +forgiving manner. 127.0.0.0/8, 127.* and 127/8 are all accepted and +mean the same thing. Ambiguous expressions like 127/8 are interpreted +as IPv4 masks; to interpret it as an IPv6 mask, use 127:/8. + GLINE has been extended to allow IRC operators to issue global G-lines; see doc/en/gline.txt for more information about how to use this feature. @@ -175,6 +190,11 @@ when you join using those keys. Part of this channel protection is that you cannot be deopped in channel by someone who you opped. +IP masks (as used in bans, G-lines, etc) are now parsed in a more +forgiving manner. 127.0.0.0/8, 127.* and 127/8 are all accepted and +mean the same thing. Ambiguous expressions like 127/8 are interpreted +as IPv4 masks; to interpret it as an IPv6 mask, use 127:/8. + Configuration Changes: Index: ircd-ircdev/RELEASE.NOTES.es diff -u ircd-ircdev/RELEASE.NOTES.es:1.3 ircd-ircdev/RELEASE.NOTES.es:1.4 --- ircd-ircdev/RELEASE.NOTES.es:1.3 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/RELEASE.NOTES.es Tue Oct 25 02:52:43 2005 @@ -1,5 +1,5 @@ Notas de lanzamiento para IRCD de IRC-Dev version 1.0 -Ultima actualización: 23 Abril 2005 +Ultima actualización: 25 Octubre 2005 Escrito y traducido por Toni Garcia <zo...@ir...> Basado en anteriores documentos por Kev <kl...@mi...>, Braden <db...@ya...> y Michael Poole <md...@tr...> @@ -12,6 +12,17 @@ IPv6 y oplevels) no están soportadas por ircds viejos. +Cambios semántico (NOTA): + +Las contraseñas de canales (vease la implementación de "oplevels" +abajo) eumeradas en un JOIN ahora se comprueban solamente al canal +correspondiente. En un ircd viejo, "JOIN #a,#b key" procuraría +utilizar la "key" como la contraseña para ambos canales #a y #b. +El IRCD de IRC-Dev procurará utilizar solamente para la contraseña +del canal #a. El comportamiento del IRCD de IRC-Dev está documentado +en el RFC 1459. + + Implementaciones: El formato del archivo de la configuración ha cambiado a uno que es @@ -83,6 +94,11 @@ El servidor no puede kickear por "net riders" en los canales con llave (+k) si ambos lados de la red al unirse tienen la misma llave. +Las máscaras de IP (utilizadas en bans, G-lines, etc) ahora se analizan +de una manera más extensa. 127.0.0.0/8, 127.* y 127/8 son todos aceptadas +y significan la misma cosa. Expresiones ambiguas como 127/8 son interpretadas +como máscaras de IPv4, para interpretarlo como una máscara IPv6 use 127:/8. + GLINE se ha ampliado para permitir a los Operadores de IRC (IRCops) publicar G-lines globales; vea doc/es/gline.txt para más información sobre cómo utilizar esta característica. Index: ircd-ircdev/doc/en/features.txt diff -u ircd-ircdev/doc/en/features.txt:1.3 ircd-ircdev/doc/en/features.txt:1.4 --- ircd-ircdev/doc/en/features.txt:1.3 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/doc/en/features.txt Tue Oct 25 02:52:43 2005 @@ -1,4 +1,4 @@ -$Id: features.txt,v 1.3 2005/09/01 11:25:42 zolty Exp $ +$Id: features.txt,v 1.4 2005/10/25 09:52:43 zolty Exp $ Many of the old compile-time options are now configured through the server configuration file, ircd.conf. This file is intended to @@ -351,6 +351,12 @@ larger than the CHANNELLEN #define. Like the NICKLEN feature, this is intended to ease changes in channel name length across a network. +USER_GLIST +* Type: boolean +* Default: FALSE + +Optionally removes the ability to list glines by users +(ie /GLINE id...@ho..., shows reason, expiry time etc) AVBANLEN * Type: integer Index: ircd-ircdev/include/channel.h diff -u ircd-ircdev/include/channel.h:1.14 ircd-ircdev/include/channel.h:1.15 --- ircd-ircdev/include/channel.h:1.14 Mon Oct 17 07:02:32 2005 +++ ircd-ircdev/include/channel.h Tue Oct 25 02:52:43 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Channel management and maintenance. - * @version $Id: channel.h,v 1.14 2005/10/17 14:02:32 zolty Exp $ + * @version $Id: channel.h,v 1.15 2005/10/25 09:52:43 zolty Exp $ */ #ifndef INCLUDED_channel_h #define INCLUDED_channel_h @@ -376,6 +376,9 @@ char *mbma_string; /**< A string */ struct Client *mbma_client; /**< A client */ } mbm_arg; /**< The mode argument */ +#if defined(UNDERNET) + unsigned short mbm_oplevel; /**< Oplevel for a bounce */ +#endif } mb_modeargs[MAXMODEPARAMS]; /**< A mode w/args */ }; @@ -401,6 +404,9 @@ #define MB_UINT(mb, i) ((mb)->mb_modeargs[(i)].mbm_arg.mbma_uint) #define MB_STRING(mb, i) ((mb)->mb_modeargs[(i)].mbm_arg.mbma_string) #define MB_CLIENT(mb, i) ((mb)->mb_modeargs[(i)].mbm_arg.mbma_client) +#if defined(UNDERNET) +#define MB_OPLEVEL(mb, i) ((mb)->mb_modeargs[(i)].mbm_oplevel) +#endif /** A buffer represeting a list of joins to send */ struct JoinBuf { @@ -486,7 +492,7 @@ extern void modebuf_mode_string(struct ModeBuf *mbuf, unsigned int mode, char *string, int free); extern void modebuf_mode_client(struct ModeBuf *mbuf, unsigned int mode, - struct Client *client); + struct Client *client, int oplevel); extern int modebuf_flush(struct ModeBuf *mbuf); extern void modebuf_extract(struct ModeBuf *mbuf, char *buf); Index: ircd-ircdev/include/class.h diff -u ircd-ircdev/include/class.h:1.7 ircd-ircdev/include/class.h:1.8 --- ircd-ircdev/include/class.h:1.7 Wed Jun 22 00:54:29 2005 +++ ircd-ircdev/include/class.h Tue Oct 25 02:52:43 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Declarations and interfaces for handling connection classes. - * @version $Id: class.h,v 1.7 2005/06/22 07:54:29 zolty Exp $ + * @version $Id: class.h,v 1.8 2005/10/25 09:52:43 zolty Exp $ */ #ifndef INCLUDED_class_h #define INCLUDED_class_h @@ -89,6 +89,8 @@ #define ConfLinks(x) ((x)->conn_class->ref_count) /** Get default usermode for ConfItem \a x. */ #define ConfUmode(x) ((x)->conn_class->default_umode) +/** Find a valid configuration class by name. */ +#define find_class(name) do_find_class((name), 0) /* * Proto types @@ -100,7 +102,7 @@ extern void class_mark_delete(void); extern void class_delete_marked(void); -extern struct ConnectionClass *find_class(const char *name); +extern struct ConnectionClass *do_find_class(const char *name, int extras); extern struct ConnectionClass *make_class(void); extern void free_class(struct ConnectionClass * tmp); extern char *get_conf_class(const struct ConfItem *aconf); Index: ircd-ircdev/include/ircd_features.h diff -u ircd-ircdev/include/ircd_features.h:1.13 ircd-ircdev/include/ircd_features.h:1.14 --- ircd-ircdev/include/ircd_features.h:1.13 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/include/ircd_features.h Tue Oct 25 02:52:43 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Public interfaces and declarations for dealing with configurable features. - * @version $Id: ircd_features.h,v 1.13 2005/09/01 11:25:42 zolty Exp $ + * @version $Id: ircd_features.h,v 1.14 2005/10/25 09:52:43 zolty Exp $ */ #ifndef INCLUDED_features_h #define INCLUDED_features_h @@ -58,11 +58,10 @@ FEAT_HIDDEN_HOST, FEAT_HIDDEN_IP, FEAT_CONNEXIT_NOTICES, -#if defined(UNDERNET) FEAT_OPLEVELS, -#endif FEAT_LOCAL_CHANNELS, FEAT_TOPIC_BURST, + FEAT_USER_GLIST, /* features that probably should not be touched */ FEAT_KILLCHASETIMELIMIT, Index: ircd-ircdev/include/patchlevel.h diff -u ircd-ircdev/include/patchlevel.h:1.45 ircd-ircdev/include/patchlevel.h:1.46 --- ircd-ircdev/include/patchlevel.h:1.45 Mon Oct 17 07:02:32 2005 +++ ircd-ircdev/include/patchlevel.h Tue Oct 25 02:52:43 2005 @@ -17,12 +17,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: patchlevel.h,v 1.45 2005/10/17 14:02:32 zolty Exp $ + * $Id: patchlevel.h,v 1.46 2005/10/25 09:52:43 zolty Exp $ * */ -#define PATCHLEVEL ".alpha44" +#define PATCHLEVEL "45" -#define RELEASE "1.0" +#define RELEASE "1.0.alpha" /* * Deliberate empty lines Index: ircd-ircdev/include/s_stats.h diff -u ircd-ircdev/include/s_stats.h:1.4 ircd-ircdev/include/s_stats.h:1.5 --- ircd-ircdev/include/s_stats.h:1.4 Mon Jan 10 04:22:00 2005 +++ ircd-ircdev/include/s_stats.h Tue Oct 25 02:52:43 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Report configuration lines and other statistics from this server. - * @version $Id: s_stats.h,v 1.4 2005/01/10 12:22:00 zolty Exp $ + * @version $Id: s_stats.h,v 1.5 2005/10/25 09:52:43 zolty Exp $ */ #ifndef INCLUDED_s_stats_h #define INCLUDED_s_stats_h @@ -55,8 +55,9 @@ #define STAT_FLAG_OPERONLY 0x01 /**< Oper-only stat */ #define STAT_FLAG_OPERFEAT 0x02 /**< Oper-only if the feature is true */ -#define STAT_FLAG_CASESENS 0x04 /**< Flag is case-sensitive */ -#define STAT_FLAG_VARPARAM 0x08 /**< May have an extra parameter */ +#define STAT_FLAG_LOCONLY 0x04 /**< Local user only */ +#define STAT_FLAG_CASESENS 0x08 /**< Flag is case-sensitive */ +#define STAT_FLAG_VARPARAM 0x10 /**< May have an extra parameter */ extern void stats_init(void); const struct StatDesc *stats_find(const char *name_or_char); Index: ircd-ircdev/include/s_user.h diff -u ircd-ircdev/include/s_user.h:1.8 ircd-ircdev/include/s_user.h:1.9 --- ircd-ircdev/include/s_user.h:1.8 Sun Jul 3 11:44:51 2005 +++ ircd-ircdev/include/s_user.h Tue Oct 25 02:52:43 2005 @@ -21,7 +21,7 @@ */ /** @file s_user.h * @brief Miscellaneous user-related helper functions. - * @version $Id: s_user.h,v 1.8 2005/07/03 18:44:51 zolty Exp $ + * @version $Id: s_user.h,v 1.9 2005/10/25 09:52:43 zolty Exp $ */ #ifndef INCLUDED_s_user_h #define INCLUDED_s_user_h @@ -146,6 +146,12 @@ extern void add_target(struct Client *sptr, void *target); extern unsigned int umode_make_snomask(unsigned int oldmask, char *arg, int what); + +extern void init_isupport(void); +extern void add_isupport(const char *name); +extern void add_isupport_i(const char *name, int value); +extern void add_isupport_s(const char *name, const char *value); +extern void del_isupport(const char *name); extern int send_supported(struct Client *cptr); #define NAMES_ALL 1 /**< List all users in channel */ Index: ircd-ircdev/include/supported.h diff -u ircd-ircdev/include/supported.h:1.9 ircd-ircdev/include/supported.h:removed --- ircd-ircdev/include/supported.h:1.9 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/include/supported.h Tue Oct 25 02:52:53 2005 @@ -1,90 +0,0 @@ -/* - * IRC-Dev IRCD - An advanced and innovative IRC Daemon, include/supported.h - * - * Copyright (C) 2002-2005 IRC-Dev Development Team <de...@ir...> - * Copyright (C) 1999 Perry Lorier - * - * 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: supported.h,v 1.9 2005/09/01 11:25:42 zolty Exp $ - * - */ -#ifndef INCLUDED_supported_h -#define INCLUDED_supported_h - -/* - * 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 - * to frequently and s_user.h is included by basically everyone. - */ -#include "channel.h" -#include "ircd_defs.h" - -/* - * 'Features' supported by this ircd - */ -#define FEATURES1 \ - "AWAYLEN=%i" \ - " MAXCHANNELLEN=%i" \ - " CHANNELLEN=%i" \ - " MAXNICKLEN=%i" \ - " NICKLEN=%i" \ - " TOPICLEN=%i" - -#define FEATURES2 \ - "CHANMODES=%s" \ - " CHANTYPES=%s" \ - " PREFIX=%s" \ - " STATUSMSG=%s" \ - -#define FEATURES3 \ - "MAXCHANNELS=%i" \ - " MAXBANS=%i" \ - " MAXTARGETS=%i" \ - " MODES=%i" \ - " SILENCE=%i" \ - " WATCH=%i" - -#define FEATURES4 \ - "CNOTICE" \ - " CPRIVMSG" \ - " MAP" \ - " USERIP" \ - " WALLCHOPS" \ - " WALLVOICES" \ - " WHOX" - -#define FEATURES5 "CHARMAPPING=%s" \ - " NETWORK=%s" \ - " FNC" \ - " SAFELIST" - - -#define FEATURESVALUES1 AWAYLEN, CHANNELLEN, feature_int(FEAT_CHANNELLEN), NICKLEN, feature_int(FEAT_NICKLEN), TOPICLEN - -#if defined(DDB) || defined(SERVICES) -#define FEATURESVALUES2 "b,k,l,imnpstrRDd", feature_bool(FEAT_LOCAL_CHANNELS) ? "#&" : "#", "(qov).@+", ".@+" -#else -#define FEATURESVALUES2 "b,k,l,imnpstRDd", feature_bool(FEAT_LOCAL_CHANNELS) ? "#&" : "#", "(ov)@+", "@+" -#endif - -#define FEATURESVALUES3 feature_int(FEAT_MAXCHANNELSPERUSER), feature_int(FEAT_MAXBANS), \ - MAXTARGETS, MAXMODEPARAMS, feature_int(FEAT_MAXSILES), \ - feature_int(FEAT_MAXWATCHS) - -#define FEATURESVALUES5 "rfc1459", feature_str(FEAT_NETWORK) - - -#endif /* INCLUDED_supported_h */ Index: ircd-ircdev/include/whocmds.h diff -u ircd-ircdev/include/whocmds.h:1.5 ircd-ircdev/include/whocmds.h:removed --- ircd-ircdev/include/whocmds.h:1.5 Mon Jan 10 04:22:00 2005 +++ ircd-ircdev/include/whocmds.h Tue Oct 25 02:52:53 2005 @@ -1,114 +0,0 @@ -/* - * IRC-Dev IRCD - An advanced and innovative IRC Daemon, include/whocmds.h - * - * Copyright (C) 2002-2005 IRC-Dev Development Team <de...@ir...> - * Copyright (C) 1990 Jarkko Oikarinen - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 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 - * - */ -/** @file whocmds.h - * @brief Support functions for /WHO-like commands. - * @version $Id: whocmds.h,v 1.5 2005/01/10 12:22:00 zolty Exp $ - */ -#ifndef INCLUDED_whocmds_h -#define INCLUDED_whocmds_h - -struct Client; -struct Channel; - - -/* - * m_who() - * m_who with support routines rewritten by Nemesi, August 1997 - * - Alghoritm have been flattened (no more recursive) - * - Several bug fixes - * - Strong performance improvement - * - Added possibility to have specific fields in the output - * See readme.who for further details. - */ - -/* Macros used only in here by m_who and its support functions */ - -#define WHOSELECT_OPER 1 /**< Flag for /WHO: Show IRC operators. */ -#define WHOSELECT_EXTRA 2 /**< Flag for /WHO: Pull rank to see users. */ - -#define WHO_FIELD_QTY 1 /**< Display query type. */ -#define WHO_FIELD_CHA 2 /**< Show common channel name. */ -#define WHO_FIELD_UID 4 /**< Show username. */ -#define WHO_FIELD_NIP 8 /**< Show IP address. */ -#define WHO_FIELD_HOS 16 /**< Show hostname. */ -#define WHO_FIELD_SER 32 /**< Show server. */ -#define WHO_FIELD_NIC 64 /**< Show nickname. */ -#define WHO_FIELD_FLA 128 /**< Show flags (away, oper, chanop, etc). */ -#define WHO_FIELD_DIS 256 /**< Show hop count (distance). */ -#define WHO_FIELD_REN 512 /**< Show realname (info). */ -#define WHO_FIELD_IDL 1024 /**< Show idle time. */ -#if defined(UNDERNET) -#define WHO_FIELD_ACC 2048 /**< Show account name. */ -#endif - -/** Default fields for /WHO */ -#define WHO_FIELD_DEF ( WHO_FIELD_NIC | WHO_FIELD_UID | WHO_FIELD_HOS | WHO_FIELD_SER ) - -/** Is \a ac plainly visible to \a s? - * @param[in] s Client trying to see \a ac. - * @param[in] ac Client being looked at. - */ -#define IS_VISIBLE_USER(s,ac) ((s==ac) || (!IsInvisible(ac))) - -/** Can \a s see \a ac by using the flags in \a b? - * @param[in] s Client trying to see \a ac. - * @param[in] ac Client being looked at. - * @param[in] b Bitset of extra flags (options: WHOSELECT_EXTRA). - */ -#define SEE_LUSER(s, ac, b) (IS_VISIBLE_USER(s, ac) || \ - ((b & WHOSELECT_EXTRA) && MyConnect(ac) && \ - (HasPriv((s), PRIV_SHOW_INVIS) || \ - HasPriv((s), PRIV_SHOW_ALL_INVIS)))) - -/** Can \a s see \a ac by using the flags in \a b? - * @param[in] s Client trying to see \a ac. - * @param[in] ac Client being looked at. - * @param[in] b Bitset of extra flags (options: WHOSELECT_EXTRA). - */ -#define SEE_USER(s, ac, b) (SEE_LUSER(s, ac, b) || \ - ((b & WHOSELECT_EXTRA) && \ - HasPriv((s), PRIV_SHOW_ALL_INVIS))) - -/** Should we show more clients to \a sptr? - * @param[in] sptr Client listing other users. - * @param[in,out] counter Default count for clients. - */ -#define SHOW_MORE(sptr, counter) (HasPriv(sptr, PRIV_UNLIMIT_QUERY) || (!(counter-- < 0)) ) - -/** Can \a s see \a chptr? - * @param[in] s Client trying to see \a chptr. - * @param[in] chptr Channel being looked at. - * @param[in] b Bitset of extra flags (options: WHOSELECT_EXTRA). - */ -#define SEE_CHANNEL(s, chptr, b) (!SecretChannel(chptr) || ((b & WHOSELECT_EXTRA) && HasPriv((s), PRIV_SEE_CHAN))) - -/** Maximum number of lines to send in response to a /WHOIS. */ -#define MAX_WHOIS_LINES 50 - -/* - * Prototypes - */ -extern void do_who(struct Client* sptr, struct Client* acptr, struct Channel* repchan, - int fields, char* qrt); -extern int count_users(char* mask); - -#endif /* INCLUDED_whocmds_h */ Index: ircd-ircdev/ircd/Makefile.in diff -u ircd-ircdev/ircd/Makefile.in:1.28 ircd-ircdev/ircd/Makefile.in:1.29 --- ircd-ircdev/ircd/Makefile.in:1.28 Mon Oct 17 07:02:32 2005 +++ ircd-ircdev/ircd/Makefile.in Tue Oct 25 02:52:43 2005 @@ -18,7 +18,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA -# $Id: Makefile.in,v 1.28 2005/10/17 14:02:32 zolty Exp $ +# $Id: Makefile.in,v 1.29 2005/10/25 09:52:43 zolty Exp $ #### Start of system configuration section. #### @@ -236,7 +236,6 @@ uping.c \ userload.c \ watch.c \ - whocmds.c \ whowas.c \ y.tab.c @@ -403,32 +402,29 @@ # DO NOT DELETE THIS LINE (or the blank line after it) -- make depend depends on them. -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ ../include/capab.h ../include/ircd.h ../include/struct.h \ - ../include/match.h ../include/msg.h ../include/numnicks.h \ - ../include/ircd_alloc.h ../include/ircd_events.h \ - ../include/ircd_features.h ../include/ircd_log.h ../include/s_debug.h \ - ../include/s_user.h ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" + ../include/match.h ../include/msg.h ../include/ircd_alloc.h \ + ../include/ircd_events.h ../include/ircd_features.h \ + ../include/ircd_log.h ../include/ircd_string.h ../include/ircd_chattr.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/res.h ../include/client.h \ ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ - ../include/ircd_handler.h ../include/capab.h \ - ../include/destruct_event.h ../include/hash.h ../include/ircd.h \ - ../include/struct.h ../include/ircd_alloc.h ../include/ircd_chattr.h \ - ../include/ircd_defs.h ../include/ircd_features.h ../include/ircd_log.h \ + ../include/ircd_handler.h ../include/capab.h ../include/ddb.h \ + ../config.h ../include/client.h ../include/destruct_event.h \ + ../include/hash.h ../include/ircd.h ../include/struct.h \ + ../include/ircd_alloc.h ../include/ircd_chattr.h ../include/ircd_defs.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/msgq.h ../include/numeric.h \ ../include/numnicks.h ../include/querycmds.h ../include/ircd_features.h \ - ../include/s_bsd.h ../include/s_conf.h ../include/client.h \ - ../include/s_debug.h ../include/s_misc.h ../include/s_user.h \ - ../include/send.h ../include/struct.h ../include/sys.h \ - ../include/whowas.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" + ../include/s_bsd.h ../include/s_conf.h ../include/s_debug.h \ + ../include/s_misc.h ../include/s_user.h ../include/send.h \ + ../include/struct.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/res.h \ @@ -437,7 +433,6 @@ ../include/ircd_log.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 -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h ../include/capab.h \ @@ -446,7 +441,6 @@ ../include/ircd_reply.h ../include/list.h ../include/msgq.h \ ../include/numeric.h ../include/s_conf.h ../include/s_debug.h \ ../include/send.h ../include/struct.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -454,20 +448,16 @@ ../include/ircd_alloc.h ../include/ircd_chattr.h \ ../include/ircd_string.h ../include/match.h ../include/s_bsd.h \ ../include/s_debug.h ../include/struct.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" dbuf.o: dbuf.c ../config.h ../include/dbuf.h ../include/ircd_alloc.h \ ../include/ircd_chattr.h ../include/ircd_features.h \ ../include/ircd_log.h ../include/send.h ../include/sys.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" destruct_event.o: destruct_event.c ../config.h ../include/channel.h \ ../include/ircd_defs.h ../include/res.h ../include/s_debug.h \ ../include/ircd_alloc.h ../include/ircd.h ../include/struct.h \ ../include/ircd_events.h ../include/ircd_log.h ../include/send.h \ ../include/msg.h ../include/ircd_handler.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" fileio.o: fileio.c ../config.h ../include/fileio.h \ ../include/ircd_alloc.h ../include/ircd_log.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" gline.o: gline.c ../config.h ../include/gline.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 \ @@ -478,18 +468,17 @@ ../include/ircd_chattr.h ../include/match.h ../include/numeric.h \ ../include/s_bsd.h ../include/s_debug.h ../include/s_misc.h \ ../include/s_stats.h ../include/send.h ../include/struct.h \ - ../include/msg.h ../include/numnicks.h ../include/whocmds.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" + ../include/msg.h ../include/numnicks.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/res.h \ ../include/capab.h ../include/channel.h ../include/ddb.h ../config.h \ ../include/client.h ../include/ircd_alloc.h ../include/ircd_chattr.h \ ../include/ircd_log.h ../include/ircd_reply.h ../include/ircd_string.h \ - ../include/ircd.h ../include/struct.h ../include/msg.h \ - ../include/numeric.h ../include/random.h ../include/send.h \ - ../include/struct.h ../include/sys.h ../include/watch.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" + ../include/ircd.h ../include/struct.h ../include/match.h \ + ../include/msg.h ../include/numeric.h ../include/random.h \ + ../include/send.h ../include/struct.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 \ @@ -508,11 +497,9 @@ ../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 -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" ircd_alloc.o: ircd_alloc.c ../config.h ../include/ircd_alloc.h \ ../include/ircd_log.h ../include/ircd_string.h ../include/ircd_chattr.h \ ../include/s_debug.h ../include/ircd_defs.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" ircd_auth.o: ircd_auth.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/res.h \ @@ -524,19 +511,16 @@ ../include/msg.h ../include/msgq.h ../include/res.h ../include/s_bsd.h \ ../include/s_debug.h ../include/s_misc.h ../include/s_user.h \ ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" ircd_crypt.o: ircd_crypt.c ../config.h ../include/ircd_crypt.h \ ../include/ircd_alloc.h ../include/ircd_features.h \ ../include/ircd_log.h ../include/ircd_string.h ../include/ircd_chattr.h \ ../include/s_debug.h ../include/ircd_defs.h \ ../include/ircd_crypt_native.h ../include/ircd_crypt_plain.h \ ../include/ircd_crypt_smd5.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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 -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" ircd_features.o: ircd_features.c ../config.h ../include/ircd_features.h \ ../include/channel.h ../include/ircd_defs.h ../include/res.h \ ../include/class.h ../include/client.h ../include/dbuf.h \ @@ -547,9 +531,9 @@ ../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/struct.h ../include/sys.h ../include/whowas.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" + ../include/s_misc.h ../include/s_stats.h ../include/s_user.h \ + ../include/send.h ../include/struct.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 \ @@ -558,7 +542,6 @@ ../include/ircd_string.h ../include/ircd_chattr.h ../include/ircd.h \ ../include/struct.h ../include/numeric.h ../include/s_debug.h \ ../include/send.h ../include/struct.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" ircd_relay.o: ircd_relay.c ../config.h ../include/ircd_relay.h \ ../include/channel.h ../include/ircd_defs.h ../include/res.h \ ../include/client.h ../include/dbuf.h ../include/msgq.h \ @@ -569,7 +552,6 @@ ../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 -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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 \ @@ -578,7 +560,6 @@ ../include/msg.h ../include/msgq.h ../include/numeric.h \ ../include/s_conf.h ../include/client.h ../include/s_debug.h \ ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" ircd_res.o: ircd_res.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/res.h \ @@ -590,31 +571,25 @@ ../include/s_bsd.h ../include/s_debug.h ../include/s_stats.h \ ../include/ircd_features.h ../include/send.h ../include/sys.h \ ../include/res.h ../include/ircd_reslib.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" ircd_reslib.o: ircd_reslib.c ../include/ircd.h ../include/struct.h \ ../include/ircd_defs.h ../include/res.h ../config.h \ ../include/ircd_reslib.h ../include/ircd_defs.h ../include/fileio.h \ ../include/ircd_string.h ../include/ircd_chattr.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" ircd_signal.o: ircd_signal.c ../config.h ../include/ircd.h \ ../include/struct.h ../include/ircd_defs.h ../include/ircd_events.h \ ../include/ircd_log.h ../include/ircd_signal.h ../include/s_conf.h \ ../include/client.h ../include/dbuf.h ../include/msgq.h \ ../include/ircd_handler.h ../include/res.h ../include/capab.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ ../include/capab.h ../include/channel.h ../include/ircd_log.h \ ../include/ircd_snprintf.h ../include/struct.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" ircd_string.o: ircd_string.c ../config.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/ircd_defs.h \ ../include/ircd_chattr.h ../include/ircd_log.h ../include/res.h \ chattr.tab.c -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" ircd_tea.o: ircd_tea.c ../config.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -625,11 +600,9 @@ ../include/numeric.h ../include/numnicks.h ../include/s_bsd.h \ ../include/s_misc.h ../include/send.h ../include/struct.h \ ../include/sys.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" lex.yy.o: lex.yy.c ../config.h ../include/ircd.h ../include/struct.h \ ../include/ircd_defs.h ../include/ircd_alloc.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/s_debug.h y.tab.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" list.o: list.c ../config.h ../include/list.h ../include/client.h \ ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \ ../include/ircd_events.h ../include/ircd_handler.h ../include/res.h \ @@ -641,7 +614,6 @@ ../include/s_bsd.h ../include/s_conf.h ../include/client.h \ ../include/s_debug.h ../include/s_misc.h ../include/s_user.h \ ../include/send.h ../include/struct.h ../include/whowas.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" listener.o: listener.c ../config.h ../include/listener.h \ ../include/ircd_defs.h ../include/ircd_events.h ../include/res.h \ ../include/client.h ../include/dbuf.h ../include/msgq.h \ @@ -654,7 +626,6 @@ ../include/s_bsd.h ../include/s_conf.h ../include/client.h \ ../include/s_misc.h ../include/s_stats.h ../include/send.h \ ../include/sys.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -663,7 +634,6 @@ ../include/ircd_reply.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/s_conf.h ../include/client.h \ ../include/s_user.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h ../include/capab.h \ @@ -672,7 +642,6 @@ ../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 -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h ../include/capab.h \ @@ -680,7 +649,6 @@ ../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_user.h ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" m_burst.o: m_burst.c ../config.h ../include/channel.h \ ../include/ircd_defs.h ../include/res.h ../include/client.h \ ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ @@ -692,7 +660,6 @@ ../include/match.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/s_conf.h ../include/client.h \ ../include/s_misc.h ../include/send.h ../include/struct.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" m_cap.o: m_cap.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/res.h ../include/capab.h \ @@ -700,7 +667,6 @@ ../include/ircd_log.h ../include/ircd_reply.h \ ../include/ircd_snprintf.h ../include/ircd_string.h ../include/msg.h \ ../include/numeric.h ../include/send.h ../include/s_user.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -711,14 +677,12 @@ ../include/ircd_chattr.h ../include/list.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/s_conf.h \ ../include/client.h ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ ../include/capab.h ../include/ircd.h ../include/struct.h \ ../include/ircd_log.h ../include/ircd_reply.h ../include/numeric.h \ ../include/s_bsd.h ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -729,13 +693,11 @@ ../include/msg.h ../include/numeric.h ../include/numnicks.h \ ../include/s_bsd.h ../include/s_conf.h ../include/client.h \ ../include/s_user.h ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ ../include/capab.h ../include/ircd_log.h ../include/ircd_reply.h \ ../include/ircd_string.h ../include/ircd_chattr.h ../include/s_user.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" m_create.o: m_create.c ../config.h ../include/channel.h \ ../include/ircd_defs.h ../include/res.h ../include/client.h \ ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ @@ -745,15 +707,12 @@ ../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 -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ ../include/capab.h ../include/ircd.h ../include/struct.h \ ../include/ircd_log.h ../include/ircd_reply.h ../include/numeric.h \ - ../include/numnicks.h ../include/send.h ../include/supported.h \ - ../include/channel.h ../include/version.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" + ../include/numnicks.h ../include/send.h ../include/version.h m_destruct.o: m_destruct.c ../config.h ../include/channel.h \ ../include/ircd_defs.h ../include/res.h ../include/client.h \ ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ @@ -762,7 +721,6 @@ ../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/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -771,7 +729,6 @@ ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/s_bsd.h \ ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h ../include/capab.h \ @@ -779,7 +736,6 @@ ../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 -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" m_endburst.o: m_endburst.c ../config.h ../include/channel.h \ ../include/ircd_defs.h ../include/res.h ../include/client.h \ ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ @@ -788,7 +744,6 @@ ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -797,7 +752,6 @@ ../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 -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h ../include/capab.h \ @@ -806,7 +760,6 @@ ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/numeric.h ../include/numnicks.h \ ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -816,7 +769,6 @@ ../include/ircd_chattr.h ../include/match.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/s_conf.h \ ../include/client.h ../include/s_misc.h ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h ../include/capab.h \ @@ -824,7 +776,6 @@ ../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/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h ../include/capab.h \ @@ -834,7 +785,6 @@ ../include/numnicks.h ../include/s_misc.h ../include/s_user.h \ ../include/s_conf.h ../include/client.h ../include/send.h \ ../include/version.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" m_invite.o: m_invite.c ../config.h ../include/channel.h \ ../include/ircd_defs.h ../include/res.h ../include/client.h \ ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ @@ -844,7 +794,6 @@ ../include/ircd_chattr.h ../include/list.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/s_user.h \ ../include/send.h ../include/struct.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h ../include/capab.h \ @@ -852,17 +801,16 @@ ../include/ircd_log.h ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/msgq.h ../include/numeric.h \ ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" m_join.o: m_join.c ../config.h ../include/channel.h \ ../include/ircd_defs.h ../include/res.h ../include/client.h \ ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ - ../include/ircd_handler.h ../include/capab.h ../include/gline.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/msg.h ../include/numeric.h ../include/numnicks.h \ - ../include/s_debug.h ../include/s_user.h ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" + ../include/ircd_handler.h ../include/capab.h ../include/ddb.h \ + ../config.h ../include/client.h ../include/gline.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/msg.h \ + ../include/numeric.h ../include/numnicks.h ../include/s_debug.h \ + ../include/s_user.h ../include/send.h ../include/sys.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/res.h ../include/capab.h \ @@ -872,7 +820,6 @@ ../include/ircd_chattr.h ../include/match.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/s_conf.h \ ../include/client.h ../include/s_misc.h ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" m_kick.o: m_kick.c ../config.h ../include/channel.h \ ../include/ircd_defs.h ../include/res.h ../include/client.h \ ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ @@ -881,7 +828,6 @@ ../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/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h ../include/capab.h \ @@ -891,7 +837,6 @@ ../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 -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -901,7 +846,6 @@ ../include/ircd_chattr.h ../include/match.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/s_user.h \ ../include/send.h ../include/struct.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" m_list.o: m_list.c ../config.h ../include/channel.h \ ../include/ircd_defs.h ../include/res.h ../include/client.h \ ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ @@ -911,7 +855,6 @@ ../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 -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -922,7 +865,6 @@ ../include/numnicks.h ../include/querycmds.h ../include/ircd_features.h \ ../include/s_misc.h ../include/s_serv.h ../include/s_user.h \ ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h ../include/capab.h \ @@ -933,7 +875,6 @@ ../include/match.h ../include/msg.h ../include/numeric.h \ ../include/s_user.h ../include/s_serv.h ../include/send.h \ ../include/querycmds.h ../include/ircd_features.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" m_mode.o: m_mode.c ../config.h ../include/handlers.h ../include/channel.h \ ../include/ircd_defs.h ../include/res.h ../include/client.h \ ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ @@ -943,7 +884,6 @@ ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/s_conf.h ../include/client.h \ ../include/s_debug.h ../include/s_user.h ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h ../include/capab.h \ @@ -953,7 +893,6 @@ ../include/msg.h ../include/numeric.h ../include/numnicks.h \ ../include/s_conf.h ../include/client.h ../include/class.h \ ../include/s_user.h ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" m_names.o: m_names.c ../config.h ../include/channel.h \ ../include/ircd_defs.h ../include/res.h ../include/client.h \ ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ @@ -962,7 +901,6 @@ ../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 -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -973,7 +911,6 @@ ../include/msg.h ../include/numeric.h ../include/numnicks.h \ ../include/s_debug.h ../include/s_misc.h ../include/s_user.h \ ../include/send.h ../include/sys.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -981,7 +918,6 @@ ../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 -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" m_oper.o: m_oper.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/res.h ../include/capab.h \ @@ -993,7 +929,6 @@ ../include/numnicks.h ../include/querycmds.h ../include/ircd_features.h \ ../include/s_conf.h ../include/client.h ../include/s_debug.h \ ../include/s_user.h ../include/s_misc.h ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -1003,7 +938,6 @@ ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/send.h ../include/s_conf.h \ ../include/client.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" m_part.o: m_part.c ../config.h ../include/channel.h \ ../include/ircd_defs.h ../include/res.h ../include/client.h \ ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ @@ -1012,13 +946,11 @@ ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/numeric.h ../include/numnicks.h \ ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h ../include/capab.h \ ../include/ircd_log.h ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h ../include/capab.h \ @@ -1027,7 +959,6 @@ ../include/struct.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/opercmds.h ../include/s_debug.h \ ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h ../include/capab.h \ @@ -1036,7 +967,6 @@ ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/opercmds.h ../include/s_user.h \ ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -1045,7 +975,6 @@ ../include/ircd_log.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 -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -1053,7 +982,6 @@ ../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/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -1061,9 +989,7 @@ ../include/ircd_log.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 -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" + ../include/s_misc.h ../include/send.h ../include/version.h m_pseudo.o: m_pseudo.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/res.h \ @@ -1074,7 +1000,6 @@ ../include/ircd_snprintf.h ../include/msg.h ../include/numeric.h \ ../include/numnicks.h ../include/s_conf.h ../include/client.h \ ../include/s_user.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" m_quit.o: m_quit.c ../config.h ../include/channel.h \ ../include/ircd_defs.h ../include/res.h ../include/client.h \ ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ @@ -1082,7 +1007,6 @@ ../include/struct.h ../include/ircd_log.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/struct.h ../include/s_misc.h \ ../include/ircd_reply.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -1090,7 +1014,6 @@ ../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/client.h ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -1099,7 +1022,6 @@ ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/numeric.h ../include/numnicks.h \ ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -1107,7 +1029,6 @@ ../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 -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -1116,7 +1037,6 @@ ../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 -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -1125,7 +1045,6 @@ ../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/opercmds.h \ ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -1138,7 +1057,6 @@ ../include/s_bsd.h ../include/s_conf.h ../include/client.h \ ../include/s_debug.h ../include/s_misc.h ../include/s_serv.h \ ../include/send.h ../include/userload.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h ../include/capab.h \ @@ -1147,7 +1065,6 @@ ../include/ircd_reply.h ../include/ircd_string.h \ ../include/ircd_chattr.h ../include/numeric.h ../include/numnicks.h \ ../include/send.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -1157,7 +1074,6 @@ ../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 ../include/struct.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" m_silence.o: m_silence.c ../config.h ../include/channel.h \ ../include/ircd_defs.h ../include/res.h ../include/client.h \ ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \ @@ -1168,7 +1084,6 @@ ../include/ircd_chattr.h ../include/list.h ../include/msg.h \ ../include/numeric.h ../include/numnicks.h ../include/s_user.h \ ../include/send.h ../include/struct.h -# 1 "/usr/home/zoltan/ircd-ircdev/ircd//" 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/res.h \ @@ -1177,7 ... [truncated message content] |
From: Toni G. <zo...@us...> - 2005-10-25 11:27:29
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-10-25 11:27:21 UTC Modified files: ircd/test/Makefile.in Log message: Prueba ---------------------- diff included ---------------------- Index: ircd-ircdev/ircd/test/Makefile.in diff -u ircd-ircdev/ircd/test/Makefile.in:1.6 ircd-ircdev/ircd/test/Makefile.in:1.7 --- ircd-ircdev/ircd/test/Makefile.in:1.6 Tue Oct 25 02:52:43 2005 +++ ircd-ircdev/ircd/test/Makefile.in Tue Oct 25 04:27:10 2005 @@ -18,13 +18,14 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA -# $Id: Makefile.in,v 1.6 2005/10/25 09:52:43 zolty Exp $ +# $Id: Makefile.in,v 1.7 2005/10/25 11:27:10 zolty Exp $ top_srcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ CPPFLAGS = -I${top_srcdir}/include -I../.. CFLAGS = -g -Wall +LDFLAGS = CC = @CC@ TESTPROGS = \ ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2005-10-26 14:55:38
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-10-26 14:55:18 UTC Modified files: ChangeLog ChangeLog.es Makefile.in include/capab.h include/dbuf.h include/hash.h include/ircd_features.h include/msg.h include/numeric.h include/patchlevel.h include/s_conf.h include/s_user.h ircd/IPcheck.c ircd/Makefile.in ircd/channel.c ircd/class.c ircd/gline.c ircd/hash.c ircd/ircd.c ircd/ircd_alloc.c ircd/ircd_auth.c ircd/ircd_crypt.c ircd/ircd_crypt_smd5.c ircd/ircd_events.c ircd/ircd_features.c ircd/ircd_log.c ircd/ircd_parser.y ircd/ircd_relay.c ircd/ircd_res.c ircd/ircd_string.c ircd/jupe.c ircd/list.c ircd/m_burst.c ircd/m_cap.c ircd/m_clearmode.c ircd/m_connect.c ircd/m_create.c ircd/m_destruct.c ircd/m_join.c ircd/m_kick.c ircd/m_kill.c ircd/m_list.c ircd/m_mode.c ircd/m_nick.c ircd/m_oper.c ircd/m_privs.c ircd/m_quit.c ircd/m_settime.c ircd/m_stats.c ircd/m_time.c ircd/m_topic.c ircd/m_trace.c ircd/m_userhost.c ircd/m_userip.c ircd/m_version.c ircd/m_who.c ircd/m_whois.c ircd/m_whowas.c ircd/match.c ircd/msgq.c ircd/numnicks.c ircd/packet.c ircd/parse.c ircd/s_auth.c ircd/s_conf.c ircd/s_debug.c ircd/s_err.c ircd/s_misc.c ircd/s_numeric.c ircd/s_serv.c ircd/s_stats.c ircd/s_user.c ircd/send.c ircd/umkpasswd.c ircd/test/ircd_chattr_t.c ircd/test/ircd_in_addr_t.c tools/Bounce/Bounce.cpp tools/Bounce/Bounce.h tools/convert-conf.py tools/hashtoy tools/untabify tools/linesync/linesync.sh Log message: Author: zoltan <zo...@ir...> Log message: 2005-10-26 Toni García <zo...@ir...> 1.0.alpha46 * Limpieza de código ---------------------- diff included ---------------------- Index: ircd-ircdev/ChangeLog diff -u ircd-ircdev/ChangeLog:1.47 ircd-ircdev/ChangeLog:1.48 --- ircd-ircdev/ChangeLog:1.47 Tue Oct 25 02:52:43 2005 +++ ircd-ircdev/ChangeLog Wed Oct 26 07:54:43 2005 @@ -1,10 +1,13 @@ # # ChangeLog for ircd-ircdev # -# $Id: ChangeLog,v 1.47 2005/10/25 09:52:43 zolty Exp $ +# $Id: ChangeLog,v 1.48 2005/10/26 14:54:43 zolty Exp $ # # Insert new changes at beginning of the change list. # +2005-10-26 Toni García <zo...@ir...> 1.0.alpha46 + * Cleanup code + 2005-10-25 Toni García <zo...@ir...> 1.0.alpha45 * Dynamic ISSUPORT Index: ircd-ircdev/ChangeLog.es diff -u ircd-ircdev/ChangeLog.es:1.47 ircd-ircdev/ChangeLog.es:1.48 --- ircd-ircdev/ChangeLog.es:1.47 Tue Oct 25 02:52:43 2005 +++ ircd-ircdev/ChangeLog.es Wed Oct 26 07:54:43 2005 @@ -1,10 +1,13 @@ # # Log de Cambios para ircd-ircdev # -# $Id: ChangeLog.es,v 1.47 2005/10/25 09:52:43 zolty Exp $ +# $Id: ChangeLog.es,v 1.48 2005/10/26 14:54:43 zolty Exp $ # # Insertar los nuevos cambios al principio de esta lista de cambios. # +2005-10-26 Toni García <zo...@ir...> 1.0.alpha46 + * Limpieza de código + 2005-10-25 Toni García <zo...@ir...> 1.0.alpha45 * ISSUPORT dinámico Index: ircd-ircdev/Makefile.in diff -u ircd-ircdev/Makefile.in:1.8 ircd-ircdev/Makefile.in:1.9 --- ircd-ircdev/Makefile.in:1.8 Tue Feb 15 08:31:49 2005 +++ ircd-ircdev/Makefile.in Wed Oct 26 07:54:43 2005 @@ -151,7 +151,7 @@ # Indent all headers and source files: indent: @test "`indent --version`" = "GNU indent 2.2.8" || \ - (echo "You need GNU indent 2.2.8; See doc/<language>/readme.indent" && exit -1); + (echo "You need GNU indent 2.2.8; See doc/<language>/indent.txt" && exit -1); VERSION_CONTROL=none indent include/*.h ircd/*.c # do a cvs update Index: ircd-ircdev/include/capab.h diff -u ircd-ircdev/include/capab.h:1.3 ircd-ircdev/include/capab.h:1.4 --- ircd-ircdev/include/capab.h:1.3 Mon Apr 11 01:44:59 2005 +++ ircd-ircdev/include/capab.h Wed Oct 26 07:54:43 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Interface and public definitions for capabilities extension - * @version $Id: capab.h,v 1.3 2005/04/11 08:44:59 zolty Exp $ + * @version $Id: capab.h,v 1.4 2005/10/26 14:54:43 zolty Exp $ */ #ifndef INCLUDED_capab_h #define INCLUDED_capab_h @@ -35,11 +35,7 @@ #define CAPFL_PROTO 0x0004 /**< Cap must be acknowledged by client */ #define CAPFL_STICKY 0x0008 /**< Cap may not be cleared once set */ - -/* XXX You can safely ignore all of these; they're only for testing purposes, - * XXX and don't result in any behavioral change. - */ -#define CAPLIST \ +#define CAPLIST \ _CAP(USERPFX, 0, "undernet.org/userpfx") /** Client capabilities */ Index: ircd-ircdev/include/dbuf.h diff -u ircd-ircdev/include/dbuf.h:1.4 ircd-ircdev/include/dbuf.h:1.5 --- ircd-ircdev/include/dbuf.h:1.4 Mon Jan 10 04:21:59 2005 +++ ircd-ircdev/include/dbuf.h Wed Oct 26 07:54:43 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Interfaces and declarations for dealing with data buffers. - * @version $Id: dbuf.h,v 1.4 2005/01/10 12:21:59 zolty Exp $ + * @version $Id: dbuf.h,v 1.5 2005/10/26 14:54:43 zolty Exp $ */ #ifndef INCLUDED_dbuf_h #define INCLUDED_dbuf_h @@ -62,4 +62,5 @@ extern unsigned int dbuf_getmsg(struct DBuf *dyn, char *buf, unsigned int length); extern void dbuf_count_memory(size_t *allocated, size_t *used); + #endif /* INCLUDED_dbuf_h */ Index: ircd-ircdev/include/hash.h diff -u ircd-ircdev/include/hash.h:1.7 ircd-ircdev/include/hash.h:1.8 --- ircd-ircdev/include/hash.h:1.7 Sat Apr 2 11:47:34 2005 +++ ircd-ircdev/include/hash.h Wed Oct 26 07:54:43 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Hash table management APIs. - * @version $Id: hash.h,v 1.7 2005/04/02 19:47:34 zolty Exp $ + * @version $Id: hash.h,v 1.8 2005/10/26 14:54:43 zolty Exp $ */ #ifndef INCLUDED_hash_h #define INCLUDED_hash_h @@ -100,7 +100,7 @@ extern int addNickJupes(const char *nicks); extern void clearNickJupes(void); extern void stats_nickjupes(struct Client* to, const struct StatDesc* sd, - char* param); + char* param); extern void list_next_channels(struct Client *cptr); #endif /* INCLUDED_hash_h */ Index: ircd-ircdev/include/ircd_features.h diff -u ircd-ircdev/include/ircd_features.h:1.14 ircd-ircdev/include/ircd_features.h:1.15 --- ircd-ircdev/include/ircd_features.h:1.14 Tue Oct 25 02:52:43 2005 +++ ircd-ircdev/include/ircd_features.h Wed Oct 26 07:54:43 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Public interfaces and declarations for dealing with configurable features. - * @version $Id: ircd_features.h,v 1.14 2005/10/25 09:52:43 zolty Exp $ + * @version $Id: ircd_features.h,v 1.15 2005/10/26 14:54:43 zolty Exp $ */ #ifndef INCLUDED_features_h #define INCLUDED_features_h @@ -67,7 +67,6 @@ FEAT_KILLCHASETIMELIMIT, FEAT_MAXCHANNELSPERUSER, FEAT_NICKLEN, - FEAT_AVBANLEN, FEAT_MAXBANS, FEAT_MAXSILES, @@ -124,7 +123,6 @@ FEAT_HIS_STATS_e, FEAT_HIS_STATS_f, FEAT_HIS_STATS_g, - FEAT_HIS_STATS_h, FEAT_HIS_STATS_i, FEAT_HIS_STATS_j, FEAT_HIS_STATS_J, Index: ircd-ircdev/include/msg.h diff -u ircd-ircdev/include/msg.h:1.13 ircd-ircdev/include/msg.h:1.14 --- ircd-ircdev/include/msg.h:1.13 Wed May 25 09:56:23 2005 +++ ircd-ircdev/include/msg.h Wed Oct 26 07:54:43 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Command and token declarations and structures. - * @version $Id: msg.h,v 1.13 2005/05/25 16:56:23 zolty Exp $ + * @version $Id: msg.h,v 1.14 2005/10/26 14:54:43 zolty Exp $ */ #ifndef INCLUDED_msg_h #define INCLUDED_msg_h @@ -343,9 +343,9 @@ #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_ASLL "ASLL" /* ASLL */ +#define TOK_ASLL "LL" +#define CMD_ASLL MSG_ASLL, TOK_ASLL #define MSG_POST "POST" /* POST */ #define TOK_POST "POST" Index: ircd-ircdev/include/numeric.h diff -u ircd-ircdev/include/numeric.h:1.15 ircd-ircdev/include/numeric.h:1.16 --- ircd-ircdev/include/numeric.h:1.15 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/include/numeric.h Wed Oct 26 07:54:43 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Declarations of numeric replies and supporting functions. - * @version $Id: numeric.h,v 1.15 2005/09/01 11:25:42 zolty Exp $ + * @version $Id: numeric.h,v 1.16 2005/10/26 14:54:43 zolty Exp $ */ #ifndef INCLUDED_numeric_h #define INCLUDED_numeric_h @@ -66,9 +66,9 @@ #define RPL_MAP 15 /* Undernet extension */ #define RPL_MAPMORE 16 /* Undernet extension */ #define RPL_MAPEND 17 /* Undernet extension */ -#define RPL_APASSWARN_SET 30 /* Undernet extension */ -#define RPL_APASSWARN_SECRET 31 /* Undernet extension */ -#define RPL_APASSWARN_CLEAR 32 /* Undernet extension */ +#define RPL_APASSWARN_SET 30 /* Undernet extension */ +#define RPL_APASSWARN_SECRET 31 /* Undernet extension */ +#define RPL_APASSWARN_CLEAR 32 /* Undernet extension */ /* RPL_YOURID 42 IRCnet extension */ /* RPL_ATTEMPTINGJUNC 50 aircd extension */ /* RPL_ATTEMPTINGREROUTE 51 aircd extension */ @@ -106,7 +106,7 @@ /* RPL_STATSBLINE 220 Numerics List: Dalnet,unreal */ #define RPL_UMODEIS 221 /* RPL_SQLINE_NICK 222 Numerics List: Dalnet */ -#define RPL_STATSJLINE 222 /* Undernet extension */ +#define RPL_STATSJLINE 222 /* Undernet extension */ /* RPL_STATSELINE 223 dalnet */ /* RPL_STATSGLINE 223 unreal */ /* RPL_STATSFLINE 224 Hybrid extension,Dalnet */ @@ -121,12 +121,12 @@ #define RPL_STATSALINE 226 /* Hybrid, Undernet */ #define RPL_STATSQLINE 228 /* Undernet extension */ -/* RPL_SERVICEINFO 231 unused */ -/* RPL_ENDOFSERVICES 232 unused */ +/* RPL_SERVICEINFO 231 unused */ +/* RPL_ENDOFSERVICES 232 unused */ /* RPL_RULES 232 unreal */ -/* RPL_SERVICE 233 unused */ -/* RPL_SERVLIST 234 unused */ -/* RPL_SERVLISTEND 235 unused */ +/* RPL_SERVICE 233 unused */ +/* RPL_SERVLIST 234 unused */ +/* RPL_SERVLISTEND 235 unused */ #define RPL_STATSVERBOSE 236 /* Undernet verbose server list */ #define RPL_STATSENGINE 237 /* Undernet engine name */ @@ -161,7 +161,7 @@ #define RPL_ADMINLOC2 258 #define RPL_ADMINEMAIL 259 -/* RPL_TRACELOG 261 unused */ +/* RPL_TRACELOG 261 unused */ #define RPL_TRACEEND 262 /* efnet/IRCnet */ /* RPL_LOAD_THROTTLED 263 efnet/hybrid */ /* RPL_TRYAGAIN 263 Numerics List: IRCnet */ @@ -206,11 +206,11 @@ /* RPL_END_CHANINFO 299 aircd */ -/* RPL_NONE 300 unused */ +/* RPL_NONE 300 unused */ #define RPL_AWAY 301 #define RPL_USERHOST 302 #define RPL_ISON 303 -/* RPL_TEXT 304 unused */ +/* RPL_TEXT 304 unused */ #define RPL_UNAWAY 305 #define RPL_NOWAWAY 306 /* NotAway, aircd */ @@ -258,7 +258,7 @@ /* RPL_LISTSYNTAX 334 unreal */ /* RPL_CHANPASSOK 338 IRCnet extension (?)*/ #define RPL_WHOISACTUALLY 338 /* Undernet extension, dalnet */ -/* RPL_BADCHANPASS 339 IRCnet extension (?)*/ +/* RPL_BADCHANPASS 339 IRCnet extension (?) */ #define RPL_USERIP 340 /* Undernet extension */ #define RPL_INVITING 341 /* RPL_SUMMONING 342 removed from RFC1459 */ @@ -276,7 +276,7 @@ See also RPL_ENDOFWHO */ #define RPL_DELNAMREPLY 355 /* QuakeNet extension */ -/* RPL_KILLDONE 361 not used */ +/* RPL_KILLDONE 361 not used */ #define RPL_CLOSING 362 #define RPL_CLOSEEND 363 #define RPL_LINKS 364 @@ -288,7 +288,7 @@ #define RPL_INFO 371 #define RPL_MOTD 372 -#define RPL_INFOSTART 373 /* not used */ +/* RPL_INFOSTART 373 not used */ #define RPL_ENDOFINFO 374 #define RPL_MOTDSTART 375 #define RPL_ENDOFMOTD 376 @@ -303,8 +303,8 @@ #define RPL_YOUREOPER 381 #define RPL_REHASHING 382 /* RPL_YOURSERVICE 383 Numeric List: various */ -/* RPL_MYPORTIS 384 not used */ -/* RPL_NOTOPERANYMORE 385 Extension to RFC1459, not used */ +/* RPL_MYPORTIS 384 not used */ +/* RPL_NOTOPERANYMORE 385 Extension to RFC1459, not used */ /* RPL_QLIST 386 unreal */ /* RPL_ENDOFQLIST 387 unreal */ /* RPL_ALIST 388 unreal */ @@ -322,7 +322,7 @@ * Errors are in the range from 400-599 currently and are grouped by what * commands they come from. */ -/* ERR_FIRSTERROR 400 unused */ +/* ERR_FIRSTERROR 400 unused */ #define ERR_NOSUCHNICK 401 #define ERR_NOSUCHSERVER 402 #define ERR_NOSUCHCHANNEL 403 @@ -333,7 +333,6 @@ /* ERR_NOSUCHSERVICE 408 IRCnet */ /* ERR_NOCOLORSONCHAN 408 Dalnet */ #define ERR_NOORIGIN 409 - #define ERR_UNKNOWNCAPCMD 410 #define ERR_NORECIPIENT 411 #define ERR_NOTEXTTOSEND 412 @@ -455,12 +454,12 @@ #define ERR_TOOMANYUSERS 519 /* Undernet extension -Kev */ /* ERR_OPERONLY 520 unreal */ #define ERR_MASKTOOWIDE 520 /* Undernet extension -Kev */ -/* ERR_WHOTRUNC 520 austnet */ +/* ERR_WHOTRUNC 520 austnet */ #define ERR_NOSUCHGLINE 521 /* Undernet extension (new) */ /* ERR_LISTSYNTAX 521 dalnet ERR_WHOSYNTAX 522 dalnet ERR_WHOLIMEXCEED 523 dalnet */ -#define ERR_QUARANTINED 524 /* Undernet extension -Vampire */ +#define ERR_QUARANTINED 524 /* Undernet extension -Vampire */ #define ERR_NOTLOWEROPLEVEL 560 /* Undernet extension */ #define ERR_NOTMANAGER 561 /* Undernet extension */ Index: ircd-ircdev/include/patchlevel.h diff -u ircd-ircdev/include/patchlevel.h:1.46 ircd-ircdev/include/patchlevel.h:1.47 --- ircd-ircdev/include/patchlevel.h:1.46 Tue Oct 25 02:52:43 2005 +++ ircd-ircdev/include/patchlevel.h Wed Oct 26 07:54:43 2005 @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: patchlevel.h,v 1.46 2005/10/25 09:52:43 zolty Exp $ + * $Id: patchlevel.h,v 1.47 2005/10/26 14:54:43 zolty Exp $ * */ -#define PATCHLEVEL "45" +#define PATCHLEVEL "46" #define RELEASE "1.0.alpha" Index: ircd-ircdev/include/s_conf.h diff -u ircd-ircdev/include/s_conf.h:1.13 ircd-ircdev/include/s_conf.h:1.14 --- ircd-ircdev/include/s_conf.h:1.13 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/include/s_conf.h Wed Oct 26 07:54:43 2005 @@ -21,7 +21,7 @@ */ /** @file s_conf.h * @brief ircd configuration file API. - * @version $Id: s_conf.h,v 1.13 2005/09/01 11:25:42 zolty Exp $ + * @version $Id: s_conf.h,v 1.14 2005/10/26 14:54:43 zolty Exp $ */ #ifndef INCLUDED_s_conf_h #define INCLUDED_s_conf_h @@ -105,7 +105,7 @@ /** Local K-line structure. */ struct DenyConf { struct DenyConf* next; /**< Next DenyConf in #denyConfList. */ - char* hostmask; /**< Mask for IP or hostname. */ + char* hostmask; /**< Mask for IP or hostname. */ char* message; /**< Message to send to denied users. */ char* usermask; /**< Mask for client's username. */ char* realmask; /**< Mask for realname. */ Index: ircd-ircdev/include/s_user.h diff -u ircd-ircdev/include/s_user.h:1.9 ircd-ircdev/include/s_user.h:1.10 --- ircd-ircdev/include/s_user.h:1.9 Tue Oct 25 02:52:43 2005 +++ ircd-ircdev/include/s_user.h Wed Oct 26 07:54:43 2005 @@ -21,7 +21,7 @@ */ /** @file s_user.h * @brief Miscellaneous user-related helper functions. - * @version $Id: s_user.h,v 1.9 2005/10/25 09:52:43 zolty Exp $ + * @version $Id: s_user.h,v 1.10 2005/10/26 14:54:43 zolty Exp $ */ #ifndef INCLUDED_s_user_h #define INCLUDED_s_user_h @@ -117,7 +117,7 @@ extern int set_nick_name(struct Client* cptr, struct Client* sptr, const char* nick, int parc, char* parv[], int flags); extern void send_umode_out(struct Client* cptr, struct Client* sptr, - struct Flags* old, int prop); + 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, Index: ircd-ircdev/ircd/IPcheck.c diff -u ircd-ircdev/ircd/IPcheck.c:1.12 ircd-ircdev/ircd/IPcheck.c:1.13 --- ircd-ircdev/ircd/IPcheck.c:1.12 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/ircd/IPcheck.c Wed Oct 26 07:54:43 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Code to count users connected from particular IP addresses. - * @version $Id: IPcheck.c,v 1.12 2005/09/01 11:25:42 zolty Exp $ + * @version $Id: IPcheck.c,v 1.13 2005/10/26 14:54:43 zolty Exp $ */ #include "config.h" @@ -284,7 +284,6 @@ } /* Note that this also counts server connects. * It is hard and not interesting, to change that. - * * Refuse connection if it would overflow the counter. */ if (0 == ++entry->connected) @@ -311,7 +310,7 @@ /* * Don't refuse connection when we just rebooted the server */ -#ifndef NOTHROTTLE +#ifndef NOTHROTTLE assert(entry->connected > 0); --entry->connected; Debug((DEBUG_DNS, "IPcheck refusing local connection from %s: too fast.", ircd_ntoa(&entry->addr))); Index: ircd-ircdev/ircd/Makefile.in diff -u ircd-ircdev/ircd/Makefile.in:1.29 ircd-ircdev/ircd/Makefile.in:1.30 --- ircd-ircdev/ircd/Makefile.in:1.29 Tue Oct 25 02:52:43 2005 +++ ircd-ircdev/ircd/Makefile.in Wed Oct 26 07:54:43 2005 @@ -18,7 +18,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA -# $Id: Makefile.in,v 1.29 2005/10/25 09:52:43 zolty Exp $ +# $Id: Makefile.in,v 1.30 2005/10/26 14:54:43 zolty Exp $ #### Start of system configuration section. #### @@ -58,7 +58,6 @@ MPATH = ${DPATH}/ircd.motd RPATH = ${DPATH}/remote.motd - CC = @CC@ CFLAGS = @CFLAGS@ CPPFLAGS = -I. -I.. -I${top_srcdir}/include @CPPFLAGS@ Index: ircd-ircdev/ircd/channel.c diff -u ircd-ircdev/ircd/channel.c:1.27 ircd-ircdev/ircd/channel.c:1.28 --- ircd-ircdev/ircd/channel.c:1.27 Tue Oct 25 02:52:43 2005 +++ ircd-ircdev/ircd/channel.c Wed Oct 26 07:54:43 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Channel management and maintanance - * @version $Id: channel.c,v 1.27 2005/10/25 09:52:43 zolty Exp $ + * @version $Id: channel.c,v 1.28 2005/10/26 14:54:43 zolty Exp $ */ #include "config.h" @@ -152,8 +152,8 @@ for (num_free = 0, ban = free_bans; ban; ban = ban->next) num_free++; send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Bans: inuse %zu(%zu) free %zu alloc %zu", - bans_inuse, bans_inuse * sizeof(*ban), num_free, bans_alloc); - } + bans_inuse, bans_inuse * sizeof(*ban), num_free, bans_alloc); +} /** return the struct Membership* that represents a client on a channel * This function finds a struct Membership* which holds the state about @@ -275,8 +275,7 @@ * the same time as if it had an Apass (but removing +i and +l), and * reopping the first user to rejoin. However, preventing net rides * requires a backwards-incompatible protocol change.. - */ - + */ if (!chptr->mode.apass[0]) /* If no Apass, destroy now. */ destruct_channel(chptr); else if (TStime() - chptr->creationtime < 172800) /* Channel younger than 48 hours? */ @@ -1069,7 +1068,7 @@ msgq_append(&me, mb, tbuf); new_mode = 0; } - else if (feat_oplevels && flag_cnt > 1 && last_oplevel != member->oplevel) + else if (feat_oplevels && flag_cnt > 1 && last_oplevel != member->oplevel) { /* * This can't be the first member of a (continued) BURST @@ -1669,7 +1668,7 @@ if (mbuf->mb_add == 0 && mbuf->mb_rem == 0 && mbuf->mb_count == 0) return 0; - /* Ok, if we were given the OPMODE flag or if it's a server, hide source + /* Ok, if we were given the OPMODE flag, or its a server, hide the source. */ if (mbuf->mb_dest & MODEBUF_DEST_OPMODE || IsServer(mbuf->mb_source) || IsMe(mbuf->mb_source)) app_source = &his; @@ -1869,7 +1868,7 @@ if (mbuf->mb_dest & MODEBUF_DEST_HACK4) sendto_opmask_butone(0, SNO_HACK4, "HACK(4): %s MODE %s %s%s%s%s%s%s " "[%Tu]", - cli_name(feature_bool(FEAT_HIS_SNOTICES) ? + cli_name(feature_bool(FEAT_HIS_SNOTICES) ? mbuf->mb_source : app_source), mbuf->mb_channel->chname, rembuf_i ? "-" : "", rembuf, addbuf_i ? "+" : "", Index: ircd-ircdev/ircd/class.c diff -u ircd-ircdev/ircd/class.c:1.10 ircd-ircdev/ircd/class.c:1.11 --- ircd-ircdev/ircd/class.c:1.10 Tue Oct 25 02:52:43 2005 +++ ircd-ircdev/ircd/class.c Wed Oct 26 07:54:43 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Implementation of connection class handling functions. - * @version $Id: class.c,v 1.10 2005/10/25 09:52:43 zolty Exp $ + * @version $Id: class.c,v 1.11 2005/10/26 14:54:43 zolty Exp $ */ #include "config.h" @@ -304,4 +304,4 @@ send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Classes: inuse: %d(%d)", connClassAllocCount, connClassAllocCount * sizeof(struct ConnectionClass)); -} +} \ No newline at end of file Index: ircd-ircdev/ircd/gline.c diff -u ircd-ircdev/ircd/gline.c:1.17 ircd-ircdev/ircd/gline.c:1.18 --- ircd-ircdev/ircd/gline.c:1.17 Tue Oct 25 02:52:43 2005 +++ ircd-ircdev/ircd/gline.c Wed Oct 26 07:54:43 2005 @@ -23,7 +23,7 @@ */ /** @file * @brief Implementation of Gline manipulation functions. - * @version $Id: gline.c,v 1.17 2005/10/25 09:52:43 zolty Exp $ + * @version $Id: gline.c,v 1.18 2005/10/26 14:54:43 zolty Exp $ */ #include "config.h" @@ -88,9 +88,9 @@ continue; ircd_snprintf(0, namebuf, sizeof(namebuf), "%s@%s", - cli_user(acptr)->username, cli_user(acptr)->host); + cli_user(acptr)->username, cli_user(acptr)->host); ircd_snprintf(0, ipbuf, sizeof(ipbuf), "%s@%s", cli_user(acptr)->username, - ircd_ntoa(&cli_ip(acptr))); + ircd_ntoa(&cli_ip(acptr))); if (!match(mask, namebuf) || !match(mask, ipbuf)) count++; @@ -145,10 +145,8 @@ { struct Gline *gline, *sgline, *after = 0; - if (!(flags & GLINE_BADCHAN)) { - /* search for overlapping glines first, skipping badchans and - * special $ glines. - */ + if (!(flags & GLINE_BADCHAN)) { /* search for overlapping glines first */ + for (gline = GlobalGlineList; gline; gline = sgline) { sgline = gline->gl_next; @@ -158,14 +156,14 @@ (gline->gl_host && !host) || (!gline->gl_host && host)) continue; else if (!mmatch(gline->gl_user, user) /* gline contains new mask */ - && (gline->gl_host == NULL || !mmatch(gline->gl_host, host))) { + && (gline->gl_host == NULL || !mmatch(gline->gl_host, host))) { if (expire <= gline->gl_expire) /* will expire before wider gline */ return 0; else after = gline; /* stick new gline after this one */ } else if (!mmatch(user, gline->gl_user) /* new mask contains gline */ - && (gline->gl_host==NULL || !mmatch(host, gline->gl_host)) - && gline->gl_expire <= expire) /* old expires before new */ + && (gline->gl_host==NULL || !mmatch(host, gline->gl_host)) + && gline->gl_expire <= expire) /* old expires before new */ gline_free(gline); /* save some memory */ } } @@ -269,7 +267,7 @@ /* let the ops know about it */ sendto_opmask_butone(0, SNO_GLINE, "G-line active for %s", - get_client_name(acptr, SHOW_IP)); + get_client_name(acptr, SHOW_IP)); /* and get rid of him */ if ((tval = exit_client_msg(cptr, acptr, &me, "G-lined (%s)", @@ -375,7 +373,7 @@ sendcmdto_serv_butone(sptr, CMD_GLINE, cptr, (GlineIsRemActive(gline) ? "* +%s%s%s %Tu :%s" : "* -%s%s%s"), - gline->gl_user, + gline->gl_user, gline->gl_host ? "@" : "", gline->gl_host ? gline->gl_host : "", gline->gl_expire - CurrentTime, gline->gl_reason); @@ -471,14 +469,15 @@ /* Inform ops... */ sendto_opmask_butone(0, ircd_strncmp(reason, "AUTO", 4) ? SNO_GLINE : - SNO_AUTO, "%s adding %s %s for %s%s%s, expiring at " - "%Tu: %s", - feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr) ? - cli_name(sptr) : cli_name((cli_user(sptr))->server), - flags & GLINE_LOCAL ? "local" : "global", - flags & GLINE_BADCHAN ? "BADCHAN" : "GLINE", user, - flags & (GLINE_BADCHAN|GLINE_REALNAME) ? "" : "@", - flags & (GLINE_BADCHAN|GLINE_REALNAME) ? "" : host, + SNO_AUTO, "%s adding %s %s for %s%s%s, expiring at " + "%Tu: %s", + (feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr)) ? + cli_name(sptr) : + cli_name((cli_user(sptr))->server), + (flags & GLINE_LOCAL) ? "local" : "global", + (flags & GLINE_BADCHAN) ? "BADCHAN" : "GLINE", user, + (flags & (GLINE_BADCHAN|GLINE_REALNAME)) ? "" : "@", + (flags & (GLINE_BADCHAN|GLINE_REALNAME)) ? "" : host, expire + TSoffset, reason); /* and log it */ @@ -537,19 +536,20 @@ /* Inform ops and log it */ sendto_opmask_butone(0, SNO_GLINE, "%s activating global %s for %s%s%s, " - "expiring at %Tu: %s", - feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr) ? - cli_name(sptr) : cli_name((cli_user(sptr))->server), - GlineIsBadChan(gline) ? "BADCHAN" : "GLINE", + "expiring at %Tu: %s", + (feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr)) ? + cli_name(sptr) : + cli_name((cli_user(sptr))->server), + GlineIsBadChan(gline) ? "BADCHAN" : "GLINE", gline->gl_user, gline->gl_host ? "@" : "", gline->gl_host ? gline->gl_host : "", - gline->gl_expire + TSoffset, gline->gl_reason); + gline->gl_expire + TSoffset, gline->gl_reason); log_write(LS_GLINE, L_INFO, LOG_NOSNOTICE, "%#C activating global %s for %s%s%s, expiring at %Tu: %s", sptr, GlineIsBadChan(gline) ? "BADCHAN" : "GLINE", gline->gl_user, - gline->gl_host ? "@" : "", - gline->gl_host ? gline->gl_host : "", + gline->gl_host ? "@" : "", + gline->gl_host ? gline->gl_host : "", gline->gl_expire + TSoffset, gline->gl_reason); if (!(flags & GLINE_LOCAL)) /* don't propagate local changes */ @@ -605,18 +605,19 @@ /* Inform ops and log it */ sendto_opmask_butone(0, SNO_GLINE, "%s %s %s for %s%s%s, expiring at %Tu: " "%s", - feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr) ? - cli_name(sptr) : cli_name((cli_user(sptr))->server), + (feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr)) ? + cli_name(sptr) : + cli_name((cli_user(sptr))->server), msg, GlineIsBadChan(gline) ? "BADCHAN" : "GLINE", - gline->gl_user, gline->gl_host ? "@" : "", + gline->gl_user, gline->gl_host ? "@" : "", gline->gl_host ? gline->gl_host : "", gline->gl_expire + TSoffset, gline->gl_reason); log_write(LS_GLINE, L_INFO, LOG_NOSNOTICE, "%#C %s %s for %s%s%s, expiring at %Tu: %s", sptr, msg, GlineIsBadChan(gline) ? "BADCHAN" : "GLINE", gline->gl_user, - gline->gl_host ? "@" : "", - gline->gl_host ? gline->gl_host : "", + gline->gl_host ? "@" : "", + gline->gl_host ? gline->gl_host : "", gline->gl_expire + TSoffset, gline->gl_reason); if (!(flags & GLINE_LOCAL)) /* don't propagate local changes */ @@ -681,14 +682,14 @@ (flags & GLINE_LASTMOD && !gline->gl_lastmod)) continue; else if (flags & GLINE_EXACT) { - if (((gline->gl_host && host && ircd_strcmp(gline->gl_host,host) == 0) - ||(!gline->gl_host && !host)) && + if (((gline->gl_host && host && ircd_strcmp(gline->gl_host, host) == 0) + || (!gline->gl_host && !host)) && (ircd_strcmp(gline->gl_user, user) == 0)) break; } else { - if (((gline->gl_host && host && match(gline->gl_host,host) == 0) - ||(!gline->gl_host && !host)) && - (match(gline->gl_user, user) == 0)) + if (((gline->gl_host && host && match(gline->gl_host, host) == 0) + || (!gline->gl_host && !host)) && + (match(gline->gl_user, user) == 0)) break; } } @@ -719,13 +720,13 @@ } if ((flags & GLINE_GLOBAL && gline->gl_flags & GLINE_LOCAL) || - (flags & GLINE_LASTMOD && !gline->gl_lastmod)) + (flags & GLINE_LASTMOD && !gline->gl_lastmod)) continue; if (GlineIsRealName(gline)) { - Debug((DEBUG_DEBUG,"realname gline: '%s' '%s'",gline->gl_user,cli_info(cptr))); + Debug((DEBUG_DEBUG,"realname gline: '%s' '%s'",gline->gl_user,cli_info(cptr))); if (match(gline->gl_user+2, cli_info(cptr)) != 0) - continue; + continue; } else { if (match(gline->gl_user, (cli_user(cptr))->username) != 0) @@ -785,9 +786,9 @@ else if (!GlineIsLocal(gline) && gline->gl_lastmod) sendcmdto_one(&me, CMD_GLINE, cptr, "* %c%s%s%s %Tu %Tu :%s", GlineIsRemActive(gline) ? '+' : '-', gline->gl_user, - gline->gl_host ? "@" : "", + gline->gl_host ? "@" : "", gline->gl_host ? gline->gl_host : "", - gline->gl_expire - CurrentTime, gline->gl_lastmod, + gline->gl_expire - CurrentTime, gline->gl_lastmod, gline->gl_reason); } @@ -817,7 +818,7 @@ sendcmdto_one(&me, CMD_GLINE, cptr, "* %c%s%s%s %Tu %Tu :%s", GlineIsRemActive(gline) ? '+' : '-', gline->gl_user, - gline->gl_host ? "@" : "", + gline->gl_host ? "@" : "", gline->gl_host ? gline->gl_host : "", gline->gl_expire - CurrentTime, gline->gl_lastmod, gline->gl_reason); @@ -844,7 +845,7 @@ /* send gline information along */ send_reply(sptr, RPL_GLIST, gline->gl_user, - gline->gl_host ? "@" : "", + gline->gl_host ? "@" : "", gline->gl_host ? gline->gl_host : "", gline->gl_expire + TSoffset, GlineIsLocal(gline) ? cli_name(&me) : "*", @@ -856,7 +857,7 @@ if (gline->gl_expire <= CurrentTime) gline_free(gline); else - send_reply(sptr, RPL_GLIST, gline->gl_user, + send_reply(sptr, RPL_GLIST, gline->gl_user, gline->gl_host ? "@" : "", gline->gl_host ? gline->gl_host : "", gline->gl_expire + TSoffset, @@ -900,8 +901,8 @@ gline_free(gline); else send_reply(sptr, RPL_STATSGLINE, 'G', gline->gl_user, - gline->gl_host ? "@" : "", - gline->gl_host ? gline->gl_host : "", + gline->gl_host ? "@" : "", + gline->gl_host ? gline->gl_host : "", gline->gl_expire + TSoffset, gline->gl_reason); } } Index: ircd-ircdev/ircd/hash.c diff -u ircd-ircdev/ircd/hash.c:1.12 ircd-ircdev/ircd/hash.c:1.13 --- ircd-ircdev/ircd/hash.c:1.12 Sun Jul 3 13:21:42 2005 +++ ircd-ircdev/ircd/hash.c Wed Oct 26 07:54:43 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Hash table management. - * @version $Id: hash.c,v 1.12 2005/07/03 20:21:42 zolty Exp $ + * @version $Id: hash.c,v 1.13 2005/10/26 14:54:43 zolty Exp $ * * This file used to use some very complicated hash function. Now it * uses CRC-32, but effectively remaps each input byte according to a @@ -509,6 +509,7 @@ /* Send all the matching channels in the bucket. */ for (chptr = channelTable[args->bucket]; chptr; chptr = chptr->hnext) { + /* Zoltan: es para que liste los canales con 0 usuarios (+r) */ if (chptr->users >= args->min_users && chptr->users < args->max_users && chptr->creationtime > args->min_time Index: ircd-ircdev/ircd/ircd.c diff -u ircd-ircdev/ircd/ircd.c:1.23 ircd-ircdev/ircd/ircd.c:1.24 --- ircd-ircdev/ircd/ircd.c:1.23 Tue Oct 25 02:52:43 2005 +++ ircd-ircdev/ircd/ircd.c Wed Oct 26 07:54:43 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Entry point and other initialization functions for the daemon. - * @version $Id: ircd.c,v 1.23 2005/10/25 09:52:43 zolty Exp $ + * @version $Id: ircd.c,v 1.24 2005/10/26 14:54:43 zolty Exp $ */ #include "config.h" @@ -87,6 +87,7 @@ * External stuff *--------------------------------------------------------------------------*/ extern void init_counters(void); +extern void init_isupport(void); extern void mem_dbg_initialise(void); /*---------------------------------------------------------------------------- @@ -364,7 +365,7 @@ Debug((DEBUG_DEBUG, "check_pings(%s)=status:%s limit: %d current: %d", cli_name(cptr), - IsPingSent(cptr) ? "[Ping Sent]" : "[]", + IsPingSent(cptr) ? "[Ping Sent]" : "[]", max_ping, (int)(CurrentTime - cli_lasttime(cptr)))); /* Ok, the thing that will happen most frequently, is that someone will @@ -516,9 +517,9 @@ debugmode = optarg; thisServer.bootopt |= BOOT_DEBUG; break; - + default: - printf("Usage: ircd [-f config] [-h servername] [-x loglevel] [-ntv] [-k [-c clispec]]\n" + printf("Usage: ircd [-f config] [-h servername] [-x loglevel] [-ntv] [-k [-c clispec]]\n" "\n -f config\t specify explicit configuration file" "\n -x loglevel\t set debug logging verbosity" "\n -n or -t\t don't detach" @@ -676,12 +677,12 @@ int fd; if ((fd = open("/dev/null", O_WRONLY)) < 0) { fprintf(stderr, "Unable to open /dev/null (to reserve fd 2): %s\n", - strerror(errno)); + strerror(errno)); return 8; } if (fd != 2 && dup2(fd, 2) < 0) { fprintf(stderr, "Unable to reserve fd 2; dup2 said: %s\n", - strerror(errno)); + strerror(errno)); return 8; } } @@ -771,4 +772,4 @@ event_loop(); return 0; -} +} \ No newline at end of file Index: ircd-ircdev/ircd/ircd_alloc.c diff -u ircd-ircdev/ircd/ircd_alloc.c:1.6 ircd-ircdev/ircd/ircd_alloc.c:1.7 --- ircd-ircdev/ircd/ircd_alloc.c:1.6 Tue Feb 15 08:31:51 2005 +++ ircd-ircdev/ircd/ircd_alloc.c Wed Oct 26 07:54:43 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief IRC daemon memory allocation functions. - * @version $Id: ircd_alloc.c,v 1.6 2005/02/15 16:31:51 zolty Exp $ + * @version $Id: ircd_alloc.c,v 1.7 2005/10/26 14:54:43 zolty Exp $ */ #include "config.h" @@ -102,5 +102,4 @@ (*noMemHandler)(); return t; } -#endif - +#endif \ No newline at end of file Index: ircd-ircdev/ircd/ircd_auth.c diff -u ircd-ircdev/ircd/ircd_auth.c:1.8 ircd-ircdev/ircd/ircd_auth.c:1.9 --- ircd-ircdev/ircd/ircd_auth.c:1.8 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/ircd/ircd_auth.c Wed Oct 26 07:54:43 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief IAuth client implementation for an IRC server. - * @version $Id: ircd_auth.c,v 1.8 2005/09/01 11:25:42 zolty Exp $ + * @version $Id: ircd_auth.c,v 1.9 2005/10/26 14:54:43 zolty Exp $ */ #include "config.h" #include "client.h" @@ -413,7 +413,7 @@ if (!addr) { log_write(LS_IAUTH, L_NOTICE, 0, "IAuth connection to %s failed: host lookup failed", i_host(iauth)); } else { - memcpy(&i_addr(iauth).addr, &addr, sizeof(i_addr(iauth).addr)); + memcpy(&i_addr(iauth).addr, addr, sizeof(i_addr(iauth).addr)); if (!irc_in_addr_valid(&i_addr(iauth).addr)) { log_write(LS_IAUTH, L_NOTICE, 0, "IAuth connection to %s failed: host came back as unresolved", i_host(iauth)); return; Index: ircd-ircdev/ircd/ircd_crypt.c diff -u ircd-ircdev/ircd/ircd_crypt.c:1.5 ircd-ircdev/ircd/ircd_crypt.c:1.6 --- ircd-ircdev/ircd/ircd_crypt.c:1.5 Sun Jul 3 13:21:42 2005 +++ ircd-ircdev/ircd/ircd_crypt.c Wed Oct 26 07:54:43 2005 @@ -22,7 +22,7 @@ /** * @file * @brief Core password encryption routines. - * @version $Id: ircd_crypt.c,v 1.5 2005/07/03 20:21:42 zolty Exp $ + * @version $Id: ircd_crypt.c,v 1.6 2005/10/26 14:54:43 zolty Exp $ * * This is a new look crypto API for ircu, it can handle different * password formats by the grace of magic tokens at the beginning of the @@ -237,7 +237,7 @@ crypt_mechs_root->next = crypt_mechs_root->prev = NULL; /* temporary kludge until we're modular. manually call the - register funtions for crypt mechanisms */ + register functions for crypt mechanisms */ ircd_register_crypt_smd5(); ircd_register_crypt_plain(); ircd_register_crypt_native(); Index: ircd-ircdev/ircd/ircd_crypt_smd5.c diff -u ircd-ircdev/ircd/ircd_crypt_smd5.c:1.4 ircd-ircdev/ircd/ircd_crypt_smd5.c:1.5 --- ircd-ircdev/ircd/ircd_crypt_smd5.c:1.4 Mon Mar 21 10:39:07 2005 +++ ircd-ircdev/ircd/ircd_crypt_smd5.c Wed Oct 26 07:54:43 2005 @@ -22,7 +22,7 @@ /** * @file * @brief Routines for Salted MD5 passwords - * @version $Id: ircd_crypt_smd5.c,v 1.4 2005/03/21 18:39:07 zolty Exp $ + * @version $Id: ircd_crypt_smd5.c,v 1.5 2005/10/26 14:54:43 zolty Exp $ * * ircd_crypt_smd5 is largely taken from md5_crypt.c from the Linux PAM * source code. it's been modified to fit in with ircu and some of the @@ -77,7 +77,7 @@ * @return The Salted MD5 password of key and salt * * Erm does exactly what the brief comment says. If you think I'm writing a - * description of how MD5 works, you have another thing coming. Go and read + * description of how MD5 works, you have another think coming. Go and read * Applied Cryptography by Bruce Schneier. The only difference is we use a * salt at the beginning of the password to perturb it so that the same password * doesn't always produce the same hash. Index: ircd-ircdev/ircd/ircd_events.c diff -u ircd-ircdev/ircd/ircd_events.c:1.7 ircd-ircdev/ircd/ircd_events.c:1.8 --- ircd-ircdev/ircd/ircd_events.c:1.7 Sat Apr 2 11:47:35 2005 +++ ircd-ircdev/ircd/ircd_events.c Wed Oct 26 07:54:43 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Implementation of event loop mid-layer. - * @version $Id: ircd_events.c,v 1.7 2005/04/02 19:47:35 zolty Exp $ + * @version $Id: ircd_events.c,v 1.8 2005/10/26 14:54:43 zolty Exp $ */ #include "config.h" @@ -541,7 +541,6 @@ return; } gen_dequeue(timer); /* remove the timer from the queue */ - timer_enqueue(timer); /* re-queue the timer */ } Index: ircd-ircdev/ircd/ircd_features.c diff -u ircd-ircdev/ircd/ircd_features.c:1.16 ircd-ircdev/ircd/ircd_features.c:1.17 --- ircd-ircdev/ircd/ircd_features.c:1.16 Tue Oct 25 02:52:43 2005 +++ ircd-ircdev/ircd/ircd_features.c Wed Oct 26 07:54:43 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Implementation of configurable feature support. - * @version $Id: ircd_features.c,v 1.16 2005/10/25 09:52:43 zolty Exp $ + * @version $Id: ircd_features.c,v 1.17 2005/10/26 14:54:43 zolty Exp $ */ #include "config.h" @@ -436,7 +436,6 @@ F_B(HIS_STATS_e, 0, 1, 0), F_B(HIS_STATS_f, 0, 1, 0), F_B(HIS_STATS_g, 0, 1, 0), - F_B(HIS_STATS_h, 0, 1, 0), F_B(HIS_STATS_i, 0, 1, 0), F_B(HIS_STATS_j, 0, 1, 0), F_B(HIS_STATS_J, 0, 1, 0), Index: ircd-ircdev/ircd/ircd_log.c diff -u ircd-ircdev/ircd/ircd_log.c:1.12 ircd-ircdev/ircd/ircd_log.c:1.13 --- ircd-ircdev/ircd/ircd_log.c:1.12 Thu Sep 1 04:25:42 2005 +++ ircd-ircdev/ircd/ircd_log.c Wed Oct 26 07:54:43 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief IRC logging implementation. - * @version $Id: ircd_log.c,v 1.12 2005/09/01 11:25:42 zolty Exp $ + * @version $Id: ircd_log.c,v 1.13 2005/10/26 14:54:43 zolty Exp $ */ #include "config.h" @@ -971,7 +971,7 @@ { if (logDesc[i].mark & LOG_MARK_FILE) /* report file */ send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F LOG %s FILE %s", - logDesc[i].name, (logDesc[i].file && logDesc[i].file->file ? + logDesc[i].name, (logDesc[i].file && logDesc[i].file->file ? logDesc[i].file->file : "(terminal)")); if (logDesc[i].mark & LOG_MARK_FACILITY) /* report facility */ Index: ircd-ircdev/ircd/ircd_parser.y diff -u ircd-ircdev/ircd/ircd_parser.y:1.23 ircd-ircdev/ircd/ircd_parser.y:1.24 --- ircd-ircdev/ircd/ircd_parser.y:1.23 Tue Oct 25 02:52:43 2005 +++ ircd-ircdev/ircd/ircd_parser.y Wed Oct 26 07:54:43 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: ircd_parser.y,v 1.23 2005/10/25 09:52:43 zolty Exp $ + * $Id: ircd_parser.y,v 1.24 2005/10/26 14:54:43 zolty Exp $ * */ %{ @@ -262,7 +262,8 @@ jupenick: NICK '=' QSTRING ';' { addNickJupes($3); - MyFree($3);}; + MyFree($3); +}; generalblock: GENERAL { @@ -355,8 +356,8 @@ struct ConnectionClass *c_class; add_class(name, tping, tconn, maxlinks, sendq); c_class = find_class(name); - c_class->default_umode = pass; MyFree(c_class->default_umode); + c_class->default_umode = pass; memcpy(&c_class->privs, &privs, sizeof(c_class->privs)); memcpy(&c_class->privs_dirty, &privs_dirty, sizeof(c_class->privs_dirty)); } @@ -493,7 +494,7 @@ }; connectmaxhops: MAXHOPS '=' expr ';' { - maxlinks = $3; + maxlinks = $3; }; connectauto: AUTOCONNECT '=' YES ';' { flags |= CONF_AUTOCONNECT; } | AUTOCONNECT '=' NO ';' { flags &= ~CONF_AUTOCONNECT; }; @@ -644,7 +645,7 @@ portmask: MASK '=' QSTRING ';' { MyFree(pass); - DupString(pass, $3); + pass = $3; }; portserver: SERVER '=' YES ';' @@ -767,7 +768,6 @@ } '{' killitems '}' ';' { if (dconf->usermask || dconf->hostmask ||dconf->realmask) { - if (dconf->hostmask != NULL) dconf->next = denyConfList; denyConfList = dconf; } Index: ircd-ircdev/ircd/ircd_relay.c diff -u ircd-ircdev/ircd/ircd_relay.c:1.8 ircd-ircdev/ircd/ircd_relay.c:1.9 --- ircd-ircdev/ircd/ircd_relay.c:1.8 Mon Jan 10 04:22:59 2005 +++ ircd-ircdev/ircd/ircd_relay.c Wed Oct 26 07:54:43 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Helper functions to relay various types of messages. - * @version $Id: ircd_relay.c,v 1.8 2005/01/10 12:22:59 zolty Exp $ + * @version $Id: ircd_relay.c,v 1.9 2005/10/26 14:54:43 zolty Exp $ * * There are four basic types of messages, each with four subtypes. * @@ -399,7 +399,7 @@ if (0 == (acptr = findNUser(name)) || !IsUser(acptr)) { send_reply(sptr, SND_EXPLICIT | ERR_NOSUCHNICK, "* :Target left %s. " "Failed to deliver: [%.20s]", feature_str(FEAT_NETWORK), - text); + text); return; } if (is_silenced(sptr, acptr)) @@ -567,4 +567,4 @@ IsServer(cli_from(sptr)) ? cli_from(sptr) : 0, host_mask ? MATCH_HOST : MATCH_SERVER, "%s :%s", mask, text); -} +} \ No newline at end of file Index: ircd-ircdev/ircd/ircd_res.c diff -u ircd-ircdev/ircd/ircd_res.c:1.11 ircd-ircdev/ircd/ircd_res.c:1.12 --- ircd-ircdev/ircd/ircd_res.c:1.11 Tue Oct 25 02:52:43 2005 +++ ircd-ircdev/ircd/ircd_res.c Wed Oct 26 07:54:43 2005 @@ -41,7 +41,7 @@ */ /** @file * @brief IRC resolver functions. - * @version $Id: ircd_res.c,v 1.11 2005/10/25 09:52:43 zolty Exp $ + * @version $Id: ircd_res.c,v 1.12 2005/10/26 14:54:43 zolty Exp $ */ #include "client.h" #include "ircd_alloc.h" @@ -145,7 +145,6 @@ static struct dlink request_list; static void rem_request(struct reslist *request); - static struct reslist *make_request(dns_callback_f callback, void *ctx); static void do_query_name(dns_callback_f callback, void *ctx, const char* name, struct reslist *request, int); @@ -307,7 +306,7 @@ if (when > t_expire(&res_timeout)) /* do nothing */; else if (t_onqueue(&res_timeout) && !(res_timeout.t_header.gh_flags & GEN_MARKED)) - timer_chg(&res_timeout, TT_ABSOLUTE, when); + timer_chg(&res_timeout, TT_ABSOLUTE, when); else timer_add(&res_timeout, timeout_resolver, NULL, TT_ABSOLUTE, when); } @@ -818,7 +817,7 @@ */ Debug((DEBUG_DNS, "Request %p has bad response (state %d type %d rcode %d)", request, request->state, request->type, header->rcode)); (*request->callback)(request->callback_ctx, NULL, NULL); - rem_request(request); + rem_request(request); } else { Index: ircd-ircdev/ircd/ircd_string.c diff -u ircd-ircdev/ircd/ircd_string.c:1.12 ircd-ircdev/ircd/ircd_string.c:1.13 --- ircd-ircdev/ircd/ircd_string.c:1.12 Mon Oct 17 07:02:32 2005 +++ ircd-ircdev/ircd/ircd_string.c Wed Oct 26 07:54:43 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Implementation of string operations. - * @version $Id: ircd_string.c,v 1.12 2005/10/17 14:02:32 zolty Exp $ + * @version $Id: ircd_string.c,v 1.13 2005/10/26 14:54:43 zolty Exp $ */ #include "config.h" @@ -32,7 +32,7 @@ #include "res.h" /* #include <assert.h> -- Now using assert in ircd_log.h */ -#include <regex.h> +#include <string.h> #include <sys/types.h> #include <netinet/in.h> Index: ircd-ircdev/ircd/jupe.c diff -u ircd-ircdev/ircd/jupe.c:1.6 ircd-ircdev/ircd/jupe.c:1.7 --- ircd-ircdev/ircd/jupe.c:1.6 Mon Jan 10 04:23:01 2005 +++ ircd-ircdev/ircd/jupe.c Wed Oct 26 07:54:43 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Implementation of juped server handling functions. - * @version $Id: jupe.c,v 1.6 2005/01/10 12:23:01 zolty Exp $ + * @version $Id: jupe.c,v 1.7 2005/10/26 14:54:43 zolty Exp $ */ #include "config.h" @@ -209,10 +209,10 @@ /* 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), + "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); @@ -263,9 +263,9 @@ /* 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), + (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); Index: ircd-ircdev/ircd/list.c diff -u ircd-ircdev/ircd/list.c:1.9 ircd-ircdev/ircd/list.c:1.10 --- ircd-ircdev/ircd/list.c:1.9 Sun Jul 3 13:21:42 2005 +++ ircd-ircdev/ircd/list.c Wed Oct 26 07:54:43 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Singly and doubly linked list manipulation implementation. - * @version $Id: list.c,v 1.9 2005/07/03 20:21:42 zolty Exp $ + * @version $Id: list.c,v 1.10 2005/10/26 14:54:43 zolty Exp $ */ #include "config.h" @@ -90,7 +90,6 @@ connectionFreeList = con; connections.alloc++; } - } /** Allocate a new Client structure. @@ -417,7 +416,7 @@ assert(cli_prev(client) == prev); /* Verify that the list hasn't become circular */ assert(cli_next(client) != GlobalClientList); - assert(visited <= client.alloc); + assert(visited <= clients.alloc); /* Remember what should precede us */ prev = client; } Index: ircd-ircdev/ircd/m_burst.c diff -u ircd-ircdev/ircd/m_burst.c:1.15 ircd-ircdev/ircd/m_burst.c:1.16 --- ircd-ircdev/ircd/m_burst.c:1.15 Tue Oct 25 02:52:43 2005 +++ ircd-ircdev/ircd/m_burst.c Wed Oct 26 07:54:43 2005 @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_burst.c,v 1.15 2005/10/25 09:52:43 zolty Exp $ + * $Id: m_burst.c,v 1.16 2005/10/26 14:54:43 zolty Exp $ * */ @@ -403,7 +403,7 @@ strcpy(newban->who, "*"); */ newban->when = TStime(); - newban->flags = BAN_BURSTED; + newban->flags |= BAN_BURSTED; newban->next = 0; if (lp) lp->next = newban; /* link it in */ @@ -518,7 +518,7 @@ if (current_mode & CHFL_CHANOP) { if (chptr->mode.apass[0]) - nickpos += ircd_snprintf(0, nickstr + nickpos, sizeof(nickstr) - nickpos, "%u", oplevel); + nickpos += ircd_snprintf(0, nickstr + nickpos, sizeof(nickstr) - nickpos, "%u", oplevel); else nickstr[nickpos++] = 'o'; } @@ -546,8 +546,6 @@ member->status |= CHFL_BURST_JOINED | (current_mode & (CHFL_CHANOP|CHFL_VOICE)); SetOpLevel(member, oplevel); } - - #else nickstr[nickpos++] = ':'; /* add a specifier */ @@ -597,9 +595,9 @@ #endif #if defined(UNDERNET) if ((member->status & CHFL_CHANOP) && !(member->status & CHFL_BURST_ALREADY_OPPED)) - modebuf_mode_client(mbuf, MODE_ADD | CHFL_CHANOP, member->user, OpLevel(member)); - if ((member->status & CHFL_VOICE) && !(member->status & CHFL_BURST_ALREADY_VOICED)) - modebuf_mode_client(mbuf, MODE_ADD | CHFL_VOICE, member->user, OpLevel(member)); + modebuf_mode_client(mbuf, MODE_ADD | CHFL_CHANOP, member->user, OpLevel(member)); + if ((member->status & CHFL_VOICE) && !(member->status & CHFL_BURST_ALREADY_VOICED)) + modebuf_mode_client(mbuf, MODE_ADD | CHFL_VOICE, member->user, OpLevel(member)); #else if (member->status & CHFL_CHANOP) modebuf_mode_client(mbuf, MODE_ADD | CHFL_CHANOP, member->user, 0); @@ -608,17 +606,17 @@ #endif } else if (parse_flags & MODE_PARSE_WIPEOUT) { /* wipeout old ops */ #if defined(UNDERNET) - if (member->status & CHFL_CHANOP) - modebuf_mode_client(mbuf, MODE_DEL | CHFL_CHANOP, member->user, OpLevel(member)); - if (member->status & CHFL_VOICE) - modebuf_mode_client(mbuf, MODE_DEL | CHFL_VOICE, member->user, OpLevel(member)); + if (member->status & CHFL_CHANOP) + modebuf_mode_client(mbuf, MODE_DEL | CHFL_CHANOP, member->user, OpLevel(member)); + if (member->status & CHFL_VOICE) + modebuf_mode_client(mbuf, MODE_DEL | CHFL_VOICE, member->user, OpLevel(member)); #else if (member->status & CHFL_CHANOP) modebuf_mode_client(mbuf, MODE_DEL | CHFL_CHANOP, member->user, 0); if (member->status & CHFL_VOICE) modebuf_mode_client(mbuf, MODE_DEL | CHFL_VOICE, member->user, 0); #endif - member->status = (member->status + member->status = (member->status #if defined(UNDERNET) & ~(CHFL_CHANNEL_MANAGER | CHFL_CHANOP | CHFL_VOICE)) #elif defined(DDB) || defined(SERVICES) @@ -626,7 +624,7 @@ #else & ~(CHFL_CHANOP | CHFL_VOICE)) #endif - | CHFL_DEOPPED; + | CHFL_DEOPPED; } } @@ -641,7 +639,7 @@ DupString(bandup, lp->banstr); modebuf_mode_string(mbuf, MODE_DEL | MODE_BAN, - bandup, 1); /* let it free banstr */ + bandup, 1); *lp_p = lp->next; /* clip out of list */ free_ban(lp); continue; Index: ircd-ircdev/ircd/m_cap.c diff -u ircd-ircdev/ircd/m_cap.c:1.3 ircd-ircdev/ircd/m_cap.c:1.4 --- ircd-ircdev/ircd/m_cap.c:1.3 Mon Apr 11 01:45:00 2005 +++ ircd-ircdev/ircd/m_cap.c Wed Oct 26 07:54:43 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Capability negotiation commands - * @version $Id: m_cap.c,v 1.3 2005/04/11 08:45:00 zolty Exp $ + * @version $Id: m_cap.c,v 1.4 2005/10/26 14:54:43 zolty Exp $ */ #include "config.h" @@ -179,7 +179,7 @@ } loc += ircd_snprintf(0, capbuf + loc, sizeof(capbuf) - loc, "%s%s", - pfx, capab_list[i].name); + pfx, capab_list[i].name); } msgq_append(0, mb, "%s", capbuf); /* append capabilities to the final cmd */ @@ -215,7 +215,7 @@ memset(&rem, 0, sizeof(rem)); while (cl) { /* walk through the capabilities list... */ if (!(cap = find_cap(&cl, &neg)) /* look up capability... */ - || (!neg && (cap->flags & CAPFL_PROHIBIT)) /* is it prohibited? */ + || (!neg && (cap->flags & CAPFL_PROHIBIT)) /* is it prohibited? */ || (neg && (cap->flags & CAPFL_STICKY))) { /* is it sticky? */ sendcmdto_one(&me, CMD_CAP, sptr, "NAK :%s", caplist); return 0; /* can't complete requested op... */ @@ -289,6 +289,7 @@ if (!(cap->flags & CAPFL_PROTO)) CapClr(cli_active(sptr), cap->cap); } + send_caplist(sptr, 0, &cleared, "ACK"); return 0; } Index: ircd-ircdev/ircd/m_clearmode.c diff -u ircd-ircdev/ircd/m_clearmode.c:1.10 ircd-ircdev/ircd/m_clearmode.c:1.11 --- ircd-ircdev/ircd/m_clearmode.c:1.10 Tue Oct 25 02:52:43 2005 +++ ircd-ircdev/ircd/m_clearmode.c Wed Oct 26 07:54:43 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_clearmode.c,v 1.10 2005/10/25 09:52:43 zolty Exp $ + * $Id: m_clearmode.c,v 1.11 2005/10/26 14:54:43 zolty Exp $ * */ @@ -200,7 +200,7 @@ /* Drop channel operator status */ if (IsChanOp(member) && del_mode & MODE_CHANOP) { #if defined(UNDERNET) - modebuf_mode_client(&mbuf, MODE_DEL | MODE_CHANOP, member->user, MAXOPLEVEL + 1); + modebuf_mode_client(&mbuf, MODE_DEL | MODE_CHANOP, member->user, MAXOPLEVEL + 1); #else modebuf_mode_client(&mbuf, MODE_DEL | MODE_CHANOP, member->user, 0); #endif @@ -210,7 +210,7 @@ /* Drop voice */ if (HasVoice(member) && del_mode & MODE_VOICE) { #if defined(UNDERNET) - modebuf_mode_client(&mbuf, MODE_DEL | MODE_VOICE, member->user, MAXOPLEVEL + 1); + modebuf_mode_client(&mbuf, MODE_DEL | MODE_VOICE, member->user, MAXOPLEVEL + 1); #else modebuf_mode_client(&mbuf, MODE_DEL | MODE_VOICE, member->user, 0); #endif Index: ircd-ircdev/ircd/m_connect.c diff -u ircd-ircdev/ircd/m_connect.c:1.6 ircd-ircdev/ircd/m_connect.c:1.7 --- ircd-ircdev/ircd/m_connect.c:1.6 Mon Jan 10 04:23:01 2005 +++ ircd-ircdev/ircd/m_connect.c Wed Oct 26 07:54:43 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_connect.c,v 1.6 2005/01/10 12:23:01 zolty Exp $ + * $Id: m_connect.c,v 1.7 2005/10/26 14:54:43 zolty Exp $ * */ @@ -194,7 +194,7 @@ * Notify all operators about remote connect requests */ sendwallto_group_butone(&me, WALL_WALLOPS, 0, - "Remote CONNECT %s %s from %s", parv[1], + "Remote CONNECT %s %s from %s", parv[1], parv[2] ? parv[2] : "", get_client_name(sptr, HIDE_IP)); log_write(LS_NETWORK, L_INFO, 0, "CONNECT From %C : %s %s", sptr, parv[1], Index: ircd-ircdev/ircd/m_create.c diff -u ircd-ircdev/ircd/m_create.c:1.7 ircd-ircdev/ircd/m_create.c:1.8 --- ircd-ircdev/ircd/m_create.c:1.7 Tue Oct 25 02:52:43 2005 +++ ircd-ircdev/ircd/m_create.c Wed Oct 26 07:54:43 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_create.c,v 1.7 2005/10/25 09:52:43 zolty Exp $ + * $Id: m_create.c,v 1.8 2005/10/26 14:54:43 zolty Exp $ * */ @@ -174,7 +174,7 @@ MODEBUF_DEST_BOUNCE)); /* And bounce the mode */ #if defined(UNDERNET) - modebuf_mode_client(&mbuf, MODE_ADD | MODE_CHANOP, sptr, MAXOPLEVEL + 1); + modebuf_mode_client(&mbuf, MODE_ADD | MODE_CHANOP, sptr, MAXOPLEVEL + 1); #else modebuf_mode_client(&mbuf, MODE_ADD | MODE_CHANOP, sptr, 0); #endif Index: ircd-ircdev/ircd/m_destruct.c diff -u ircd-ircdev/ircd/m_destruct.c:1.6 ircd-ircdev/ircd/m_destruct.c:1.7 --- ircd-ircdev/ircd/m_destruct.c:1.6 Mon Mar 21 10:39:08 2005 +++ ircd-ircdev/ircd/m_destruct.c Wed Oct 26 07:54:43 2005 @@ -18,66 +18,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_destruct.c,v 1.6 2005/03/21 18:39:08 zolty Exp $ + * $Id: m_destruct.c,v 1.7 2005/10/26 14:54:43 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" Index: ircd-ircdev/ircd/m_join.c diff -u ircd-ircdev/ircd/m_join.c:1.15 ircd-ircdev/ircd/m_join.c:1.16 --- ircd-ircdev/ircd/m_join.c:1.15 Tue Oct 25 02:52:43 2005 +++ ircd-ircdev/ircd/m_join.c Wed Oct 26 07:54:43 2005 @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_join.c,v 1.15 2005/10/25 09:52:43 zolty Exp $ + * $Id: m_join.c,v 1.16 2005/10/26 14:54:43 zolty Exp $ * */ @@ -90,7 +90,6 @@ 0); joinbuf_flush(&part); - } return chanlist; @@ -158,7 +157,7 @@ if (!(chptr = FindChannel(name))) { if (((name[0] == '&') && !feature_bool(FEAT_LOCAL_CHANNELS)) - || strlen(name) >= IRCD_MIN(CHANNELLEN, feature_int(FEAT_CHANNELLEN))) { + || strlen(name) >= IRCD_MIN(CHANNELLEN, feature_int(FEAT_CHANNELLEN))) { send_reply(sptr, ERR_NOSUCHCHANNEL, name); continue; } @@ -363,7 +362,7 @@ else { /* We have a valid channel? */ if ((member = find_member_link(chptr, sptr))) { - /* It is impossible to get here --Run */ + /* It is impossible to get here --Run */ if (!IsZombie(member)) /* already on channel */ continue; Index: ircd-ircdev/ircd/m_kick.c diff -u ircd-ircdev/ircd/m_kick.c:1.12 ircd-ircdev/ircd/m_kick.c:1.1... [truncated message content] |
From: Toni G. <zo...@us...> - 2005-10-26 15:13:47
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-10-26 15:13:37 UTC Modified files: doc/ircd.sample-en.conf Log message: ircd.conf ---------------------- diff included ---------------------- Index: ircd-ircdev/doc/ircd.sample-en.conf diff -u ircd-ircdev/doc/ircd.sample-en.conf:1.23 ircd-ircdev/doc/ircd.sample-en.conf:1.24 --- ircd-ircdev/doc/ircd.sample-en.conf:1.23 Mon Oct 17 07:02:32 2005 +++ ircd-ircdev/doc/ircd.sample-en.conf Wed Oct 26 08:13:27 2005 @@ -1,6 +1,6 @@ # ircd.conf - configuration file for IRC-Dev's IRCD. # -# Last Updated: 1, Sep 2005. +# Last Updated: 25, October 2005. # # Written by Niels <ni...@un...>, based on the original example.conf, # server code and some real-life (ahem) experience. @@ -59,7 +59,7 @@ # numeric = numericnumber; # }; # -# If present, "virtual" must contain a valid address in dotted +# If present, "vhost" must contain a valid address in dotted # quad or IPv6 numeric notation (127.0.0.1 or ::1). The address MUST # be the address of a physical interface on the host. This address is # used for outgoing connections if the "Connect" block does not override @@ -222,7 +222,8 @@ # apass_opmode (can use OPMODE/CLEARMODE on +A and +U keys) # # For global opers (with propagate = yes or local = no), the default - # is to grant all of the above privileges EXCEPT apass_opmode. For. + # is to grant all of the above privileges EXCEPT walk_lchan, + # unlimit_query, set, badchan, local_badchan and apass_opmode. For. # local opers, the default is to grant ONLY the following privileges: # chan_limit, mode_lchan, show_invis, show_all_invis, local_kill, # rehash, local_gline, local_jupe, local_opmode, whox, display, @@ -708,7 +709,7 @@ Quarantine { "#shells" = "Thou shalt not support the h4><0rz"; "&kiddies" = "They can take care of themselves"; - }; +}; # This is a server-implemented alias to send a message to a service. # The string after Pseudo is the command name; the name entry inside @@ -828,7 +829,6 @@ # "HIS_STATS_e" = "TRUE"; # "HIS_STATS_f" = "TRUE"; # "HIS_STATS_g" = "TRUE"; -# "HIS_STATS_h" = "TRUE"; # "HIS_STATS_i" = "TRUE"; # "HIS_STATS_j" = "TRUE"; # "HIS_STATS_J" = "TRUE"; @@ -847,7 +847,7 @@ # "HIS_STATS_u" = "FALSE"; # "HIS_STATS_U" = "TRUE"; # "HIS_STATS_v" = "TRUE"; -# "HIS_STATS_w" = "FALSE"; +# "HIS_STATS_w" = "TRUE"; # "HIS_STATS_x" = "TRUE"; # "HIS_STATS_y" = "TRUE"; # "HIS_STATS_z" = "TRUE"; @@ -855,7 +855,7 @@ # "HIS_WHOIS_IDLETIME" = "TRUE"; # "HIS_WHOIS_LOCALCHAN" = "TRUE"; # "HIS_WHO_SERVERNAME" = "TRUE"; -# "HIS_WHO_HOPCOUNT" = TRUE"; +# "HIS_WHO_HOPCOUNT" = "TRUE"; # "HIS_BANWHO" = "TRUE"; # "HIS_KILLWHO" = "TRUE"; # "HIS_REWRITE" = "TRUE"; ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2005-10-26 15:23:21
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-10-26 15:23:11 UTC Modified files: ircd/class.c ircd/ircd.c ircd/ircd_alloc.c ircd/ircd_relay.c ircd/m_userip.c ircd/test/Makefile.in Log message: Author: zoltan <zo...@ir...> Log message: 2005-10-26 Toni García <zo...@ir...> 1.0.alpha46 * Limpieza de código ---------------------- diff included ---------------------- Index: ircd-ircdev/ircd/class.c diff -u ircd-ircdev/ircd/class.c:1.11 ircd-ircdev/ircd/class.c:1.12 --- ircd-ircdev/ircd/class.c:1.11 Wed Oct 26 07:54:43 2005 +++ ircd-ircdev/ircd/class.c Wed Oct 26 08:23:00 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Implementation of connection class handling functions. - * @version $Id: class.c,v 1.11 2005/10/26 14:54:43 zolty Exp $ + * @version $Id: class.c,v 1.12 2005/10/26 15:23:00 zolty Exp $ */ #include "config.h" @@ -304,4 +304,4 @@ send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Classes: inuse: %d(%d)", connClassAllocCount, connClassAllocCount * sizeof(struct ConnectionClass)); -} \ No newline at end of file +} Index: ircd-ircdev/ircd/ircd.c diff -u ircd-ircdev/ircd/ircd.c:1.24 ircd-ircdev/ircd/ircd.c:1.25 --- ircd-ircdev/ircd/ircd.c:1.24 Wed Oct 26 07:54:43 2005 +++ ircd-ircdev/ircd/ircd.c Wed Oct 26 08:23:01 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Entry point and other initialization functions for the daemon. - * @version $Id: ircd.c,v 1.24 2005/10/26 14:54:43 zolty Exp $ + * @version $Id: ircd.c,v 1.25 2005/10/26 15:23:01 zolty Exp $ */ #include "config.h" @@ -772,4 +772,4 @@ event_loop(); return 0; -} \ No newline at end of file +} Index: ircd-ircdev/ircd/ircd_alloc.c diff -u ircd-ircdev/ircd/ircd_alloc.c:1.7 ircd-ircdev/ircd/ircd_alloc.c:1.8 --- ircd-ircdev/ircd/ircd_alloc.c:1.7 Wed Oct 26 07:54:43 2005 +++ ircd-ircdev/ircd/ircd_alloc.c Wed Oct 26 08:23:01 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief IRC daemon memory allocation functions. - * @version $Id: ircd_alloc.c,v 1.7 2005/10/26 14:54:43 zolty Exp $ + * @version $Id: ircd_alloc.c,v 1.8 2005/10/26 15:23:01 zolty Exp $ */ #include "config.h" @@ -102,4 +102,4 @@ (*noMemHandler)(); return t; } -#endif \ No newline at end of file +#endif Index: ircd-ircdev/ircd/ircd_relay.c diff -u ircd-ircdev/ircd/ircd_relay.c:1.9 ircd-ircdev/ircd/ircd_relay.c:1.10 --- ircd-ircdev/ircd/ircd_relay.c:1.9 Wed Oct 26 07:54:43 2005 +++ ircd-ircdev/ircd/ircd_relay.c Wed Oct 26 08:23:01 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Helper functions to relay various types of messages. - * @version $Id: ircd_relay.c,v 1.9 2005/10/26 14:54:43 zolty Exp $ + * @version $Id: ircd_relay.c,v 1.10 2005/10/26 15:23:01 zolty Exp $ * * There are four basic types of messages, each with four subtypes. * @@ -567,4 +567,4 @@ IsServer(cli_from(sptr)) ? cli_from(sptr) : 0, host_mask ? MATCH_HOST : MATCH_SERVER, "%s :%s", mask, text); -} \ No newline at end of file +} Index: ircd-ircdev/ircd/m_userip.c diff -u ircd-ircdev/ircd/m_userip.c:1.8 ircd-ircdev/ircd/m_userip.c:1.9 --- ircd-ircdev/ircd/m_userip.c:1.8 Wed Oct 26 07:54:43 2005 +++ ircd-ircdev/ircd/m_userip.c Wed Oct 26 08:23:01 2005 @@ -1,4 +1,4 @@ -* +/* * IRC-Dev IRCD - An advanced and innovative IRC Daemon, ircd/m_userip.c * * Copyright (C) 2002-2005 IRC-Dev Development Team <de...@ir...> @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: m_userip.c,v 1.8 2005/10/26 14:54:43 zolty Exp $ + * $Id: m_userip.c,v 1.9 2005/10/26 15:23:01 zolty Exp $ * */ Index: ircd-ircdev/ircd/test/Makefile.in diff -u ircd-ircdev/ircd/test/Makefile.in:1.7 ircd-ircdev/ircd/test/Makefile.in:1.8 --- ircd-ircdev/ircd/test/Makefile.in:1.7 Tue Oct 25 04:27:10 2005 +++ ircd-ircdev/ircd/test/Makefile.in Wed Oct 26 08:23:01 2005 @@ -18,7 +18,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA -# $Id: Makefile.in,v 1.7 2005/10/25 11:27:10 zolty Exp $ +# $Id: Makefile.in,v 1.8 2005/10/26 15:23:01 zolty Exp $ top_srcdir = @top_srcdir@ srcdir = @srcdir@ @@ -92,7 +92,9 @@ ../../include/numnicks.h ../../include/client.h \ ../../include/ircd_defs.h ../../include/dbuf.h ../../include/msgq.h \ ../../include/ircd_events.h ../../config.h ../../include/ircd_handler.h \ - ../../include/res.h ../../include/capab.h + ../../include/res.h ../../include/capab.h ../../include/res.h +ircd_match_t.o: ircd_match_t.c ../../include/ircd_log.h \ + ../../include/match.h ../../include/res.h ../../config.h ircd_string_t.o: ircd_string_t.c ../../include/ircd_string.h \ ../../include/ircd_chattr.h test_stub.o: test_stub.c ../../include/client.h ../../include/ircd_defs.h \ ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2005-10-26 15:26:04
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-10-26 15:25:55 UTC Modified files: ChangeLog ChangeLog.es include/patchlevel.h Log message: Version 1.0.beta0 ---------------------- diff included ---------------------- Index: ircd-ircdev/ChangeLog diff -u ircd-ircdev/ChangeLog:1.48 ircd-ircdev/ChangeLog:1.49 --- ircd-ircdev/ChangeLog:1.48 Wed Oct 26 07:54:43 2005 +++ ircd-ircdev/ChangeLog Wed Oct 26 08:25:45 2005 @@ -1,10 +1,13 @@ # # ChangeLog for ircd-ircdev # -# $Id: ChangeLog,v 1.48 2005/10/26 14:54:43 zolty Exp $ +# $Id: ChangeLog,v 1.49 2005/10/26 15:25:45 zolty Exp $ # # Insert new changes at beginning of the change list. # +2005-10-27 Toni García <zo...@ir...> 1.0.beta0 + * First beta version + 2005-10-26 Toni García <zo...@ir...> 1.0.alpha46 * Cleanup code Index: ircd-ircdev/ChangeLog.es diff -u ircd-ircdev/ChangeLog.es:1.48 ircd-ircdev/ChangeLog.es:1.49 --- ircd-ircdev/ChangeLog.es:1.48 Wed Oct 26 07:54:43 2005 +++ ircd-ircdev/ChangeLog.es Wed Oct 26 08:25:45 2005 @@ -1,10 +1,13 @@ # # Log de Cambios para ircd-ircdev # -# $Id: ChangeLog.es,v 1.48 2005/10/26 14:54:43 zolty Exp $ +# $Id: ChangeLog.es,v 1.49 2005/10/26 15:25:45 zolty Exp $ # # Insertar los nuevos cambios al principio de esta lista de cambios. # +2005-10-27 Toni García <zo...@ir...> 1.0.beta0 + * Primera versión beta + 2005-10-26 Toni García <zo...@ir...> 1.0.alpha46 * Limpieza de código Index: ircd-ircdev/include/patchlevel.h diff -u ircd-ircdev/include/patchlevel.h:1.47 ircd-ircdev/include/patchlevel.h:1.48 --- ircd-ircdev/include/patchlevel.h:1.47 Wed Oct 26 07:54:43 2005 +++ ircd-ircdev/include/patchlevel.h Wed Oct 26 08:25:45 2005 @@ -17,12 +17,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: patchlevel.h,v 1.47 2005/10/26 14:54:43 zolty Exp $ + * $Id: patchlevel.h,v 1.48 2005/10/26 15:25:45 zolty Exp $ * */ -#define PATCHLEVEL "46" +#define PATCHLEVEL "0" -#define RELEASE "1.0.alpha" +#define RELEASE "1.0.beta" /* * Deliberate empty lines ----------------------- End of diff ----------------------- |
From: Toni G. <zo...@us...> - 2007-04-19 22:54:17
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2007-04-19 22:54:11 UTC Modified files: ChangeLog ChangeLog.es Makefile.in acconfig.h config.h.in configure configure.in doc/Makefile.in include/IPcheck.h include/capab.h include/channel.h include/class.h include/client.h include/crule.h include/dbuf.h include/ddb.h include/destruct_event.h include/fileio.h include/gline.h include/handlers.h include/hash.h include/ircd.h include/ircd_alloc.h include/ircd_auth.h include/ircd_chattr.h include/ircd_crypt.h include/ircd_crypt_native.h include/ircd_crypt_plain.h include/ircd_crypt_smd5.h include/ircd_defs.h include/ircd_events.h include/ircd_features.h include/ircd_handler.h include/ircd_log.h include/ircd_md5.h include/ircd_osdep.h include/ircd_relay.h include/ircd_reply.h include/ircd_reslib.h include/ircd_signal.h include/ircd_snprintf.h include/ircd_string.h include/ircd_tea.h include/jupe.h include/list.h include/listener.h include/match.h include/memdebug.h include/motd.h include/msg.h include/msgq.h include/numeric.h include/numnicks.h include/opercmds.h include/packet.h include/parse.h include/patchlevel.h include/querycmds.h include/random.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_numeric.h include/s_serv.h include/s_stats.h include/s_user.h include/send.h include/struct.h include/sys.h include/umkpasswd.h include/uping.h include/userload.h include/version.h include/watch.h include/whowas.h ircd/.cvsignore ircd/IPcheck.c ircd/Makefile.in ircd/channel.c ircd/class.c ircd/client.c ircd/convert-conf.c ircd/crule.c ircd/dbuf.c ircd/ddb.c ircd/ddb_db_native.c ircd/ddb_db_template.c ircd/ddb_events.c ircd/destruct_event.c ircd/engine_devpoll.c ircd/engine_epoll.c ircd/engine_kqueue.c ircd/engine_poll.c ircd/engine_select.c ircd/fileio.c ircd/gline.c ircd/hash.c ircd/ircd.c ircd/ircd_alloc.c ircd/ircd_auth.c ircd/ircd_crypt.c ircd/ircd_crypt_native.c ircd/ircd_crypt_plain.c ircd/ircd_crypt_smd5.c ircd/ircd_events.c ircd/ircd_features.c ircd/ircd_lexer.l ircd/ircd_log.c ircd/ircd_md5.c ircd/ircd_parser.y ircd/ircd_relay.c ircd/ircd_reply.c ircd/ircd_res.c ircd/ircd_reslib.c ircd/ircd_signal.c ircd/ircd_snprintf.c ircd/ircd_string.c ircd/ircd_tea.c ircd/jupe.c ircd/list.c ircd/listener.c ircd/m_account.c ircd/m_admin.c ircd/m_asll.c ircd/m_away.c ircd/m_bmode.c ircd/m_burst.c ircd/m_cap.c ircd/m_clearmode.c ircd/m_close.c ircd/m_connect.c ircd/m_cprivmsg.c ircd/m_create.c ircd/m_db.c ircd/m_dbq.c ircd/m_defaults.c ircd/m_destruct.c ircd/m_desynch.c ircd/m_die.c ircd/m_endburst.c ircd/m_error.c ircd/m_get.c ircd/m_ghost.c ircd/m_gline.c ircd/m_help.c ircd/m_info.c ircd/m_invite.c ircd/m_ison.c ircd/m_join.c ircd/m_jupe.c ircd/m_kick.c ircd/m_kill.c ircd/m_links.c ircd/m_list.c ircd/m_lusers.c ircd/m_map.c ircd/m_mode.c ircd/m_motd.c ircd/m_names.c ircd/m_nick.c ircd/m_notice.c ircd/m_oper.c ircd/m_opmode.c ircd/m_part.c ircd/m_pass.c ircd/m_ping.c ircd/m_pong.c ircd/m_privmsg.c ircd/m_privs.c ircd/m_proto.c ircd/m_pseudo.c ircd/m_quit.c ircd/m_rehash.c ircd/m_reset.c ircd/m_restart.c ircd/m_rping.c ircd/m_rpong.c ircd/m_server.c ircd/m_set.c ircd/m_settime.c ircd/m_silence.c ircd/m_squit.c ircd/m_stats.c ircd/m_svsnick.c ircd/m_time.c ircd/m_tmpl.c ircd/m_topic.c ircd/m_trace.c ircd/m_uping.c ircd/m_user.c ircd/m_userhost.c ircd/m_userip.c ircd/m_users.c ircd/m_version.c ircd/m_wallchops.c ircd/m_wallops.c ircd/m_wallusers.c ircd/m_wallvoices.c ircd/m_watch.c ircd/m_who.c ircd/m_whois.c ircd/m_whowas.c ircd/match.c ircd/memdebug.c ircd/motd.c ircd/msgq.c ircd/numnicks.c ircd/opercmds.c ircd/os_generic.c ircd/packet.c ircd/parse.c ircd/querycmds.c ircd/random.c ircd/s_auth.c ircd/s_bsd.c ircd/s_conf.c ircd/s_debug.c ircd/s_err.c ircd/s_misc.c ircd/s_numeric.c ircd/s_serv.c ircd/s_stats.c ircd/s_user.c ircd/send.c ircd/table_gen.c ircd/umkpasswd.c ircd/uping.c ircd/userload.c ircd/version.c.SH ircd/watch.c ircd/whowas.c ircd/test/.cvsignore ircd/test/Makefile.in tools/ringlog.c tools/wrapper.c Log message: Author: zoltan <zo...@ir...> Log message: 2007-04-20 Toni Garc�a <zo...@ir...> 1.0.beta1 * Escribir comentarios de doxygen * Statics ---------------------- diff included ---------------------- ----------------------- End of diff ----------------------- |