zapped room without putting the room [back] on your known rooms list. This
is useful for the new administrative functions in WebCit (updating a user's
vCard without the Aide suddenly having that user's config room on their
list). It's also useful for making a certain pedophile in Sacramento even
more suspicious that someone is reading his email.
+ Revision 591.48 2002/06/19 21:42:57 ajc
+ * Added support for "transient goto" which allows entry into a private and/or
+ zapped room without putting the room [back] on your known rooms list. This
+ is useful for the new administrative functions in WebCit (updating a user's
+ vCard without the Aide suddenly having that user's config room on their
+ list). It's also useful for making a certain pedophile in Sacramento even
+ more suspicious that someone is reading his email.
+
Revision 591.47 2002/06/18 16:34:06 error
* room_ops.c: Fix for old room record not being deleted when renaming
baseroom or aideroom
Revision 591.47 2002/06/18 16:34:06 error
* room_ops.c: Fix for old room record not being deleted when renaming
baseroom or aideroom
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
if (IMAP->selected) {
strcpy(savedroom, CC->quickroom.QRname);
}
if (IMAP->selected) {
strcpy(savedroom, CC->quickroom.QRname);
}
- usergoto(roomname, 0, &msgs, &new);
+ usergoto(roomname, 0, 0, &msgs, &new);
* our happy day without violent explosions.
*/
if (IMAP->selected) {
* our happy day without violent explosions.
*/
if (IMAP->selected) {
- usergoto(savedroom, 0, &msgs, &new);
+ usergoto(savedroom, 0, 0, &msgs, &new);
}
/* We don't need this buffer anymore */
}
/* We don't need this buffer anymore */
* or access control is done here -- the caller should make sure that the
* specified room exists and is ok to access.
*/
* or access control is done here -- the caller should make sure that the
* specified room exists and is ok to access.
*/
-void usergoto(char *where, int display_result, int *retmsgs, int *retnew)
+void usergoto(char *where, int display_result, int transiently,
+ int *retmsgs, int *retnew)
{
int a;
int new_messages = 0;
{
int a;
int new_messages = 0;
begin_critical_section(S_USERSUPP);
CtdlGetRelationship(&vbuf, &CC->usersupp, &CC->quickroom);
begin_critical_section(S_USERSUPP);
CtdlGetRelationship(&vbuf, &CC->usersupp, &CC->quickroom);
- /* Know the room ... but not if it's the page log room */
- if (strcasecmp(CC->quickroom.QRname, config.c_logpages)) {
+ /* Know the room ... but not if it's the page log room, or if the
+ * caller specified that we're only entering this room transiently.
+ */
+ if ((strcasecmp(CC->quickroom.QRname, config.c_logpages))
+ && (transiently == 0) ) {
vbuf.v_flags = vbuf.v_flags & ~V_FORGET & ~V_LOCKOUT;
vbuf.v_flags = vbuf.v_flags | V_ACCESS;
}
vbuf.v_flags = vbuf.v_flags & ~V_FORGET & ~V_LOCKOUT;
vbuf.v_flags = vbuf.v_flags | V_ACCESS;
}
char augmented_roomname[SIZ];
char towhere[SIZ];
char password[SIZ];
char augmented_roomname[SIZ];
char towhere[SIZ];
char password[SIZ];
if (CtdlAccessCheck(ac_logged_in)) return;
extract(towhere, gargs, 0);
extract(password, gargs, 1);
if (CtdlAccessCheck(ac_logged_in)) return;
extract(towhere, gargs, 0);
extract(password, gargs, 1);
+ transiently = extract_int(gargs, 2);
getuser(&CC->usersupp, CC->curr_user);
getuser(&CC->usersupp, CC->curr_user);
if (CC->internal_pgm) {
memcpy(&CC->quickroom, &QRscratch,
sizeof(struct quickroom));
if (CC->internal_pgm) {
memcpy(&CC->quickroom, &QRscratch,
sizeof(struct quickroom));
- usergoto(NULL, 1, NULL, NULL);
+ usergoto(NULL, 1, transiently, NULL, NULL);
((ra & UA_GOTOALLOWED))) {
memcpy(&CC->quickroom, &QRscratch,
sizeof(struct quickroom));
((ra & UA_GOTOALLOWED))) {
memcpy(&CC->quickroom, &QRscratch,
sizeof(struct quickroom));
- usergoto(NULL, 1, NULL, NULL);
+ usergoto(NULL, 1, transiently, NULL, NULL);
return;
} else if ((QRscratch.QRflags & QR_PASSWORDED) &&
((ra & UA_KNOWN) == 0) &&
return;
} else if ((QRscratch.QRflags & QR_PASSWORDED) &&
((ra & UA_KNOWN) == 0) &&
} else {
memcpy(&CC->quickroom, &QRscratch,
sizeof(struct quickroom));
} else {
memcpy(&CC->quickroom, &QRscratch,
sizeof(struct quickroom));
- usergoto(NULL, 1, NULL, NULL);
+ usergoto(NULL, 1, transiently, NULL, NULL);
if (kill_ok) {
strcpy(deleted_room_name, CC->quickroom.QRname);
delete_room(&CC->quickroom); /* Do the dirty work */
if (kill_ok) {
strcpy(deleted_room_name, CC->quickroom.QRname);
delete_room(&CC->quickroom); /* Do the dirty work */
- usergoto(config.c_baseroom, 0, NULL, NULL); /* Return to the Lobby */
+ usergoto(config.c_baseroom, 0, 0, NULL, NULL); /* Return to the Lobby */
/* tell the world what we did */
snprintf(aaa, sizeof aaa, "%s> killed by %s\n",
/* tell the world what we did */
snprintf(aaa, sizeof aaa, "%s> killed by %s\n",
void cmd_lkrn (char *argbuf);
void cmd_lkro (char *argbuf);
void cmd_lzrm (char *argbuf);
void cmd_lkrn (char *argbuf);
void cmd_lkro (char *argbuf);
void cmd_lzrm (char *argbuf);
-void usergoto (char *where, int display_result, int *msgs, int *new);
+void usergoto (char *where, int display_result, int transiently,
+ int *msgs, int *new);
void cmd_goto (char *gargs);
void cmd_whok (void);
void cmd_rdir (void);
void cmd_goto (char *gargs);
void cmd_whok (void);
void cmd_rdir (void);
* the number of messages and number of new messages.
*/
memcpy(&CC->quickroom, &QRscratch, sizeof(struct quickroom));
* the number of messages and number of new messages.
*/
memcpy(&CC->quickroom, &QRscratch, sizeof(struct quickroom));
- usergoto(NULL, 0, &msgs, &new);
+ usergoto(NULL, 0, 0, &msgs, &new);
IMAP->selected = 1;
if (!strcasecmp(parms[1], "EXAMINE")) {
IMAP->selected = 1;
if (!strcasecmp(parms[1], "EXAMINE")) {
if (IMAP->selected) {
strcpy(savedroom, CC->quickroom.QRname);
}
if (IMAP->selected) {
strcpy(savedroom, CC->quickroom.QRname);
}
- usergoto(roomname, 0, &msgs, &new);
+ usergoto(roomname, 0, 0, &msgs, &new);
/*
* Tell the client what it wants to know. In fact, tell it *more* than
/*
* Tell the client what it wants to know. In fact, tell it *more* than
* our happy day without violent explosions.
*/
if (IMAP->selected) {
* our happy day without violent explosions.
*/
if (IMAP->selected) {
- usergoto(savedroom, 0, &msgs, &new);
+ usergoto(savedroom, 0, 0, &msgs, &new);
if (IMAP->selected) {
strcpy(savedroom, CC->quickroom.QRname);
}
if (IMAP->selected) {
strcpy(savedroom, CC->quickroom.QRname);
}
- usergoto(roomname, 0, &msgs, &new);
+ usergoto(roomname, 0, 0, &msgs, &new);
/*
* If another folder is selected, go back to that room so we can resume
* our happy day without violent explosions.
*/
if (IMAP->selected) {
/*
* If another folder is selected, go back to that room so we can resume
* our happy day without violent explosions.
*/
if (IMAP->selected) {
- usergoto(savedroom, 0, &msgs, &new);
+ usergoto(savedroom, 0, 0, &msgs, &new);
}
cprintf("%s OK SUBSCRIBE completed\r\n", parms[0]);
}
cprintf("%s OK SUBSCRIBE completed\r\n", parms[0]);
if (IMAP->selected) {
strcpy(savedroom, CC->quickroom.QRname);
}
if (IMAP->selected) {
strcpy(savedroom, CC->quickroom.QRname);
}
- usergoto(roomname, 0, &msgs, &new);
+ usergoto(roomname, 0, 0, &msgs, &new);
/*
* Now make the API call to zap the room
/*
* Now make the API call to zap the room
* our happy day without violent explosions.
*/
if (IMAP->selected) {
* our happy day without violent explosions.
*/
if (IMAP->selected) {
- usergoto(savedroom, 0, &msgs, &new);
+ usergoto(savedroom, 0, 0, &msgs, &new);
if (IMAP->selected) {
strcpy(savedroom, CC->quickroom.QRname);
}
if (IMAP->selected) {
strcpy(savedroom, CC->quickroom.QRname);
}
- usergoto(roomname, 0, &msgs, &new);
+ usergoto(roomname, 0, 0, &msgs, &new);
/*
* Now delete the room.
/*
* Now delete the room.
* our happy day without violent explosions.
*/
if (IMAP->selected) {
* our happy day without violent explosions.
*/
if (IMAP->selected) {
- usergoto(savedroom, 0, &msgs, &new);
+ usergoto(savedroom, 0, 0, &msgs, &new);
is not supplied or is incorrect, or the command will complete successfully
if the password is correct.
is not supplied or is incorrect, or the command will complete successfully
if the password is correct.
+ The third (and also) optional parameter is a "transient" flag. Normally,
+when a user enters a private and/or zapped room, the room is added to the
+user's known rooms list. If the transient flag is set to non-zero, this is
+called a "transient goto" which causes the user to enter the room without
+adding the room to the known rooms list.
+
The possible result codes are:
OK - The command completed successfully. User is now in the room.
The possible result codes are:
OK - The command completed successfully. User is now in the room.
create_room(SENTITEMS, 4, "", 0, 1, 0);
/* Enter the lobby */
create_room(SENTITEMS, 4, "", 0, 1, 0);
/* Enter the lobby */
- usergoto(config.c_baseroom, 0, NULL, NULL);
+ usergoto(config.c_baseroom, 0, 0, NULL, NULL);
/* Record this login in the Citadel log */
rec_log(CL_LOGIN, CC->curr_user);
/* Record this login in the Citadel log */
rec_log(CL_LOGIN, CC->curr_user);
lputuser(&CC->usersupp);
/* Return to the Lobby, so we don't end up in an undefined room */
lputuser(&CC->usersupp);
/* Return to the Lobby, so we don't end up in an undefined room */
- usergoto(config.c_baseroom, 0, NULL, NULL);
+ usergoto(config.c_baseroom, 0, 0, NULL, NULL);