$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
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
cmd_scdn(&cmdbuf[5]);
}
- else if (!strncasecmp(cmdbuf, "NSET", 4)) {
- cmd_nset(&cmdbuf[5]);
- }
-
else if (!strncasecmp(cmdbuf, "UIMG", 4)) {
cmd_uimg(&cmdbuf[5]);
}
&& (!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);
enum {
hostalias_nomatch,
hostalias_localhost,
- hostalias_gatewaydomain
+ hostalias_gatewaydomain,
+ hostalias_directory
};
extern DLEXP char *inetcfg;
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;
return;
case 3: strcpy(buf, "smarthost");
return;
+ case 4: strcpy(buf, "directory");
+ return;
}
}
if (!(CC->logged_in)) {
cprintf("%d Not logged in.\n",ERROR+NOT_LOGGED_IN);
return;
- }
+ }
my_vcard = vcard_get_user(&CC->usersupp);
strcpy(tmpaddr, "");
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);
CitControl.MMflags = CitControl.MMflags | MM_VALID ;
put_control();
end_critical_section(S_CONTROL);
- }
+}
if (s == NULL) s = vcard_get_prop(v, "tel", 1);
if (s != NULL) {
cprintf("%s\n", s);
- }
+ }
else {
cprintf(" \n");
}
extract_token(buf, adr, 6, ';');
cprintf("%s\n", buf); /* country */
cprintf("000\n");
- }
+}
/*
create_room(ADDRESS_BOOK_ROOM, 3, "", 0, 1);
return "$Id$";
}
-
-
-
-/*
- * 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
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
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
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
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.