removed IGnet functions from text client
authorArt Cancro <ajc@citadel.org>
Mon, 22 Jan 2018 20:45:39 +0000 (15:45 -0500)
committerArt Cancro <ajc@citadel.org>
Mon, 22 Jan 2018 20:45:39 +0000 (15:45 -0500)
textclient/citadel.rc
textclient/src/citadel.c
textclient/src/include/citadel_ipc.h
textclient/src/include/tuiconfig.h
textclient/src/tuiconfig.c

index 19e248719eb447c7d1e0421faf9af00f82ba38b5..efe8824eac876d8fe170b6b36de4614ad50d3d5c 100644 (file)
@@ -231,13 +231,10 @@ cmd=70,2,&.,&Admin,&Message edit:
 cmd=78,1,&.,&Admin,&Post
 cmd=80,2,&.,&Admin,&System configuration,&General
 cmd=82,2,&.,&Admin,&System configuration,&Internet
-cmd=88,2,&.,&Admin,&System configuration,&Network
-cmd=92,2,&.,&Admin,&System configuration,network &Filter list
 cmd=85,2,&.,&Admin,&Terminate server,&Now
 cmd=86,2,&.,&Admin,&Terminate server,&Scheduled
 cmd=87,1,&.,&Admin,mailing &List recipients
 cmd=94,1,&.,&Admin,mailing list &Digest recipients
-cmd=89,1,&.,&Admin,&Network room sharing
 
 cmd=29,0,&.,&Terminate,and &Quit
 cmd=30,0,&.,&Terminate,and &Stay online
index 70cddecef2f9ceef1f63a7f06d5546979a83e38a..0385c37509c90eb1cf27374a9afe4f621e8e6591 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Main source module for the client program.
  *
- * Copyright (c) 1987-2016 by the citadel.org team
+ * Copyright (c) 1987-2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
@@ -1962,26 +1962,11 @@ NEWUSR: if (IsEmptyStr(rc_password)) {
                                break;
 
                        case 87:
-                               network_config_management(ipc, "listrecp",
-                                                         "Message-by-message mailing list recipients");
+                               network_config_management(ipc, "listrecp", "Message-by-message mailing list recipients");
                                break;
 
                        case 94:
-                               network_config_management(ipc, "digestrecp",
-                                                         "Digest mailing list recipients");
-                               break;
-
-                       case 89:
-                               network_config_management(ipc, "ignet_push_share",
-                                                         "Nodes with which we share this room");
-                               break;
-
-                       case 88:
-                               do_ignet_configuration(ipc);
-                               break;
-
-                       case 92:
-                               do_filterlist_configuration(ipc);
+                               network_config_management(ipc, "digestrecp", "Digest mailing list recipients");
                                break;
 
                        case 6:
index 13150f993b4d41e327c976c028827bc27d0ea2c4..536c138817a268215b1544bb4038b0aa974b9d03 100644 (file)
@@ -18,7 +18,7 @@
 #include <openssl/rand.h>
 #endif
 
-#define CLIENT_VERSION          916
+#define CLIENT_VERSION          918
 #define CLIENT_TYPE               0
 //copycat of: /#include "server.h"
 
index 7e65bc4b6bed6115af9a9671cae678e99cba9e14..6aa77d6368b5457ee744a3e3a125f77278b23b21 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1987-2012 by the citadel.org team
+ * Copyright (c) 1987-2018 by the citadel.org team
  *
  *  This program is open source software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License version 3.
  */
 
 void do_internet_configuration(CtdlIPC *ipc);
-void do_ignet_configuration(CtdlIPC *ipc);
 void network_config_management(CtdlIPC *ipc, char *entrytype, char *comment);
-void do_filterlist_configuration(CtdlIPC *ipc);
 void do_pop3client_configuration(CtdlIPC *ipc);
 void do_rssclient_configuration(CtdlIPC *ipc);
 void do_system_configuration(CtdlIPC *ipc);
-
 extern char editor_path[PATH_MAX];
 extern int enable_status_line;
index d89ab9ccf3c31baee83dd5ba24186d3550527032..0f6d64a5912dd11fe6e67142a04209f59d7016f8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Configuration screens that are part of the text mode client.
  *
- * Copyright (c) 1987-2017 by the citadel.org team
+ * Copyright (c) 1987-2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
@@ -667,260 +667,6 @@ void network_config_management(CtdlIPC *ipc, char *entrytype, char *comment)
 }
 
 
