* Removed the NETF command and the UI elements which call it. We haven't had the...
authorArt Cancro <ajc@citadel.org>
Fri, 16 Jan 2009 20:33:00 +0000 (20:33 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 16 Jan 2009 20:33:00 +0000 (20:33 +0000)
citadel/citadel.c
citadel/citadel.rc
citadel/citadel_ipc.c
citadel/citserver.c
citadel/file_ops.c
citadel/routines2.c

index 8e5c4901063114032b375f46b12d9f50d51b95dc..5dca5cceeb0e233efc73564a75fe267e20c9d3b1 100644 (file)
@@ -2214,10 +2214,6 @@ NEWUSR:  if (IsEmptyStr(rc_password)) {
                                deletefile(ipc);
                                break;
 
-                       case 53:
-                               netsendfile(ipc);
-                               break;
-
                        case 54:
                                movefile(ipc);
                                break;
index da648888fbe5b29d1ba0ab6e0435adf022c29d31..1c271084c13aedbc1dbf6f28c252be56f3fa4883 100644 (file)
@@ -295,7 +295,6 @@ cmd=48,1,&.,&Aide,enter &Info file
 cmd=27,0,&.,&Aide,&Room,&Invite user
 cmd=28,0,&.,&Aide,&Room,&Kick out user
 cmd=51,1,&.,&Aide,&File,&Delete
-cmd=53,1,&.,&Aide,&File,&Send over net
 cmd=54,1,&.,&Aide,&File,&Move
 cmd=70,2,&.,&Aide,&Message edit:
 cmd=78,1,&.,&Aide,&Post
index d1769cc1c17411af0eb5b628e36b7a700ba90158..476780c60dc5e12753796a7492dd88e354c1d731 100644 (file)
@@ -1202,26 +1202,6 @@ int CtdlIPCMoveFile(CtdlIPC *ipc, const char *filename, const char *destroom, ch
 }
 
 
-/* NETF */
-int CtdlIPCNetSendFile(CtdlIPC *ipc, const char *filename, const char *destnode, char *cret)
-{
-       register int ret;
-       char *aaa;
-
-       if (!cret) return -2;
-       if (!filename) return -2;
-       if (!destnode) return -2;
-
-       aaa = (char *)malloc(strlen(filename) + strlen(destnode) + 7);
-       if (!aaa) return -1;
-
-       sprintf(aaa, "NETF %s|%s", filename, destnode);
-       ret = CtdlIPCGenericCommand(ipc, aaa, NULL, 0, NULL, NULL, cret);
-       free(aaa);
-       return ret;
-}
-
-
 /* RWHO */
 int CtdlIPCOnlineUsers(CtdlIPC *ipc, char **listing, time_t *stamp, char *cret)
 {
index dbed6366a606240de8e007114c5ec61b24d964b2..a78e60113674b8eaac7003eb3418d2d331ab2954 100644 (file)
@@ -1292,10 +1292,6 @@ void do_command_loop(void) {
                cmd_movf(&cmdbuf[5]);
        }
 
-       else if (!strncasecmp(cmdbuf,"NETF",4)) {
-               cmd_netf(&cmdbuf[5]);
-       }
-
        else if (!strncasecmp(cmdbuf,"OPEN",4)) {
                cmd_open(&cmdbuf[5]);
        }
index af4a872a1d5a43bbd840e0193a3c2d018f3f0f82..1424e33e18aec2b64572befe4cf276502d6b9dcf 100644 (file)
@@ -219,102 +219,6 @@ void cmd_movf(char *cmdbuf)
 }
 
 
-/*
- * send a file over the net
- */
-void cmd_netf(char *cmdbuf)
-{
-       char pathname[256], filename[256], destsys[256], buf[256];
-       char outfile[256];
-       int a, e;
-       time_t now;
-       FILE *ofp;
-       static int seq = 1;
-
-       extract_token(filename, cmdbuf, 0, '|', sizeof filename);
-       extract_token(destsys, cmdbuf, 1, '|', sizeof destsys);
-
-       if (CtdlAccessCheck(ac_room_aide)) return;
-
-       if ((CC->room.QRflags & QR_DIRECTORY) == 0) {
-               cprintf("%d No directory in this room.\n",
-                       ERROR + NOT_HERE);
-               return;
-       }
-
-       if (IsEmptyStr(filename)) {
-               cprintf("%d You must specify a file name.\n",
-                       ERROR + FILE_NOT_FOUND);
-               return;
-       }
-
-       for (a = 0; !IsEmptyStr(&filename[a]); ++a) {
-               if ( (filename[a] == '/') || (filename[a] == '\\') ) {
-                       filename[a] = '_';
-               }
-       }
-       snprintf(pathname, sizeof pathname, "./files/%s/%s",
-                CC->room.QRdirname, filename);
-       if (access(pathname, 0) != 0) {
-               cprintf("%d File '%s' not found.\n",
-                       ERROR + FILE_NOT_FOUND, pathname);
-               return;
-       }
-       snprintf(buf, sizeof buf, "sysop@%s", destsys);
-       e = alias(buf);
-       if (e != MES_IGNET) {
-               cprintf("%d No such system: '%s'\n",
-                       ERROR + NO_SUCH_SYSTEM, destsys);
-               return;
-       }
-       snprintf(outfile, sizeof outfile,
-                        "%s/nsf.%04lx.%04x",
-                        ctdl_netin_dir,
-                        (long)getpid(), ++seq);
-       ofp = fopen(outfile, "a");
-       if (ofp == NULL) {
-               cprintf("%d internal error\n", ERROR + INTERNAL_ERROR);
-               return;
-       }
-
-       putc(255, ofp);
-       putc(MES_NORMAL, ofp);
-       putc(0, ofp);
-       fprintf(ofp, "P%s", CC->user.fullname);
-       putc(0, ofp);
-       time(&now);
-       fprintf(ofp, "T%ld", (long) now);
-       putc(0, ofp);
-       fprintf(ofp, "A%s", CC->user.fullname);
-       putc(0, ofp);
-       fprintf(ofp, "O%s", CC->room.QRname);
-       putc(0, ofp);
-       fprintf(ofp, "N%s", NODENAME);
-       putc(0, ofp);
-       fprintf(ofp, "D%s", destsys);
-       putc(0, ofp);
-       fprintf(ofp, "SFILE");
-       putc(0, ofp);
-       putc('M', ofp);
-       fclose(ofp);
-
-       snprintf(buf, sizeof buf,
-                        "cd %s/%s; uuencode %s <%s 2>/dev/null >>%s",
-                        ctdl_file_dir,
-                        /* FIXME: detect uuencode while installation? or inline */
-                        CC->room.QRdirname, filename, filename, outfile);
-       system(buf);
-
-       ofp = fopen(outfile, "a");
-       putc(0, ofp);
-       fclose(ofp);
-
-       cprintf("%d File '%s' has been sent to %s.\n", CIT_OK, filename,
-               destsys);
-       /* FIXME start a network run here. */
-       return;
-}
-
 /*
  * This code is common to all commands which open a file for downloading,
  * regardless of whether it's a file from the directory, an image, a network
index da3ecf11030244a1b36da9fa7407cb9598313e4d..ab8ec1c21a0a88e95981760e7f574126edb340ba 100644 (file)
@@ -548,21 +548,6 @@ void deletefile(CtdlIPC *ipc)
        err_printf("%s\n", buf);
 }
 
-/*
- * <.A>ide <F>ile <S>end command
- */
-void netsendfile(CtdlIPC *ipc)
-{
-       char filename[32], destsys[20], buf[256];
-
-       newprompt("Filename: ", filename, 31);
-       if (IsEmptyStr(filename))
-               return;
-       newprompt("System to send to: ", destsys, 19);
-       CtdlIPCNetSendFile(ipc, filename, destsys, buf);
-       err_printf("%s\n", buf);
-       return;
-}
 
 /*
  * <.A>ide <F>ile <M>ove command