irc-dev-cvs Mailing List for IRC-Dev ircd development
Brought to you by:
zolty
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(22) |
Sep
|
Oct
(2) |
Nov
|
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(30) |
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(27) |
Dec
(17) |
2004 |
Jan
|
Feb
(4) |
Mar
|
Apr
(4) |
May
(8) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(14) |
Dec
(2) |
2005 |
Jan
(18) |
Feb
(2) |
Mar
(12) |
Apr
(18) |
May
(16) |
Jun
(3) |
Jul
(2) |
Aug
|
Sep
(3) |
Oct
(9) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(8) |
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(5) |
Oct
|
Nov
(3) |
Dec
(2) |
2008 |
Jan
(6) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(8) |
Aug
(14) |
Sep
(4) |
Oct
(11) |
Nov
(1) |
Dec
|
From: <zo...@us...> - 2008-11-09 20:44:02
|
Revision: 223 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=223&view=rev Author: zolty Date: 2008-11-09 20:43:40 +0000 (Sun, 09 Nov 2008) Log Message: ----------- Agregamos el ylwrap Added Paths: ----------- ircd/trunk/ylwrap Added: ircd/trunk/ylwrap =================================================================== --- ircd/trunk/ylwrap (rev 0) +++ ircd/trunk/ylwrap 2008-11-09 20:43:40 UTC (rev 223) @@ -0,0 +1 @@ +link /usr/share/automake-1.10/ylwrap \ No newline at end of file Property changes on: ircd/trunk/ylwrap ___________________________________________________________________ Added: svn:special + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-10-26 19:08:35
|
Revision: 222 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=222&view=rev Author: zolty Date: 2008-10-26 19:08:25 +0000 (Sun, 26 Oct 2008) Log Message: ----------- Reescritura gestion de nicks aleatorios Modified Paths: -------------- ircd/trunk/ChangeLog.es ircd/trunk/TODO.es ircd/trunk/include/patchlevel.h ircd/trunk/include/s_user.h ircd/trunk/ircd/ddb_events.c ircd/trunk/ircd/m_nick.c ircd/trunk/ircd/m_svsnick.c Modified: ircd/trunk/ChangeLog.es =================================================================== --- ircd/trunk/ChangeLog.es 2008-10-25 20:36:42 UTC (rev 221) +++ ircd/trunk/ChangeLog.es 2008-10-26 19:08:25 UTC (rev 222) @@ -5,6 +5,17 @@ # # Insertar los nuevos cambios al principio de esta lista de cambios. # +2008-01-19 Toni Garc�a <zo...@ir...> 1.0.beta13 +svsmode +svsjoin +svspart +tabla j +tabla u +tabla f +tabla o (pendiente) +tabla p (pendiente) +modos usuario ahBXc + 2008-01-19 Toni Garc�a <zo...@ir...> 1.0.beta12 * Transicion con IRC-Hispano * Soporte de XMODE JCEA Modified: ircd/trunk/TODO.es =================================================================== --- ircd/trunk/TODO.es 2008-10-25 20:36:42 UTC (rev 221) +++ ircd/trunk/TODO.es 2008-10-26 19:08:25 UTC (rev 222) @@ -62,7 +62,6 @@ SIN PRIORIDAD (SERVICES o UNDERNET) -------------------------------------------------------------------------------------- - [S] Buscar una forma para cifrar IPs con un cambio de clave de cifrado incluido. - - [S] Comando SVSMODE. - [S] Comando SVSVHOST para cambiar la virtualhost. Estudiar alguna forma de propagarse en el burst. - [S] Comando /IDENTIFY y autentificacion NICK nick clave. @@ -316,12 +315,10 @@ - Jupe de nicks por tabla j - mensajes nicks ocupado ERR_NICKNAMEINUSE - nicklen dinamico -- tabla d - SVSMODE - SVSJOIN, SVSPART - SNO_SERVICE - SVSNICK -- auto +i - whois a un uline se muestra el servidor - nick baneado o canal +R/+M sin +r o esta +m no puede cambiar dfe nick - Reallen 70 Modified: ircd/trunk/include/patchlevel.h =================================================================== --- ircd/trunk/include/patchlevel.h 2008-10-25 20:36:42 UTC (rev 221) +++ ircd/trunk/include/patchlevel.h 2008-10-26 19:08:25 UTC (rev 222) @@ -20,7 +20,7 @@ * $Id: patchlevel.h,v 1.60 2008-01-19 19:25:58 zolty Exp $ * */ -#define PATCHLEVEL "12" +#define PATCHLEVEL "13" #define RELEASE "1.0.beta" Modified: ircd/trunk/include/s_user.h =================================================================== --- ircd/trunk/include/s_user.h 2008-10-25 20:36:42 UTC (rev 221) +++ ircd/trunk/include/s_user.h 2008-10-26 19:08:25 UTC (rev 222) @@ -115,6 +115,7 @@ extern int verify_pass_nick(char *nick, char *cryptpass, char *pass); #endif extern int do_nick_name(char* nick); +extern char *get_random_nick(struct Client* cptr); 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, Modified: ircd/trunk/ircd/ddb_events.c =================================================================== --- ircd/trunk/ircd/ddb_events.c 2008-10-25 20:36:42 UTC (rev 221) +++ ircd/trunk/ircd/ddb_events.c 2008-10-26 19:08:25 UTC (rev 222) @@ -369,34 +369,13 @@ if (nick_renames) { - struct Client *acptr; - unsigned int v[2], k[2], x[2]; - char newnick[NICKLEN + 2]; + char *newnick; char tmp[100]; char *parv[3]; int flags = 0; + + newnick = get_random_nick(cptr); - k[0] = k[1] = x[0] = x[1] = 0; - - v[0] = base64toint(cli_yxx(cptr)); - v[1] = base64toint(cli_yxx(&me)); - - acptr = cptr; - - do - { - ircd_tea(v, k, x); - v[1] += 4096; - - if (x[0] >= 4294000000ul) - continue; - - ircd_snprintf(0, newnick, sizeof(newnick), "Guest%.6d", - (int)(x[0] % 1000000)); - acptr = FindUser(newnick); - } - while (acptr); - SetRenamed(flags); parv[0] = cli_name(cptr); Modified: ircd/trunk/ircd/m_nick.c =================================================================== --- ircd/trunk/ircd/m_nick.c 2008-10-25 20:36:42 UTC (rev 221) +++ ircd/trunk/ircd/m_nick.c 2008-10-26 19:08:25 UTC (rev 222) @@ -83,6 +83,46 @@ return (ch - nick); } +/** Get a random nickname. +* +* @param[in] cptr Client's requested nickname. +* @return A new nick. +*/ +char *get_random_nick(struct Client* cptr) +{ + struct Client* acptr; + char* newnick; + char nickout[NICKLEN + 1]; + unsigned int v[2], k[2], x[2]; + + k[0] = k[1] = x[0] = x[1] = 0; + + v[0] = base64toint(cli_yxx(cptr)); + v[1] = base64toint(cli_yxx(&me)); + + acptr = cptr; + + do + { + ircd_tea(v, k, x); + v[1] += 4096; + + if (x[0] >= 4294000000ul) + continue; + + ircd_snprintf(0, nickout, sizeof(nickout), "Guest%.6d", + (int)(x[0] % 1000000)); + + nickout[NICKLEN] = '\0'; + newnick = nickout; + + acptr = FindUser(newnick); + } + while (acptr); + + return newnick; +} + /** Handle a NICK message from a local connection. * * \a parv has the following elements: @@ -102,6 +142,7 @@ char* s; const char* client_name; int flags = 0; + int random_nick = 0; #if defined(DDB) struct Ddb *ddb; char *p; @@ -119,7 +160,7 @@ client_name = (*(cli_name(sptr))) ? cli_name(sptr) : "*"; #if 0 -/*TODO-ZOLTAN: Cosas de JCea, comprobar */ +/* TODO-ZOLTAN: Cosas de JCea, comprobar */ /* * Not change nick several times BEFORE to have completed your entrance * in the network. @@ -162,6 +203,17 @@ #endif /* defined(DDB) */ /* + * Special CASE + * NICK * + * Random nickname + */ + if ((strlen(parv[1]) == 1) && (*parv[1] == '*')) + { + parv[1] = get_random_nick(sptr); + random_nick = 1; + } + + /* * Don't let them send make us send back a really long string of * garbage */ @@ -173,7 +225,7 @@ #if !defined(DDB) if ((s = strchr(arg, '~'))) *s = '\0'; -#endif +#endif strcpy(nick, arg); @@ -186,24 +238,19 @@ } #if defined(DDB) - if (strlen(nick) == 11) - { - if ((strcmp(nick, "Guest000000") >= 0) && (strcmp(nick, "Guest999999") <= 0)) - { - if (FindClient(nick)) - send_reply(sptr, ERR_NICKNAMEINUSE, nick); - else - send_reply(sptr, ERR_ERRONEUSNICKNAME, nick); - return 0; /* NICK message ignored */ - } - } - - ddb = ddb_find_key(DDB_JUPEDB, nick); - if (ddb) + if (!random_nick) { - send_reply(sptr, SND_EXPLICIT | ERR_NICKNAMEINUSE, "%s :Nickname is juped: %s", - nick, ddb_content(ddb)); - return 0; /* NICK message ignored */ + struct Ddb *regj; + + for (regj = ddb_iterator_first(DDB_JUPEDB); regj; regj = ddb_iterator_next()) + { + if (!match(ddb_key(regj), nick)) + { + send_reply(sptr, SND_EXPLICIT | ERR_NICKNAMEINUSE, "%s :Nickname is juped: %s", + nick, ddb_content(regj)); + return 0; /* NICK message ignored */ + } + } } #endif /* defined(DDB) */ @@ -211,7 +258,7 @@ * Check if this is a LOCAL user trying to use a reserved (Juped) * nick, if so tell him that it's a nick in use... */ - if (isNickJuped(nick)) { + if (isNickJuped(nick) & !random_nick) { send_reply(sptr, ERR_NICKNAMEINUSE, nick); return 0; /* NICK message ignored */ } Modified: ircd/trunk/ircd/m_svsnick.c =================================================================== --- ircd/trunk/ircd/m_svsnick.c 2008-10-25 20:36:42 UTC (rev 221) +++ ircd/trunk/ircd/m_svsnick.c 2008-10-26 19:08:25 UTC (rev 222) @@ -91,7 +91,8 @@ sendcmdto_serv(sptr, CMD_SVSNICK, cptr, "%s :%s", parv[1], parv[2]); acptr = findNUser(parv[1]); - + if (!acptr) + acptr = FindUser(parv[1]); if (!acptr || !MyUser(acptr)) return 0; @@ -114,31 +115,8 @@ return 0; } else - { - unsigned int v[2], k[2], x[2]; + strcpy(newnick, get_random_nick(acptr)); - k[0] = k[1] = x[0] = x[1] = 0; - - v[0] = base64toint(cli_yxx(acptr)); - v[1] = base64toint(cli_yxx(&me)); - - bcptr = acptr; - - do - { - ircd_tea(v, k, x); - v[1] += 4096; - - if (x[0] >= 4294000000ul) - continue; - - ircd_snprintf(0, newnick, sizeof(newnick), "Guest%.6d", - (int)(x[0] % 1000000)); - bcptr = FindUser(newnick); - } - while (bcptr); - } - sendto_opmask(0, SNO_HACK4, "SVSNICK for %C, new nick %s. From %C", acptr, newnick, sptr); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-10-25 20:36:50
|
Revision: 221 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=221&view=rev Author: zolty Date: 2008-10-25 20:36:42 +0000 (Sat, 25 Oct 2008) Log Message: ----------- Nuevos comandos administrativos, bajo compilacion condicional Modified Paths: -------------- ircd/trunk/include/handlers.h ircd/trunk/include/msg.h ircd/trunk/ircd/Makefile.am ircd/trunk/ircd/Makefile.in ircd/trunk/ircd/parse.c Added Paths: ----------- ircd/trunk/ircd/m_svsjoin.c ircd/trunk/ircd/m_svsmode.c ircd/trunk/ircd/m_svspart.c Modified: ircd/trunk/include/handlers.h =================================================================== --- ircd/trunk/include/handlers.h 2008-10-25 15:33:58 UTC (rev 220) +++ ircd/trunk/include/handlers.h 2008-10-25 20:36:42 UTC (rev 221) @@ -241,6 +241,9 @@ extern int ms_squit(struct Client*, struct Client*, int, char*[]); extern int ms_stats(struct Client*, struct Client*, int, char*[]); extern int ms_svsnick(struct Client*, struct Client*, int, char*[]); +extern int ms_svsmode(struct Client*, struct Client*, int, char*[]); +extern int ms_svsjoin(struct Client*, struct Client*, int, char*[]); +extern int ms_svspart(struct Client*, struct Client*, int, char*[]); extern int ms_topic(struct Client*, struct Client*, int, char*[]); extern int ms_trace(struct Client*, struct Client*, int, char*[]); extern int ms_uping(struct Client*, struct Client*, int, char*[]); Modified: ircd/trunk/include/msg.h =================================================================== --- ircd/trunk/include/msg.h 2008-10-25 15:33:58 UTC (rev 220) +++ ircd/trunk/include/msg.h 2008-10-25 20:36:42 UTC (rev 221) @@ -389,15 +389,27 @@ #define MSG_SVSNICK "SVSNICK" /* SVSN */ #define TOK_SVSNICK "SN" #define CMD_SVSNICK MSG_SVSNICK, TOK_SVSNICK + #if 1 /* TRANSICION IRC-HISPANO */ #define MSG_RENAME "RENAME" /* SVSN */ #define TOK_RENAME "RENAME" #define CMD_RENAME MSG_RENAME, TOK_RENAME - #endif +#define MSG_SVSMODE "SVSMODE" +#define TOK_SVSMODE "SM" +#define CMD_SVSMODE MSG_SVSMODE, TOK_SVSMODE +#define MSG_SVSJOIN "SVSJOIN" +#define TOK_SVSJOIN "SJ" +#define CMD_SVSJOIN MSG_SVSJOIN, TOK_SVSJOIN +#define MSG_SVSPART "SVSPART" +#define TOK_SVSPART "SL" +#define CMD_SVSPART MSG_SVSPART, TOK_SVSPART + + + /* * Constants */ Modified: ircd/trunk/ircd/Makefile.am =================================================================== --- ircd/trunk/ircd/Makefile.am 2008-10-25 15:33:58 UTC (rev 220) +++ ircd/trunk/ircd/Makefile.am 2008-10-25 20:36:42 UTC (rev 221) @@ -195,12 +195,18 @@ m_db.c \ m_dbq.c \ m_ghost.c \ - m_svsnick.c + m_svsnick.c \ + m_svsmode.c \ + m_svsjoin.c \ + m_svspart.c endif #if ENVIRONMENT_SERVICES #ircd_SOURCES += \ -# m_svsnick.c +# m_svsnick.c \ +# m_svsmode.c \ +# m_svsjoin.c \ +# m_svspart.c #endif Modified: ircd/trunk/ircd/Makefile.in =================================================================== --- ircd/trunk/ircd/Makefile.in 2008-10-25 15:33:58 UTC (rev 220) +++ ircd/trunk/ircd/Makefile.in 2008-10-25 20:36:42 UTC (rev 221) @@ -48,12 +48,18 @@ @ENVIRONMENT_DDB_TRUE@ m_db.c \ @ENVIRONMENT_DDB_TRUE@ m_dbq.c \ @ENVIRONMENT_DDB_TRUE@ m_ghost.c \ -@ENVIRONMENT_DDB_TRUE@ m_svsnick.c +@ENVIRONMENT_DDB_TRUE@ m_svsnick.c \ +@ENVIRONMENT_DDB_TRUE@ m_svsmode.c \ +@ENVIRONMENT_DDB_TRUE@ m_svsjoin.c \ +@ENVIRONMENT_DDB_TRUE@ m_svspart.c #if ENVIRONMENT_SERVICES #ircd_SOURCES += \ -# m_svsnick.c +# m_svsnick.c \ +# m_svsmode.c \ +# m_svsjoin.c \ +# m_svspart.c #endif @ENGINE_POLL_TRUE@am__append_2 = engine_poll.c @ENGINE_POLL_FALSE@am__append_3 = engine_select.c @@ -102,14 +108,16 @@ s_debug.c s_err.c s_misc.c s_numeric.c s_serv.c s_stats.c \ s_user.c send.c ssl.c uping.c userload.c watch.c whowas.c \ ddb.c ddb_db_native.c ddb_events.c ircd_tea.c m_bmode.c m_db.c \ - m_dbq.c m_ghost.c m_svsnick.c engine_poll.c engine_select.c \ - engine_devpoll.c engine_epoll.c engine_kqueue.c + m_dbq.c m_ghost.c m_svsnick.c m_svsmode.c m_svsjoin.c \ + m_svspart.c engine_poll.c engine_select.c engine_devpoll.c \ + engine_epoll.c engine_kqueue.c @ENVIRONMENT_DDB_TRUE@am__objects_1 = ddb.$(OBJEXT) \ @ENVIRONMENT_DDB_TRUE@ ddb_db_native.$(OBJEXT) \ @ENVIRONMENT_DDB_TRUE@ ddb_events.$(OBJEXT) ircd_tea.$(OBJEXT) \ @ENVIRONMENT_DDB_TRUE@ m_bmode.$(OBJEXT) m_db.$(OBJEXT) \ @ENVIRONMENT_DDB_TRUE@ m_dbq.$(OBJEXT) m_ghost.$(OBJEXT) \ -@ENVIRONMENT_DDB_TRUE@ m_svsnick.$(OBJEXT) +@ENVIRONMENT_DDB_TRUE@ m_svsnick.$(OBJEXT) m_svsmode.$(OBJEXT) \ +@ENVIRONMENT_DDB_TRUE@ m_svsjoin.$(OBJEXT) m_svspart.$(OBJEXT) @ENGINE_POLL_TRUE@am__objects_2 = engine_poll.$(OBJEXT) @ENGINE_POLL_FALSE@am__objects_3 = engine_select.$(OBJEXT) @ENGINE_DEVPOLL_TRUE@am__objects_4 = engine_devpoll.$(OBJEXT) @@ -535,7 +543,10 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m_silence.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m_squit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m_stats.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m_svsjoin.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m_svsmode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m_svsnick.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m_svspart.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m_time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m_topic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m_trace.Po@am__quote@ Added: ircd/trunk/ircd/m_svsjoin.c =================================================================== --- ircd/trunk/ircd/m_svsjoin.c (rev 0) +++ ircd/trunk/ircd/m_svsjoin.c 2008-10-25 20:36:42 UTC (rev 221) @@ -0,0 +1,174 @@ +/* + * IRC-Dev IRCD - An advanced and innovative IRC Daemon, ircd/m_svsjoin.c + * + * Copyright (C) 2002-2008 IRC-Dev Development Team <de...@ir...> + * Copyright (C) 2008 Toni Garcia (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 SVSJOIN command. + * @version $Id: m_svsnick.c,v 1.6 2007-04-22 13:56:21 zolty Exp $ + */ +#include "config.h" + +#include "channel.h" +#include "client.h" +#include "ddb.h" +#include "hash.h" +#include "ircd.h" +#include "ircd_features.h" +#include "ircd_log.h" +#include "ircd_string.h" +#include "msg.h" +#include "numeric.h" +#include "numnicks.h" +#include "s_user.h" +#include "send.h" + +/* #include <assert.h> -- Now using assert in ircd_log.h */ +#include <stdio.h> +#include <string.h> + + +/** Handle a SVSJOIN command from a server. + * See @ref m_functions for general discussion of parameters. + * + * \a parv has the following elements when \a sptr is a server: + * \li parv[1] is a nick + * \li \a parv[2] is a comma-separated list of channel names + * + * @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_svsjoin(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) +{ + struct Channel *chptr; + struct JoinBuf join; + struct JoinBuf create; + struct Client *acptr; + char *p = 0; + char *chanlist; + char *name; + + assert(0 != IsServer(cptr)); + + if (parc < 3) + return 0; + + if (!cli_uworld(sptr)) + { + sendcmdto_serv(&me, CMD_DESYNCH, 0, + ":HACK(2): Fail SVSJOIN for %s. From %C", parv[1], sptr); + sendto_opmask(0, SNO_HACK2, + "Fail SVSJOIN for %s. From %C", parv[1], sptr); + return 0; + } + + sendcmdto_serv(sptr, CMD_SVSJOIN, cptr, "%s :%s", parv[1], parv[2]); + + acptr = findNUser(parv[1]); + + if (!acptr || !MyUser(acptr)) + return 0; + + sendto_opmask(0, SNO_HACK4, + "SVSJOIN for %C, channels %s. From %C", acptr, parv[2], sptr); + + joinbuf_init(&join, acptr, acptr, JOINBUF_TYPE_JOIN, 0, 0); + joinbuf_init(&create, acptr, acptr, JOINBUF_TYPE_CREATE, 0, TStime()); + +#if 0 + chanlist = last0(acptr, acptr, parv[2]); /* find last "JOIN 0" */ + + for (name = ircd_strtok(&p, chanlist, ","); name; + name = ircd_strtok(&p, 0, ",")) { +#endif + for (name = ircd_strtok(&p, parv[2], ","); name; + name = ircd_strtok(&p, 0, ",")) { + + if (!IsChannelName(name) || !strIsIrcCh(name)) + { + /* bad channel name */ + continue; + } + + if (!(chptr = FindChannel(name))) { + if (((name[0] == '&') && !feature_bool(FEAT_LOCAL_CHANNELS)) + || strlen(name) >= IRCD_MIN(CHANNELLEN, feature_uint(FEAT_CHANNELLEN))) { + continue; + } + + if (!(chptr = get_channel(sptr, name, CGT_CREATE))) + continue; + +#if defined(UNDERNET) + joinbuf_join(&create, chptr, CHFL_CHANOP | CHFL_CHANNEL_MANAGER); +#else + joinbuf_join(&create, chptr, CHFL_CHANOP); +#endif + + } else if (find_member_link(chptr, sptr)) { + continue; /* already on channel */ + } else { + int flags = 0; +#if defined(DDB) + struct Ddb *ddb = ddb_find_key(DDB_CHANDB, chptr->chname); + + if (ddb && !ircd_strcmp(ddb_content(ddb), cli_name(sptr))) + flags = CHFL_OWNER; +#endif + + joinbuf_join(&join, chptr, flags); + cli_last_join(acptr) = CurrentTime; + + if (flags & CHFL_CHANOP) { + struct ModeBuf mbuf; + /* Always let the server op him: this is needed on a net with older servers + because they 'destruct' channels immediately when they become empty without + sending out a DESTRUCT message. As a result, they would always bounce a mode + (as HACK(2)) when the user ops himself. + (There is also no particularly good reason to have the user op himself.) + */ + modebuf_init(&mbuf, &me, acptr, chptr, MODEBUF_DEST_SERVER); +#if defined(UNDERNET) + modebuf_mode_client(&mbuf, MODE_ADD | MODE_CHANOP, acptr, (flags & CHFL_CHANNEL_MANAGER) ? 0 : 1)); +#elif defined(DDB) || defined(SERVICES) + modebuf_mode_client(&mbuf, MODE_ADD | MODE_CHANOP, acptr, 0); +#endif + modebuf_flush(&mbuf); + } + } + + del_invite(sptr, chptr); + + if (chptr->topic[0]) { + send_reply(acptr, RPL_TOPIC, chptr->chname, chptr->topic); + send_reply(acptr, RPL_TOPICWHOTIME, chptr->chname, chptr->topic_nick, + chptr->topic_time); + } + + do_names(acptr, chptr, NAMES_ALL|NAMES_EON); /* send /names list */ + } + + joinbuf_flush(&join); /* must be first, if there's a JOIN 0 */ + joinbuf_flush(&create); + + return 0; + +} Added: ircd/trunk/ircd/m_svsmode.c =================================================================== --- ircd/trunk/ircd/m_svsmode.c (rev 0) +++ ircd/trunk/ircd/m_svsmode.c 2008-10-25 20:36:42 UTC (rev 221) @@ -0,0 +1,88 @@ +/* + * IRC-Dev IRCD - An advanced and innovative IRC Daemon, ircd/m_svsmode.c + * + * Copyright (C) 2002-2008 IRC-Dev Development Team <de...@ir...> + * Copyright (C) 2008 Toni Garcia (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 SVSMODE command. + * @version $Id: m_svsmode.c,v 1.6 2007-04-22 13:56:21 zolty Exp $ + */ +#include "config.h" + +#include "channel.h" +#include "client.h" +#include "hash.h" +#include "ircd.h" +#include "ircd_log.h" +#include "ircd_snprintf.h" +#include "ircd_string.h" +#include "msg.h" +#include "numnicks.h" +#include "s_conf.h" +#include "s_user.h" +#include "send.h" + +/* #include <assert.h> -- Now using assert in ircd_log.h */ +#include <stdio.h> +#include <string.h> + + +/** Handle a SVSMODE command from a server. + * See @ref m_functions for general discussion of parameters. + * + * \a parv[1] is a nick + * \a parv[2] is a new nick (* random nick) + * + * @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_svsmode(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) +{ + struct Channel *chptr = 0; + + assert(0 != IsServer(cptr)); + + if (parc < 3) + return 0; + + if (!cli_uworld(sptr)) + { + sendcmdto_serv(&me, CMD_DESYNCH, 0, + ":HACK(2): Fail SVSMODE for %s. From %C", parv[1], sptr); + sendto_opmask(0, SNO_HACK2, + "Fail SVSMODE for %s. From %C", parv[1], sptr); + return 0; + } + + if (!IsChannelName(parv[1]) || !(chptr = FindChannel(parv[1]))) + { + struct Client *acptr; + + acptr = findNUser(parv[1]); + if (!acptr) + acptr = FindUser(parv[1]); + if (!acptr) + return 0; + } + + /* No change modes for channels */ + return 0; +} Added: ircd/trunk/ircd/m_svspart.c =================================================================== --- ircd/trunk/ircd/m_svspart.c (rev 0) +++ ircd/trunk/ircd/m_svspart.c 2008-10-25 20:36:42 UTC (rev 221) @@ -0,0 +1,132 @@ +/* + * IRC-Dev IRCD - An advanced and innovative IRC Daemon, ircd/m_svspart.c + * + * Copyright (C) 2002-2008 IRC-Dev Development Team <de...@ir...> + * Copyright (C) 2008 Toni Garcia (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 SVSPART command. + * @version $Id: m_svsnick.c,v 1.6 2007-04-22 13:56:21 zolty Exp $ + */ +#include "config.h" + +#include "channel.h" +#include "client.h" +#include "hash.h" +#include "ircd.h" +#include "ircd_log.h" +#include "ircd_string.h" +#include "msg.h" +#include "numeric.h" +#include "numnicks.h" +#include "s_user.h" +#include "send.h" + +/* #include <assert.h> -- Now using assert in ircd_log.h */ +#include <stdio.h> +#include <string.h> + + +/** Handle a SVSPART command from a server. + * See @ref m_functions for general discussion of parameters. + * + * \a parv has the following elements when \a sptr is a server: + * \li parv[1] is a nick + * \li \a parv[2] is a comma-separated list of channel names + * \li \a parv[\a parc - 1] is the parting comment + * + * @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_svspart(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) +{ + struct Channel *chptr; + struct Membership *member; + struct JoinBuf parts; + struct Client *acptr; + unsigned int flags = 0; + char *p = 0; + char *name; + + assert(0 != IsServer(cptr)); + + if (parc < 3) + return 0; + + if (!cli_uworld(sptr)) + { + sendcmdto_serv(&me, CMD_DESYNCH, 0, + ":HACK(2): Fail SVSPART for %s. From %C", parv[1], + sptr); + sendto_opmask(0, SNO_HACK2, + "Fail SVSPART for %s. From %C", parv[1], sptr); + return 0; + } + + if (parc > 3) + sendcmdto_serv(sptr, CMD_SVSPART, cptr, "%s %s :%s", parv[1], parv[2], parv[3]); + else + sendcmdto_serv(sptr, CMD_SVSPART, cptr, "%s %s", parv[1], parv[2]); + + acptr = findNUser(parv[1]); + + if (!acptr || !MyUser(acptr)) + return 0; + + sendto_opmask(0, SNO_HACK4, + "SVSPART for %C, channels %s. From %C", acptr, parv[2], sptr); + + /* init join/part buffer */ + joinbuf_init(&parts, acptr, cptr, JOINBUF_TYPE_PART, + (parc > 3 && !EmptyString(parv[parc - 1])) ? parv[parc - 1] : 0, + 0); + + /* scan through channel list */ + for (name = ircd_strtok(&p, parv[2], ","); name; + name = ircd_strtok(&p, 0, ",")) { + + chptr = get_channel(acptr, name, CGT_NO_CREATE); /* look up channel */ + + if (!chptr) { /* complain if there isn't such a channel */ + continue; + } + + if (!(member = find_member_link(chptr, acptr))) { /* complain if not on */ + continue; + } + + assert(!IsZombie(member)); /* Local users should never zombie */ + + if (!member_can_send_to_channel(member, 0)) + { + flags |= CHFL_BANNED; + /* Remote clients don't want to see a comment either. */ + parts.jb_comment = 0; + } + + if (IsDelayedJoin(member)) + flags |= CHFL_DELAYED; + + joinbuf_join(&parts, chptr, flags); /* part client from channel */ + + } + + return joinbuf_flush(&parts); /* flush channel parts */ +} Modified: ircd/trunk/ircd/parse.c =================================================================== --- ircd/trunk/ircd/parse.c 2008-10-25 15:33:58 UTC (rev 220) +++ ircd/trunk/ircd/parse.c 2008-10-25 20:36:42 UTC (rev 221) @@ -667,7 +667,7 @@ TOK_GHOST, 0, MAXPARA, MFLG_SLOW, 0, NULL, /* UNREG, CLIENT, SERVER, OPER, SERVICE */ - { m_unregistered, m_ghost, m_ignore, m_ignore, m_ignore } + { m_unregistered, m_ghost, m_ignore, m_ghost, m_ignore } }, #endif #if defined(DDB) || defined(SERVICES) @@ -678,6 +678,27 @@ /* UNREG, CLIENT, SERVER, OPER, SERVICE */ { m_ignore, m_ignore, ms_svsnick, m_ignore, m_ignore } }, + { + MSG_SVSMODE, + TOK_SVSMODE, + 0, MAXPARA, MFLG_SLOW, 0, NULL, + /* UNREG, CLIENT, SERVER, OPER, SERVICE */ + { m_ignore, m_ignore, ms_svsmode, m_ignore, m_ignore } + }, + { + MSG_SVSJOIN, + TOK_SVSJOIN, + 0, MAXPARA, MFLG_SLOW, 0, NULL, + /* UNREG, CLIENT, SERVER, OPER, SERVICE */ + { m_ignore, m_ignore, ms_svsjoin, m_ignore, m_ignore } + }, + { + MSG_SVSPART, + TOK_SVSPART, + 0, MAXPARA, MFLG_SLOW, 0, NULL, + /* UNREG, CLIENT, SERVER, OPER, SERVICE */ + { m_ignore, m_ignore, ms_svspart, m_ignore, m_ignore } + }, #if 1 /* TRANSICION IRC-HISPANO */ { "RENAME", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-10-25 15:34:05
|
Revision: 220 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=220&view=rev Author: zolty Date: 2008-10-25 15:33:58 +0000 (Sat, 25 Oct 2008) Log Message: ----------- Correcciones soporte minimi P09 de transicion Modified Paths: -------------- ircd/trunk/ircd/m_server.c Modified: ircd/trunk/ircd/m_server.c =================================================================== --- ircd/trunk/ircd/m_server.c 2008-10-25 12:09:09 UTC (rev 219) +++ ircd/trunk/ircd/m_server.c 2008-10-25 15:33:58 UTC (rev 220) @@ -560,17 +560,8 @@ if (!prot) return exit_client_msg(cptr, sptr, &me, "Bogus protocol (%s)", parv[5]); else if (prot < atoi(MINOR_PROTOCOL)) -#if 1 /* TRANSICION IRC-HISPANO */ - { - prot = atoi(MINOR_PROTOCOL); - /* Los P09 siempre son Services y hub */ - SetService(cptr); - SetHub(cptr); - } -#else return exit_new_server(cptr, sptr, host, timestamp, "Incompatible protocol: %s", parv[5]); -#endif /* TRANSICION IRC-HISPANO */ Debug((DEBUG_INFO, "Got SERVER %s with timestamp [%s] age %Tu (%Tu)", host, parv[4], start_timestamp, cli_serv(&me)->timestamp)); @@ -682,6 +673,9 @@ unsigned short prot; time_t start_timestamp; time_t timestamp; +#if 1 /* TRANSICION IRC-HISPANO */ + int IsP09 = 0; +#endif if (parc < 8) { @@ -707,7 +701,7 @@ return exit_client_msg(cptr, sptr, &me, "Bogus protocol (%s)", parv[5]); else if (prot < atoi(MINOR_PROTOCOL)) #if 1 /* TRANSICION IRC-HISPANO */ - prot = atoi(MINOR_PROTOCOL); + IsP09 = 1; #else return exit_new_server(cptr, sptr, host, timestamp, "Incompatible protocol: %s", parv[5]); @@ -751,6 +745,15 @@ if (*parv[7] == '+') set_server_flags(acptr, parv[7] + 1); + +#if 1 /* TRANSICION IRC-HISPANO */ + if (IsP09) + { + *parv[5] = 'P'; + sendto_opmask(0, SNO_NETWORK, "Net junction: %s %s", + cli_name(sptr), cli_name(acptr)); + } +#endif Count_newremoteserver(UserStats); add_client_to_list(acptr); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-10-25 12:09:16
|
Revision: 219 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=219&view=rev Author: zolty Date: 2008-10-25 12:09:09 +0000 (Sat, 25 Oct 2008) Log Message: ----------- Ahora permite cifrar nicks de mas de 15 caracteres Modified Paths: -------------- ircd/trunk/ircd/s_user.c Modified: ircd/trunk/ircd/s_user.c =================================================================== --- ircd/trunk/ircd/s_user.c 2008-10-24 09:29:51 UTC (rev 218) +++ ircd/trunk/ircd/s_user.c 2008-10-25 12:09:09 UTC (rev 219) @@ -558,8 +558,13 @@ int verify_pass_nick(char *nick, char *cryptpass, char *pass) { unsigned int v[2], k[2], x[2]; - int cont = (NICKLEN + 8) / 8; - char tmpnick[8 * ((NICKLEN + 8) / 8) + 1]; + int nicklen = strlen(nick); +#if 1 /* TRANSICION IRC-HISPANO */ + int cont=(nicklen < 16) ? 2 : ((nicklen + 8) / 8); +#else + int cont = ((nicklen + 8) / 8); +#endif + char tmpnick[8 * cont + 1]; char tmppass[12 + 1]; unsigned int *p = (unsigned int *)tmpnick; /* int == 32bits */ unsigned int numpass[2]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-10-24 09:34:14
|
Revision: 218 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=218&view=rev Author: zolty Date: 2008-10-24 09:29:51 +0000 (Fri, 24 Oct 2008) Log Message: ----------- Correccion SVSNICK Modified Paths: -------------- ircd/trunk/ircd/m_svsnick.c Modified: ircd/trunk/ircd/m_svsnick.c =================================================================== --- ircd/trunk/ircd/m_svsnick.c 2008-10-24 06:37:01 UTC (rev 217) +++ ircd/trunk/ircd/m_svsnick.c 2008-10-24 09:29:51 UTC (rev 218) @@ -88,11 +88,7 @@ return 0; } -#if 1 /* TRANSICION IRC-HISPANO */ - sendcmdto_serv(sptr, feature_bool(FEAT_TRANSICION_HISPANO) ? CMD_RENAME : CMD_SVSNICK, cptr, "%s :%s", parv[1], parv[2]); -#else sendcmdto_serv(sptr, CMD_SVSNICK, cptr, "%s :%s", parv[1], parv[2]); -#endif acptr = findNUser(parv[1]); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-10-24 06:37:10
|
Revision: 217 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=217&view=rev Author: zolty Date: 2008-10-24 06:37:01 +0000 (Fri, 24 Oct 2008) Log Message: ----------- Subimos NICKLEN global a 30 Modified Paths: -------------- ircd/trunk/include/ircd_defs.h Modified: ircd/trunk/include/ircd_defs.h =================================================================== --- ircd/trunk/include/ircd_defs.h 2008-10-18 11:54:45 UTC (rev 216) +++ ircd/trunk/include/ircd_defs.h 2008-10-24 06:37:01 UTC (rev 217) @@ -39,7 +39,7 @@ * See also F:NICKLEN in ircd.conf. */ #ifndef NICKLEN -#define NICKLEN 15 +#define NICKLEN 30 #endif /** Maximum length allowed of a user name, including an optional * leading '~' if the user name has not been authenticated by an auth (RFC 931) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-10-18 11:55:12
|
Revision: 216 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=216&view=rev Author: zolty Date: 2008-10-18 11:54:45 +0000 (Sat, 18 Oct 2008) Log Message: ----------- Ahora si, no es DARWIN sino __APPLE__. Gracias a Redstrips por su paciencia haciendo las pruebas. Modified Paths: -------------- ircd/trunk/ircd/os_generic.c Modified: ircd/trunk/ircd/os_generic.c =================================================================== --- ircd/trunk/ircd/os_generic.c 2008-10-18 10:01:22 UTC (rev 215) +++ ircd/trunk/ircd/os_generic.c 2008-10-18 11:54:45 UTC (rev 216) @@ -39,6 +39,9 @@ * they give you everything. */ #else +# ifdef __APPLE__ +# include <libc.h> +# endif #define _XOPEN_SOURCE 600 #endif @@ -90,10 +93,6 @@ #define getrusage(a,b) syscall(SYS_GETRUSAGE, a, b) #endif -#ifdef DARWIN -#include <libc.h" -#endif - static int is_blocked(int error) { return EWOULDBLOCK == error This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-10-18 10:01:38
|
Revision: 215 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=215&view=rev Author: zolty Date: 2008-10-18 10:01:22 +0000 (Sat, 18 Oct 2008) Log Message: ----------- En Darwin (MacOS X) no se compilaba porque faltaba un include a libc.h. Thanks a RedStripes Modified Paths: -------------- ircd/trunk/ircd/os_generic.c Modified: ircd/trunk/ircd/os_generic.c =================================================================== --- ircd/trunk/ircd/os_generic.c 2008-10-18 09:54:03 UTC (rev 214) +++ ircd/trunk/ircd/os_generic.c 2008-10-18 10:01:22 UTC (rev 215) @@ -90,6 +90,10 @@ #define getrusage(a,b) syscall(SYS_GETRUSAGE, a, b) #endif +#ifdef DARWIN +#include <libc.h" +#endif + static int is_blocked(int error) { return EWOULDBLOCK == error This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-10-18 09:54:24
|
Revision: 214 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=214&view=rev Author: zolty Date: 2008-10-18 09:54:03 +0000 (Sat, 18 Oct 2008) Log Message: ----------- Deshabilito el SSL por defecto mientras no esta completo al 100% Modified Paths: -------------- ircd/trunk/configure ircd/trunk/configure.ac Modified: ircd/trunk/configure =================================================================== --- ircd/trunk/configure 2008-10-16 22:51:11 UTC (rev 213) +++ ircd/trunk/configure 2008-10-18 09:54:03 UTC (rev 214) @@ -10139,6 +10139,8 @@ fi +#Temporal +unet_cv_enable_ssl=no { echo "$as_me:$LINENO: checking whether to enable SSL" >&5 echo $ECHO_N "checking whether to enable SSL... $ECHO_C" >&6; } # Check whether --enable-ssl was given. Modified: ircd/trunk/configure.ac =================================================================== --- ircd/trunk/configure.ac 2008-10-16 22:51:11 UTC (rev 213) +++ ircd/trunk/configure.ac 2008-10-18 09:54:03 UTC (rev 214) @@ -295,6 +295,8 @@ fi dnl how about SSL support? +#Temporal +unet_cv_enable_ssl=no unet_TOGGLE([ssl], $unet_have_ssl, [Disable SSL support], [whether to enable SSL], [# Prohibit SSL support if ssl doesn't exist This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-10-16 22:51:25
|
Revision: 213 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=213&view=rev Author: zolty Date: 2008-10-16 22:51:11 +0000 (Thu, 16 Oct 2008) Log Message: ----------- Actualizacion TODO Modified Paths: -------------- ircd/trunk/TODO.es Modified: ircd/trunk/TODO.es =================================================================== --- ircd/trunk/TODO.es 2008-10-14 16:05:19 UTC (rev 212) +++ ircd/trunk/TODO.es 2008-10-16 22:51:11 UTC (rev 213) @@ -266,7 +266,6 @@ - En un ghost durante una conexion salir GHOST - DOS a traves deWhois? - Usuario baneado en canal -t no puede cambiar canal a menos que sea +o -- CPRIVMSG resetea el idle - Ocultacion de canales en el whois siendo +B - Estando glineado que al reentrar salga g-line y no k-line - Soporte PASS claveserver:clavebdd @@ -312,5 +311,20 @@ - nicks equivalentes - nicks prohibidos - nicks suspendidos +- whois de colores (tabla w) +- Jupe de servidores por tabla j +- Jupe de nicks por tabla j +- mensajes nicks ocupado ERR_NICKNAMEINUSE +- nicklen dinamico +- tabla d +- SVSMODE +- SVSJOIN, SVSPART +- SNO_SERVICE +- SVSNICK +- auto +i +- whois a un uline se muestra el servidor +- nick baneado o canal +R/+M sin +r o esta +m no puede cambiar dfe nick +- Reallen 70 +- +k se saltan CN This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-10-14 16:05:32
|
Revision: 212 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=212&view=rev Author: zolty Date: 2008-10-14 16:05:19 +0000 (Tue, 14 Oct 2008) Log Message: ----------- Dedicado a Daijo xD Modified Paths: -------------- ircd/trunk/TODO.es Modified: ircd/trunk/TODO.es =================================================================== --- ircd/trunk/TODO.es 2008-09-12 12:45:00 UTC (rev 211) +++ ircd/trunk/TODO.es 2008-10-14 16:05:19 UTC (rev 212) @@ -17,7 +17,6 @@ ALTA PRIORIDAD -------------------------------------------------------------------------------------- - - [D] U-lines a traves de la DDB. Usar tabla u de Uworld. - [D] Mejorar la inicializacion de las DDB con los eventos. - [D] DDB: compactado. - [D] DDB: Terminar de revisar el funcionamiento, drops y hashchecks. @@ -58,10 +57,8 @@ - [G] Con la introduccion de &his, comprobar TODO. - [G] Poner uuna Feature para elegir entre salir o no el nombre del servidor en los notices de auth y dnslookup al conectar. - - [D] Estudiar tabla j de jupes para jupear nicks con un mensaje - de descripcion. + - SIN PRIORIDAD (SERVICES o UNDERNET) -------------------------------------------------------------------------------------- - [S] Buscar una forma para cifrar IPs con un cambio de clave de cifrado incluido. @@ -273,12 +270,10 @@ - Ocultacion de canales en el whois siendo +B - Estando glineado que al reentrar salga g-line y no k-line - Soporte PASS claveserver:clavebdd -- En USERHOST/USERIP salir * si eres oper como en el WHO (Tiene para ircops perhelpers?) - Meter lo de nick changed too fast en claves erroneas de +r y en ghost erroneos - En Users indicar el tiempo de arranque - Netride de topic - MOTD por BDD -- Soporte de Ulines por BDD - Canales persistentes - Numerico de ircops, helpers e bots - Usuarios con k saltan targets y nicks seguidos @@ -309,7 +304,6 @@ - Campos adecuados en stats l - Mensaje de silenciado - Helpers pueden ver whois largos y modos extra -- lag en el map - Class full y mensaje al llenar la clase - Conexiones con clones no heredan targets - ZLIB @@ -317,4 +311,6 @@ - mensaje global - nicks equivalentes - nicks prohibidos -- nicks suspendidos \ No newline at end of file +- nicks suspendidos + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-09-12 12:44:50
|
Revision: 211 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=211&view=rev Author: zolty Date: 2008-09-12 12:45:00 +0000 (Fri, 12 Sep 2008) Log Message: ----------- correccion gramatical Modified Paths: -------------- ircd/trunk/ircd/hash.c ircd/trunk/ircd/ircd_features.c ircd/trunk/ircd/s_conf.c Modified: ircd/trunk/ircd/hash.c =================================================================== --- ircd/trunk/ircd/hash.c 2008-09-12 00:11:06 UTC (rev 210) +++ ircd/trunk/ircd/hash.c 2008-09-12 12:45:00 UTC (rev 211) @@ -498,7 +498,7 @@ #if defined(DDB) for (ddb = ddb_iterator_first(DDB_JUPEDB); ddb; ddb = ddb_iterator_next()) - send_reply(to, SND_EXPLICIT | RPL_STATSJLINE, "J %s :%s (setted by DDB)", + send_reply(to, SND_EXPLICIT | RPL_STATSJLINE, "J %s :%s (set by DDB)", ddb_key(ddb), ddb_content(ddb)); #endif } Modified: ircd/trunk/ircd/ircd_features.c =================================================================== --- ircd/trunk/ircd/ircd_features.c 2008-09-12 00:11:06 UTC (rev 210) +++ ircd/trunk/ircd/ircd_features.c 2008-09-12 12:45:00 UTC (rev 211) @@ -640,7 +640,7 @@ } else if (feat->flags & FEAT_DDB) { if (from) { - sendcmdto_one(&me, CMD_NOTICE, from, "%C :The feature has been setted by DDB", from); + sendcmdto_one(&me, CMD_NOTICE, from, "%C :The feature has been set by DDB", from); send_reply(from, ERR_NOFEATURE, fields[0]); } return 0; @@ -804,7 +804,7 @@ #if defined(DDB) if (feat->flags & FEAT_DDB) { if (from) { - sendcmdto_one(&me, CMD_NOTICE, from, "%C :The feature has been setted by DDB", from); + sendcmdto_one(&me, CMD_NOTICE, from, "%C :The feature has been set by DDB", from); send_reply(from, ERR_NOFEATURE, fields[0]); } return 0; @@ -1039,7 +1039,7 @@ case FEAT_INT: /* Report an F-line with integer values */ #if defined(DDB) if (features[i].flags & FEAT_DDB) { - send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s %d (setted by DDB)", + send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s %d (set by DDB)", features[i].type, features[i].v_int); break; } else if (features[i].flags & FEAT_MARK) /* it's been changed */ @@ -1053,7 +1053,7 @@ case FEAT_UINT: /* Report an F-line with unsigned values */ #if defined(DDB) if (features[i].flags & FEAT_DDB) { - send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s %u (setted by DDB)", + send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s %u (set by DDB)", features[i].type, features[i].v_int); break; } else if (features[i].flags & FEAT_MARK) /* it's been changed */ @@ -1067,7 +1067,7 @@ case FEAT_BOOL: /* Report an F-line with boolean values */ #if defined(DDB) if (features[i].flags & FEAT_DDB) { - send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s %s (setted by DDB)", + send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s %s (set by DDB)", features[i].type, features[i].v_int ? "TRUE" : "FALSE"); break; } else if (features[i].flags & FEAT_MARK) /* it's been changed */ @@ -1082,10 +1082,10 @@ #if defined(DDB) if (features[i].flags & FEAT_DDB) { if (features[i].v_str) - send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s %s (setted by DDB)", + send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s %s (set by DDB)", features[i].type, features[i].v_str); else - send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s (setted by DDB)", + send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s (set by DDB)", features[i].type); break; } else if (features[i].flags & FEAT_MARK) { /* it's been changed */ Modified: ircd/trunk/ircd/s_conf.c =================================================================== --- ircd/trunk/ircd/s_conf.c 2008-09-12 00:11:06 UTC (rev 210) +++ ircd/trunk/ircd/s_conf.c 2008-09-12 12:45:00 UTC (rev 211) @@ -1009,7 +1009,7 @@ #if defined(DDB) for (ddb = ddb_iterator_first(DDB_UWORLDDB); ddb; ddb = ddb_iterator_next()) - send_reply(to, SND_EXPLICIT | RPL_STATSULINE, "U %s (setted by DDB)", + send_reply(to, SND_EXPLICIT | RPL_STATSULINE, "U %s (set by DDB)", ddb_key(ddb)); #endif } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-09-12 00:10:56
|
Revision: 210 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=210&view=rev Author: zolty Date: 2008-09-12 00:11:06 +0000 (Fri, 12 Sep 2008) Log Message: ----------- Tabla J de Jupes Modified Paths: -------------- ircd/trunk/include/ddb.h ircd/trunk/ircd/ddb.c ircd/trunk/ircd/ddb_events.c ircd/trunk/ircd/hash.c ircd/trunk/ircd/m_nick.c Modified: ircd/trunk/include/ddb.h =================================================================== --- ircd/trunk/include/ddb.h 2008-09-11 23:50:46 UTC (rev 209) +++ ircd/trunk/include/ddb.h 2008-09-12 00:11:06 UTC (rev 210) @@ -55,6 +55,8 @@ #define DDB_FEATUREDB 'f' /** Ilines table of %DDB Distributed Databases. */ #define DDB_ILINEDB 'i' +/** Jupes table of %DDB Distributed Databases. */ +#define DDB_JUPEDB 'j' /** Nicks table of %DDB Distributed Databases. */ #define DDB_NICKDB 'n' /** Operators table of %DDB Distributed Databases. */ Modified: ircd/trunk/ircd/ddb.c =================================================================== --- ircd/trunk/ircd/ddb.c 2008-09-11 23:50:46 UTC (rev 209) +++ ircd/trunk/ircd/ddb.c 2008-09-12 00:11:06 UTC (rev 210) @@ -208,6 +208,7 @@ ddb_resident_table[DDB_CHANDB2] = 32768; ddb_resident_table[DDB_FEATUREDB] = 256; ddb_resident_table[DDB_ILINEDB] = 256; + ddb_resident_table[DDB_JUPEDB] = 256; ddb_resident_table[DDB_NICKDB] = 32768; ddb_resident_table[DDB_OPERDB] = 256; ddb_resident_table[DDB_PRIVSDB] = 256; Modified: ircd/trunk/ircd/ddb_events.c =================================================================== --- ircd/trunk/ircd/ddb_events.c 2008-09-11 23:50:46 UTC (rev 209) +++ ircd/trunk/ircd/ddb_events.c 2008-09-12 00:11:06 UTC (rev 210) @@ -76,6 +76,7 @@ ddb_events_table[DDB_CHANDB2] = ddb_events_table_d; ddb_events_table[DDB_FEATUREDB] = ddb_events_table_f; ddb_events_table[DDB_ILINEDB] = 0; + ddb_events_table[DDB_JUPEDB] = 0; ddb_events_table[DDB_NICKDB] = ddb_events_table_n; ddb_events_table[DDB_OPERDB] = ddb_events_table_o; ddb_events_table[DDB_UWORLDDB] = 0; Modified: ircd/trunk/ircd/hash.c =================================================================== --- ircd/trunk/ircd/hash.c 2008-09-11 23:50:46 UTC (rev 209) +++ ircd/trunk/ircd/hash.c 2008-09-12 00:11:06 UTC (rev 210) @@ -487,10 +487,20 @@ void stats_nickjupes(struct Client* to, const struct StatDesc* sd, char* param) { +#if defined(DDB) + struct Ddb *ddb; +#endif int i; for (i = 0; i < JUPEHASHSIZE; i++) if (jupeTable[i][0]) send_reply(to, RPL_STATSJLINE, jupeTable[i]); + +#if defined(DDB) + for (ddb = ddb_iterator_first(DDB_JUPEDB); ddb; + ddb = ddb_iterator_next()) + send_reply(to, SND_EXPLICIT | RPL_STATSJLINE, "J %s :%s (setted by DDB)", + ddb_key(ddb), ddb_content(ddb)); +#endif } /** Send more channels to a client in mid-LIST. Modified: ircd/trunk/ircd/m_nick.c =================================================================== --- ircd/trunk/ircd/m_nick.c 2008-09-11 23:50:46 UTC (rev 209) +++ ircd/trunk/ircd/m_nick.c 2008-09-12 00:11:06 UTC (rev 210) @@ -197,6 +197,14 @@ return 0; /* NICK message ignored */ } } + + ddb = ddb_find_key(DDB_JUPEDB, nick); + if (ddb) + { + send_reply(sptr, SND_EXPLICIT | ERR_NICKNAMEINUSE, "%s :Nickname is juped: %s", + nick, ddb_content(ddb)); + return 0; /* NICK message ignored */ + } #endif /* defined(DDB) */ /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-09-11 23:50:35
|
Revision: 209 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=209&view=rev Author: zolty Date: 2008-09-11 23:50:46 +0000 (Thu, 11 Sep 2008) Log Message: ----------- Tabla u de Uworld Modified Paths: -------------- ircd/trunk/include/ddb.h ircd/trunk/ircd/ddb.c ircd/trunk/ircd/ddb_events.c ircd/trunk/ircd/s_conf.c Modified: ircd/trunk/include/ddb.h =================================================================== --- ircd/trunk/include/ddb.h 2008-09-11 23:21:45 UTC (rev 208) +++ ircd/trunk/include/ddb.h 2008-09-11 23:50:46 UTC (rev 209) @@ -61,6 +61,8 @@ #define DDB_OPERDB 'o' /** Privileges table of %DDB Distributed Databases. */ #define DDB_PRIVSDB 'p' +/** Uworld table of %DDB Distributed Databases. */ +#define DDB_UWORLDDB 'u' /** Vhost table of %DDB Distributed Databases. */ #define DDB_VHOSTDB 'v' /** Config table of %DDB Distributed Databases. */ Modified: ircd/trunk/ircd/ddb.c =================================================================== --- ircd/trunk/ircd/ddb.c 2008-09-11 23:21:45 UTC (rev 208) +++ ircd/trunk/ircd/ddb.c 2008-09-11 23:50:46 UTC (rev 209) @@ -211,6 +211,7 @@ ddb_resident_table[DDB_NICKDB] = 32768; ddb_resident_table[DDB_OPERDB] = 256; ddb_resident_table[DDB_PRIVSDB] = 256; + ddb_resident_table[DDB_UWORLDDB] = 256; ddb_resident_table[DDB_VHOSTDB] = 256; ddb_resident_table[DDB_CONFIGDB] = 256; Modified: ircd/trunk/ircd/ddb_events.c =================================================================== --- ircd/trunk/ircd/ddb_events.c 2008-09-11 23:21:45 UTC (rev 208) +++ ircd/trunk/ircd/ddb_events.c 2008-09-11 23:50:46 UTC (rev 209) @@ -78,6 +78,7 @@ ddb_events_table[DDB_ILINEDB] = 0; ddb_events_table[DDB_NICKDB] = ddb_events_table_n; ddb_events_table[DDB_OPERDB] = ddb_events_table_o; + ddb_events_table[DDB_UWORLDDB] = 0; ddb_events_table[DDB_VHOSTDB] = ddb_events_table_v; ddb_events_table[DDB_CONFIGDB] = ddb_events_table_z; Modified: ircd/trunk/ircd/s_conf.c =================================================================== --- ircd/trunk/ircd/s_conf.c 2008-09-11 23:21:45 UTC (rev 208) +++ ircd/trunk/ircd/s_conf.c 2008-09-11 23:50:46 UTC (rev 209) @@ -933,6 +933,9 @@ { struct DLink *lp; struct SLink *sp; +#if defined(DDB) + struct Ddb *ddb; +#endif assert(cli_serv(cptr) != NULL); @@ -943,7 +946,15 @@ if (sp) cli_serv(cptr)->flags |= SFLAG_UWORLD; else + { +#if defined(DDB) + ddb = ddb_find_key(DDB_UWORLDDB, cli_name(cptr)); + if (ddb) + cli_serv(cptr)->flags |= SFLAG_UWORLD; + else +#endif cli_serv(cptr)->flags &= ~SFLAG_UWORLD; + } for (lp = cli_serv(cptr)->down; lp; lp = lp->next) update_uworld_flags(lp->value.cptr); @@ -988,9 +999,19 @@ stats_uworld(struct Client* to, const struct StatDesc* sd, char* param) { struct SLink *sp; +#if defined(DDB) + struct Ddb *ddb; +#endif for (sp = uworlds; sp; sp = sp->next) send_reply(to, RPL_STATSULINE, sp->value.cp); + +#if defined(DDB) + for (ddb = ddb_iterator_first(DDB_UWORLDDB); ddb; + ddb = ddb_iterator_next()) + send_reply(to, SND_EXPLICIT | RPL_STATSULINE, "U %s (setted by DDB)", + ddb_key(ddb)); +#endif } /** Free all memory associated with service mapping \a smap. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-09-11 23:21:34
|
Revision: 208 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=208&view=rev Author: zolty Date: 2008-09-11 23:21:45 +0000 (Thu, 11 Sep 2008) Log Message: ----------- Correcciones menores Modified Paths: -------------- ircd/trunk/ircd/m_ghost.c ircd/trunk/ircd/s_user.c Modified: ircd/trunk/ircd/m_ghost.c =================================================================== --- ircd/trunk/ircd/m_ghost.c 2008-08-24 19:44:36 UTC (rev 207) +++ ircd/trunk/ircd/m_ghost.c 2008-09-11 23:21:45 UTC (rev 208) @@ -117,7 +117,7 @@ acptr, cptr); } sendcmdbotto_one(botname, CMD_NOTICE, cptr, "%C :*** %C GHOST session has been " - "released", acptr, cptr); + "released", cptr, acptr); exit_client_msg(cptr, acptr, &me, "Killed (GHOST session released by %C)", cptr); return 0; Modified: ircd/trunk/ircd/s_user.c =================================================================== --- ircd/trunk/ircd/s_user.c 2008-08-24 19:44:36 UTC (rev 207) +++ ircd/trunk/ircd/s_user.c 2008-09-11 23:21:45 UTC (rev 208) @@ -486,8 +486,8 @@ /* Send user mode to client */ if (MyUser(sptr)) { + #if defined(UNDERNET) static struct Flags flags; /* automatically initialized to zeros */ -#if defined(UNDERNET) /* To avoid sending +r to the client due to auth-on-connect, set * the "old" FLAG_ACCOUNT bit to match the client's value. */ @@ -496,8 +496,8 @@ else FlagClr(&flags, FLAG_ACCOUNT); client_set_privs(sptr, NULL); -#endif send_umode(cptr, sptr, &flags, ALL_UMODES); +#endif if ((cli_snomask(sptr) != SNO_DEFAULT) && HasFlag(sptr, FLAG_SERVNOTICE)) send_reply(sptr, RPL_SNOMASK, cli_snomask(sptr), cli_snomask(sptr)); } @@ -832,6 +832,9 @@ #if defined(DDB) if (IsIdentify(flags) && !IsNickEquivalent(flags)) { + if (!botname) + botname = ddb_get_botname(DDB_NICKSERV); + sendcmdbotto_one(botname, CMD_NOTICE, cptr, "%C :*** Password accepted. Welcome to %s", cptr, feature_str(FEAT_NETWORK)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-08-24 19:44:26
|
Revision: 207 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=207&view=rev Author: zolty Date: 2008-08-24 19:44:36 +0000 (Sun, 24 Aug 2008) Log Message: ----------- Actualizacion TODO Modified Paths: -------------- ircd/trunk/TODO.es ircd/trunk/ircd/m_nick.c Modified: ircd/trunk/TODO.es =================================================================== --- ircd/trunk/TODO.es 2008-08-24 18:50:51 UTC (rev 206) +++ ircd/trunk/TODO.es 2008-08-24 19:44:36 UTC (rev 207) @@ -8,39 +8,34 @@ URGENTE -------------------------------------------------------------------------------------- + - [D] Comprobar paso por paso tabla n de Nicks + - [D] Comprobar paso por paso tabla i de Ilines - [D] Implementar tabla o de Operadores - [D] Implementar tabla p de Privilegios + - [G] Al hacerse ircop, sale la IP real en el Server Notice. + - [G] Mirar funcionamiento glines, no van. ALTA PRIORIDAD -------------------------------------------------------------------------------------- - - [G] Soporte de E-lines (excepciones a K-lines). - - [G] Poner uuna Feature para elegir entre salir o no el nombre del servidor en los - notices de auth y dnslookup al conectar. - - [D] U-lines a traves de la DDB. + - [D] U-lines a traves de la DDB. Usar tabla u de Uworld. - [D] Mejorar la inicializacion de las DDB con los eventos. - - [G] Con la introduccion de &his, comprobar TODO. + - [D] DDB: compactado. + - [D] DDB: Terminar de revisar el funcionamiento, drops y hashchecks. - PRIORIDAD MEDIA -------------------------------------------------------------------------------------- - - [D] DDB: compactado. - - [G] Caracter '~' en los nicks. - [G] Mostrar tiempo en formato humano en las G-lines y Jupes. - - [G] Enviar un Closing Link en los QUIT. + - [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 la mascara. - [G] Si un global lo manda un ircop, que salga el prefijo de Mensaje global con la mascara o avisar mediante wallops global. - - [S] Buscar una forma para cifrar IPs con un cambio de clave de cifrado incluido. - - [S] Comando SVSMODE. - - [S] Comando SVSVHOST para cambiar la virtualhost. Estudiar alguna forma de propagarse - en el burst. - - [S] Comando /IDENTIFY y autentificacion NICK nick clave. PRIORIDAD BAJA -------------------------------------------------------------------------------------- + - [G] Soporte de E-lines (excepciones a K-lines). - [G] \xBFAmpliacion comando OPER para elegir clase? - [G] S-lines (Spoof Lines). - [G] Soporte Zlib para server<->server y client<->server (requiere @@ -60,9 +55,22 @@ - [G] Modo HalfOp (+h). - [G] Estudiar la viabilidad de "doble ban" cuando se banea a virtualhosts para que se banee tambi\xE9n a la IP real. + - [G] Con la introduccion de &his, comprobar TODO. + - [G] Poner uuna Feature para elegir entre salir o no el nombre del servidor en los + notices de auth y dnslookup al conectar. - [D] Estudiar tabla j de jupes para jupear nicks con un mensaje de descripcion. - + + +SIN PRIORIDAD (SERVICES o UNDERNET) +-------------------------------------------------------------------------------------- + - [S] Buscar una forma para cifrar IPs con un cambio de clave de cifrado incluido. + - [S] Comando SVSMODE. + - [S] Comando SVSVHOST para cambiar la virtualhost. Estudiar alguna forma de propagarse + en el burst. + - [S] Comando /IDENTIFY y autentificacion NICK nick clave. + + [18:11:32] <Tor> quote opmode torcum #opers,#lala [18:11:38] <Tor> quote opmode #opers +nk lalala [18:14:59] <Tor> burst de aways @@ -77,6 +85,7 @@ 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 @@ -254,7 +263,6 @@ - Modo WEBCHAT especifico - En el MOTD, la hora que salga con el timezone - Ojo con E-lines al hacer rehash -- Guardar clave cifrado en memoria en ASCII y BINARIO - Al mandar un notice a un canal que salga los mismos reply de erroes que con privmsg - Suspends y forbids por BDD de forma inmediata - Si un nodo hace bounce de modos/topic/kick/invite, hacer un -o @@ -269,59 +277,44 @@ - Meter lo de nick changed too fast en claves erroneas de +r y en ghost erroneos - En Users indicar el tiempo de arranque - Netride de topic -- Eliminacion de canales MODELESS que empiecen por @? (No hay canales modeless) - MOTD por BDD - Soporte de Ulines por BDD - Canales persistentes - Numerico de ircops, helpers e bots - Usuarios con k saltan targets y nicks seguidos -- Parche ~ en nicks -- Numeric modo +R +- Numeric modo +R en whois - Salir el +k en el WHO -- Numeric Bots +B -- Chequeo de caracteres raros en el BAN - Eline 223, silence 509 - Silence 510 -- +R y numerico 480 - +k sale part y quit -- Ping timeout y read error sin el to nick - E-lines y numeric 239 - cambiosde nicks demasiados rapido salia erro - 432 de Erroneus nickname por invalid nickname -- nicks prohibidos - Comprobador de TS - Restringir lista de silence - Formato humano en gline y stats g - Comando OPER pass clase - Class is full y class non-existent - Ojo con cambio de nick estando baneado, que no salga el notice -- nicks equivalentes -- nicks suspendidos - al hacer un quit, mandar el quit con el closing link -- Quit sin mensaje no sale ningun mensaje (Sale Quit a secas) +- Quit sin mensaje no sale ningun mensaje (sale quit a secas) - Reliable clock desactivado - Bug de +l 0 o negativos -- Names sin parametros no enought parameters - /Kick primero comprobar si esta y luego si tiene +k - whois nodo_inex nick devolver no such server (con ocultacion de servers funciona diferente?) - Mensajes autoghost - Ojo con ips en trace -- No permitir caracteres de control en nombre canal, ascii < 32 (creo que funciona, comprobar) -- En canales modeless no pueden empezar por +, #, &, @ - Los bans tienen que comprobar a la real y virtual - Cambiar mensaje "Cannot kill, kick or deop channel service - Campos adecuados en stats l - Mensaje de silenciado - Helpers pueden ver whois largos y modos extra -- Helpers salen en who 0 o - lag en el map -- al glinear sale la razon - Class full y mensaje al llenar la clase - Conexiones con clones no heredan targets - ZLIB - join OPER -- ip virtual en el path en los kill - mensaje global -- ircops no tienen limitado canales -- +X mira ip real y virtual en who - +- nicks equivalentes +- nicks prohibidos +- nicks suspendidos \ No newline at end of file Modified: ircd/trunk/ircd/m_nick.c =================================================================== --- ircd/trunk/ircd/m_nick.c 2008-08-24 18:50:51 UTC (rev 206) +++ ircd/trunk/ircd/m_nick.c 2008-08-24 19:44:36 UTC (rev 207) @@ -170,8 +170,10 @@ arg[IRCD_MIN(NICKLEN, feature_uint(FEAT_NICKLEN))] = '\0'; /* Soporte de nicks ~ */ +#if !defined(DDB) if ((s = strchr(arg, '~'))) *s = '\0'; +#endif strcpy(nick, arg); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-08-24 18:50:41
|
Revision: 206 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=206&view=rev Author: zolty Date: 2008-08-24 18:50:51 +0000 (Sun, 24 Aug 2008) Log Message: ----------- Auto usermode al conectar Modified Paths: -------------- ircd/trunk/include/ircd_features.h ircd/trunk/ircd/client.c ircd/trunk/ircd/ircd_features.c ircd/trunk/ircd/s_user.c Modified: ircd/trunk/include/ircd_features.h =================================================================== --- ircd/trunk/include/ircd_features.h 2008-08-23 21:42:48 UTC (rev 205) +++ ircd/trunk/include/ircd_features.h 2008-08-24 18:50:51 UTC (rev 206) @@ -55,6 +55,7 @@ FEAT_RANDOM_SEED, FEAT_DEFAULT_LIST_PARAM, FEAT_NICKNAMEHISTORYLENGTH, + FEAT_AUTOUSERMODES, FEAT_HOST_HIDING, FEAT_HIDDEN_HOST, FEAT_HIDDEN_IP, Modified: ircd/trunk/ircd/client.c =================================================================== --- ircd/trunk/ircd/client.c 2008-08-23 21:42:48 UTC (rev 205) +++ ircd/trunk/ircd/client.c 2008-08-24 18:50:51 UTC (rev 206) @@ -31,6 +31,7 @@ #include "ircd_features.h" #include "ircd_log.h" #include "ircd_reply.h" +#include "ircd_string.h" #include "list.h" #include "msgq.h" #include "numeric.h" @@ -83,6 +84,9 @@ assert(cli_verify(sptr)); + if (!EmptyString(feature_str(FEAT_AUTOUSERMODES))) + return feature_str(FEAT_AUTOUSERMODES); + for (link = cli_confs(sptr); link; link = link->next) { aconf = link->value.aconf; if ((aconf->status & CONF_CLIENT) && ConfUmode(aconf)) Modified: ircd/trunk/ircd/ircd_features.c =================================================================== --- ircd/trunk/ircd/ircd_features.c 2008-08-23 21:42:48 UTC (rev 205) +++ ircd/trunk/ircd/ircd_features.c 2008-08-24 18:50:51 UTC (rev 206) @@ -387,6 +387,7 @@ F_N(RANDOM_SEED, FEAT_NODISP, random_seed_set, 0, 0, 0, 0, 0, 0), F_S(DEFAULT_LIST_PARAM, FEAT_NULL, 0, list_set_default), F_U(NICKNAMEHISTORYLENGTH, 0, 800, whowas_realloc), + F_S(AUTOUSERMODES, FEAT_NULL, 0, 0), F_B(HOST_HIDING, 0, 1, 0), F_S(HIDDEN_HOST, FEAT_CASE, "users.irc-dev.net", 0), F_S(HIDDEN_IP, 0, "127.0.0.1", 0), Modified: ircd/trunk/ircd/s_user.c =================================================================== --- ircd/trunk/ircd/s_user.c 2008-08-23 21:42:48 UTC (rev 205) +++ ircd/trunk/ircd/s_user.c 2008-08-24 18:50:51 UTC (rev 206) @@ -411,7 +411,7 @@ if (tmpstr) { char *umodev[] = { NULL, NULL, NULL, NULL }; umodev[2] = tmpstr; - set_user_mode(cptr, sptr, 1, umodev, ALLOWMODES_ANY); + set_user_mode(cptr, sptr, 3, umodev, ALLOWMODES_ANY); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-08-23 21:42:38
|
Revision: 205 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=205&view=rev Author: zolty Date: 2008-08-23 21:42:48 +0000 (Sat, 23 Aug 2008) Log Message: ----------- Actualizacion TODO Modified Paths: -------------- ircd/trunk/TODO.es Modified: ircd/trunk/TODO.es =================================================================== --- ircd/trunk/TODO.es 2008-08-18 19:26:23 UTC (rev 204) +++ ircd/trunk/TODO.es 2008-08-23 21:42:48 UTC (rev 205) @@ -14,7 +14,6 @@ ALTA PRIORIDAD -------------------------------------------------------------------------------------- - [G] Soporte de E-lines (excepciones a K-lines). - - [G] Modo +X de ver ips. Hacerlo por privilegios daria problemas. - [G] Poner uuna Feature para elegir entre salir o no el nombre del servidor en los notices de auth y dnslookup al conectar. - [D] U-lines a traves de la DDB. @@ -61,6 +60,8 @@ - [G] Modo HalfOp (+h). - [G] Estudiar la viabilidad de "doble ban" cuando se banea a virtualhosts para que se banee tambi\xE9n a la IP real. + - [D] Estudiar tabla j de jupes para jupear nicks con un mensaje + de descripcion. [18:11:32] <Tor> quote opmode torcum #opers,#lala [18:11:38] <Tor> quote opmode #opers +nk lalala This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-08-18 19:26:23
|
Revision: 204 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=204&view=rev Author: zolty Date: 2008-08-18 19:26:23 +0000 (Mon, 18 Aug 2008) Log Message: ----------- TRansicion vhosts Modified Paths: -------------- ircd/trunk/ircd/ddb_events.c ircd/trunk/ircd/m_die.c ircd/trunk/ircd/s_user.c Modified: ircd/trunk/ircd/ddb_events.c =================================================================== --- ircd/trunk/ircd/ddb_events.c 2008-08-15 22:09:38 UTC (rev 203) +++ ircd/trunk/ircd/ddb_events.c 2008-08-18 19:26:23 UTC (rev 204) @@ -32,6 +32,7 @@ #include "ircd.h" #include "ircd_alloc.h" #include "ircd_chattr.h" +#include "ircd_features.h" #include "ircd_snprintf.h" #include "ircd_tea.h" #include "msg.h" @@ -270,14 +271,14 @@ tempa[0] = keytemp; tempa[1] = content; - feature_set(&me, tempa, 2); + feature_set(&me, (const char * const *)tempa, 2); } else { char *tempb[1]; tempb[0] = keytemp; - feature_set(&me, tempb, 1); + feature_set(&me, (const char * const *)tempb, 1); } } @@ -518,11 +519,22 @@ { if (content) { +#if 1 /* TRANSICION IRC-HISPANO */ + if (!strcmp(key, feature_bool(FEAT_TRANSICION_HISPANO) ? + "numero.maximo.de.clones.por.defecto" : DDB_CONFIGDB_MAX_CLONES_PER_IP)) + max_clones = atoi(content); + else if (!strcmp(key, feature_bool(FEAT_TRANSICION_HISPANO) ? + "mensaje.de.demasiados.clones" : DDB_CONFIGDB_MSG_TOO_MANY_FROM_IP)) + msg_many_clones = content; + else if (!strcmp(key, feature_bool(FEAT_TRANSICION_HISPANO) ? + "clave.de.cifrado.de.ips" : DDB_CONFIGDB_IP_CRYPT_KEY)) +#else 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)) +#endif { char keytmp[12 + 1]; char c; @@ -539,11 +551,22 @@ } else { +#if 1 /* TRANSICION IRC-HISPANO */ + if (!strcmp(key, feature_bool(FEAT_TRANSICION_HISPANO) ? + "numero.maximo.de.clones.por.defecto" : DDB_CONFIGDB_MAX_CLONES_PER_IP)) + max_clones = 0; + else if (!strcmp(key, feature_bool(FEAT_TRANSICION_HISPANO) ? + "mensaje.de.demasiados.clones" : DDB_CONFIGDB_MSG_TOO_MANY_FROM_IP)) + msg_many_clones = NULL; + else if (!strcmp(key, feature_bool(FEAT_TRANSICION_HISPANO) ? + "clave.de.cifrado.de.ips" : DDB_CONFIGDB_IP_CRYPT_KEY)) +#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)) +#endif { ip_crypt_key = NULL; binary_ip_crypt_key[0] = 0; Modified: ircd/trunk/ircd/m_die.c =================================================================== --- ircd/trunk/ircd/m_die.c 2008-08-15 22:09:38 UTC (rev 203) +++ ircd/trunk/ircd/m_die.c 2008-08-18 19:26:23 UTC (rev 204) @@ -122,7 +122,7 @@ reason = parv[parc - 1]; /* now, let's schedule the exit */ - exit_schedule(0, 0, 0, "Received DIE"); + exit_schedule(0, when, sptr, reason); return 0; } Modified: ircd/trunk/ircd/s_user.c =================================================================== --- ircd/trunk/ircd/s_user.c 2008-08-15 22:09:38 UTC (rev 203) +++ ircd/trunk/ircd/s_user.c 2008-08-18 19:26:23 UTC (rev 204) @@ -1248,7 +1248,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\xEDa ocurrir nunca... */ if (++ts == 65535) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-08-15 22:09:28
|
Revision: 203 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=203&view=rev Author: zolty Date: 2008-08-15 22:09:38 +0000 (Fri, 15 Aug 2008) Log Message: ----------- Actualizacion doc Undernet Modified Paths: -------------- ircd/trunk/doc/en/features.txt ircd/trunk/doc/ircd.sample-en.conf Modified: ircd/trunk/doc/en/features.txt =================================================================== --- ircd/trunk/doc/en/features.txt 2008-08-15 20:46:05 UTC (rev 202) +++ ircd/trunk/doc/en/features.txt 2008-08-15 22:09:38 UTC (rev 203) @@ -1060,3 +1060,23 @@ Number of fast join-part sequences before a client is judged to look like a spambot. + +NETWORK_REHASH + * Type: boolean + * Default: FALSE + +Allow this server to act upon a network-issued /rehash. + + +NETWORK_RESTART + * Type: boolean + * Default: FALSE + +Allow this server to act upon a network-issued /restart. + + +NETWORK_DIE + * Type: boolean + * Default: FALSE + +Allow this server to act upon a network-issued /die. Modified: ircd/trunk/doc/ircd.sample-en.conf =================================================================== --- ircd/trunk/doc/ircd.sample-en.conf 2008-08-15 20:46:05 UTC (rev 202) +++ ircd/trunk/doc/ircd.sample-en.conf 2008-08-15 22:09:38 UTC (rev 203) @@ -677,6 +677,9 @@ # server = yes; # # Setting to yes makes the port "hidden" from stats. # hidden = yes; +# # Setting to yes makes the port exempt from connection restrictions +# # during a timed /restart or /die. +# exempt = yes; # }; # # The port and vhost lines allow you to specify one or both of "ipv4" @@ -716,6 +719,8 @@ # This only accepts clients with IPs like 192.168.*. mask = "192.168.*"; port = 6666; + # Allows your opers to connect during a timed /restart or /die. + exempt = yes; }; # This is a hidden client port, listening on 168.8.21.107. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-08-15 20:45:57
|
Revision: 202 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=202&view=rev Author: zolty Date: 2008-08-15 20:46:05 +0000 (Fri, 15 Aug 2008) Log Message: ----------- Fix Modified Paths: -------------- ircd/trunk/ircd/ddb_events.c Modified: ircd/trunk/ircd/ddb_events.c =================================================================== --- ircd/trunk/ircd/ddb_events.c 2008-08-15 20:43:04 UTC (rev 201) +++ ircd/trunk/ircd/ddb_events.c 2008-08-15 20:46:05 UTC (rev 202) @@ -107,9 +107,9 @@ chptr = get_channel(NULL, key, CGT_CREATE); /* Ponemos modo +r */ - if (!(chptr->mode.mode & MODE_REGCHAN)) + if (!(chptr->mode.mode & MODE_REGISTERED)) { - chptr->mode.mode |= MODE_REGCHAN; + chptr->mode.mode |= MODE_REGISTERED; if (chptr->users) sendcmdbotto_channel(botname, CMD_MODE, chptr, NULL, SKIP_SERVERS, "%H +r", chptr); @@ -178,9 +178,9 @@ chptr = get_channel(NULL, key, CGT_NO_CREATE); /* Borramos el canal */ - if (chptr && ((chptr->mode.mode) & MODE_REGCHAN)) + if (chptr && ((chptr->mode.mode) & MODE_REGISTERED)) { - chptr->mode.mode &= ~MODE_REGCHAN; + chptr->mode.mode &= ~MODE_REGISTERED; if (chptr->users) { struct Membership *member; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-08-15 20:42:56
|
Revision: 201 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=201&view=rev Author: zolty Date: 2008-08-15 20:43:04 +0000 (Fri, 15 Aug 2008) Log Message: ----------- Transicion RENAME a SVSNICK Modified Paths: -------------- ircd/trunk/include/msg.h ircd/trunk/ircd/m_svsnick.c ircd/trunk/ircd/parse.c Modified: ircd/trunk/include/msg.h =================================================================== --- ircd/trunk/include/msg.h 2008-08-15 20:28:43 UTC (rev 200) +++ ircd/trunk/include/msg.h 2008-08-15 20:43:04 UTC (rev 201) @@ -389,9 +389,15 @@ #define MSG_SVSNICK "SVSNICK" /* SVSN */ #define TOK_SVSNICK "SN" #define CMD_SVSNICK MSG_SVSNICK, TOK_SVSNICK +#if 1 /* TRANSICION IRC-HISPANO */ +#define MSG_RENAME "RENAME" /* SVSN */ +#define TOK_RENAME "RENAME" +#define CMD_RENAME MSG_RENAME, TOK_RENAME +#endif + /* * Constants */ Modified: ircd/trunk/ircd/m_svsnick.c =================================================================== --- ircd/trunk/ircd/m_svsnick.c 2008-08-15 20:28:43 UTC (rev 200) +++ ircd/trunk/ircd/m_svsnick.c 2008-08-15 20:43:04 UTC (rev 201) @@ -66,8 +66,18 @@ assert(0 != IsServer(cptr)); - if (parc < 2) +#if 1 /* TRANSICION IRC-HISPANO */ + if (parc == 2) + { + parv[2] = "*"; + parc = 3; + } + else if (parc < 2) return 0; +#else + if (parc < 3) + return 0; +#endif if (!cli_uworld(sptr)) { @@ -78,7 +88,11 @@ return 0; } +#if 1 /* TRANSICION IRC-HISPANO */ + sendcmdto_serv(sptr, feature_bool(FEAT_TRANSICION_HISPANO) ? CMD_RENAME : CMD_SVSNICK, cptr, "%s :%s", parv[1], parv[2]); +#else sendcmdto_serv(sptr, CMD_SVSNICK, cptr, "%s :%s", parv[1], parv[2]); +#endif acptr = findNUser(parv[1]); Modified: ircd/trunk/ircd/parse.c =================================================================== --- ircd/trunk/ircd/parse.c 2008-08-15 20:28:43 UTC (rev 200) +++ ircd/trunk/ircd/parse.c 2008-08-15 20:43:04 UTC (rev 201) @@ -678,6 +678,15 @@ /* UNREG, CLIENT, SERVER, OPER, SERVICE */ { m_ignore, m_ignore, ms_svsnick, m_ignore, m_ignore } }, +#if 1 /* TRANSICION IRC-HISPANO */ + { + "RENAME", + "RENAME", + 0, MAXPARA, MFLG_SLOW, 0, NULL, + /* UNREG, CLIENT, SERVER, OPER, SERVICE */ + { m_ignore, m_ignore, ms_svsnick, m_ignore, m_ignore } + }, +#endif #endif /* This command is an alias for QUIT during the unregistered part of This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-08-15 20:28:35
|
Revision: 200 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=200&view=rev Author: zolty Date: 2008-08-15 20:28:43 +0000 (Fri, 15 Aug 2008) Log Message: ----------- Sincronizacion Undernet y fix esteticos Modified Paths: -------------- ircd/trunk/include/channel.h ircd/trunk/include/client.h ircd/trunk/ircd/channel.c Modified: ircd/trunk/include/channel.h =================================================================== --- ircd/trunk/include/channel.h 2008-08-15 20:04:12 UTC (rev 199) +++ ircd/trunk/include/channel.h 2008-08-15 20:28:43 UTC (rev 200) @@ -101,6 +101,9 @@ /* Channel Visibility macros */ +#if defined(DDB) || defined(SERVICES) +#define MODE_OWNER CHFL_OWNER /**< +q Channel owner */ +#endif #define MODE_CHANOP CHFL_CHANOP /**< +o Chanop */ #define MODE_VOICE CHFL_VOICE /**< +v Voice */ #define MODE_PRIVATE 0x0004 /**< +p Private */ @@ -114,13 +117,10 @@ #define MODE_LIMIT 0x0400 /**< +l Limit */ #define MODE_REGONLY 0x0800 /**< +R Only +r users may join */ #define MODE_DELJOINS 0x1000 /**< New join messages are delayed */ -#define MODE_NOCOLOUR 0x2000 /**< No mIRC/ANSI colors/bold */ -#define MODE_NOCTCP 0x4000 /**< No channel CTCPs */ -#define MODE_NONOTICE 0x8000 /**< No channel notices */ -#if defined(DDB) || defined(SERVICES) -#define MODE_REGCHAN 0x10000 /**< +r Channel registered */ -#define MODE_OWNER CHFL_OWNER /**< +q Channel owner */ -#endif +#define MODE_REGISTERED 0x2000 /**< Channel marked as registered */ +#define MODE_NOCOLOUR 0x4000 /**< No mIRC/ANSI colors/bold */ +#define MODE_NOCTCP 0x8000 /**< No channel CTCPs */ +#define MODE_NONOTICE 0x10000 /**< No channel notices */ #define MODE_SAVE 0x20000 /**< save this mode-with-arg 'til * later */ #define MODE_FREE 0x40000 /**< string needs to be passed to @@ -142,7 +142,7 @@ #define MODE_WPARAS (MODE_CHANOP|MODE_VOICE|MODE_BAN|MODE_KEY|MODE_LIMIT|MODE_APASS|MODE_UPASS) /** Available Channel modes */ -#define infochanmodes feature_bool(FEAT_OPLEVELS) ? "AbiklmnopstUvrDcCNuM" : "biklmnopstvrDcCNuM" +#define infochanmodes feature_bool(FEAT_OPLEVELS) ? "AbiklmnopstUvrDRcCNuM" : "biklmnopstvrDRcCNuM" /** Available Channel modes that take parameters */ #define infochanmodeswithparams feature_bool(FEAT_OPLEVELS) ? "AbkloUv" : "bklov" #elif defined(DDB) || defined(SERVICES) @@ -160,7 +160,7 @@ #define MODE_WPARAS (MODE_CHANOP|MODE_VOICE|MODE_BAN|MODE_KEY|MODE_LIMIT) /** Available Channel modes */ -#define infochanmodes "biklmnopstvrDcCNuM" +#define infochanmodes "biklmnopstvrDRcCNuM" /** Available Channel modes that take parameters */ #define infochanmodeswithparams "bklov" #endif Modified: ircd/trunk/include/client.h =================================================================== --- ircd/trunk/include/client.h 2008-08-15 20:04:12 UTC (rev 199) +++ ircd/trunk/include/client.h 2008-08-15 20:28:43 UTC (rev 200) @@ -73,9 +73,9 @@ /** String containing valid user modes, in no particular order. */ #if defined(DDB) || defined(SERVICES) -#define infousermodes "dioswkgxrRachBSZ" +#define infousermodes "dioOswkgxrRachBSZ" #else -#define infousermodes "dioswkgxRZ" +#define infousermodes "dioOswkgxRZ" #endif /** Operator privileges. */ @@ -548,10 +548,10 @@ /** Return non-zero if the client is an IRC operator (global or local). */ #if defined(DDB) -#define IsAnOper(x) (HasFlag(x, FLAG_OPER) || HasFlag(x, FLAG_LOCOP) || HasFlag(x, FLAG_ADMIN) || \ - HasFlag(x, FLAG_CODER) || HasFlag(x, FLAG_HELPOPER) || HasFlag(x, FLAG_BOT)) +#define IsAnOper(x) (IsOper(x) || IsLocOp(x) || IsAdmin(x) || \ + IsCoder(x) || IsHelpOper(x) || IsBot(x)) #else -#define IsAnOper(x) (HasFlag(x, FLAG_OPER) || HasFlag(x, FLAG_LOCOP)) +#define IsAnOper(x) (IsOper(x) || IsLocOp(x)) #endif /** Return non-zero if the client's connection is blocked. */ #define IsBlocked(x) HasFlag(x, FLAG_BLOCKED) @@ -577,7 +577,7 @@ /** Return non-zero if the client caused a net.burst. */ #define IsJunction(x) HasFlag(x, FLAG_JUNCTION) /** Return non-zero if the client has set mode +O (local operator). */ -#define IsLocOp(x) HasFlag(x, FLAG_LOCOP) +#define IsLocOp(x) (MyUser(x) && HasFlag(x, FLAG_LOCOP)) /** Return non-zero if the client has set mode +o (global operator). */ #define IsOper(x) HasFlag(x, FLAG_OPER) /** Return non-zero if the client has an active UDP ping request. */ Modified: ircd/trunk/ircd/channel.c =================================================================== --- ircd/trunk/ircd/channel.c 2008-08-15 20:04:12 UTC (rev 199) +++ ircd/trunk/ircd/channel.c 2008-08-15 20:28:43 UTC (rev 200) @@ -329,7 +329,7 @@ #elif defined(DDB) chptr->users = 0; - if (!(chptr->mode.mode & MODE_REGCHAN)) + if (!(chptr->mode.mode & MODE_REGISTERED)) destruct_channel(chptr); #else @@ -864,14 +864,11 @@ *mbuf++ = 'i'; if (chptr->mode.mode & MODE_NOPRIVMSGS) *mbuf++ = 'n'; + if (chptr->mode.mode & MODE_REGONLY) #if defined(UNDERNET) - if (chptr->mode.mode & MODE_REGONLY) *mbuf++ = 'r'; #elif defined(DDB) || defined(SERVICES) - if (chptr->mode.mode & MODE_REGCHAN) - *mbuf++ = 'r'; - if (chptr->mode.mode & MODE_REGONLY) - *mbuf++ = 'R'; + *mbuf++ = 'R'; #endif if (chptr->mode.mode & MODE_NOCOLOUR) *mbuf++ = 'c'; @@ -881,12 +878,18 @@ *mbuf++ = 'N'; if (chptr->mode.mode & MODE_NOQUITPARTS) *mbuf++ = 'u'; + if (chptr->mode.mode & MODE_MODERATENOREG) + *mbuf++ = 'M'; if (chptr->mode.mode & MODE_DELJOINS) *mbuf++ = 'D'; - if (chptr->mode.mode & MODE_MODERATENOREG) - *mbuf++ = 'M'; else if (MyUser(cptr) && (chptr->mode.mode & MODE_WASDELJOINS)) *mbuf++ = 'd'; + if (chptr->mode.mode & MODE_REGISTERED) +#if defined(UNDERNET) + *mbuf++ = 'R'; +#elif defined(DDB) || defined(SERVICES) + *mbuf++ = 'r'; +#endif if (chptr->mode.limit) { *mbuf++ = 'l'; ircd_snprintf(0, pbuf, buflen, "%u", chptr->mode.limit); @@ -1705,9 +1708,10 @@ MODE_INVITEONLY, 'i', MODE_NOPRIVMSGS, 'n', #if defined(UNDERNET) + MODE_REGISTERED, 'R', MODE_REGONLY, 'r', #elif defined(DDB) || defined(SERVICES) - MODE_REGCHAN, 'r', + MODE_REGISTERED, 'r', MODE_REGONLY, 'R', /* MODE_OWNER, 'q', */ #endif @@ -2222,12 +2226,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_NOCTCP | MODE_NONOTICE | MODE_NOQUITPARTS | MODE_NOCOLOUR | MODE_MODERATENOREG | - MODE_DELJOINS | MODE_WASDELJOINS); + MODE_DELJOINS | MODE_WASDELJOINS | MODE_REGISTERED); if (!(mode & ~(MODE_ADD | MODE_DEL))) /* don't add empty modes... */ return; @@ -2380,9 +2381,10 @@ /* MODE_BAN, 'b', */ MODE_LIMIT, 'l', #if defined(UNDERNET) + MODE_REGISTERED, 'R' MODE_REGONLY, 'r', #elif defined(DDB) || defined(SERVICES) - MODE_REGCHAN, 'r', + MODE_REGISTERED, 'r', MODE_REGONLY, 'R', /* MODE_OWNER, 'q', */ #endif @@ -3495,6 +3497,13 @@ if (!state->mbuf) return; + +#if defined(UNDERNET) + /* Local users are not permitted to change registration status */ + if (flag_p[0] == MODE_REGISTERED && !(state->flags & MODE_PARSE_FORCE) && + MyUser(state->sptr)) + return; +#endif if (state->dir == MODE_ADD) { state->add |= flag_p[0]; @@ -3544,10 +3553,11 @@ MODE_BAN, 'b', MODE_LIMIT, 'l', #if defined(UNDERNET) + MODE_REGISTERED, 'R', MODE_REGONLY, 'r', #elif defined(DDB) || defined(SERVICES) MODE_OWNER, 'q', - MODE_REGCHAN, 'r', + MODE_REGISTERED, 'r', MODE_REGONLY, 'R', #endif MODE_DELJOINS, 'D', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zo...@us...> - 2008-08-15 20:04:08
|
Revision: 199 http://irc-dev.svn.sourceforge.net/irc-dev/?rev=199&view=rev Author: zolty Date: 2008-08-15 20:04:12 +0000 (Fri, 15 Aug 2008) Log Message: ----------- Soporte de REHASH, RESTART y DIE remotos Modified Paths: -------------- ircd/trunk/include/handlers.h ircd/trunk/include/ircd_features.h ircd/trunk/include/msg.h ircd/trunk/ircd/ircd_features.c ircd/trunk/ircd/m_die.c ircd/trunk/ircd/m_rehash.c ircd/trunk/ircd/m_restart.c ircd/trunk/ircd/parse.c Modified: ircd/trunk/include/handlers.h =================================================================== --- ircd/trunk/include/handlers.h 2008-08-15 18:54:05 UTC (rev 198) +++ ircd/trunk/include/handlers.h 2008-08-15 20:04:12 UTC (rev 199) @@ -205,6 +205,7 @@ extern int ms_dbq(struct Client*, struct Client*, int, char*[]); extern int ms_destruct(struct Client*, struct Client*, int, char*[]); extern int ms_desynch(struct Client*, struct Client*, int, char*[]); +extern int ms_die(struct Client*, struct Client*, int, char*[]); extern int ms_end_of_burst(struct Client*, struct Client*, int, char*[]); extern int ms_end_of_burst_ack(struct Client*, struct Client*, int, char*[]); extern int ms_error(struct Client*, struct Client*, int, char*[]); @@ -230,6 +231,8 @@ 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_rehash(struct Client*, struct Client*, int, char*[]); +extern int ms_restart(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*[]); extern int ms_server(struct Client*, struct Client*, int, char*[]); Modified: ircd/trunk/include/ircd_features.h =================================================================== --- ircd/trunk/include/ircd_features.h 2008-08-15 18:54:05 UTC (rev 198) +++ ircd/trunk/include/ircd_features.h 2008-08-15 20:04:12 UTC (rev 199) @@ -203,6 +203,11 @@ FEAT_SPAM_JOINED_TIME, FEAT_SPAM_FJP_COUNT, + /* Really special features (tm) */ + FEAT_NETWORK_REHASH, + FEAT_NETWORK_RESTART, + FEAT_NETWORK_DIE, + #if 1 /* TRANSICION IRC-HISPANO */ FEAT_TRANSICION_HISPANO, #endif Modified: ircd/trunk/include/msg.h =================================================================== --- ircd/trunk/include/msg.h 2008-08-15 18:54:05 UTC (rev 198) +++ ircd/trunk/include/msg.h 2008-08-15 20:04:12 UTC (rev 199) @@ -268,11 +268,11 @@ #define CMD_SERVSET MSG_SERVSET, TOK_SERVSET #define MSG_REHASH "REHASH" /* REHA */ -#define TOK_REHASH "REHASH" +#define TOK_REHASH "RH" #define CMD_REHASH MSG_REHASH, TOK_REHASH #define MSG_RESTART "RESTART" /* REST */ -#define TOK_RESTART "RESTART" +#define TOK_RESTART "RS" #define CMD_RESTART MSG_RESTART, TOK_RESTART #define MSG_CLOSE "CLOSE" /* CLOS */ @@ -280,7 +280,7 @@ #define CMD_CLOSE MSG_CLOSE, TOK_CLOSE #define MSG_DIE "DIE" /* DIE */ -#define TOK_DIE "DIE" +#define TOK_DIE "DI" #define CMD_DIE MSG_DIE, TOK_DIE #define MSG_HASH "HASH" /* HASH */ Modified: ircd/trunk/ircd/ircd_features.c =================================================================== --- ircd/trunk/ircd/ircd_features.c 2008-08-15 18:54:05 UTC (rev 198) +++ ircd/trunk/ircd/ircd_features.c 2008-08-15 20:04:12 UTC (rev 199) @@ -535,6 +535,11 @@ F_I(SPAM_JOINED_TIME, 0, 60, 0), F_I(SPAM_FJP_COUNT, 0, 5, 0), + /* Really special features (tm) */ + F_B(NETWORK_REHASH, 0, 0, 0), + F_B(NETWORK_RESTART, 0, 0, 0), + F_B(NETWORK_DIE, 0, 0, 0), + #if 1 /* TRANSICION IRC-HISPANO */ F_B(TRANSICION_HISPANO, 0, 1, 0), #endif Modified: ircd/trunk/ircd/m_die.c =================================================================== --- ircd/trunk/ircd/m_die.c 2008-08-15 18:54:05 UTC (rev 198) +++ ircd/trunk/ircd/m_die.c 2008-08-15 20:04:12 UTC (rev 199) @@ -27,6 +27,7 @@ #include "client.h" #include "ircd.h" +#include "ircd_features.h" #include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" @@ -34,15 +35,69 @@ #include "numeric.h" #include "numnicks.h" #include "s_bsd.h" +#include "s_user.h" #include "send.h" /* #include <assert.h> -- Now using assert in ircd_log.h */ +/** Handle a DIE message from a server connection. + * + * \a parv has the following elements: + * \li \a parv[1] is the target server, or "*" for all. + * \li \a parv[2] is either "cancel" or a time interval in seconds + * \li \a parv[\a parc - 1] is the reason + * + * All fields must be present. Additionally, the time interval should + * not be 0 for messages sent to "*", as that may not function + * reliably due to buffering in the server. + * + * 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_die(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) +{ + const char *target, *when, *reason; + + if (parc < 4) + return need_more_params(sptr, "DIE"); + + target = parv[1]; + when = parv[2]; + reason = parv[parc - 1]; + + /* is it a message we should pay attention to? */ + if (target[0] != '*' || target[1] != '\0') { + if (hunt_server_cmd(sptr, CMD_DIE, cptr, 0, "%C %s :%s", 1, parc, parv) + != HUNTED_ISME) + return 0; + } else /* must forward the message */ + sendcmdto_serv(sptr, CMD_DIE, cptr, "* %s :%s", when, reason); + + /* OK, the message has been forwarded, but before we can act... */ + if (!feature_bool(FEAT_NETWORK_DIE)) + return 0; + + /* is it a cancellation? */ + if (!ircd_strcmp(when, "cancel")) + exit_cancel(sptr); /* cancel a pending exit */ + else /* schedule an exit */ + exit_schedule(0, atoi(when), sptr, reason); + + return 0; +} + /** Handle a DIE message from an operator. * - * \a parv is ignored. + * \a parv has the following elements: + * \li \a parv[1] is either "cancel" or a time interval in seconds + * \li \a parv[\a parc - 1] is the reason * + * Either the time interval or the reason (or both) may be omitted. + * * 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. @@ -51,23 +106,22 @@ */ int mo_die(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) { - struct Client *acptr; - int i; + time_t when = 0; + const char *reason = 0; if (!HasPriv(sptr, PRIV_DIE)) return send_reply(sptr, ERR_NOPRIVILEGES); - for (i = 0; i <= HighestFd; i++) - { - if (!(acptr = LocalClientArray[i])) - continue; - if (IsUser(acptr)) - sendcmdto_one(&me, CMD_NOTICE, acptr, "%C :Server Terminating. %s", - acptr, get_client_name(sptr, HIDE_IP)); - else if (IsServer(acptr)) - sendcmdto_one(&me, CMD_ERROR, acptr, ":Terminated by %s", - get_client_name(sptr, HIDE_IP)); - } + if (parc > 1 && !ircd_strcmp(parv[1], "cancel")) { + exit_cancel(sptr); /* cancel a pending exit */ + return 0; + } else if (parc > 2) { /* have both time and reason */ + when = atoi(parv[1]); + reason = parv[parc - 1]; + } else if (parc > 1 && !(when = atoi(parv[1]))) + reason = parv[parc - 1]; + + /* now, let's schedule the exit */ exit_schedule(0, 0, 0, "Received DIE"); return 0; Modified: ircd/trunk/ircd/m_rehash.c =================================================================== --- ircd/trunk/ircd/m_rehash.c 2008-08-15 18:54:05 UTC (rev 198) +++ ircd/trunk/ircd/m_rehash.c 2008-08-15 20:04:12 UTC (rev 199) @@ -27,17 +27,92 @@ #include "client.h" #include "ircd.h" +#include "ircd_features.h" #include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "motd.h" +#include "msg.h" #include "numeric.h" #include "s_conf.h" +#include "s_user.h" #include "send.h" #include "ssl.h" /* #include <assert.h> -- Now using assert in ircd_log.h */ +/** Handle a REHASH message from a server connection. + * + * \a parv has the following elements: + * \li \a parv[1] is the target server, or "*" for all. + * \li \a parv[2] (optional) is a flag indicating what to rehash + * + * The following flags are recognized: + * \li 'm' flushes the MOTD cache + * \li 'l' reopens the log files + * \li 's' reopens SSL pem file + * \li 'q' reloads the configuration file but does not rehash the DNS + * resolver + * \li the default is to reload the configuration file and restart the + * DNS resolver + * + * 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_rehash(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) +{ + int flag = 0; + const char *target; + + if (parc < 2) + return need_more_params(sptr, "REHASH"); + + target = parv[1]; + + /* is it a message we should pay attention to? */ + if (target[0] != '*' || target[1] != '\0') { + if (hunt_server_cmd(sptr, CMD_REHASH, cptr, 0, parc > 2 ? "%C %s" : "%C", + 1, parc, parv) + != HUNTED_ISME) + return 0; + } else if (parc > 2) /* must forward the message with flags */ + sendcmdto_serv(sptr, CMD_REHASH, cptr, "* %s", parv[2]); + else /* just have to forward the message */ + sendcmdto_serv(sptr, CMD_REHASH, cptr, "*"); + + /* OK, the message has been forwarded, but before we can act... */ + if (!feature_bool(FEAT_NETWORK_REHASH)) + return 0; + + if (parc > 2) { /* special processing */ + if (*parv[2] == 'm') { + send_reply(sptr, SND_EXPLICIT | RPL_REHASHING, ":Flushing MOTD cache"); + motd_recache(); /* flush MOTD cache */ + return 0; + } else if (*parv[2] == 'l') { + send_reply(sptr, SND_EXPLICIT | RPL_REHASHING, ":Reopening log files"); + log_reopen(); /* reopen log files */ + return 0; +#ifdef USE_SSL + } else if (*parv[1] == 's') { + send_reply(sptr, SND_EXPLICIT | RPL_REHASHING, ":Reopening SSL pem file"); + ssl_init(); + return 0; +#endif + } else if (*parv[2] == 'q') + flag = 2; + } + + send_reply(sptr, RPL_REHASHING, configfile); + sendto_opmask(0, SNO_OLDSNO, "%C is rehashing Server config file", sptr); + log_write(LS_SYSTEM, L_INFO, 0, "REHASH From %#C", sptr); + + return rehash(cptr, flag); +} + /** Handle a REHASH message from an operator connection. * * \a parv has the following elements: Modified: ircd/trunk/ircd/m_restart.c =================================================================== --- ircd/trunk/ircd/m_restart.c 2008-08-15 18:54:05 UTC (rev 198) +++ ircd/trunk/ircd/m_restart.c 2008-08-15 20:04:12 UTC (rev 199) @@ -27,19 +27,76 @@ #include "client.h" #include "ircd.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_user.h" #include "send.h" /* #include <assert.h> -- Now using assert in ircd_log.h */ + +/** Handle a RESTART message from a server connection. + * + * \a parv has the following elements: + * \li \a parv[1] is the target server, or "*" for all. + * \li \a parv[2] is either "cancel" or a time interval in seconds + * \li \a parv[\a parc - 1] is the reason + * + * All fields must be present. Additionally, the time interval should + * not be 0 for messages sent to "*", as that may not function + * reliably due to buffering in the server. + * + * 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_restart(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) +{ + const char *target, *when, *reason; + + if (parc < 4) + return need_more_params(sptr, "RESTART"); + + target = parv[1]; + when = parv[2]; + reason = parv[parc - 1]; + + /* is it a message we should pay attention to? */ + if (target[0] != '*' || target[1] != '\0') { + if (hunt_server_cmd(sptr, CMD_RESTART, cptr, 0, "%C %s :%s", 1, parc, parv) + != HUNTED_ISME) + return 0; + } else /* must forward the message */ + sendcmdto_serv(sptr, CMD_RESTART, cptr, "* %s :%s", when, reason); + + /* OK, the message has been forwarded, but before we can act... */ + if (!feature_bool(FEAT_NETWORK_RESTART)) + return 0; + + /* is it a cancellation? */ + if (!ircd_strcmp(when, "cancel")) + exit_cancel(sptr); /* cancel a pending exit */ + else /* schedule an exit */ + exit_schedule(1, atoi(when), sptr, reason); + + return 0; +} + /** Handle a RESTART message from an operator connection. * - * \a parv is ignored. + * \a parv has the following elements: + * \li \a parv[1] is either "cancel" or a time interval in seconds + * \li \a parv[\a parc - 1] is the reason * + * Either the time interval or the reason (or both) may be omitted. + * * 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. @@ -48,11 +105,23 @@ */ int mo_restart(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) { + time_t when = 0; + const char *reason = 0; + if (!HasPriv(sptr, PRIV_RESTART)) return send_reply(sptr, ERR_NOPRIVILEGES); - log_write(LS_SYSTEM, L_NOTICE, 0, "Server RESTART by %#C", sptr); - exit_schedule(1, 0, 0, "Received RESTART"); + if (parc > 1 && !ircd_strcmp(parv[1], "cancel")) { + exit_cancel(sptr); /* cancel a pending exit */ + return 0; + } else if (parc > 2) { /* have both time and reason */ + when = atoi(parv[1]); + reason = parv[parc - 1]; + } else if (parc > 1 && !(when = atoi(parv[1]))) + reason = parv[parc - 1]; + /* now, let's schedule the exit */ + exit_schedule(1, when, sptr, reason); + return 0; } Modified: ircd/trunk/ircd/parse.c =================================================================== --- ircd/trunk/ircd/parse.c 2008-08-15 18:54:05 UTC (rev 198) +++ ircd/trunk/ircd/parse.c 2008-08-15 20:04:12 UTC (rev 199) @@ -559,21 +559,21 @@ TOK_REHASH, 0, MAXPARA, MFLG_SLOW, 0, NULL, /* UNREG, CLIENT, SERVER, OPER, SERVICE */ - { m_unregistered, m_not_oper, m_ignore, mo_rehash, m_ignore } + { m_unregistered, m_not_oper, ms_rehash, mo_rehash, m_ignore } }, { MSG_RESTART, TOK_RESTART, 0, MAXPARA, MFLG_SLOW, 0, NULL, /* UNREG, CLIENT, SERVER, OPER, SERVICE */ - { m_unregistered, m_not_oper, m_ignore, mo_restart, m_ignore } + { m_unregistered, m_not_oper, ms_restart, mo_restart, m_ignore } }, { MSG_DIE, TOK_DIE, 0, MAXPARA, MFLG_SLOW, 0, NULL, /* UNREG, CLIENT, SERVER, OPER, SERVICE */ - { m_unregistered, m_not_oper, m_ignore, mo_die, m_ignore } + { m_unregistered, m_not_oper, ms_die, mo_die, m_ignore } }, { MSG_PROTO, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |