From: Art Cancro Date: Fri, 12 Aug 2005 02:12:31 +0000 (+0000) Subject: * Added more room name macros X-Git-Tag: v7.86~4731 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=57a3cf8f94879cef6a84f56e805e4a8e88e29cc0;p=citadel.git * Added more room name macros --- diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 10b41862d..d5c433929 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,7 @@ $Log$ +Revision 654.13 2005/08/12 02:12:31 ajc +* Added more room name macros + Revision 654.12 2005/08/11 23:12:26 ajc * debian/citadel-server.postinst: remove reference to '?' file (patch sent in by W. Goesgens) @@ -7036,4 +7039,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import - diff --git a/citadel/room_ops.c b/citadel/room_ops.c index 682adddab..163d44911 100644 --- a/citadel/room_ops.c +++ b/citadel/room_ops.c @@ -932,15 +932,30 @@ void cmd_goto(char *gargs) getuser(&CC->user, CC->curr_user); - if (!strcasecmp(towhere, "_BASEROOM_")) + /* + * Handle some of the macro named rooms + */ + if (!strcasecmp(towhere, "_BASEROOM_")) { safestrncpy(towhere, config.c_baseroom, sizeof towhere); - - if (!strcasecmp(towhere, "_MAIL_")) + } + else if (!strcasecmp(towhere, "_MAIL_")) { safestrncpy(towhere, MAILROOM, sizeof towhere); - - if (!strcasecmp(towhere, "_BITBUCKET_")) + } + else if (!strcasecmp(towhere, "_BITBUCKET_")) { safestrncpy(towhere, config.c_twitroom, sizeof towhere); - + } + else if (!strcasecmp(towhere, "_CALENDAR_")) { + safestrncpy(towhere, USERCALENDARROOM, sizeof towhere); + } + else if (!strcasecmp(towhere, "_TASKS_")) { + safestrncpy(towhere, USERTASKSROOM, sizeof towhere); + } + else if (!strcasecmp(towhere, "_CONTACTS_")) { + safestrncpy(towhere, USERCONTACTSROOM, sizeof towhere); + } + else if (!strcasecmp(towhere, "_NOTES_")) { + safestrncpy(towhere, USERNOTESROOM, sizeof towhere); + } /* First try a regular match */ c = getroom(&QRscratch, towhere); diff --git a/citadel/techdoc/protocol.txt b/citadel/techdoc/protocol.txt index 525a7eeea..18affe1e6 100644 --- a/citadel/techdoc/protocol.txt +++ b/citadel/techdoc/protocol.txt @@ -375,10 +375,14 @@ GOTO command to _BASEROOM_ is guaranteed to succeed. This is useful to allow client software to return to the base room when it doesn't know where else to go. - There are also two additional reserved room names: - "_MAIL_" translates to the system's designated room for e-mail messages. - "_BITBUCKET_" goes to whatever room has been chosen for messages -without a home. + There are also several additional reserved room names: + "_MAIL_" goes to the user's inbox (i.e. the Mail> room). + "_BITBUCKET_" goes to a room that has been chosen for messages without a home. + "_CALENDAR_" goes to the user's primary personal calendar. + "_CONTACTS_" goes to the user's primary personal address book. + "_NOTES_" goes to the user's primary personal notes room. + "_TASKS_" goes to the user's primary personal task list. + The second (and optional) parameter is a password, if one is required for access to the room. This allows for all types of rooms to be accessed via