$Log$
+Revision 655.4 2005/09/15 21:37:06 ajc
+* Restructured cmd_auto() to be able to search vCards in more than one room.
+ For now we are using the Global Address Book as the second room, but in
+ production that might be a bit too slow.
+
Revision 655.3 2005/09/15 18:36:29 ajc
* serv_smtp.c: Allow the use of *any* RFC822-compliant address format,
including Name <user@node>, or user@node (Name), by stripping down the
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
}
strcpy(hold_rm, CC->room.QRname); /* save current room */
+ cprintf("%d try these:\n", LISTING_FOLLOWS);
- if (getroom(&CC->room, USERCONTACTSROOM) != 0) {
- getroom(&CC->room, hold_rm);
- lprintf(CTDL_CRIT, "cannot get user contacts room\n");
- cprintf("%d Your address book was not found.\n", ERROR + ROOM_NOT_FOUND);
- return;
+ /* Take a spin through the user's personal address book */
+ if (getroom(&CC->room, USERCONTACTSROOM) == 0) {
+ CtdlForEachMessage(MSGS_ALL, 0, "text/x-vcard", NULL,
+ hunt_for_autocomplete, search_string);
}
-
- cprintf("%d try these:\n", LISTING_FOLLOWS);
- CtdlForEachMessage(MSGS_ALL, 0, "text/x-vcard", NULL, hunt_for_autocomplete, search_string);
+
+ /* FIXME try the global address book */
+ if (getroom(&CC->room, ADDRESS_BOOK_ROOM) == 0) {
+ CtdlForEachMessage(MSGS_ALL, 0, "text/x-vcard", NULL,
+ hunt_for_autocomplete, search_string);
+ }
+
cprintf("000\n");
-
- getroom(&CC->room, hold_rm); /* return to saved room */
+ if (strcmp(&CC->room.QRname, hold_rm)) {
+ getroom(&CC->room, hold_rm); /* return to saved room */
+ }
}
* Copyright (c) 1999-2002 / released under the GNU General Public License
*/
-/*
- * Where we keep messages containing the vCards that source our directory. It
- * makes no sense to change this, because you'd have to change it on every
- * system on the network. That would be stupid.
- */
-#define ADDRESS_BOOK_ROOM "Global Address Book"
-
/*
* Format of the "Exclusive ID" field of the message containing a user's
* vCard. Doesn't matter what it really looks like as long as it's both
#define SMTP_SPOOLOUT_ROOM "__CitadelSMTPspoolout__"
#define DELETED_MSGS_ROOM "__CitadelDeletedMessages__"
+/*
+ * Where we keep messages containing the vCards that source our directory. It
+ * makes no sense to change this, because you'd have to change it on every
+ * system on the network. That would be stupid.
+ */
+#define ADDRESS_BOOK_ROOM "Global Address Book"
+
+
/*
* How long (in seconds) to retain message entries in the use table
*/