[svn] Cut down quit/part/kick reasons to avoid quit reasons
overflowing the client exiting server notice (from TOPICLEN to 260). kill reasons become shorter accordingly. kline/dline/gline reasons become 390. away messages stay at TOPICLEN for now.
This commit is contained in:
parent
606384aea8
commit
61569b65f2
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
jilles 2007/03/02 17:45:47 UTC (20070302-3223)
|
||||
Log:
|
||||
Don't leak auth{} spoofed IP addresses in +f notices.
|
||||
from ratbox (androsyn)
|
||||
|
||||
|
||||
Changes: Modified:
|
||||
+10 -3 trunk/src/s_conf.c (File Modified)
|
||||
|
||||
|
||||
jilles 2007/02/24 19:34:28 UTC (20070224-3219)
|
||||
Log:
|
||||
Make oper_up() take +i/-i during opering up into account
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
* USA
|
||||
*
|
||||
* $Id: ircd_defs.h 865 2006-02-16 14:05:37Z nenolod $
|
||||
* $Id: ircd_defs.h 3225 2007-03-04 23:42:55Z jilles $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -101,9 +101,14 @@
|
|||
#define LOC_CHANNELLEN 50
|
||||
|
||||
/* reason length of klines, parts, quits etc */
|
||||
#define REASONLEN TOPICLEN /* in charybdis, reasonlen is controlled via topiclen */
|
||||
#define AWAYLEN TOPICLEN /* ditto for awaylen */
|
||||
#define KILLLEN TOPICLEN /* and killlen. have a nice day. --nenolod */
|
||||
/* for quit messages, note that a client exit server notice
|
||||
* :012345678901234567890123456789012345678901234567890123456789123 NOTICE * :*** Notice -- Client exiting: 012345678901234567 (0123456789@012345678901234567890123456789012345678901234567890123456789123) [] [1111:2222:3333:4444:5555:6666:7777:8888]
|
||||
* takes at most 246 bytes (including CRLF and '\0') and together with the
|
||||
* quit reason should fit in 512 */
|
||||
#define REASONLEN 260 /* kick/part/quit */
|
||||
#define BANREASONLEN 390 /* kline/dline/gline */
|
||||
#define AWAYLEN TOPICLEN
|
||||
#define KILLLEN 200 /* with Killed (nick ()) added this should fit in quit */
|
||||
|
||||
/* 23+1 for \0 */
|
||||
#define KEYLEN 24
|
||||
|
|
|
@ -1 +1 @@
|
|||
#define SERNO "20070224-3219"
|
||||
#define SERNO "20070302-3223"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
* USA
|
||||
*
|
||||
* $Id: m_dline.c 3161 2007-01-25 07:23:01Z nenolod $
|
||||
* $Id: m_dline.c 3225 2007-03-04 23:42:55Z jilles $
|
||||
*/
|
||||
|
||||
#include "stdinc.h"
|
||||
|
@ -59,7 +59,7 @@ struct Message undline_msgtab = {
|
|||
};
|
||||
|
||||
mapi_clist_av1 dline_clist[] = { &dline_msgtab, &undline_msgtab, NULL };
|
||||
DECLARE_MODULE_AV1(dline, NULL, NULL, dline_clist, NULL, NULL, "$Revision: 3161 $");
|
||||
DECLARE_MODULE_AV1(dline, NULL, NULL, dline_clist, NULL, NULL, "$Revision: 3225 $");
|
||||
|
||||
static int valid_comment(char *comment);
|
||||
static int flush_write(struct Client *, FILE *, char *, char *);
|
||||
|
@ -393,8 +393,8 @@ valid_comment(char *comment)
|
|||
if(strchr(comment, '"'))
|
||||
return 0;
|
||||
|
||||
if(strlen(comment) > REASONLEN)
|
||||
comment[REASONLEN] = '\0';
|
||||
if(strlen(comment) > BANREASONLEN)
|
||||
comment[BANREASONLEN] = '\0';
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
* USA
|
||||
*
|
||||
* $Id: m_gline.c 3161 2007-01-25 07:23:01Z nenolod $
|
||||
* $Id: m_gline.c 3225 2007-03-04 23:42:55Z jilles $
|
||||
*/
|
||||
|
||||
#include "stdinc.h"
|
||||
|
@ -63,7 +63,7 @@ struct Message ungline_msgtab = {
|
|||
};
|
||||
|
||||
mapi_clist_av1 gline_clist[] = { &gline_msgtab, &ungline_msgtab, NULL };
|
||||
DECLARE_MODULE_AV1(gline, NULL, NULL, gline_clist, NULL, NULL, "$Revision: 3161 $");
|
||||
DECLARE_MODULE_AV1(gline, NULL, NULL, gline_clist, NULL, NULL, "$Revision: 3225 $");
|
||||
|
||||
static int majority_gline(struct Client *source_p, const char *user,
|
||||
const char *host, const char *reason);
|
||||
|
@ -514,8 +514,8 @@ invalid_gline(struct Client *source_p, const char *luser,
|
|||
return 1;
|
||||
}
|
||||
|
||||
if(strlen(lreason) > REASONLEN)
|
||||
lreason[REASONLEN] = '\0';
|
||||
if(strlen(lreason) > BANREASONLEN)
|
||||
lreason[BANREASONLEN] = '\0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -546,8 +546,8 @@ set_local_gline(struct Client *source_p, const char *user,
|
|||
aconf->status = CONF_GLINE;
|
||||
aconf->flags |= CONF_FLAGS_TEMPORARY;
|
||||
|
||||
if(strlen(my_reason) > REASONLEN)
|
||||
my_reason[REASONLEN-1] = '\0';
|
||||
if(strlen(my_reason) > BANREASONLEN)
|
||||
my_reason[BANREASONLEN-1] = '\0';
|
||||
|
||||
if((oper_reason = strchr(my_reason, '|')) != NULL)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
* USA
|
||||
*
|
||||
* $Id: m_kline.c 3161 2007-01-25 07:23:01Z nenolod $
|
||||
* $Id: m_kline.c 3225 2007-03-04 23:42:55Z jilles $
|
||||
*/
|
||||
|
||||
#include "stdinc.h"
|
||||
|
@ -65,7 +65,7 @@ struct Message unkline_msgtab = {
|
|||
};
|
||||
|
||||
mapi_clist_av1 kline_clist[] = { &kline_msgtab, &unkline_msgtab, NULL };
|
||||
DECLARE_MODULE_AV1(kline, NULL, NULL, kline_clist, NULL, NULL, "$Revision: 3161 $");
|
||||
DECLARE_MODULE_AV1(kline, NULL, NULL, kline_clist, NULL, NULL, "$Revision: 3225 $");
|
||||
|
||||
/* Local function prototypes */
|
||||
static int find_user_host(struct Client *source_p, const char *userhost, char *user, char *host);
|
||||
|
@ -659,8 +659,8 @@ valid_comment(struct Client *source_p, char *comment)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if(strlen(comment) > REASONLEN)
|
||||
comment[REASONLEN] = '\0';
|
||||
if(strlen(comment) > BANREASONLEN)
|
||||
comment[BANREASONLEN] = '\0';
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue