Fix config conversion bugs (functional and documentation).
authorMichael Poole <mdpoole@troilus.org>
Sat, 31 Dec 2005 01:38:24 +0000 (01:38 +0000)
committerMichael Poole <mdpoole@troilus.org>
Sat, 31 Dec 2005 01:38:24 +0000 (01:38 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1595 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
RELEASE.NOTES
ircd/convert-conf.c

index 3ce2add02cc224fcd99c033f7afd694447becab2..106e42e65c8aab8a5c62d5d3f0402c6b16330bf1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-12-30  Michael Poole <mdpoole@troilus.org>
+
+       * RELEASE.NOTES: Mention removal of HIS_STATS_h.
+
+       * ircd/convert-conf.c (removed_features): Add AUTOHIDE,
+       HIS_DESYNCS and TIMESEC.
+       (get_connect): Do not downcase connection name on insert.
+       (do_feature): Do not upcase feature name (cf HIS_STATS_k).
+
 2005-12-30  Michael Poole <mdpoole@troilus.org>
 
        * ircd/engine_devpoll.c (engine_loop): Remove bogus assert.
index 199d855620a2c5601c30c32386f33de62365b269..47106bd16a926841dc079ec95283396894e14c0a 100644 (file)
@@ -123,6 +123,8 @@ HIS_DESYNCS, TIMESEC.
 Deleted features since they are now controlled by other configuration
 entries: VIRTUAL_HOST, oper and locop privilege features.
 
+Deleted feature since it no longer applies: HIS_STATS_h.
+
 Compile Time Options:
 
 A listing of supported compile-time options may be seen by running
index 1470ec194542e928156715a9d3972b5f769c91fd..da88adb9b5da54cc18dcaa1520235bd16187f08c 100644 (file)
@@ -17,7 +17,7 @@
  * USA.
  */
 
-#include <ctype.h> /* tolower(), toupper(), isdigit() */
+#include <ctype.h> /* tolower() */
 #include <stdio.h> /* *printf(), fgets() */
 #include <stdlib.h> /* free(), strtol() */
 #include <string.h> /* strlen(), memcpy(), strchr(), strspn() */
@@ -30,7 +30,7 @@ const char *admin_names[] = { "location", "contact", "contact", 0 },
     *general_names[] = { "name", "vhost", "description", "", "#numeric", 0 },
     *motd_names[] = { "host", "file", 0 },
     *class_names[] = { "name", "#pingfreq", "#connectfreq", "#maxlinks", "#sendq", 0 },
-    *removed_features[] = { "VIRTUAL_HOST", "OPERS_SEE_IN_SECRET_CHANNELS", "LOCOP_SEE_IN_SECRET_CHANNELS", 0 };
+    *removed_features[] = { "VIRTUAL_HOST", "TIMESEC", "OPERS_SEE_IN_SECRET_CHANNELS", "LOCOP_SEE_IN_SECRET_CHANNELS", "HIS_STATS_h", "HIS_DESYNCS", "AUTOHIDE", 0 };
 char orig_line[512], line[512], dbuf[512];
 char *fields[MAX_FIELDS + 1];
 unsigned int nfields;
@@ -159,7 +159,7 @@ static struct connect *get_connect(const char *name)
     nlen = strlen(name);
     for (conn = connects; conn; conn = conn->next)
     {
-        for (ii = 0; tolower(name[ii]) == conn->name[ii] && ii < nlen; ++ii) ;
+        for (ii = 0; tolower(name[ii]) == tolower(conn->name[ii]) && ii < nlen; ++ii) ;
         if (conn->name[ii] == '\0' && name[ii] == '\0')
             break;
     }
@@ -169,7 +169,7 @@ static struct connect *get_connect(const char *name)
     {
         conn = calloc(1, sizeof(*conn) + nlen);
         for (ii = 0; ii < nlen; ++ii)
-            conn->name[ii] = tolower(name[ii]);
+            conn->name[ii] = name[ii];
         conn->next = connects;
         connects = conn;
     }
@@ -311,7 +311,7 @@ static void do_feature(void)
     ii = strlen(fields[0]);
     feat = calloc(1, sizeof(*feat) + ii);
     while (ii-- > 0)
-        feat->name[ii] = toupper(fields[0][ii]);
+        feat->name[ii] = fields[0][ii];
     feat->next = features;
     features = feat;
     string_get(&feat->origins, orig_line);
@@ -610,9 +610,10 @@ int main(int argc, char *argv[])
             fputs(line, stdout);
             continue;
         }
-        /* Strip EOL character(s) and pass blank lines through. */
-        while (len > 0 && (line[len-1] == '\n' || line[len-1] == '\r'))
+        /* Strip trailing whitespace. */
+        while (len > 0 && isspace(line[len-1]))
             line[--len] = '\0';
+        /* Pass blank lines through. */
         if (len == 0) {
             fputc('\n', stdout);
             continue;