general support for Channel Mode +NMFa and User Mode +SDXHst
[srvx.git] / src / proto.h
index 99ca1099703fddf03aa3fd6b69d0e93de99dea48..92bd7ed6ed37177c3825a39bf65bfc56684e5484 100644 (file)
@@ -181,6 +181,7 @@ unsigned int irc_user_modes(const struct userNode *user, char modes[], size_t le
 
 /* Channel mode manipulation */
 #define KEYLEN          23
+#define CHANNELLEN      200
 typedef unsigned long chan_mode_t;
 /* Rules for struct mod_chanmode:
  * For a membership mode change, args[n].mode can contain more than
@@ -189,11 +190,12 @@ typedef unsigned long chan_mode_t;
  */
 struct mod_chanmode {
     chan_mode_t modes_set, modes_clear;
-    unsigned int new_limit, argc;
+    unsigned int new_limit, new_access, argc;
 #ifndef NDEBUG
     unsigned int alloc_argc;
 #endif
     char new_key[KEYLEN + 1];
+    char new_altchan[CHANNELLEN + 1];
     char new_upass[KEYLEN + 1];
     char new_apass[KEYLEN + 1];
     struct {
@@ -204,15 +206,16 @@ struct mod_chanmode {
         } u;
     } args[1];
 };
-#define MCP_ALLOW_OVB     0x0001 /* allow op, voice, ban manipulation */
-#define MCP_FROM_SERVER   0x0002 /* parse as from a server */
-#define MCP_KEY_FREE      0x0004 /* -k without a key argument */
-#define MCP_REGISTERED    0x0008 /* chan is already registered; do not allow changes to MODE_REGISTERED */
-#define MCP_UPASS_FREE    0x0010 /* -U without a key argument */
-#define MCP_APASS_FREE    0x0020 /* -A without a key argument */
-#define MCP_NO_APASS      0x0040 /* Do not allow +/-A or +/-U */
-#define MC_ANNOUNCE       0x0100 /* send a mod_chanmode() change out */
-#define MC_NOTIFY         0x0200 /* make local callbacks to announce */
+#define MCP_ALLOW_OVB      0x0001 /* allow op, voice, ban manipulation */
+#define MCP_FROM_SERVER    0x0002 /* parse as from a server */
+#define MCP_KEY_FREE       0x0004 /* -k without a key argument */
+#define MCP_REGISTERED     0x0008 /* chan is already registered; do not allow changes to MODE_REGISTERED */
+#define MCP_UPASS_FREE     0x0010 /* -U without a key argument */
+#define MCP_APASS_FREE     0x0020 /* -A without a key argument */
+#define MCP_NO_APASS       0x0040 /* Do not allow +/-A or +/-U */
+#define MCP_IGN_REGISTERED 0x0080 /* chan is already registered; ignore changes to MODE_REGISTERED */
+#define MC_ANNOUNCE        0x0100 /* send a mod_chanmode() change out */
+#define MC_NOTIFY          0x0200 /* make local callbacks to announce */
 #ifdef NDEBUG
 #define mod_chanmode_init(CHANMODE) do { memset((CHANMODE), 0, sizeof(*CHANMODE)); } while (0)
 #else