]> code.citadel.org Git - citadel.git/commitdiff
* More changes to the new networker. Added client command for room sharing.
authorArt Cancro <ajc@citadel.org>
Sat, 8 Sep 2001 18:58:38 +0000 (18:58 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 8 Sep 2001 18:58:38 +0000 (18:58 +0000)
citadel/ChangeLog
citadel/citadel.c
citadel/citadel.rc
citadel/routines2.c
citadel/routines2.h
citadel/serv_network.c

index c2f789c5287fe6c2daafc0dcd59d4ef0580024cc..112ae7c10d57a59cfc2d348a9827aa4b1424c092 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 580.39  2001/09/08 18:58:38  ajc
+ * More changes to the new networker.  Added client command for room sharing.
+
  Revision 580.38  2001/09/07 04:05:27  ajc
  * You guessed it: still more code for the new networker.
 
@@ -2731,4 +2734,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import 
-
index 9221bf387a6dfa8a18a539d5142e2ddf1f19e9a7..88d48ef1e2fa5901d8286c872b159989e0281d2b 100644 (file)
@@ -1386,7 +1386,13 @@ PWOK:
                                break;
 
                        case 87:
-                               mailing_list_management();
+                               network_config_management("listrecp",
+                                       "Mailing list recipients");
+                               break;
+
+                       case 89:
+                               network_config_management("ignet_push_share",
+                                       "Nodes with which we share this room");
                                break;
 
                        case 88:
index 5aa359c736721203467f0d04b2bc68554eb60141..39bc559a45dbc5bc69a8267f0cb227a4d46fd711 100644 (file)
@@ -182,6 +182,7 @@ cmd=88,2,&.,&Aide,&System configuration,&Network
 cmd=85,2,&.,&Aide,&Terminate server,&Now
 cmd=86,2,&.,&Aide,&Terminate server,&Scheduled
 cmd=87,1,&.,&Aide,mailing &List management
+cmd=89,1,&.,&Aide,&Network room sharing
 
 cmd=29,0,&.,&Terminate,and &Quit
 cmd=30,0,&.,&Terminate,and &Stay online
index d64d77b631b97ec0bed52239e36d56115c65c3f8..df306feee240f709462268304ecb71ed2ac03d41 100644 (file)
@@ -905,9 +905,9 @@ void do_internet_configuration(void) {
 
 
 /*
- * Edit mailing list configuration
+ * Edit network configuration for room sharing, mailing lists, etc.
  */
-void mailing_list_management(void) {
+void network_config_management(char *entrytype, char *comment) {
        char filename[PATH_MAX];
        char changefile[PATH_MAX];
        int e_ex_code;
@@ -935,8 +935,9 @@ void mailing_list_management(void) {
                return;
        }
 
-       fprintf(tempfp, "# Mailing list recipients for: %s\n", room_name);
-       fprintf(tempfp, "# Specify recipients one per line.\n"
+       fprintf(tempfp, "# Configuration for room: %s\n", room_name);
+       fprintf(tempfp, "# %s\n", comment);
+       fprintf(tempfp, "# Specify one per line.\n"
                        "\n\n");
 
        serv_puts("GNET");
@@ -944,7 +945,7 @@ void mailing_list_management(void) {
        if (buf[0] == '1') {
                while(serv_gets(buf), strcmp(buf, "000")) {
                        extract(instr, buf, 0);
-                       if (!strcasecmp(instr, "listrecp")) {
+                       if (!strcasecmp(instr, entrytype)) {
                                extract(addr, buf, 1);
                                fprintf(tempfp, "%s\n", addr);
                        }
@@ -982,7 +983,7 @@ void mailing_list_management(void) {
                if (buf[0] == '1') {
                        while(serv_gets(buf), strcmp(buf, "000")) {
                                extract(instr, buf, 0);
-                               if (strcasecmp(instr, "listrecp")) {
+                               if (strcasecmp(instr, entrytype)) {
                                        fprintf(changefp, "%s\n", buf);
                                }
                        }
@@ -994,7 +995,7 @@ void mailing_list_management(void) {
                        }
                        striplt(buf);
                        if (strlen(buf) > 0) {
-                               fprintf(changefp, "listrecp|%s\n", buf);
+                               fprintf(changefp, "%s|%s\n", entrytype, buf);
                        }
                }
                fclose(tempfp);
index 7da25d4d05ab1f70536dd791717596a51987238a..5750792c9c1b3bdacc9fbed7dbefb7b46a4a8029 100644 (file)
@@ -14,4 +14,4 @@ void cli_image_upload(char *keyname);
 int room_prompt(int qrflags);
 void do_internet_configuration(void);
 void do_ignet_configuration(void);
-void mailing_list_management(void);
+void network_config_management(char *entrytype, char *comment);
index 09e14c0d230da4fe8aa148fdc11510ad4faf015e..c663e988f7b51ae75892f6138f556fdcdec7d30f 100644 (file)
@@ -625,8 +625,18 @@ void network_process_buffer(char *buffer, long size) {
        if (msg->cm_fields['D'] != NULL) {
                if (strcasecmp(msg->cm_fields['D'], config.c_nodename)) {
 
-                       /* FIXME route the message, stupid */
+                       if (is_valid_node(NULL, msg->cm_fields['D']) == 0) {
 
+                               /* FIXME route the message, stupid */
+
+
+                       }
+                       
+                       else {  /* invalid destination node name */
+
+                               /* FIXME bounce the msg */
+
+                       }
                }
        }