Subject: [IRCOPS-ESNET] Parche DB4 Resent-Date: Fri, 2 Oct 1998 00:53:44 +0200 Resent-From: ircops@esnet.org Date: Fri, 02 Oct 1998 00:43:44 +0000 From: Jesús Cea Avión Reply-To: ircops@esnet.org Organization: Argo Redes y Servicios Telematicos, S.A. To: Lista IRCops ESNET Este parche: - Permite que la base de datos se utilice para transferir informaciones complejas, lo que se necesitará para el registro de canales. - Soluciona un problema comentado por NEXT: si se ejecuta el servidor desde fuera de su directorio raíz, no se lee la base de datos y es necesario recargarla mediante un "rehash" o un "kill -HUP". *** ATENCION: Si aplicais el parche tal cual tened mucho cuidado con los "line wrap". *** ../ircu2.10.04/ircd/s_debug.c Fri Oct 2 00:33:39 1998 --- ../ircu2.10.04+/ircd/s_debug.c Fri Oct 2 00:34:15 1998 *************** *** 193,199 **** '-', #endif #endif ! 'D','B','3', #ifdef DB_ESNET '+', #else --- 193,199 ---- '-', #endif #endif ! 'D','B','4', #ifdef DB_ESNET '+', #else *** ../ircu2.10.04/ircd/ircd.c Thu Oct 1 20:32:09 1998 --- ../ircu2.10.04+/ircd/ircd.c Thu Oct 1 20:38:33 1998 *************** *** 847,855 **** initwhowas(); initmsgtree(); initstats(); - #ifdef DB_ESNET - initdb(); - #endif open_debugfile(); if (portnum == 0) portnum = PORTNUM; --- 847,852 ---- *************** *** 933,938 **** --- 930,939 ---- Debug((DEBUG_NOTICE, "Server ready...")); #ifdef USE_SYSLOG syslog(LOG_NOTICE, "Server Ready"); + #endif + + #ifdef DB_ESNET + initdb(); #endif for (;;) *** ../ircu2.10.04/ircd/s_serv.c Thu Oct 1 20:42:55 1998 --- ../ircu2.10.04+/ircd/s_serv.c Thu Oct 1 21:18:41 1998 *************** *** 1394,1400 **** case 'J': { ! char *p,*p2; int cont=100; if(db>=db_num_serie_local) { /* Se le pueden mandar registros individuales */ --- 1394,1400 ---- case 'J': { ! char *p,*p2,*p3,*p4; int cont=100; if(db>=db_num_serie_local) { /* Se le pueden mandar registros individuales */ *************** *** 1411,1417 **** p2=strchr(p,' '); if(p2==NULL) continue; *p2++='\0'; ! sendto_one(sptr,"%c DB %s %s %s",me.yxx[0],p,db_buf,p2); if(!(--cont)) break; } while(leer_db(db_file,db_buf)!=-1); close(db_file); --- 1411,1426 ---- p2=strchr(p,' '); if(p2==NULL) continue; *p2++='\0'; ! p3=strchr(p2,' '); ! if(p3==NULL) continue; ! *p3++='\0'; ! p4=strchr(p3,' '); ! if(p4==NULL) { ! sendto_one(sptr,"%c DB %s %s %s %s",me.yxx[0],p,db_buf,p2,p3); ! } else { ! *p4++='\0'; ! sendto_one(sptr,"%c DB %s %s %s %s :%s",me.yxx[0],p,db_buf,p2,p3,p4); ! } if(!(--cont)) break; } while(leer_db(db_file,db_buf)!=-1); close(db_file); *************** *** 1467,1473 **** sprintf_irc(db_buf,"%c DB %s %s %s %s", NumServ(sptr),parv[1],parv[2],parv[3],parv[4]); else ! sprintf_irc(db_buf,"%c DB %s %s %s %s %s", NumServ(sptr),parv[1],parv[2],parv[3],parv[4],parv[5]); for (lp = me.serv->down; lp; lp = lp->next) --- 1476,1482 ---- sprintf_irc(db_buf,"%c DB %s %s %s %s", NumServ(sptr),parv[1],parv[2],parv[3],parv[4]); else ! sprintf_irc(db_buf,"%c DB %s %s %s %s :%s", NumServ(sptr),parv[1],parv[2],parv[3],parv[4],parv[5]); for (lp = me.serv->down; lp; lp = lp->next) -- Jesus Cea Avion _/_/ _/_/_/ _/_/_/ jcea@argo.es http://www.argo.es/~jcea/ _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ _/_/_/_/_/ PGP Key Available at KeyServ _/_/ _/_/ _/_/ _/_/ _/_/ "Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ "My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/ "El amor es poner tu felicidad en la felicidad de otro" - Leibnitz