* Removed some protocol commands and writeups that are no longer necessary
authorArt Cancro <ajc@citadel.org>
Sat, 5 Jan 2002 22:31:22 +0000 (22:31 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 5 Jan 2002 22:31:22 +0000 (22:31 +0000)
* Began some of the framework for the Global Address Book

citadel/ChangeLog
citadel/citserver.c
citadel/internet_addressing.c
citadel/internet_addressing.h
citadel/routines2.c
citadel/serv_vcard.c
citadel/sysdep.c
citadel/techdoc/session.txt

index d6bc5d35fd10ed82e0dcba2667547180c5da468c..683f69fe14a21f8c4858f838e0e42540aee9681e 100644 (file)
@@ -1,4 +1,8 @@
  $Log$
+ Revision 590.40  2002/01/05 22:31:22  ajc
+ * Removed some protocol commands and writeups that are no longer necessary
+ * Began some of the framework for the Global Address Book
+
  Revision 590.39  2002/01/05 12:44:43  error
  * serv_chat.c: allow a session to be killed while in chat
 
@@ -3079,4 +3083,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 c721e963cd82fade92b88d3433ddb27381fa60ab..0845f9201bc243b15cd45848b38e1cbae9f8ce1b 100644 (file)
@@ -1181,10 +1181,6 @@ void do_command_loop(void) {
                cmd_scdn(&cmdbuf[5]);
                }
 
-       else if (!strncasecmp(cmdbuf, "NSET", 4)) {
-               cmd_nset(&cmdbuf[5]);
-               }
-
        else if (!strncasecmp(cmdbuf, "UIMG", 4)) {
                cmd_uimg(&cmdbuf[5]);
                }
index b96aec1dcbca7985735ac23ec0967da783550364..5cb35968164b728065dd132df93235bd30d334bc 100644 (file)
@@ -90,6 +90,10 @@ int CtdlHostAlias(char *fqdn) {
                   && (!strcasecmp(&fqdn[strlen(fqdn)-strlen(host)], host)))
                        return(hostalias_gatewaydomain);
 
+               if ( (!strcasecmp(type, "directory"))
+                  && (!strcasecmp(&fqdn[strlen(fqdn)-strlen(host)], host)))
+                       return(hostalias_directory);
+
        }
 
        return(hostalias_nomatch);
index a097dd70d1213838a90913ffc79e9f368746811a..414fb860ee6d8933f2ea13690de06fb919bfaff8 100644 (file)
@@ -38,7 +38,8 @@ int CtdlHostAlias(char *fqdn);
 enum {
        hostalias_nomatch,
        hostalias_localhost,
-       hostalias_gatewaydomain
+       hostalias_gatewaydomain,
+       hostalias_directory
 };
 
 extern DLEXP char *inetcfg;
index a0499fead1df6b6fc06f635a7c091e70a062f187..4eeff192498bf439131ffeffd98336e922cff066 100644 (file)
@@ -796,10 +796,11 @@ void do_system_configuration(void)
 void get_inet_rec_type(char *buf) {
        int sel;
 
-       keyopt(" <1> localhost       (Alias for this computer)\n");
-       keyopt(" <2> gateway domain  (Domain for all Citadel systems)\n");
-       keyopt(" <3> smart-host      (Forward all outbound mail to this host)\n");
-       sel = intprompt("Which one", 1, 1, 3);
+       keyopt(" <1> localhost      (Alias for this computer)\n");
+       keyopt(" <2> gateway domain (Domain for all Citadel systems)\n");
+       keyopt(" <3> smart-host     (Forward all outbound mail to this host)\n");
+       keyopt(" <4> directory      (Consult the Global Address Book)\n");
+       sel = intprompt("Which one", 1, 1, 4);
        switch(sel) {
                case 1: strcpy(buf, "localhost");
                        return;
@@ -807,6 +808,8 @@ void get_inet_rec_type(char *buf) {
                        return;
                case 3: strcpy(buf, "smarthost");
                        return;
+               case 4: strcpy(buf, "directory");
+                       return;
        }
 }
 
index c3b27f092b33d92c34bc891624cb6db1acc09e57..b800272e4ef64b8b8e2eeba0b22e4fec362ff58a 100644 (file)
@@ -299,7 +299,7 @@ void cmd_regi(char *argbuf) {
        if (!(CC->logged_in)) {
                cprintf("%d Not logged in.\n",ERROR+NOT_LOGGED_IN);
                return;
-               }
+       }
 
        my_vcard = vcard_get_user(&CC->usersupp);
        strcpy(tmpaddr, "");
@@ -321,14 +321,15 @@ void cmd_regi(char *argbuf) {
                                        b=strlen(tmpzip);
                                        tmpzip[b]=buf[c];
                                        tmpzip[b+1]=0;
-                                       }
                                }
                        }
+               }
                if (a==5) vcard_set_prop(my_vcard, "tel;home", buf);
                if (a==6) vcard_set_prop(my_vcard, "email;internet", buf);
                if (a==7) strcpy(tmpcountry, buf);
                ++a;
-               }
+       }
+
        sprintf(tmpaddress, ";;%s;%s;%s;%s;%s",
                tmpaddr, tmpcity, tmpstate, tmpzip, tmpcountry);
        vcard_set_prop(my_vcard, "adr", tmpaddress);
@@ -345,7 +346,7 @@ void cmd_regi(char *argbuf) {
        CitControl.MMflags = CitControl.MMflags | MM_VALID ;
        put_control();
        end_critical_section(S_CONTROL);
-       }
+}
 
 
 
@@ -405,7 +406,7 @@ void cmd_greg(char *argbuf)
        if (s == NULL) s = vcard_get_prop(v, "tel", 1);
        if (s != NULL) {
                cprintf("%s\n", s);
-               }
+       }
        else {
                cprintf(" \n");
        }
