$Log$
+ Revision 614.12 2004/02/01 06:19:22 ajc
+ * policy.c: fix bug in GetExpirePolicy() that was causing the default
+ mailbox purge policy to be misinterpreted if it was set to "use
+ system default"
+ * serv_vcard.c: always set the Global Address Book room's expire policy
+ to "never expire" and its default view to "address book"
+
Revision 614.11 2004/01/31 05:44:29 ajc
*** empty log message ***
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
* If there is a default policy for mailbox rooms, return it
*/
if (qrbuf->QRflags & QR_MAILBOX) {
- if (&config.c_mbxep.expire_mode != 0) {
+ if (config.c_mbxep.expire_mode != 0) {
memcpy(epbuf, &config.c_mbxep,
sizeof(struct ExpirePolicy));
return;
char *serv_vcard_init(void)
{
+ struct ctdlroom qr;
+
CtdlRegisterSessionHook(vcard_session_startup_hook, EVT_START);
CtdlRegisterSessionHook(vcard_session_login_hook, EVT_LOGIN);
CtdlRegisterMessageHook(vcard_upload_beforesave, EVT_BEFORESAVE);
CtdlRegisterProtoHook(cmd_qdir, "QDIR", "Query Directory");
CtdlRegisterUserHook(vcard_purge, EVT_PURGEUSER);
CtdlRegisterNetprocHook(vcard_extract_from_network);
+
+ /* Create the Global ADdress Book room if necessary */
create_room(ADDRESS_BOOK_ROOM, 3, "", 0, 1, 0);
+
+ /* Set expiration policy to manual; otherwise objects will be lost! */
+ if (!lgetroom(&qr, ADDRESS_BOOK_ROOM)) {
+ qr.QRep.expire_mode = EXPIRE_MANUAL;
+ qr.QRdefaultview = 2; /* 2 = address book view */
+ lputroom(&qr);
+ }
+
return "$Id$";
}