Support MAXPARA
authorJelmer Vernooij <jelmer@samba.org>
Sat, 14 Apr 2007 21:45:11 +0000 (23:45 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 14 Apr 2007 21:45:11 +0000 (23:45 +0200)
NEWS
src/isupport.c
src/isupport.h

diff --git a/NEWS b/NEWS
index ebde7b6..e5ef4f8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -68,7 +68,7 @@ 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 and SILENCE
+               MAXNICKLEN, DEAF, ELIST, MAXPARA 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 93d36a8..4a005c5 100644 (file)
@@ -111,6 +111,9 @@ char *network_info_string(struct network_info *info)
        if (info->maxmodes != 0)
                fs = g_list_append(fs, g_strdup_printf("MODES=%d", info->maxmodes));
 
+       if (info->maxpara != 0)
+               fs = g_list_append(fs, g_strdup_printf("MAXPARA=%d", info->maxpara));
+
        if (info->wallchops)
                fs = g_list_append(fs, g_strdup("WALLCHOPS"));
 
@@ -266,6 +269,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, "MAXPARA")) {
+               info->maxpara = atoi(val);
        } else if (!g_strcasecmp(key, "MAXCHANNELS")) {
                info->maxchannels = atoi(val);
        } else if (!g_strcasecmp(key, "MAXTARGETS")) {
index fe9797e..d82b545 100644 (file)
@@ -194,6 +194,9 @@ struct network_info
         * http://www3.ietf.org/proceedings/03mar/I-D/draft-baudis-irc-capab-00.txt
         */
        gboolean capab;
+
+       /* Maximum number of arguments per command. */
+       gint maxpara;
 };
 
 G_MODULE_EXPORT char *network_info_string(struct network_info *info);