[IPv6 IRC-DEV] [CVS] Module ipv6: Change committed
Brought to you by:
zolty
From: Toni G. <zo...@us...> - 2003-01-04 00:27:42
|
CVSROOT : /cvsroot/irc-dev Module : ipv6 Commit time: 2003-01-04 00:27:42 UTC Modified files: .patches CAMBIOS.Ipv6 CAMBIOS2_10_H_06 todo.jcea include/patchlevel.h include/s_user.h ircd/m_config.c ircd/s_debug.c ircd/s_misc.c ircd/s_serv.c ircd/s_user.c ircd/whocmds.c Log message: Sincronizacion u2.10.H.06.35 ---------------------- diff included ---------------------- Index: ipv6/.patches diff -u ipv6/.patches:1.4 ipv6/.patches:1.5 --- ipv6/.patches:1.4 Tue Dec 17 08:16:48 2002 +++ ipv6/.patches Fri Jan 3 16:27:31 2003 @@ -1 +1 @@ -u2.10.H.06.28 +u2.10.H.06.35 Index: ipv6/CAMBIOS.Ipv6 diff -u ipv6/CAMBIOS.Ipv6:1.14 ipv6/CAMBIOS.Ipv6:1.15 --- ipv6/CAMBIOS.Ipv6:1.14 Tue Dec 17 08:16:48 2002 +++ ipv6/CAMBIOS.Ipv6 Fri Jan 3 16:27:31 2003 @@ -1,3 +1,7 @@ +* 2003/01/04 zo...@ir... INET6.15 +----------------------------------------------------------------------- +Actualizacion IRCD hasta el u2.10.H.06.35. + * 2002/12/17 zo...@ir... INET6.14 ----------------------------------------------------------------------- Actualizacion IRCD hasta el u2.10.H.06.28. Index: ipv6/CAMBIOS2_10_H_06 diff -u ipv6/CAMBIOS2_10_H_06:1.2 ipv6/CAMBIOS2_10_H_06:1.3 --- ipv6/CAMBIOS2_10_H_06:1.2 Tue Dec 17 08:16:48 2002 +++ ipv6/CAMBIOS2_10_H_06 Fri Jan 3 16:27:31 2003 @@ -1,4 +1,50 @@ -$Id: CAMBIOS2_10_H_06,v 1.2 2002/12/17 16:16:48 zolty Exp $ +$Id: CAMBIOS2_10_H_06,v 1.3 2003/01/04 00:27:31 zolty Exp $ + +* 2003/01/02 jc...@ar... (u2.10.H.06.35) CLEANUP + ----------------------------------------------------------------------- + Elimino unos "warnings" en los parches anteriores. + +* 2003/01/01 ni...@ir... (u2.10.H.06.34) FEATURE + ----------------------------------------------------------------------- + Usuarios con +k se saltan la limitacion de targets y de cambios de nick + consecutivos. + +* 2002/12/31 ni...@ir... (u2.10.H.06.33) FIX + ----------------------------------------------------------------------- + Un ajuste mas en el contador de helpers. No se contabilizaban las + salidas por exit_client :) + +* 2002/12/31 ni...@ir... (u2.10.H.06.32) FEATURE + ----------------------------------------------------------------------- + En un VERSION vemos el numero maximo de canales por usuario. Aparece + tras el valor de CLIENT_FLOOD. Asimismo, chequeamos que su valor este + entre 1-99 (99 < MAXCHANNELSPERUSER > 1). + +* 2002/12/31 ni...@ir... (u2.10.H.06.31) FEATURE + ----------------------------------------------------------------------- + Nuevo numeric para el WHOIS: + + /* 379 */ + {RPL_WHOISMODES, "%s :Utiliza los modos [%s]"}, + + Devuelve las letras de los modos visibles del usuario. El criterio para + mostrar u ocultar modos es el mismo que para el WHO. + + Se ha modificado la funcion umode_str(aClient *cptr), que servia para + calcular la cadena de modos que se envia en un BURST para que acepte un + segundo parametro: umode_str(aClient *cptr, aClient *acptr), de tal + modo que calcula tambien, si acptr != NULL, los modos de cptr visibles + por acptr. + +* 2002/12/26 jc...@ar... (Z14 - u2.10.H.06.30) FIX + ----------------------------------------------------------------------- + Inicializacion correcta de ZLIB, que podia dar problemas bajo ciertas + circunstancias, incluyendo la caida del servidor. + +* 2002/12/16 n3...@9p... (u2.10.H.06.29) FEATURE + ----------------------------------------------------------------------- + Segunda parte del parche para permitir el ~ en los nicks. Ahora, ya + permitimos su uso de forma local. * 2002/12/16 jc...@ar... (u2.10.H.06.28) FEATURE ----------------------------------------------------------------------- Index: ipv6/include/patchlevel.h diff -u ipv6/include/patchlevel.h:1.15 ipv6/include/patchlevel.h:1.16 --- ipv6/include/patchlevel.h:1.15 Tue Dec 17 08:16:50 2002 +++ ipv6/include/patchlevel.h Fri Jan 3 16:27:31 2003 @@ -49,7 +49,7 @@ \ \ \ - "+INET6.14" + "+INET6.15" /* * Deliberate empty lines Index: ipv6/include/s_user.h diff -u ipv6/include/s_user.h:1.2 ipv6/include/s_user.h:1.3 --- ipv6/include/s_user.h:1.2 Thu Sep 12 12:18:59 2002 +++ ipv6/include/s_user.h Fri Jan 3 16:27:32 2003 @@ -58,7 +58,7 @@ extern int m_userip(aClient *cptr, aClient *sptr, int parc, char *parv[]); extern int m_ison(aClient *cptr, aClient *sptr, int parc, char *parv[]); extern void send_features(aClient *sptr, char *nick); -extern char *umode_str(aClient *cptr); +extern char *umode_str(aClient *cptr, aClient *acptr); #if defined(BDD) extern void send_umode(aClient *cptr, aClient *sptr, int old, int sendmask, int oldh, int sendhmask); Index: ipv6/ircd/m_config.c diff -u ipv6/ircd/m_config.c:1.2 ipv6/ircd/m_config.c:1.3 --- ipv6/ircd/m_config.c:1.2 Thu Sep 12 12:19:00 2002 +++ ipv6/ircd/m_config.c Fri Jan 3 16:27:32 2003 @@ -99,6 +99,7 @@ outofmemory(); cptr->comp_out->zalloc = z_alloc; cptr->comp_out->zfree = z_free; + cptr->comp_out->opaque = 0; estado = deflateInit(cptr->comp_out, 9); assert(estado == Z_OK); cptr->comp_out_total_in = 0; @@ -124,8 +125,10 @@ if (!cptr->comp_in) outofmemory(); cptr->comp_in->next_in = Z_NULL; + cptr->comp_in->avail_in = 0; cptr->comp_in->zalloc = z_alloc; cptr->comp_in->zfree = z_free; + cptr->comp_in->opaque = 0; estado = inflateInit(cptr->comp_in); assert(estado == Z_OK); cptr->comp_in_total_in = 0; Index: ipv6/ircd/s_debug.c diff -u ipv6/ircd/s_debug.c:1.2 ipv6/ircd/s_debug.c:1.3 --- ipv6/ircd/s_debug.c:1.2 Sat Sep 14 15:44:51 2002 +++ ipv6/ircd/s_debug.c Fri Jan 3 16:27:32 2003 @@ -56,7 +56,7 @@ #include "channel.h" #include "numnicks.h" -RCSTAG_CC("$Id: s_debug.c,v 1.2 2002/09/14 22:44:51 zolty Exp $"); +RCSTAG_CC("$Id: s_debug.c,v 1.3 2003/01/04 00:27:32 zolty Exp $"); /* *INDENT-OFF* */ @@ -198,6 +198,14 @@ (char)('0' + (CLIENT_FLOOD/10) % 10), (char)('0' + (CLIENT_FLOOD/1) % 10), '.', +#if (MAXCHANNELSPERUSER > 99) || (MAXCHANNELSPERUSER < 1) +#error Valor MAXCHANNELSPERUSER erroneo. Rango permitido 1-99. Ejecuta el "make config" de nuevo y reajusta el valor. +#endif +#if MAXCHANNELSPERUSER > 9 + (char)('0' + (MAXCHANNELSPERUSER/10) % 10), +#endif + (char)('0' + (MAXCHANNELSPERUSER/1) % 10), + '.', #if !0 /* Esto hay que quitarlo en algun momento... */ 'N','5','.', @@ -243,7 +251,7 @@ 'C','F','G','5', #ifdef ESNET_NEG '+', - '.','Z','1','3', + '.','Z','1','4', #ifdef ZLIB_ESNET '+', #else Index: ipv6/ircd/s_misc.c diff -u ipv6/ircd/s_misc.c:1.4 ipv6/ircd/s_misc.c:1.5 --- ipv6/ircd/s_misc.c:1.4 Mon Sep 30 08:02:00 2002 +++ ipv6/ircd/s_misc.c Fri Jan 3 16:27:32 2003 @@ -65,7 +65,7 @@ #include <assert.h> -RCSTAG_CC("$Id: s_misc.c,v 1.4 2002/09/30 15:02:00 zolty Exp $"); +RCSTAG_CC("$Id: s_misc.c,v 1.5 2003/01/04 00:27:32 zolty Exp $"); static void exit_one_client(aClient *, char *); @@ -370,6 +370,9 @@ time_t on_for; #endif char comment1[HOSTLEN + HOSTLEN + 2]; + + if (!IsServer(bcptr) && IsHelpOp(bcptr)) + --nrof.helpers; if (MyConnect(bcptr)) { Index: ipv6/ircd/s_serv.c diff -u ipv6/ircd/s_serv.c:1.4 ipv6/ircd/s_serv.c:1.5 --- ipv6/ircd/s_serv.c:1.4 Mon Sep 16 05:22:13 2002 +++ ipv6/ircd/s_serv.c Fri Jan 3 16:27:32 2003 @@ -57,7 +57,7 @@ #include "IPcheck.h" -RCSTAG_CC("$Id: s_serv.c,v 1.4 2002/09/16 12:22:13 zolty Exp $"); +RCSTAG_CC("$Id: s_serv.c,v 1.5 2003/01/04 00:27:32 zolty Exp $"); static int exit_new_server(aClient *cptr, aClient *sptr, char *host, time_t timestamp, char *fmt, ...) @@ -1040,7 +1040,7 @@ else { char xxx_buf[8]; - char *s = umode_str(acptr); + char *s = umode_str(acptr, NULL); sendto_one(cptr, *s ? "%s NICK %s %d " TIME_T_FMT " %s %s +%s %s %s%s :%s" : "%s NICK %s %d " TIME_T_FMT " %s %s %s%s %s%s :%s", Index: ipv6/ircd/s_user.c diff -u ipv6/ircd/s_user.c:1.9 ipv6/ircd/s_user.c:1.10 --- ipv6/ircd/s_user.c:1.9 Tue Dec 17 08:16:53 2002 +++ ipv6/ircd/s_user.c Fri Jan 3 16:27:32 2003 @@ -69,7 +69,7 @@ #include "IPcheck.h" #include "class.h" -RCSTAG_CC("$Id: s_user.c,v 1.9 2002/12/17 16:16:53 zolty Exp $"); +RCSTAG_CC("$Id: s_user.c,v 1.10 2003/01/04 00:27:32 zolty Exp $"); /* *INDENT-OFF* */ @@ -703,7 +703,7 @@ } #ifdef NO_PROTOCOL9 /* Use this when all servers are 2.10 (but test it first) --Run */ - tmpstr = umode_str(sptr); + tmpstr = umode_str(sptr, NULL); sendto_serv_butone(cptr, *tmpstr ? "%s NICK %s %d %d %s %s +%s %s %s%s :%s" : "%s NICK %s %d %d %s %s %s%s %s%s :%s", @@ -727,7 +727,8 @@ } /* If the user has no umode, no need to generate a user MODE */ - if (*(tmpstr = umode_str(sptr)) && (MyConnect(sptr) || Protocol(cptr) > 9)) + if (*(tmpstr = umode_str(sptr, NULL)) && (MyConnect(sptr) + || Protocol(cptr) > 9)) /* Is it necessary to generate an user MODE message ? */ { for (lp = me.serv->down; lp; lp = lp->next) @@ -1018,8 +1019,7 @@ * creation) then reject it. If from a server and we reject it, * and KILL it. -avalon 4/4/92 */ - if (do_nick_name(nick) == 0 || (IsServer(cptr) && strcmp(nick, parv[1])) - || (!IsServer(cptr) && strchr(nick, '~'))) + if (do_nick_name(nick) == 0 || (IsServer(cptr) && strcmp(nick, parv[1]))) { sendto_one(sptr, err_str(ERR_INVALIDNICKNAME), me.name, parv[0], parv[1]); @@ -1663,8 +1663,10 @@ * If someone didn't change their nick for more then 60 seconds * however, allow to do two nick changes immedately after another * before limiting the nick flood. -Run + * Un +k puede cambiarse de nick todas las veces seguidas que + * quiera sin limitaciones. -NiKoLaS */ - if (now < cptr->nextnick) + if ((now < cptr->nextnick) && !(IsChannelService(cptr))) { cptr->nextnick += 2; /* Send error message */ @@ -1680,6 +1682,10 @@ /* bounce NICK to user */ return 0; /* ignore nick change! */ } + else if (IsChannelService(cptr)) + { + cptr->nextnick = now; + } else { /* Limit total to 1 change per NICK_DELAY seconds: */ @@ -2024,10 +2030,8 @@ register unsigned int tmp = ((size_t)target & 0xffff00) >> 8; unsigned char hash = (tmp * tmp) >> 12; -#ifdef CS_NO_FLOOD_ESNET if (IsChannelService(sptr)) return 0; -#endif if (sptr->targets[0] == hash) /* Same target as last time ? */ return 0; @@ -3766,26 +3770,55 @@ /* * Build umode string for BURST command * --Run + * Se amplia la funcion para devolver los + * modos de cptr que ve acptr. Si solo se + * quiere construir la cadena para el BURST + * o tener el listado completo de los modos + * de cptr, se le pasa NULL como segundo + * parametro. + * --NiKoLaS */ -char *umode_str(aClient *cptr) +char *umode_str(aClient *cptr, aClient *acptr) { char *m = umode_buf; /* Maximum string size: "owidg\0" */ int *s, flag, c_flags; +#if defined(BDD) + int c_hmodes; + + c_hmodes = cptr->hmodes & SEND_HMODES; + + for (s = user_hmodes; (flag = *s); s += 2) + if ((c_hmodes & flag)) + *m++ = *(s + 1); +#endif + c_flags = cptr->flags & SEND_UMODES; /* cleaning up the original code */ for (s = user_modes; (flag = *s); s += 2) + { if ((c_flags & flag)) - *m++ = *(s + 1); + { + if (acptr) + { + if ((flag & FLAGS_INVISIBLE) || (flag & FLAGS_WALLOP) + || (flag & FLAGS_DEBUG)) + { + if (IsAnOper(acptr) #if defined(BDD) - { - int c_hmodes = cptr->hmodes & SEND_HMODES; - - for (s = user_hmodes; (flag = *s); s += 2) - if ((c_hmodes & flag)) + || IsHelpOp(acptr) +#endif + || (acptr == cptr)) + *m++ = *(s + 1); + } + else + *m++ = *(s + 1); + } + else *m++ = *(s + 1); + } } -#endif + *m = '\0'; return umode_buf; /* Note: static buffer, gets Index: ipv6/ircd/whocmds.c diff -u ipv6/ircd/whocmds.c:1.6 ipv6/ircd/whocmds.c:1.7 --- ipv6/ircd/whocmds.c:1.6 Sat Nov 9 06:52:54 2002 +++ ipv6/ircd/whocmds.c Fri Jan 3 16:27:32 2003 @@ -64,7 +64,7 @@ #include "querycmds.h" #include "IPcheck.h" -RCSTAG_CC("$Id: whocmds.c,v 1.6 2002/11/09 14:52:54 zolty Exp $"); +RCSTAG_CC("$Id: whocmds.c,v 1.7 2003/01/04 00:27:32 zolty Exp $"); /* * m_who() @@ -993,6 +993,10 @@ if (MyConnect(acptr)) sendto_one(sptr, rpl_str(RPL_WHOISIDLE), me.name, parv[0], name, now - user->last, acptr->firsttime); + + sendto_one(sptr, rpl_str(RPL_WHOISMODES), me.name, + parv[0], name, umode_str(acptr, sptr)); + } if (found == 2 || total++ >= MAX_WHOIS_LINES) break; Index: ipv6/todo.jcea diff -u ipv6/todo.jcea:1.4 ipv6/todo.jcea:1.5 --- ipv6/todo.jcea:1.4 Tue Dec 17 08:16:49 2002 +++ ipv6/todo.jcea Fri Jan 3 16:27:31 2003 @@ -1,4 +1,13 @@ -$Id: todo.jcea,v 1.4 2002/12/17 16:16:49 zolty Exp $ +$Id: todo.jcea,v 1.5 2003/01/04 00:27:31 zolty Exp $ + +19/Dic/02 +Definir un nuevo modo de usuario, similar al +i +pero que no lista canales NO COMUNES con quien +hace el WHOIS. + +Hay que valorar el hecho de que los usuarios conocen +canales precisamente porque ven los canales de otros +usuarios... 16/Dic/02 Los "invites" deberian estar en la parte local @@ -9,7 +18,7 @@ Dentro de un an~o volver a considerar la opcion de que la tabla de "watch" se guarde en la red, en vez de en el cliente. -Puedes ser util para usaurios que se conectan desde diferentes +Puede ser util para usuarios que se conectan desde diferentes sitios, o para cubrir la deficiencia del mIRC, que no separa los "notify" por redes. @@ -23,20 +32,6 @@ aunque comprometeria la posibilidad futura de soportar compresion con los usuarios. -17/Oct/02 -[11:42] <NiKoLaS> que al hacer un /invite te devuelva los canales donde estas invitado y aun no entraste? -[11:42] <NiKoLaS> esto seria sacado de undernet - -17/Oct/02 -[11:28] <NiKoLaS> En el whois se ha de poder ver el resumen de modos del usuario. Se mostraran -[11:28] <NiKoLaS> los mismos modos que en el WHO y se unificara la rutina que los calcula en -[11:28] <NiKoLaS> en WHO para poder llamarla desde el WHO y el WHOIS y evitar redundancias en -[11:28] <NiKoLaS> el codigo. - -16/Oct/02 -El modo +k debe saltarse tambien la limitacion de cambios -de nick y de TARGETS. - 10/Oct/02 Pasar la tabla 'o' a FLAGS individuales. Osea, cada bit, un flag. @@ -59,11 +54,6 @@ 16/Sep/02 Cuando quitamos a un usuario del WATCH, nos aparece un TimeStamp de 1970. - -09/Sep/02 -Permitir el caracter ~ en los nicks. Aparentemente, -segun NiKoLaS, eso requeriria una actualizacion -en dos etapas. 13/Ago/02 La variable que contiene los modos de usuario esta superpoblada y ----------------------- End of diff ----------------------- |