]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - include/ircd_defs.h
'lip' added in LocalUser struct
[irc/rqf/shadowircd.git] / include / ircd_defs.h
index 66918e3b72b122a6d4ddcdb9570835c82f3ae9da..f5c359f6d5c11a6bb2994211ab9b2ba69009ae20 100644 (file)
@@ -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 $
  */
 
 /*
  * 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
 
 #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"
 #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
 #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 */