X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/212380e3f42f585dc1ea927402252eb943f91f7b..162828b85d576514c6c4bf3e8961486e7d75e11c:/include/ircd_defs.h diff --git a/include/ircd_defs.h b/include/ircd_defs.h index 66918e3..f5c359f 100644 --- a/include/ircd_defs.h +++ b/include/ircd_defs.h @@ -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 3512 2007-06-06 16:20:40Z nenolod $ */ /* @@ -30,10 +30,11 @@ * Otherwise there are no user servicable part here. * */ - /* ircd_defs.h - Global size definitions for record entries used - * througout ircd. Please think 3 times before adding anything to this - * file. - */ + +/* ircd_defs.h - Global size definitions for record entries used + * througout ircd. Please think 3 times before adding anything to this + * file. + */ #ifndef INCLUDED_ircd_defs_h #define INCLUDED_ircd_defs_h @@ -48,6 +49,15 @@ #define AFP(a,b) #endif +/* + * This ensures that __attribute__((deprecated)) is not used in for example + * sun CC, since it's a GNU-specific extension. -nenolod + */ +#ifdef __GNUC__ +#define IRC_DEPRECATED __attribute__((deprecated)) +#else +#define IRC_DEPRECATED +#endif #include "s_log.h" #include "send.h" @@ -101,9 +111,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 @@ -137,34 +152,10 @@ #endif #endif /* #ifdef IPV6 */ - -#ifdef IPV6 -#define irc_sockaddr_storage sockaddr_storage -#else -#define irc_sockaddr_storage sockaddr -#define ss_family sa_family -#ifdef SOCKADDR_IN_HAS_LEN -#define ss_len sa_len -#endif -#endif - #ifdef IPV6 #define PATRICIA_BITS 128 #else #define PATRICIA_BITS 32 #endif -#ifdef SOCKADDR_IN_HAS_LEN -#define SET_SS_LEN(x, y) (x).ss_len = (y) -#define GET_SS_LEN(x) x.ss_len -#else -#define SET_SS_LEN(x, y) -#ifdef IPV6 -#define GET_SS_LEN(x) x.ss_family == AF_INET ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6) -#else -#define GET_SS_LEN(x) sizeof(struct sockaddr_in) -#endif -#endif - - #endif /* INCLUDED_ircd_defs_h */