@@ -420,7 +421,7 @@ void cmd_greg(char *argbuf)
        extract_token(buf, adr, 6, ';');
        cprintf("%s\n", buf);                           /* country */
        cprintf("000\n");
-       }
+}
 
 
 /*
@@ -478,6 +479,3 @@ char *Dynamic_Module_Init(void)
        create_room(ADDRESS_BOOK_ROOM, 3, "", 0, 1);
        return "$Id$";
 }
-
-
-
index 7e22d927f5b4072bce8631266db56399a9ec03dd..c45e2f77681e44fd4fe424f5978e0334e6f521d2 100644 (file)
@@ -671,73 +671,6 @@ void start_daemon(int do_close_stdio) {
 
 
 
-/*
- * Tie in to the 'netsetup' program.
- *
- * (We're going to hope that netsetup never feeds more than 4096 bytes back.)
- */
-void cmd_nset(char *cmdbuf)
-{
-       int retcode;
-       char fbuf[4096];
-       FILE *netsetup;
-       int ch;
-       int a, b;
-       char netsetup_args[3][SIZ];
-
-       if (CC->usersupp.axlevel < 6) {
-               cprintf("%d Higher access required.\n", 
-                       ERROR + HIGHER_ACCESS_REQUIRED);
-               return;
-       }
-
-       for (a=1; a<=3; ++a) {
-               if (num_parms(cmdbuf) >= a) {
-                       extract(netsetup_args[a-1], cmdbuf, a-1);
-                       for (b=0; b<strlen(netsetup_args[a-1]); ++b) {
-                               if (netsetup_args[a-1][b] == 34) {
-                                       netsetup_args[a-1][b] = '_';
-                               }
-                       }
-               }
-               else {
-                       netsetup_args[a-1][0] = 0;
-               }
-       }
-
-       sprintf(fbuf, "./netsetup \"%s\" \"%s\" \"%s\" </dev/null 2>&1",
-               netsetup_args[0], netsetup_args[1], netsetup_args[2]);
-       netsetup = popen(fbuf, "r");
-       if (netsetup == NULL) {
-               cprintf("%d %s\n", ERROR, strerror(errno));
-               return;
-       }
-
-       fbuf[0] = 0;
-       while (ch = getc(netsetup), (ch > 0)) {
-               fbuf[strlen(fbuf)+1] = 0;
-               fbuf[strlen(fbuf)] = ch;
-       }
-
-       retcode = pclose(netsetup);
-
-       if (retcode != 0) {
-               for (a=0; a<strlen(fbuf); ++a) {
-                       if (fbuf[a] < 32) fbuf[a] = 32;
-               }
-               fbuf[245] = 0;
-               cprintf("%d %s\n", ERROR, fbuf);
-               return;
-       }
-
-       cprintf("%d Command succeeded.  Output follows:\n", LISTING_FOLLOWS);
-       cprintf("%s", fbuf);
-       if (fbuf[strlen(fbuf)-1] != 10) cprintf("\n");
-       cprintf("000\n");
-}
-
-
-
 /*
  * Generic routine to convert a login name to a full name (gecos)
  * Returns nonzero if a conversion took place
index 546244dc5bc0155d69585b69667fe8db800d38e6..0c1f0538e64cd431b1df3fb99eda30b5d5da634b 100644 (file)
@@ -1,5 +1,5 @@
                   SESSION LAYER PROTOCOL FOR CITADEL/UX
-         (c) 1995-2001 by Art Cancro et. al.    All Rights Reserved
+         (c) 1995-2002 by Art Cancro et. al.    All Rights Reserved
    
   
  INTRODUCTION
@@ -1465,27 +1465,6 @@ BINARY_FOLLOWS followed by a data block containing the _raw_ message format
 on disk.
   
    
- ENT3   (ENTer message, mode 3 -- internal command)
- ENT3 is for use by internal programs only and should not be utilized by
-user-mode clients.  It does require IPGM authentication.  This command posts
-a raw message straight into the message base without modification or performing
-any checks.   It accepts the following arguments:
-  0  -  Post flag.  This should be set to 1 to post a message.  If it is
-set to 0, the server only returns OK or ERROR (plus any flags describing
-the error) without reading in a message.  This is used to verify the operation
-before actually transmitting a message.
-  1  -  Recipient.  This argument is utilized only for private mail messages.
-It is ignored for public messages.  It contains, of course, the name of the
-recipient of the message.
-  2  -  The size (in bytes) of the message to be transmitted.
-
- ENT3 returns OK to tell the client that a message can be posted, ERROR if
-there would be a problem with the operation, or SEND_BINARY followed by a byte
-count if it is expecting the message to be transmitted.
-  
-  
  TERM   (TERMinate another session)
  
  In a multithreaded environment, it sometimes becomes necessary to terminate
@@ -1501,17 +1480,6 @@ running on.
  See also: REQT
  
  
- NSET   (Network SETup commands)
- Aides may use this command to configure the networker.  This command's
-parameters are passed directly to the 'netsetup' command line utility.   If
-netsetup returns a non-zero exit code, ERROR is returned, along with the
-error message (if any).  If netsetup returns a zero (success) exit code,
-LISTING_FOLLOWS is returned, followed by zero or more lines of output (since
-netsetup may have information to display, such as a room or node list) and
-the usual '000' listing terminator.
  DOWN   (shut DOWN the server)
  
  This command, which may only be executed by an Aide, immediately shuts down
@@ -1748,7 +1716,7 @@ into the system.  It is implemented in the serv_expire module.
  
  MSG4   (read MeSsaGe, mode 4 -- enumerate MIME parts)
  
-     FIX ... do the writeup for this once it's done.
+     FIXME ... do the writeup for this once it's done.