]> code.citadel.org Git - citadel.git/blobdiff - citadel/file_ops.c
Mon Aug 24 20:04:04 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
[citadel.git] / citadel / file_ops.c
index 0168837d0f7ba824306f26efc3fd8b055388f787..436ff717e5760050b82a7e1e96f35d5df87c8f96 100644 (file)
 #include <pthread.h>
 #include "citadel.h"
 #include "server.h"
-#include "proto.h"
+#include "config.h"
+#include "file_ops.h"
+#include "sysdep_decls.h"
+#include "user_ops.h"
+#include "support.h"
+#include "room_ops.h"
+#include "msgbase.h"
 
 void cmd_delf(char *filename)
 {
@@ -100,7 +106,7 @@ void cmd_movf(char *cmdbuf)
 
        for (a=0; a<MAXROOMS; ++a) {
                getroom(&qrbuf,a);
-               if (!strucmp(qrbuf.QRname,newroom)) target_room = a;
+               if (!strcasecmp(qrbuf.QRname,newroom)) target_room = a;
                }
        if (target_room < 0) {
                cprintf("%d Room '%s' not found.\n",
@@ -219,7 +225,7 @@ void cmd_netf(char *cmdbuf)
  * It examines the file and displays the OK result code and some information
  * about the file.  NOTE: this stuff is Unix dependent.
  */
-void OpenCmdResult() {
+void OpenCmdResult(void) {
        struct stat statbuf;
 
        fstat(fileno(CC->download_fp), &statbuf);
@@ -299,7 +305,7 @@ void cmd_oimg(char *cmdbuf)
                return;
                }
 
-       if (!strucmp(filename, "_userpic_")) {
+       if (!strcasecmp(filename, "_userpic_")) {
                extract(which_user, cmdbuf, 1);
                if (getuser(&usbuf, which_user) != 0) {
                        cprintf("%d No such user.\n", ERROR+NO_SUCH_USER);
@@ -307,11 +313,11 @@ void cmd_oimg(char *cmdbuf)
                        }
                sprintf(pathname, "./userpics/%ld.gif", usbuf.usernum);
                }
-       else if (!strucmp(filename, "_floorpic_")) {
+       else if (!strcasecmp(filename, "_floorpic_")) {
                which_floor = extract_int(cmdbuf, 1);
                sprintf(pathname, "./images/floor.%d.gif", which_floor);
                }
-       else if (!strucmp(filename, "_roompic_")) {
+       else if (!strcasecmp(filename, "_roompic_")) {
                sprintf(pathname, "./images/room.%d.gif", CC->curr_rm);
                }
        else {
@@ -421,17 +427,17 @@ void cmd_uimg(char *cmdbuf)
                sprintf(CC->upl_path, "./images/%s", basenm);
                }
 
-       if (!strucmp(basenm, "_userpic_")) {
+       if (!strcasecmp(basenm, "_userpic_")) {
                sprintf(CC->upl_path, "./userpics/%ld.gif",
                        CC->usersupp.usernum);
                }
 
-       if ( (!strucmp(basenm, "_floorpic_")) && (CC->usersupp.axlevel >= 6) ) {
+       if ( (!strcasecmp(basenm, "_floorpic_")) && (CC->usersupp.axlevel >= 6) ) {
                which_floor = extract_int(cmdbuf, 2);
                sprintf(CC->upl_path, "./images/floor.%d.gif", which_floor);
                }
 
-       if ( (!strucmp(basenm, "_roompic_")) && (is_room_aide()) ) {
+       if ( (!strcasecmp(basenm, "_roompic_")) && (is_room_aide()) ) {
                sprintf(CC->upl_path, "./images/room.%d.gif", CC->curr_rm);
                }
 
@@ -511,13 +517,13 @@ void cmd_ucls(char *cmd)
        fclose(CC->upload_fp);
        CC->upload_fp = NULL;
 
-       if ((!strucmp(cmd,"1")) && (CC->upload_type != UPL_FILE)) {
+       if ((!strcasecmp(cmd,"1")) && (CC->upload_type != UPL_FILE)) {
                CC->upload_type = UPL_FILE;
                cprintf("%d Upload completed.\n", OK);
                return;
                }
 
-       if (!strucmp(cmd,"1")) {
+       if (!strcasecmp(cmd,"1")) {
                cprintf("%d File '%s' saved.\n",OK,CC->upl_path);
                fp = fopen(CC->upl_filedir,"a");
                if (fp==NULL) fp=fopen(CC->upl_filedir,"w");
@@ -618,7 +624,7 @@ void cmd_netp(char *cmdbuf)
        char buf[256];
        
        extract(buf,cmdbuf,1);
-       if (strucmp(buf,config.c_net_password)) {
+       if (strcasecmp(buf,config.c_net_password)) {
                cprintf("%d authentication failed\n",ERROR);
                return;
                }