[IRC-Dev CVS] [CVS] Module ircd-ircdev: Change committed
Brought to you by:
zolty
From: Toni G. <zo...@us...> - 2005-04-02 19:47:56
|
CVSROOT : /cvsroot/irc-dev Module : ircd-ircdev Commit time: 2005-04-02 19:47:45 UTC Modified files: ChangeLog ChangeLog.es doc/ircd.sample-en.conf doc/ircd.sample-es.conf include/client.h include/handlers.h include/hash.h include/ircd_features.h include/msg.h include/numeric.h include/patchlevel.h include/s_conf.h include/struct.h ircd/channel.c ircd/engine_kqueue.c ircd/hash.c ircd/ircd_events.c ircd/ircd_features.c ircd/ircd_lexer.l ircd/ircd_parser.y ircd/ircd_res.c ircd/m_burst.c ircd/m_part.c ircd/m_privs.c ircd/m_server.c ircd/parse.c ircd/s_bsd.c ircd/s_err.c ircd/s_misc.c ircd/s_serv.c ircd/s_stats.c Log message: Author: zoltan <zo...@ir...> Log message: 2005-04-02 Toni García <zo...@ir...> 1.0.alpha24 * STATS J para jupe de nicks * PRIVS remoto * Correccion de Bugs * Sincronización Undernet ---------------------- diff included ---------------------- Index: ircd-ircdev/ChangeLog diff -u ircd-ircdev/ChangeLog:1.25 ircd-ircdev/ChangeLog:1.26 --- ircd-ircdev/ChangeLog:1.25 Thu Mar 31 04:58:01 2005 +++ ircd-ircdev/ChangeLog Sat Apr 2 11:47:33 2005 @@ -1,10 +1,16 @@ # # ChangeLog for ircd-ircdev # -# $Id: ChangeLog,v 1.25 2005/03/31 12:58:01 zolty Exp $ +# $Id: ChangeLog,v 1.26 2005/04/02 19:47:33 zolty Exp $ # # Insert new changes at beginning of the change list. # +2005-04-02 Toni García <zo...@ir...> 1.0.alpha24 + * STATS J for jupe nicks + * PRIVS remote + * Fix bugs + * Undernet synchronization + 2005-03-30 Toni García <zo...@ir...> 1.0.alpha23 * Table n (NICKDB) support * Usermode +r Index: ircd-ircdev/ChangeLog.es diff -u ircd-ircdev/ChangeLog.es:1.25 ircd-ircdev/ChangeLog.es:1.26 --- ircd-ircdev/ChangeLog.es:1.25 Thu Mar 31 04:58:01 2005 +++ ircd-ircdev/ChangeLog.es Sat Apr 2 11:47:33 2005 @@ -1,10 +1,16 @@ # # Log de Cambios para ircd-ircdev # -# $Id: ChangeLog.es,v 1.25 2005/03/31 12:58:01 zolty Exp $ +# $Id: ChangeLog.es,v 1.26 2005/04/02 19:47:33 zolty Exp $ # # Insertar los nuevos cambios al principio de esta lista de cambios. # +2005-04-02 Toni García <zo...@ir...> 1.0.alpha24 + * STATS J para jupe de nicks + * PRIVS remoto + * Correccion de Bugs + * Sincronización Undernet + 2005-03-30 Toni García <zo...@ir...> 1.0.alpha23 * Soporte de tabla n (NICKDB) * Modo de usuario +r Index: ircd-ircdev/doc/ircd.sample-en.conf diff -u ircd-ircdev/doc/ircd.sample-en.conf:1.15 ircd-ircdev/doc/ircd.sample-en.conf:1.16 --- ircd-ircdev/doc/ircd.sample-en.conf:1.15 Mon Mar 21 09:26:29 2005 +++ ircd-ircdev/doc/ircd.sample-en.conf Sat Apr 2 11:47:33 2005 @@ -811,6 +811,7 @@ # "HIS_STATS_h" = "TRUE"; # "HIS_STATS_i" = "TRUE"; # "HIS_STATS_j" = "TRUE"; +# "HIS_STATS_J" = "TRUE"; # "HIS_STATS_k" = "TRUE"; # "HIS_STATS_l" = "TRUE"; # "HIS_STATS_L" = "TRUE"; Index: ircd-ircdev/doc/ircd.sample-es.conf diff -u ircd-ircdev/doc/ircd.sample-es.conf:1.11 ircd-ircdev/doc/ircd.sample-es.conf:1.12 --- ircd-ircdev/doc/ircd.sample-es.conf:1.11 Mon Mar 21 09:26:31 2005 +++ ircd-ircdev/doc/ircd.sample-es.conf Sat Apr 2 11:47:33 2005 @@ -848,6 +848,7 @@ # "HIS_STATS_h" = "TRUE"; # "HIS_STATS_i" = "TRUE"; # "HIS_STATS_j" = "TRUE"; +# "HIS_STATS_J" = "TRUE"; # "HIS_STATS_k" = "TRUE"; # "HIS_STATS_l" = "TRUE"; # "HIS_STATS_L" = "TRUE"; Index: ircd-ircdev/include/client.h diff -u ircd-ircdev/include/client.h:1.13 ircd-ircdev/include/client.h:1.14 --- ircd-ircdev/include/client.h:1.13 Thu Mar 31 04:58:02 2005 +++ ircd-ircdev/include/client.h Sat Apr 2 11:47:34 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Structures and functions for handling local clients. - * @version $Id: client.h,v 1.13 2005/03/31 12:58:02 zolty Exp $ + * @version $Id: client.h,v 1.14 2005/04/02 19:47:34 zolty Exp $ */ #ifndef INCLUDED_client_h #define INCLUDED_client_h @@ -277,7 +277,7 @@ struct irc_in_addr cli_ip; /**< Real IP of client */ short cli_status; /**< Client type */ char cli_name[HOSTLEN + 1]; /**< Unique name of the client, nick or host */ - char cli_username[USERLEN + 1]; /**< username here now for auth stuff */ + char cli_username[USERLEN + 1]; /**< Username determined by ident lookup */ char cli_info[REALLEN + 1]; /**< Free form additional client information */ }; Index: ircd-ircdev/include/handlers.h diff -u ircd-ircdev/include/handlers.h:1.11 ircd-ircdev/include/handlers.h:1.12 --- ircd-ircdev/include/handlers.h:1.11 Thu Mar 31 04:58:02 2005 +++ ircd-ircdev/include/handlers.h Sat Apr 2 11:47:34 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Declarations for all protocol message handler functions. - * @version $Id: handlers.h,v 1.11 2005/03/31 12:58:02 zolty Exp $ + * @version $Id: handlers.h,v 1.12 2005/04/02 19:47:34 zolty Exp $ */ #ifndef INCLUDED_handlers_h #define INCLUDED_handlers_h @@ -229,6 +229,7 @@ extern int ms_ping(struct Client*, struct Client*, int, char*[]); extern int ms_pong(struct Client*, struct Client*, int, char*[]); extern int ms_privmsg(struct Client*, struct Client*, int, char*[]); +extern int ms_privs(struct Client*, struct Client*, int, char*[]); extern int ms_quit(struct Client*, struct Client*, int, char*[]); extern int ms_rping(struct Client*, struct Client*, int, char*[]); extern int ms_rpong(struct Client*, struct Client*, int, char*[]); Index: ircd-ircdev/include/hash.h diff -u ircd-ircdev/include/hash.h:1.6 ircd-ircdev/include/hash.h:1.7 --- ircd-ircdev/include/hash.h:1.6 Wed Mar 23 10:34:25 2005 +++ ircd-ircdev/include/hash.h Sat Apr 2 11:47:34 2005 @@ -22,13 +22,14 @@ */ /** @file * @brief Hash table management APIs. - * @version $Id: hash.h,v 1.6 2005/03/23 18:34:25 zolty Exp $ + * @version $Id: hash.h,v 1.7 2005/04/02 19:47:34 zolty Exp $ */ #ifndef INCLUDED_hash_h #define INCLUDED_hash_h struct Client; struct Channel; +struct StatDesc; struct Watch; /* @@ -98,6 +99,8 @@ extern int isNickJuped(const char *nick); extern int addNickJupes(const char *nicks); extern void clearNickJupes(void); +extern void stats_nickjupes(struct Client* to, const struct StatDesc* sd, + 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.11 ircd-ircdev/include/ircd_features.h:1.12 --- ircd-ircdev/include/ircd_features.h:1.11 Thu Mar 31 04:58:02 2005 +++ ircd-ircdev/include/ircd_features.h Sat Apr 2 11:47:34 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Public interfaces and declarations for dealing with configurable features. - * @version $Id: ircd_features.h,v 1.11 2005/03/31 12:58:02 zolty Exp $ + * @version $Id: ircd_features.h,v 1.12 2005/04/02 19:47:34 zolty Exp $ */ #ifndef INCLUDED_features_h #define INCLUDED_features_h @@ -112,28 +112,29 @@ FEAT_HIS_MAP, FEAT_HIS_LINKS, FEAT_HIS_TRACE, - FEAT_HIS_STATS_l, - FEAT_HIS_STATS_L, FEAT_HIS_STATS_a, #if defined(DDB) FEAT_HIS_STATS_b, #endif FEAT_HIS_STATS_c, + FEAT_HIS_STATS_d, + FEAT_HIS_STATS_e, + FEAT_HIS_STATS_f, FEAT_HIS_STATS_g, FEAT_HIS_STATS_h, - FEAT_HIS_STATS_k, - FEAT_HIS_STATS_f, FEAT_HIS_STATS_i, FEAT_HIS_STATS_j, - FEAT_HIS_STATS_M, + FEAT_HIS_STATS_J, + FEAT_HIS_STATS_k, + FEAT_HIS_STATS_l, + FEAT_HIS_STATS_L, FEAT_HIS_STATS_m, + FEAT_HIS_STATS_M, FEAT_HIS_STATS_o, FEAT_HIS_STATS_p, FEAT_HIS_STATS_q, - FEAT_HIS_STATS_R, FEAT_HIS_STATS_r, - FEAT_HIS_STATS_d, - FEAT_HIS_STATS_e, + FEAT_HIS_STATS_R, FEAT_HIS_STATS_t, FEAT_HIS_STATS_T, FEAT_HIS_STATS_u, Index: ircd-ircdev/include/msg.h diff -u ircd-ircdev/include/msg.h:1.11 ircd-ircdev/include/msg.h:1.12 --- ircd-ircdev/include/msg.h:1.11 Thu Mar 31 04:58:02 2005 +++ ircd-ircdev/include/msg.h Sat Apr 2 11:47:34 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Command and token declarations and structures. - * @version $Id: msg.h,v 1.11 2005/03/31 12:58:02 zolty Exp $ + * @version $Id: msg.h,v 1.12 2005/04/02 19:47:34 zolty Exp $ */ #ifndef INCLUDED_msg_h #define INCLUDED_msg_h @@ -360,7 +360,8 @@ #define TOK_GET "GET" #define MSG_PRIVS "PRIVS" /* PRIV */ -#define TOK_PRIVS "PRIVS" +#define TOK_PRIVS "PR" +#define CMD_PRIVS MSG_PRIVS, TOK_PRIVS #define MSG_CAP "CAP" #define TOK_CAP "CAP" Index: ircd-ircdev/include/numeric.h diff -u ircd-ircdev/include/numeric.h:1.10 ircd-ircdev/include/numeric.h:1.11 --- ircd-ircdev/include/numeric.h:1.10 Thu Mar 31 04:58:02 2005 +++ ircd-ircdev/include/numeric.h Sat Apr 2 11:47:34 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Declarations of numeric replies and supporting functions. - * @version $Id: numeric.h,v 1.10 2005/03/31 12:58:02 zolty Exp $ + * @version $Id: numeric.h,v 1.11 2005/04/02 19:47:34 zolty Exp $ */ #ifndef INCLUDED_numeric_h #define INCLUDED_numeric_h @@ -97,7 +97,7 @@ #define RPL_STATSNLINE 214 /* unused */ #define RPL_STATSILINE 215 #define RPL_STATSKLINE 216 -#define RPL_STATSPLINE 217 /* Undernet extenstion */ +#define RPL_STATSPLINE 217 /* Undernet extension */ /* RPL_STATSQLINE 217 Various */ #define RPL_STATSYLINE 218 #define RPL_ENDOFSTATS 219 /* See also RPL_STATSDLINE */ @@ -106,6 +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 */ /* RPL_STATSELINE 223 dalnet */ /* RPL_STATSGLINE 223 unreal */ /* RPL_STATSFLINE 224 Hybrid extension,Dalnet */ Index: ircd-ircdev/include/patchlevel.h diff -u ircd-ircdev/include/patchlevel.h:1.25 ircd-ircdev/include/patchlevel.h:1.26 --- ircd-ircdev/include/patchlevel.h:1.25 Thu Mar 31 04:58:03 2005 +++ ircd-ircdev/include/patchlevel.h Sat Apr 2 11:47:34 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.25 2005/03/31 12:58:03 zolty Exp $ + * $Id: patchlevel.h,v 1.26 2005/04/02 19:47:34 zolty Exp $ * */ -#define PATCHLEVEL ".alpha23" +#define PATCHLEVEL ".alpha24" #define RELEASE "1.0" Index: ircd-ircdev/include/s_conf.h diff -u ircd-ircdev/include/s_conf.h:1.8 ircd-ircdev/include/s_conf.h:1.9 --- ircd-ircdev/include/s_conf.h:1.8 Mon Jan 10 04:22:00 2005 +++ ircd-ircdev/include/s_conf.h Sat Apr 2 11:47:34 2005 @@ -21,7 +21,7 @@ */ /** @file s_conf.h * @brief ircd configuration file API. - * @version $Id: s_conf.h,v 1.8 2005/01/10 12:22:00 zolty Exp $ + * @version $Id: s_conf.h,v 1.9 2005/04/02 19:47:34 zolty Exp $ */ #ifndef INCLUDED_s_conf_h #define INCLUDED_s_conf_h @@ -156,6 +156,8 @@ char nick[1]; /**< start of nick\@server string */ }; +#define SMAP_FAST 1 /**< Command does not have MFLG_SLOW. */ + /** Target set for a service pseudo-command. */ struct s_map { struct s_map *next; /**< Next element in #GlobalServiceMapList. */ @@ -163,6 +165,7 @@ char *name; /**< Text name of the mapping. */ char *command; /**< Command name to use. */ char *prepend; /**< Extra text to prepend to user's text. */ + unsigned int flags; /**< Bitwise map of SMAP_* flags. */ struct nick_host *services; /**< Linked list of possible targets. */ }; Index: ircd-ircdev/include/struct.h diff -u ircd-ircdev/include/struct.h:1.8 ircd-ircdev/include/struct.h:1.9 --- ircd-ircdev/include/struct.h:1.8 Wed Mar 23 10:34:27 2005 +++ ircd-ircdev/include/struct.h Sat Apr 2 11:47:34 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Structure definitions for users and servers. - * @version $Id: struct.h,v 1.8 2005/03/23 18:34:27 zolty Exp $ + * @version $Id: struct.h,v 1.9 2005/04/02 19:47:34 zolty Exp $ */ #ifndef INCLUDED_struct_h #define INCLUDED_struct_h @@ -82,7 +82,12 @@ unsigned int joined; /**< number of channels joined */ unsigned int invites; /**< Number of channels we've been invited to */ unsigned int watches; /**< Number of entrances in the watch list */ - char username[USERLEN + 1]; /**< remote account name */ + /** Remote account name. Before registration is complete, this is + * either empty or contains the username from the USER command. + * After registration, that may be prefixed with ~ or it may be + * overwritten with the ident response. + */ + char username[USERLEN + 1]; char host[HOSTLEN + 1]; /**< displayed hostname */ char realhost[HOSTLEN + 1]; /**< actual hostname */ #if defined(UNDERNET) Index: ircd-ircdev/ircd/channel.c diff -u ircd-ircdev/ircd/channel.c:1.15 ircd-ircdev/ircd/channel.c:1.16 --- ircd-ircdev/ircd/channel.c:1.15 Mon Mar 21 10:39:05 2005 +++ ircd-ircdev/ircd/channel.c Sat Apr 2 11:47:34 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Channel management and maintanance - * @version $Id: channel.c,v 1.15 2005/03/21 18:39:05 zolty Exp $ + * @version $Id: channel.c,v 1.16 2005/04/02 19:47:34 zolty Exp $ */ #include "config.h" @@ -996,7 +996,7 @@ * Do we have a nick with a new mode ? * Or are we starting a new BURST line? */ - if (new_mode || !feat_oplevels) + if (new_mode) { /* * This means we are at the _first_ member that has only @@ -1024,7 +1024,7 @@ msgq_append(&me, mb, tbuf); new_mode = 0; } - else if (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 Index: ircd-ircdev/ircd/engine_kqueue.c diff -u ircd-ircdev/ircd/engine_kqueue.c:1.6 ircd-ircdev/ircd/engine_kqueue.c:1.7 --- ircd-ircdev/ircd/engine_kqueue.c:1.6 Wed Jan 26 09:19:47 2005 +++ ircd-ircdev/ircd/engine_kqueue.c Sat Apr 2 11:47:35 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief FreeBSD kqueue()/kevent() event engine. - * @version $Id: engine_kqueue.c,v 1.6 2005/01/26 17:19:47 zolty Exp $ + * @version $Id: engine_kqueue.c,v 1.7 2005/04/02 19:47:35 zolty Exp $ */ #include "config.h" @@ -301,11 +301,6 @@ dellist[1].data = 0; dellist[1].udata = 0; - /* make it all go away */ - if (kevent(kqueue_id, dellist, 2, 0, 0, 0) < 0) - log_write(LS_SOCKET, L_WARNING, 0, - "Unable to delete kevent items for socket %d", s_fd(sock)); - sockList[s_fd(sock)] = 0; } Index: ircd-ircdev/ircd/hash.c diff -u ircd-ircdev/ircd/hash.c:1.8 ircd-ircdev/ircd/hash.c:1.9 --- ircd-ircdev/ircd/hash.c:1.8 Wed Mar 23 10:34:47 2005 +++ ircd-ircdev/ircd/hash.c Sat Apr 2 11:47:35 2005 @@ -22,7 +22,7 @@ */ /** @file * @brief Hash table management. - * @version $Id: hash.c,v 1.8 2005/03/23 18:34:47 zolty Exp $ + * @version $Id: hash.c,v 1.9 2005/04/02 19:47:35 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 @@ -479,6 +479,21 @@ jupeTable[i][0] = '\000'; } +/** Report all nick jupes to a user. + * @param[in] to Client requesting statistics. + * @param[in] sd Stats descriptor for request (ignored). + * @param[in] param Extra parameter from user (ignored). + */ +void +stats_nickjupes(struct Client* to, const struct StatDesc* sd, char* param) +{ + int i; + + for (i = 0; i < JUPEHASHSIZE; i++) + if (jupeTable[i][0]) + send_reply(to, RPL_STATSJLINE, jupeTable[i]); +} + /** Send more channels to a client in mid-LIST. * @param[in] cptr Client to send the list to. */ Index: ircd-ircdev/ircd/ircd_events.c diff -u ircd-ircdev/ircd/ircd_events.c:1.6 ircd-ircdev/ircd/ircd_events.c:1.7 --- ircd-ircdev/ircd/ircd_events.c:1.6 Mon Jan 10 04:22:59 2005 +++ ircd-ircdev/ircd/ircd_events.c Sat Apr 2 11:47:35 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Implementation of event loop mid-layer. - * @version $Id: ircd_events.c,v 1.6 2005/01/10 12:22:59 zolty Exp $ + * @version $Id: ircd_events.c,v 1.7 2005/04/02 19:47:35 zolty Exp $ */ #include "config.h" @@ -528,12 +528,20 @@ "timeout %Tu", timer, timer_to_name(timer->t_type), timer->t_value, timer_to_name(type), value)); - gen_dequeue(timer); /* remove the timer from the queue */ - timer->t_type = type; /* Set the new type and value */ timer->t_value = value; timer->t_expire = 0; + /* If the timer expiration callback tries to change the timer + * expiration, flag the timer but do not dequeue it yet. + */ + if (timer->t_header.gh_flags & GEN_MARKED) + { + timer->t_header.gh_flags |= GEN_READD; + 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.13 ircd-ircdev/ircd/ircd_features.c:1.14 --- ircd-ircdev/ircd/ircd_features.c:1.13 Thu Mar 31 04:58:04 2005 +++ ircd-ircdev/ircd/ircd_features.c Sat Apr 2 11:47:35 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Implementation of configurable feature support. - * @version $Id: ircd_features.c,v 1.13 2005/03/31 12:58:04 zolty Exp $ + * @version $Id: ircd_features.c,v 1.14 2005/04/02 19:47:35 zolty Exp $ */ #include "config.h" @@ -352,28 +352,29 @@ F_B(HIS_MAP, 0, 1, 0), F_B(HIS_LINKS, 0, 1, 0), F_B(HIS_TRACE, 0, 1, 0), - F_B(HIS_STATS_l, 0, 1, 0), - F_B(HIS_STATS_L, 0, 1, 0), F_B(HIS_STATS_a, 0, 1, 0), #if defined(DDB) F_B(HIS_STATS_b, 0, 1, 0), #endif F_B(HIS_STATS_c, 0, 1, 0), + F_B(HIS_STATS_d, 0, 1, 0), + 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_k, 0, 1, 0), - F_B(HIS_STATS_f, 0, 1, 0), F_B(HIS_STATS_i, 0, 1, 0), F_B(HIS_STATS_j, 0, 1, 0), - F_B(HIS_STATS_M, 0, 1, 0), + F_B(HIS_STATS_J, 0, 1, 0), + F_B(HIS_STATS_k, 0, 1, 0), + F_B(HIS_STATS_l, 0, 1, 0), + F_B(HIS_STATS_L, 0, 1, 0), F_B(HIS_STATS_m, 0, 1, 0), + F_B(HIS_STATS_M, 0, 1, 0), F_B(HIS_STATS_o, 0, 1, 0), F_B(HIS_STATS_p, 0, 1, 0), F_B(HIS_STATS_q, 0, 1, 0), - F_B(HIS_STATS_R, 0, 1, 0), F_B(HIS_STATS_r, 0, 1, 0), - F_B(HIS_STATS_d, 0, 1, 0), - F_B(HIS_STATS_e, 0, 1, 0), + F_B(HIS_STATS_R, 0, 1, 0), F_B(HIS_STATS_t, 0, 1, 0), F_B(HIS_STATS_T, 0, 1, 0), F_B(HIS_STATS_u, 0, 0, 0), Index: ircd-ircdev/ircd/ircd_lexer.l diff -u ircd-ircdev/ircd/ircd_lexer.l:1.10 ircd-ircdev/ircd/ircd_lexer.l:1.11 --- ircd-ircdev/ircd/ircd_lexer.l:1.10 Wed Mar 9 10:12:34 2005 +++ ircd-ircdev/ircd/ircd_lexer.l Sat Apr 2 11:47:35 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_lexer.l,v 1.10 2005/03/09 18:12:34 zolty Exp $ + * $Id: ircd_lexer.l,v 1.11 2005/04/02 19:47:35 zolty Exp $ * */ @@ -100,6 +100,7 @@ TOKEN(PSEUDO), TOKEN(PREPEND), TOKEN(USERMODE), + TOKEN(FAST), #undef TOKEN { "administrator", ADMIN }, { "apass_opmode", TPRIV_APASS_OPMODE }, Index: ircd-ircdev/ircd/ircd_parser.y diff -u ircd-ircdev/ircd/ircd_parser.y:1.15 ircd-ircdev/ircd/ircd_parser.y:1.16 --- ircd-ircdev/ircd/ircd_parser.y:1.15 Mon Mar 21 10:39:07 2005 +++ ircd-ircdev/ircd/ircd_parser.y Sat Apr 2 11:47:35 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.15 2005/03/21 18:39:07 zolty Exp $ + * $Id: ircd_parser.y,v 1.16 2005/04/02 19:47:35 zolty Exp $ * */ %{ @@ -158,6 +158,7 @@ %token USERMODE %token IAUTH %token TIMEOUT +%token FAST /* and now a lot of privileges... */ %token TPRIV_CHAN_LIMIT TPRIV_MODE_LCHAN TPRIV_DEOP_LCHAN TPRIV_WALK_LCHAN %token TPRIV_LOCAL_KILL TPRIV_REHASH TPRIV_RESTART TPRIV_DIE @@ -945,7 +946,7 @@ }; pseudoitems: pseudoitem pseudoitems | pseudoitem; -pseudoitem: pseudoname | pseudoprepend | pseudonick | error; +pseudoitem: pseudoname | pseudoprepend | pseudonick | pseudoflags | error; pseudoname: NAME '=' QSTRING ';' { DupString(smap->name, $3); @@ -967,6 +968,10 @@ smap->services = nh; } }; +pseudoflags: FAST ';' +{ + smap->flags |= SMAP_FAST; +}; iauthblock: IAUTH '{' { Index: ircd-ircdev/ircd/ircd_res.c diff -u ircd-ircdev/ircd/ircd_res.c:1.7 ircd-ircdev/ircd/ircd_res.c:1.8 --- ircd-ircdev/ircd/ircd_res.c:1.7 Mon Mar 21 10:39:08 2005 +++ ircd-ircdev/ircd/ircd_res.c Sat Apr 2 11:47:35 2005 @@ -41,7 +41,7 @@ */ /** @file * @brief IRC resolver functions. - * @version $Id: ircd_res.c,v 1.7 2005/03/21 18:39:08 zolty Exp $ + * @version $Id: ircd_res.c,v 1.8 2005/04/02 19:47:35 zolty Exp $ */ #include "client.h" #include "ircd_alloc.h" @@ -300,23 +300,30 @@ { if (when > CurrentTime + AR_TTL) when = CurrentTime + AR_TTL; - if (!t_active(&res_timeout) || !t_onqueue(&res_timeout)) + /* TODO after 2.10.12: Rewrite the timer API because there should be + * no need for clients to know this kind of implementation detail. */ + 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); + else timer_add(&res_timeout, timeout_resolver, NULL, TT_ABSOLUTE, when); - else if (when < t_expire(&res_timeout)) - timer_chg(&res_timeout, TT_ABSOLUTE, when); } /** Drop pending DNS lookups which have timed out. - * @param[in] notused Timer event data (ignored). + * @param[in] ev Timer event data (ignored). */ static void -timeout_resolver(struct Event *notused) +timeout_resolver(struct Event *ev) { struct dlink *ptr, *next_ptr; struct reslist *request; time_t next_time = 0; time_t timeout = 0; + if (ev_type(ev) != ET_EXPIRE) + return; + for (ptr = request_list.next; ptr != &request_list; ptr = next_ptr) { next_ptr = ptr->next; @@ -531,6 +538,7 @@ if (request == NULL) { request = make_request(query); + request->state= REQ_PTR; request->type = T_PTR; memcpy(&request->addr, addr, sizeof(request->addr)); request->name = (char *)MyMalloc(HOSTLEN + 1); @@ -822,7 +830,7 @@ * If a bad error was returned, we stop here and don't send * send any more (no retries granted). */ - Debug((DEBUG_DNS, "Request %p has bad response (state %d type %d)", request, request->state, request->type)); + 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); rem_request(request); } Index: ircd-ircdev/ircd/m_burst.c diff -u ircd-ircdev/ircd/m_burst.c:1.8 ircd-ircdev/ircd/m_burst.c:1.9 --- ircd-ircdev/ircd/m_burst.c:1.8 Mon Mar 21 10:39:08 2005 +++ ircd-ircdev/ircd/m_burst.c Sat Apr 2 11:47:35 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.8 2005/03/21 18:39:08 zolty Exp $ + * $Id: m_burst.c,v 1.9 2005/04/02 19:47:35 zolty Exp $ * */ @@ -300,6 +300,26 @@ modebuf_mode(mbuf, MODE_DEL | chptr->mode.mode); /* wipeout modes */ chptr->mode.mode &= MODE_BURSTADDED | MODE_WASDELJOINS; + /* wipe out modes not represented in chptr->mode.mode */ + if (chptr->mode.limit) { + modebuf_mode_uint(mbuf, MODE_DEL | MODE_LIMIT, chptr->mode.limit); + chptr->mode.limit = 0; + } + if (chptr->mode.key[0]) { + modebuf_mode_string(mbuf, MODE_DEL | MODE_KEY, chptr->mode.key, 0); + chptr->mode.key[0] = '\0'; + } +#if defined(UNDERNET) + if (chptr->mode.upass[0]) { + modebuf_mode_string(mbuf, MODE_DEL | MODE_UPASS, chptr->mode.upass, 0); + chptr->mode.upass[0] = '\0'; + } + if (chptr->mode.apass[0]) { + modebuf_mode_string(mbuf, MODE_DEL | MODE_APASS, chptr->mode.apass, 0); + chptr->mode.apass[0] = '\0'; + } +#endif + parse_flags |= (MODE_PARSE_SET | MODE_PARSE_WIPEOUT); /* wipeout keys */ /* mark bans for wipeout */ @@ -489,7 +509,12 @@ if (current_mode & CHFL_VOICE) nickstr[nickpos++] = 'v'; if (current_mode & CHFL_CHANOP) - nickpos += ircd_snprintf(0, nickstr + nickpos, sizeof(nickstr) - nickpos, "%u", oplevel); + { + if (chptr->mode.apass[0]) + nickpos += ircd_snprintf(0, nickstr + nickpos, sizeof(nickstr) - nickpos, "%u", oplevel); + else + nickstr[nickpos++] = 'o'; + } } else if (current_mode & CHFL_CHANOP && oplevel != last_oplevel) { /* if just op level changed... */ nickstr[nickpos++] = ':'; /* add a specifier */ nickpos += ircd_snprintf(0, nickstr + nickpos, sizeof(nickstr) - nickpos, "%u", oplevel - last_oplevel); Index: ircd-ircdev/ircd/m_part.c diff -u ircd-ircdev/ircd/m_part.c:1.6 ircd-ircdev/ircd/m_part.c:1.7 --- ircd-ircdev/ircd/m_part.c:1.6 Mon Jan 10 04:23:02 2005 +++ ircd-ircdev/ircd/m_part.c Sat Apr 2 11:47:35 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_part.c,v 1.6 2005/01/10 12:23:02 zolty Exp $ + * $Id: m_part.c,v 1.7 2005/04/02 19:47:35 zolty Exp $ * */ @@ -200,14 +200,6 @@ if (IsDelayedJoin(member)) flags |= CHFL_DELAYED; - /* - * XXX BUG: If a client /part's with a part notice, on channels where - * he's banned, local clients will not see the part notice, but remote - * clients will. - */ - if (!member_can_send_to_channel(member, 0)) - flags |= CHFL_BANNED; - /* part user from channel */ joinbuf_join(&parts, chptr, flags); } Index: ircd-ircdev/ircd/m_privs.c diff -u ircd-ircdev/ircd/m_privs.c:1.4 ircd-ircdev/ircd/m_privs.c:1.5 --- ircd-ircdev/ircd/m_privs.c:1.4 Mon Jan 10 04:23:02 2005 +++ ircd-ircdev/ircd/m_privs.c Sat Apr 2 11:47:35 2005 @@ -18,65 +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_privs.c,v 1.4 2005/01/10 12:23:02 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. +/** @file + * @brief Report operators' privileges to others + * @version $Id: m_privs.c,v 1.5 2005/04/02 19:47:35 zolty Exp $ */ #include "config.h" @@ -86,14 +31,19 @@ #include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" +#include "msg.h" #include "numeric.h" #include "numnicks.h" #include "send.h" /* #include <assert.h> -- Now using assert in ircd_log.h */ -/* - * mo_privs - report operator privileges +/** Handle a local operator's privilege query. + * @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. + * @see \ref m_functions */ int mo_privs(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) { @@ -108,10 +58,46 @@ for (i = 1; i < parc; i++) { for (name = ircd_strtok(&p, parv[i], " "); name; name = ircd_strtok(&p, 0, " ")) { - if ((acptr = FindUser(name))) + if (!(acptr = FindUser(name))) + continue; + else if (MyUser(acptr)) client_report_privs(sptr, acptr); + else + sendcmdto_one(cptr, CMD_PRIVS, acptr, "%s%s", NumNick(acptr)); } } return 0; } + +/** Handle a remote user's privilege query. + * @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. + * @see \ref m_functions + */ +int ms_privs(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) +{ + struct Client *acptr; + char *numnick, *p = 0; + int i; + + if (parc < 2) + return protocol_violation(cptr, "PRIVS with no arguments"); + + for (i = 1; i < parc; i++) { + for (numnick = ircd_strtok(&p, parv[i], " "); numnick; + numnick = ircd_strtok(&p, 0, " ")) { + if (!(acptr = findNUser(numnick))) + continue; + else if (MyUser(acptr)) + client_report_privs(sptr, acptr); + else + sendcmdto_one(cptr, CMD_PRIVS, acptr, "%s%s", NumNick(acptr)); + } + } + + return 0; +} + Index: ircd-ircdev/ircd/m_server.c diff -u ircd-ircdev/ircd/m_server.c:1.7 ircd-ircdev/ircd/m_server.c:1.8 --- ircd-ircdev/ircd/m_server.c:1.7 Mon Mar 21 10:39:08 2005 +++ ircd-ircdev/ircd/m_server.c Sat Apr 2 11:47:35 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Handlers for the SERVER command. - * @version $Id: m_server.c,v 1.7 2005/03/21 18:39:08 zolty Exp $ + * @version $Id: m_server.c,v 1.8 2005/04/02 19:47:35 zolty Exp $ */ #include "config.h" @@ -477,6 +477,20 @@ } } +/** Interpret a server's flags. + * + * @param[in] cptr New server structure. + * @param[in] flags String listing server's P10 flags. + */ +void set_server_flags(struct Client *cptr, const char *flags) +{ + while (*flags) switch (*flags++) { + case 'h': SetHub(cptr); break; + case 's': SetService(cptr); break; + case '6': SetIPv6(cptr); break; + } +} + /** Handle a SERVER message from an unregistered connection. * * \a parv has the following elements: @@ -497,7 +511,6 @@ */ int mr_server(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) { - char* ch; char* host; struct ConfItem* aconf; struct Jupe* ajupe; @@ -615,17 +628,8 @@ /* Attach any necessary UWorld config items. */ attach_confs_byhost(cptr, host, CONF_UWORLD); - if (*parv[7] == '+') { - for (ch = parv[7] + 1; *ch; ch++) - switch (*ch) { - case 'h': - SetHub(cptr); - break; - case 's': - SetService(cptr); - break; - } - } + if (*parv[7] == '+') + set_server_flags(cptr, parv[7] + 1); recv_time = TStime(); check_start_timestamp(cptr, timestamp, start_timestamp, recv_time); @@ -664,7 +668,6 @@ */ int ms_server(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) { - char* ch; int i; char* host; struct Client* acptr; @@ -739,17 +742,8 @@ /* Attach any necessary UWorld config items. */ attach_confs_byhost(cptr, host, CONF_UWORLD); - if (*parv[7] == '+') { - for (ch = parv[7] + 1; *ch; ch++) - switch (*ch) { - case 'h': - SetHub(acptr); - break; - case 's': - SetService(acptr); - break; - } - } + if (*parv[7] == '+') + set_server_flags(acptr, parv[7] + 1); Count_newremoteserver(UserStats); if (Protocol(acptr) < 10) @@ -759,9 +753,13 @@ if (*parv[5] == 'J') { SetBurst(acptr); - sendto_opmask_butone(0, SNO_NETWORK, "Net junction: %s %s", - cli_name(sptr), cli_name(acptr)); SetJunction(acptr); + for (bcptr = cli_serv(acptr)->up; !IsMe(bcptr); bcptr = cli_serv(bcptr)->up) + if (IsBurstOrBurstAck(bcptr)) + break; + if (IsMe(bcptr)) + sendto_opmask_butone(0, SNO_NETWORK, "Net junction: %s %s", + cli_name(sptr), cli_name(acptr)); } /* * Old sendto_serv_but_one() call removed because we now need to send @@ -774,10 +772,11 @@ continue; if (0 == match(cli_name(&me), cli_name(acptr))) continue; - sendcmdto_one(sptr, CMD_SERVER, bcptr, "%s %d 0 %s %s %s%s +%s%s :%s", + sendcmdto_one(sptr, CMD_SERVER, bcptr, "%s %d 0 %s %s %s%s +%s%s%s :%s", cli_name(acptr), hop + 1, parv[4], parv[5], NumServCap(acptr), IsHub(acptr) ? "h" : "", - IsService(acptr) ? "s" : "", cli_info(acptr)); + IsService(acptr) ? "s" : "", IsIPv6(acptr) ? "6" : "", + cli_info(acptr)); } return 0; } Index: ircd-ircdev/ircd/parse.c diff -u ircd-ircdev/ircd/parse.c:1.14 ircd-ircdev/ircd/parse.c:1.15 --- ircd-ircdev/ircd/parse.c:1.14 Thu Mar 31 04:58:04 2005 +++ ircd-ircdev/ircd/parse.c Sat Apr 2 11:47:35 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Parse input from IRC clients and other servers. - * @version $Id: parse.c,v 1.14 2005/03/31 12:58:04 zolty Exp $ + * @version $Id: parse.c,v 1.15 2005/04/02 19:47:35 zolty Exp $ */ #include "config.h" @@ -609,7 +609,7 @@ TOK_PRIVS, 0, MAXPARA, MFLG_SLOW, 0, NULL, /* UNREG, CLIENT, SERVER, OPER, SERVICE */ - { m_unregistered, m_not_oper, m_ignore, mo_privs, m_ignore } + { m_unregistered, m_not_oper, ms_privs, mo_privs, m_ignore } }, #if defined(UNDERNET) { @@ -792,18 +792,18 @@ msg->tok = map->command; msg->count = 0; msg->parameters = 2; - msg->flags = MFLG_SLOW | MFLG_EXTRA; + msg->flags = MFLG_EXTRA; + if (!(map->flags & SMAP_FAST)) + msg->flags |= MFLG_SLOW; msg->bytes = 0; msg->extra = map; msg->handlers[UNREGISTERED_HANDLER] = m_ignore; msg->handlers[CLIENT_HANDLER] = m_pseudo; msg->handlers[SERVER_HANDLER] = m_ignore; - msg->handlers[OPER_HANDLER] = m_pseudo; + msg->handlers[OPER_HANDLER] = m_pseudo; msg->handlers[SERVICE_HANDLER] = m_ignore; - /* Service mappings are only applicable to clients; insert the - pseudocommand into the command tree only. */ add_msg_element(&msg_tree, msg, msg->cmd); map->msg = msg; @@ -907,7 +907,7 @@ paramcount = mptr->parameters; i = bufend - ((s) ? s : ch); mptr->bytes += i; - if ((mptr->flags & MFLG_SLOW)) + if ((mptr->flags & MFLG_SLOW) || !IsAnOper(cptr)) cli_since(cptr) += (2 + i / 120); /* * Allow only 1 msg per 2 seconds Index: ircd-ircdev/ircd/s_bsd.c diff -u ircd-ircdev/ircd/s_bsd.c:1.12 ircd-ircdev/ircd/s_bsd.c:1.13 --- ircd-ircdev/ircd/s_bsd.c:1.12 Wed Mar 23 10:34:52 2005 +++ ircd-ircdev/ircd/s_bsd.c Sat Apr 2 11:47:35 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.12 2005/03/23 18:34:52 zolty Exp $ + * @version $Id: s_bsd.c,v 1.13 2005/04/02 19:47:35 zolty Exp $ */ #include "config.h" @@ -907,6 +907,11 @@ cli_error(cptr) = ev_data(ev); if (s_state(&(con_socket(con))) == SS_CONNECTING) { completed_connection(cptr); + /* for some reason, the os_get_sockerr() in completed_connect() + * can return 0 even when ev_data(ev) indicates a real error, so + * re-assign the client error here. + */ + cli_error(cptr) = ev_data(ev); break; } /*FALLTHROUGH*/ Index: ircd-ircdev/ircd/s_err.c diff -u ircd-ircdev/ircd/s_err.c:1.14 ircd-ircdev/ircd/s_err.c:1.15 --- ircd-ircdev/ircd/s_err.c:1.14 Thu Mar 31 04:58:04 2005 +++ ircd-ircdev/ircd/s_err.c Sat Apr 2 11:47:35 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Error handling support. - * @version $Id: s_err.c,v 1.14 2005/03/31 12:58:04 zolty Exp $ + * @version $Id: s_err.c,v 1.15 2005/04/02 19:47:35 zolty Exp $ */ #include "config.h" @@ -483,7 +483,7 @@ /* 221 */ { RPL_UMODEIS, "%s", "221" }, /* 222 */ - { 0 }, + { RPL_STATSJLINE, "J %s", "222" }, /* 223 */ { 0 }, /* 224 */ Index: ircd-ircdev/ircd/s_misc.c diff -u ircd-ircdev/ircd/s_misc.c:1.8 ircd-ircdev/ircd/s_misc.c:1.9 --- ircd-ircdev/ircd/s_misc.c:1.8 Mon Mar 21 10:39:12 2005 +++ ircd-ircdev/ircd/s_misc.c Sat Apr 2 11:47:35 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Miscellaneous support functions. - * @version $Id: s_misc.c,v 1.8 2005/03/21 18:39:12 zolty Exp $ + * @version $Id: s_misc.c,v 1.9 2005/04/02 19:47:35 zolty Exp $ */ #include "config.h" @@ -164,16 +164,12 @@ { static char nbuf[HOSTLEN * 2 + USERLEN + 5]; - if (MyConnect(sptr)) { - if (showip) - ircd_snprintf(0, nbuf, sizeof(nbuf), "%s[%s@%s]", cli_name(sptr), - IsIdented(sptr) ? cli_username(sptr) : "unknown", - cli_sock_ip(sptr)); - else - return cli_name(sptr); - return nbuf; - } - return cli_name(sptr); + if (!MyConnect(sptr) || !showip) + return cli_name(sptr); + ircd_snprintf(0, nbuf, sizeof(nbuf), "%s[%s@%s]", cli_name(sptr), + IsIdented(sptr) ? cli_username(sptr) : "", + cli_sock_ip(sptr)); + return nbuf; } /** Set cli_sockhost(cptr) from \a host. Index: ircd-ircdev/ircd/s_serv.c diff -u ircd-ircdev/ircd/s_serv.c:1.9 ircd-ircdev/ircd/s_serv.c:1.10 --- ircd-ircdev/ircd/s_serv.c:1.9 Wed Mar 23 10:34:52 2005 +++ ircd-ircdev/ircd/s_serv.c Sat Apr 2 11:47:35 2005 @@ -21,7 +21,7 @@ */ /** @file * @brief Miscellaneous server support functions. - * @version $Id: s_serv.c,v 1.9 2005/03/23 18:34:52 zolty Exp $ + * @version $Id: s_serv.c,v 1.10 2005/04/02 19:47:35 zolty Exp $ */ #include "config.h" @@ -203,10 +203,10 @@ if (!match(cli_name(&me), cli_name(cptr))) continue; sendcmdto_one(&me, CMD_SERVER, acptr, - "%s 2 0 %Tu J%02u %s%s +%s%s :%s", cli_name(cptr), + "%s 2 0 %Tu J%02u %s%s +%s%s%s :%s", cli_name(cptr), cli_serv(cptr)->timestamp, Protocol(cptr), NumServCap(cptr), IsHub(cptr) ? "h" : "", IsService(cptr) ? "s" : "", - cli_info(cptr)); + IsIPv6(cptr) ? "6" : "", cli_info(cptr)); } /* Send these as early as possible so that glined users/juped servers can @@ -246,11 +246,11 @@ if (0 == match(cli_name(&me), cli_name(acptr))) continue; sendcmdto_one(cli_serv(acptr)->up, CMD_SERVER, cptr, - "%s %d 0 %Tu %s%u %s%s +%s%s :%s", cli_name(acptr), + "%s %d 0 %Tu %s%u %s%s +%s%s%s :%s", cli_name(acptr), cli_hopcount(acptr) + 1, cli_serv(acptr)->timestamp, protocol_str, Protocol(acptr), NumServCap(acptr), IsHub(acptr) ? "h" : "", IsService(acptr) ? "s" : "", - cli_info(acptr)); + IsIPv6(acptr) ? "6" : "", cli_info(acptr)); } } Index: ircd-ircdev/ircd/s_stats.c diff -u ircd-ircdev/ircd/s_stats.c:1.10 ircd-ircdev/ircd/s_stats.c:1.11 --- ircd-ircdev/ircd/s_stats.c:1.10 Wed Mar 23 10:34:52 2005 +++ ircd-ircdev/ircd/s_stats.c Sat Apr 2 11:47:35 2005 @@ -22,7 +22,7 @@ /** @file * @brief Report configuration lines and other statistics from this * server. - * @version $Id: s_stats.c,v 1.10 2005/03/23 18:34:52 zolty Exp $ + * @version $Id: s_stats.c,v 1.11 2005/04/02 19:47:35 zolty Exp $ * * Note: The info is reported in the order the server uses * it--not reversed as in ircd.conf! @@ -34,6 +34,7 @@ #include "client.h" #include "ddb.h" #include "gline.h" +#include "hash.h" #include "ircd.h" #include "ircd_chattr.h" #include "ircd_crypt.h" @@ -532,9 +533,12 @@ { 'i', "access", (STAT_FLAG_OPERFEAT | STAT_FLAG_VARPARAM), FEAT_HIS_STATS_i, stats_access, CONF_CLIENT, "Connection authorization lines." }, - { 'j', "histogram", STAT_FLAG_OPERFEAT, FEAT_HIS_STATS_j, + { 'j', "histogram", (STAT_FLAG_OPERFEAT | STAT_FLAG_CASESENS), FEAT_HIS_STATS_j, msgq_histogram, 0, "Message length histogram." }, + { 'J', "jupes", (STAT_FLAG_OPERFEAT | STAT_FLAG_CASESENS), FEAT_HIS_STATS_J, + stats_nickjupes, 0, + "Nickname jupes." }, { 'k', "klines", (STAT_FLAG_OPERFEAT | STAT_FLAG_VARPARAM), FEAT_HIS_STATS_k, stats_klines, 0, "Local bans (K-Lines)." }, @@ -574,7 +578,7 @@ "Local connection statistics (Total SND/RCV, etc)." }, { 'U', "uworld", (STAT_FLAG_OPERFEAT | STAT_FLAG_CASESENS), FEAT_HIS_STATS_U, stats_configured_links, CONF_UWORLD, - "Service server & nick jupes information." }, + "Service server information." }, { 'u', "uptime", (STAT_FLAG_OPERFEAT | STAT_FLAG_CASESENS), FEAT_HIS_STATS_u, stats_uptime, 0, "Current uptime & highest connection count." }, ----------------------- End of diff ----------------------- |