Add support for WATCH.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 14 Apr 2007 22:37:37 +0000 (00:37 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 14 Apr 2007 22:37:37 +0000 (00:37 +0200)
NEWS
src/isupport.c
src/isupport.h

diff --git a/NEWS b/NEWS
index 24f99d1..40d0b19 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -68,7 +68,8 @@ Ctrlproxy 3.0.2 UNRELEASED
                AWAYLEN, MAXTARGETS, WALLCHOPS, WALLVOICES, RFC2812, PENALTY,
                FNC, SAFELIST, USERIP, CNOTICE, KNOCK, VCHANNELS, WHOX, CALLERID,
                ACCEPT, KEYLEN, USERLEN, HOSTLEN, MAXCHANNELLEN, 
-               MAXNICKLEN, DEAF, ELIST, MAXPARA, NAMESX, SECURELIST and SILENCE
+               MAXNICKLEN, DEAF, ELIST, MAXPARA, NAMESX, SECURELIST, WATCH
+               and SILENCE
 
        * Default to binding to 127.0.0.1 if no IP was specified in the 
          listener, instead of 0.0.0.0.
index b87f7d0..046fec9 100644 (file)
@@ -84,6 +84,9 @@ char *network_info_string(struct network_info *info)
        if (info->userlen != 0)
                fs = g_list_append(fs, g_strdup_printf("USERLEN=%d", info->userlen));
 
+       if (info->watch != 0)
+               fs = g_list_append(fs, g_strdup_printf("WATCH=%d", info->watch));
+
        if (info->hostlen != 0)
                fs = g_list_append(fs, g_strdup_printf("HOSTLEN=%d", info->hostlen));
 
@@ -274,6 +277,8 @@ void network_info_parse(struct network_info *info, const char *parameter)
                info->kicklen = atoi(val);
        } else if (!g_strcasecmp(key, "TOPICLEN")) {
                info->topiclen = atoi(val);
+       } else if (!g_strcasecmp(key, "WATCH")) {
+               info->watch = atoi(val);
        } else if (!g_strcasecmp(key, "MAXPARA")) {
                info->maxpara = atoi(val);
        } else if (!g_strcasecmp(key, "MAXCHANNELS")) {
index 10bd096..90b09a1 100644 (file)
@@ -206,6 +206,9 @@ struct network_info
         * run 60 seconds within connect. See 
         * http://www.inspircd.org/wiki/Secure_LIST_Module for details. */
        gboolean securelist;
+
+       /* Number of watches allowed */
+       gint watch;
 };
 
 G_MODULE_EXPORT char *network_info_string(struct network_info *info);