From: Art Cancro Date: Sat, 5 Jan 2002 22:31:22 +0000 (+0000) Subject: * Removed some protocol commands and writeups that are no longer necessary X-Git-Tag: v7.86~6630 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=25dc8d8676bc59a71f66c2c61bc87712c7abed6c * Removed some protocol commands and writeups that are no longer necessary * Began some of the framework for the Global Address Book --- diff --git a/citadel/ChangeLog b/citadel/ChangeLog index d6bc5d35f..683f69fe1 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -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 Fri Jul 10 1998 Art Cancro * Initial CVS import - diff --git a/citadel/citserver.c b/citadel/citserver.c index c721e963c..0845f9201 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -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]); } diff --git a/citadel/internet_addressing.c b/citadel/internet_addressing.c index b96aec1dc..5cb359681 100644 --- a/citadel/internet_addressing.c +++ b/citadel/internet_addressing.c @@ -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); diff --git a/citadel/internet_addressing.h b/citadel/internet_addressing.h index a097dd70d..414fb860e 100644 --- a/citadel/internet_addressing.h +++ b/citadel/internet_addressing.h @@ -38,7 +38,8 @@ int CtdlHostAlias(char *fqdn); enum { hostalias_nomatch, hostalias_localhost, - hostalias_gatewaydomain + hostalias_gatewaydomain, + hostalias_directory }; extern DLEXP char *inetcfg; diff --git a/citadel/routines2.c b/citadel/routines2.c index a0499fead..4eeff1924 100644 --- a/citadel/routines2.c +++ b/citadel/routines2.c @@ -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; } } diff --git a/citadel/serv_vcard.c b/citadel/serv_vcard.c index c3b27f092..b800272e4 100644 --- a/citadel/serv_vcard.c +++ b/citadel/serv_vcard.c @@ -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$"; } - - - diff --git a/citadel/sysdep.c b/citadel/sysdep.c index 7e22d927f..c45e2f776 100644 --- a/citadel/sysdep.c +++ b/citadel/sysdep.c @@ -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&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