]> jfr.im git - solanum.git/blobdiff - include/ircd_defs.h
um_callerid: Only people can have common channels
[solanum.git] / include / ircd_defs.h
index 40db5383963960d9c8c2611bf6e254bd65ae40f6..b89d7f8506da8a00b782e151b9292f7f6cdd384d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  charybdis: An advanced IRCd.
+ *  solanum: An advanced IRCd.
  *  ircd_defs.h: A header for ircd global definitions.
  *
  *  Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
@@ -64,6 +64,8 @@
 #define MIN(a, b)      ((a) < (b) ? (a) : (b))
 #endif
 
+#define ARRAY_SIZE(array)       (sizeof(array) / sizeof((array)[0]))
+
 #define HOSTLEN         63     /* Length of hostname.  Updated to         */
                                /* comply with RFC1123                     */
 
 
 /* 23+1 for \0 */
 #define KEYLEN          24
+#define TAGSLEN         512    /* IRCv3 message tags */
+#define DATALEN         510    /* RFC1459 message data */
 #define BUFSIZE         512    /* WARNING: *DONT* CHANGE THIS!!!! */
+#define EXT_BUFSIZE     (TAGSLEN + DATALEN + 1)
 #define OPERNICKLEN     (NICKLEN*2)    /* Length of OPERNICKs. */
 
-#define USERHOST_REPLYLEN       (NICKLEN+HOSTLEN+USERLEN+5)
+#define NAMELEN                (MAX(NICKLEN, HOSTLEN))
+
+#define USERHOST_REPLYLEN       (NAMELEN+HOSTLEN+USERLEN+5)
 #define MAX_DATE_STRING 32     /* maximum string length for a date string */
 
 #define HELPLEN         400
 #define CLIENT_PARSE_ERROR -1
 #define CLIENT_OK      1
 
-#ifdef RB_IPV6
 #ifndef AF_INET6
 #error "AF_INET6 not defined"
 #endif
 
-
-#else /* #ifdef RB_IPV6 */
-
-#ifndef AF_INET6
-#define AF_INET6 AF_MAX                /* Dummy AF_INET6 declaration */
-#endif
-#endif /* #ifdef RB_IPV6 */
-
-#ifdef RB_IPV6
 #define PATRICIA_BITS  128
-#else
-#define PATRICIA_BITS  32
-#endif
 
 /* Read buffer size */
 #define READBUF_SIZE 16384