-/*
- * IGnet node configuration
- */
-void do_ignet_configuration(CtdlIPC *ipc) {
-       char buf[SIZ];
-       int num_recs = 0;
-       char **recs = NULL;
-       char ch;
-       int i, j;
-       int quitting = 0;
-       int modified = 0;
-       char *listing = NULL;
-       int r;
-
-       r = CtdlIPCGetSystemConfigByType(ipc, IGNETCFG, &listing, buf);
-       if (r / 100 == 1) while (*listing && !IsEmptyStr(listing)) {
-               extract_token(buf, listing, 0, '\n', sizeof buf);
-               remove_token(listing, 0, '\n');
-
-               ++num_recs;
-               if (num_recs == 1) recs = malloc(sizeof(char *));
-               else recs = realloc(recs, (sizeof(char *)) * num_recs);
-               recs[num_recs-1] = malloc(SIZ);
-               strcpy(recs[num_recs-1], buf);
-       }
-       if (listing) free(listing);
-
-       do {
-               scr_printf("\n");
-               color(BRIGHT_WHITE);
-               scr_printf(     "### "
-                       "   Node          "
-                       "  Secret           "
-                       "          Host or IP             "
-                       "Port#\n");
-               color(DIM_WHITE);
-               scr_printf(     "--- "
-                       "---------------- "
-                       "------------------ "
-                       "-------------------------------- "
-                       "-----\n");
-               for (i=0; i<num_recs; ++i) {
-               color(DIM_WHITE);
-               scr_printf("%3d ", i+1);
-               extract_token(buf, recs[i], 0, '|', sizeof buf);
-               color(BRIGHT_CYAN);
-               scr_printf("%-16s ", buf);
-               extract_token(buf, recs[i], 1, '|', sizeof buf);
-               color(BRIGHT_MAGENTA);
-               scr_printf("%-18s ", buf);
-               extract_token(buf, recs[i], 2, '|', sizeof buf);
-               color(BRIGHT_CYAN);
-               scr_printf("%-32s ", buf);
-               extract_token(buf, recs[i], 3, '|', sizeof buf);
-               color(BRIGHT_MAGENTA);
-               scr_printf("%-3s\n", buf);
-               color(DIM_WHITE);
-               }
-               scr_printf("\n");
-
-               ch = keymenu("", "<A>dd|<D>elete|<S>ave|<Q>uit");
-               switch(ch) {
-                       case 'a':
-                               ++num_recs;
-                               if (num_recs == 1)
-                                       recs = malloc(sizeof(char *));
-                               else recs = realloc(recs,
-                                       (sizeof(char *)) * num_recs);
-                               newprompt("Enter node name    : ", buf, 16);
-                               strcat(buf, "|");
-                               newprompt("Enter shared secret: ",
-                                       &buf[strlen(buf)], 18);
-                               strcat(buf, "|");
-                               newprompt("Enter host or IP   : ",
-                                       &buf[strlen(buf)], 32);
-                               strcat(buf, "|504");
-                               strprompt("Enter port number  : ",
-                                       &buf[strlen(buf)-3], 5);
-                               recs[num_recs-1] = strdup(buf);
-                               modified = 1;
-                               break;
-                       case 'd':
-                               i = intprompt("Delete which one",
-                                       1, 1, num_recs) - 1;
-                               free(recs[i]);
-                               --num_recs;
-                               for (j=i; j<num_recs; ++j)
-                                       recs[j] = recs[j+1];
-                               modified = 1;
-                               break;
-                       case 's':
-                               r = 1;
-                               for (i = 0; i < num_recs; ++i)
-                                       r += 1 + strlen(recs[i]);
-                               listing = (char*) calloc(1, r);
-                               if (!listing) {
-                                       scr_printf("Can't save config - out of memory!\n");
-                                       logoff(ipc, 1);
-                               }
-                               if (num_recs) for (i = 0; i < num_recs; ++i) {
-                                       strcat(listing, recs[i]);
-                                       strcat(listing, "\n");
-                               }
-                               r = CtdlIPCSetSystemConfigByType(ipc, IGNETCFG, listing, buf);
-                               if (r / 100 != 4) {
-                                       scr_printf("%s\n", buf);
-                               } else {
-                                       scr_printf("Wrote %d records.\n", num_recs);
-                                       modified = 0;
-                               }
-                free(listing);
-                               break;
-                       case 'q':
-                               quitting = !modified || boolprompt(
-                                       "Quit without saving", 0);
-                               break;
-                       default:
-                               break;
-               }
-       } while (!quitting);
-
-       if (recs != NULL) {
-               for (i=0; i<num_recs; ++i) free(recs[i]);
-               free(recs);
-       }
-}
-
-
-/*
- * Filter list configuration
- */
-void do_filterlist_configuration(CtdlIPC *ipc)
-{
-       char buf[SIZ];
-       int num_recs = 0;
-       char **recs = NULL;
-       char ch;
-       int i, j;
-       int quitting = 0;
-       int modified = 0;
-       char *listing = NULL;
-       int r;
-
-       r = CtdlIPCGetSystemConfigByType(ipc, FILTERLIST, &listing, buf);
-       if (r / 100 == 1) while (*listing && !IsEmptyStr(listing)) {
-               extract_token(buf, listing, 0, '\n', sizeof buf);
-               remove_token(listing, 0, '\n');
-
-               ++num_recs;
-               if (num_recs == 1) recs = malloc(sizeof(char *));
-               else recs = realloc(recs, (sizeof(char *)) * num_recs);
-               recs[num_recs-1] = malloc(SIZ);
-               strcpy(recs[num_recs-1], buf);
-       }
-       if (listing) free(listing);
-
-       do {
-               scr_printf("\n");
-               color(BRIGHT_WHITE);
-               scr_printf(     "### "
-                       "         User name           "
-                       "         Room name           "
-                       "    Node name    "
-                       "\n");
-               color(DIM_WHITE);
-               scr_printf(     "--- "
-                       "---------------------------- "
-                       "---------------------------- "
-                       "---------------- "
-                       "\n");
-               for (i=0; i<num_recs; ++i) {
-               color(DIM_WHITE);
-               scr_printf("%3d ", i+1);
-               extract_token(buf, recs[i], 0, '|', sizeof buf);
-               color(BRIGHT_CYAN);
-               scr_printf("%-28s ", buf);
-               extract_token(buf, recs[i], 1, '|', sizeof buf);
-               color(BRIGHT_MAGENTA);
-               scr_printf("%-28s ", buf);
-               extract_token(buf, recs[i], 2, '|', sizeof buf);
-               color(BRIGHT_CYAN);
-               scr_printf("%-16s\n", buf);
-               extract_token(buf, recs[i], 3, '|', sizeof buf);
-               color(DIM_WHITE);
-               }
-
-               ch = keymenu("", "<A>dd|<D>elete|<S>ave|<Q>uit");
-               switch(ch) {
-                       case 'a':
-                               ++num_recs;
-                               if (num_recs == 1)
-                                       recs = malloc(sizeof(char *));
-                               else recs = realloc(recs,
-                                       (sizeof(char *)) * num_recs);
-                               newprompt("Enter user name: ", buf, 28);
-                               strcat(buf, "|");
-                               newprompt("Enter room name: ",
-                                       &buf[strlen(buf)], 28);
-                               strcat(buf, "|");
-                               newprompt("Enter node name: ",
-                                       &buf[strlen(buf)], 16);
-                               strcat(buf, "|");
-                               recs[num_recs-1] = strdup(buf);
-                               modified = 1;
-                               break;
-                       case 'd':
-                               i = intprompt("Delete which one",
-                                       1, 1, num_recs) - 1;
-                               free(recs[i]);
-                               --num_recs;
-                               for (j=i; j<num_recs; ++j)
-                                       recs[j] = recs[j+1];
-                               modified = 1;
-                               break;
-                       case 's':
-                               r = 1;
-                               for (i = 0; i < num_recs; ++i)
-                                       r += 1 + strlen(recs[i]);
-                               listing = (char*) calloc(1, r);
-                               if (!listing) {
-                                       scr_printf("Can't save config - out of memory!\n");
-                                       logoff(ipc, 1);
-                               }
-                               if (num_recs) for (i = 0; i < num_recs; ++i) {
-                                       strcat(listing, recs[i]);
-                                       strcat(listing, "\n");
-                               }
-                               r = CtdlIPCSetSystemConfigByType(ipc, FILTERLIST, listing, buf);
-                               if (r / 100 != 4) {
-                                       scr_printf("%s\n", buf);
-                               } else {
-                                       scr_printf("Wrote %d records.\n", num_recs);
-                                       modified = 0;
-                               }
-                free(listing);
-                               break;
-                       case 'q':
-                               quitting = !modified || boolprompt(
-                                       "Quit without saving", 0);
-                               break;
-                       default:
-                               break;
-               }
-       } while (!quitting);
-
-       if (recs != NULL) {
-               for (i=0; i<num_recs; ++i) free(recs[i]);
-               free(recs);
-       }
-}
-
-
-
-
 /*
  * POP3 aggregation client configuration
  */