Support DEAF
authorJelmer Vernooij <jelmer@samba.org>
Sat, 7 Apr 2007 01:02:43 +0000 (03:02 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 7 Apr 2007 01:02:43 +0000 (03:02 +0200)
NEWS
src/isupport.c
src/isupport.h

diff --git a/NEWS b/NEWS
index e28b16b24a36484e7ee1ab10e39d3908ba4b3a98..41096796ef8476be88a99b4ba61e1bb1acb12637 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -63,7 +63,8 @@ Ctrlproxy 3.0.2 UNRELEASED
                NICKLEN, MAXBANS, MODES, NICKLEN, MAXBANS, TOPICLEN, KICKLEN, 
                AWAYLEN, MAXTARGETS, WALLCHOPS, WALLVOICES, RFC2812, PENALTY,
                FNC, SAFELIST, USERIP, CNOTICE, KNOCK, VCHANNELS, WHOX, CALLERID,
-               ACCEPT, KEYLEN, USERLEN, HOSTLEN and SILENCE
+               ACCEPT, KEYLEN, USERLEN, HOSTLEN, MAXCHANNELLEN, 
+               MAXNICKLEN, DEAF 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 9228af39de3c808abe4fbcb4430d6303b3f0e035..0d49db00c6f4c9d78863acd4ba0ae9abf8f003ea 100644 (file)
@@ -181,6 +181,9 @@ char *network_info_string(struct network_info *info)
        if (info->invex_mode != '\0')
                fs = g_list_append(fs, g_strdup_printf("INVEX=%c", info->invex_mode));
 
+       if (info->deaf_mode != '\0')
+               fs = g_list_append(fs, g_strdup_printf("DEAF=%c", info->deaf_mode));
+
        if (info->maxlist != NULL)
                fs = g_list_append(fs, g_strdup_printf("MAXLIST=%s", info->maxlist));
 
@@ -309,6 +312,13 @@ void network_info_parse(struct network_info *info, const char *parameter)
                        log_global(LOG_WARNING, "Invalid length invex value: %s", val);
                else
                        info->invex_mode = val[0];
+       } else if (!g_strcasecmp(key, "DEAF")) {
+               if (val == NULL) 
+                       info->deaf_mode = 'D';
+               else if (strlen(val) > 1)
+                       log_global(LOG_WARNING, "Invalid length deaf value: %s", val);
+               else
+                       info->deaf_mode = val[0];
        } else if (!g_strcasecmp(key, "MAXLIST")) {
                g_free(info->maxlist);
                info->maxlist = g_strdup(val);
index f5fad36ed8923b05846bdf6334bd46510b910de5..09fd06d03966305cf61ffe3de6e40d7472f777fb 100644 (file)
@@ -86,6 +86,9 @@ struct network_info
         * RFC 2811 for more information. */
        char invex_mode;
 
+       /** The server supports dead mode (+d). */
+       char deaf_mode;
+
        /** The server supports messaging channel member who have a 
         * certain status or higher. The status is one of the letters from 
         * PREFIX. */