]> code.citadel.org Git - citadel.git/commitdiff
dynloader.c: Made dynamically added server commands case-insensitive
authorArt Cancro <ajc@citadel.org>
Mon, 12 Oct 1998 23:14:46 +0000 (23:14 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 12 Oct 1998 23:14:46 +0000 (23:14 +0000)
citadel/ChangeLog
citadel/dynloader.c
citadel/import.c

index 228a1448b801fad76464f39c90b87cec72309f40..e0663d65bd2d2bf6cc3701110883abc498c0a5d6 100644 (file)
@@ -1,5 +1,6 @@
 Mon Oct 12 15:27:21 EDT 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * Killed the "rooms" subdirectory (it isn't used anymore)
+       * dynloader.c: Made dynamically added server commands case-insensitive
 
 1998-10-12 Nathan Bryant <bryant@cs.usm.maine.edu>
        * Makefile.in: simplified to use pattern rules; files compiled with
index 1fe7848267e8e366d0847091cc146778053e9014..92dc1c2aad183bb502948bea538af2c45a8a420e 100644 (file)
@@ -61,7 +61,7 @@ int DLoader_Exec_Cmd(char *cmdbuf)
 
   for (p = ProtoHookList; p; p = p->next)
     {
-      if (!strncmp(cmdbuf, p->cmd, 4))
+      if (!strncasecmp(cmdbuf, p->cmd, 4))
        {
          p->handler(&cmdbuf[5]);
          return 1;
index 7772564b2a41890254d98dceea5b3cb41b402f10..8cbd5a656c800c06728bebe919ed697cc182d357 100644 (file)
@@ -68,16 +68,6 @@ void imp_ssv() {
                fpgetfield(imfp, value);
                lprintf(9, " %s = %s\n", key, value);
                
-               if (!strcasecmp(key, "maxrooms")) {
-                       ssv_maxrooms = atol(value);
-                       if (ssv_maxrooms > MAXROOMS) {
-                               lprintf(3, "ERROR: maxrooms is %d, need %d\n",
-                                       ssv_maxrooms, MAXROOMS);
-                               fclose(imfp);
-                               return;
-                               }
-                       }
-
                if (!strcasecmp(key, "maxfloors")) {
                        ssv_maxfloors = atol(value);
                        if (ssv_maxfloors > MAXFLOORS) {
@@ -359,6 +349,7 @@ void imp_rooms() {
        long *msglist;
        int num_msgs = 0;
        long msgnum, msglen;
+       char cdbkey[256];
        
        while(fpgetfield(imfp, key), strcasecmp(key, "endsection")) {
                if (!strcasecmp(key, "room")) {
@@ -412,15 +403,19 @@ void imp_rooms() {
                                }
 
                        lprintf(9, "\n");
-                       if ((roomnum!=1)&&(qr.QRflags&QR_INUSE))
-                          cdb_store(CDB_QUICKROOM,
-                               &roomnum, sizeof(int),
-                               &qr, sizeof(struct quickroom) );
+                       if ((roomnum!=1)&&(qr.QRflags&QR_INUSE)) {
+                               cdb_store(CDB_QUICKROOM,
+                                       &roomnum, sizeof(int),
+                                       &qr, sizeof(struct quickroom) );
+                               }
 
                        if (num_msgs > 0) {
-                               if ((roomnum!=1)&&(qr.QRflags&QR_INUSE))
-                                cdb_store(CDB_MSGLISTS, &roomnum, sizeof(int),
-                                       msglist, (sizeof(long)*num_msgs) );
+                               if ((roomnum!=1)&&(qr.QRflags&QR_INUSE)) {
+                                       cdb_store(CDB_MSGLISTS,
+                                               &roomnum, sizeof(int),
+                                               msglist,
+                                               (sizeof(long)*num_msgs) );
+                                       }
                                free(msglist);
                                }