From b8eb22f8c5935a353f8ea6d6918d14de1830357b Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 3 Sep 2010 13:06:18 -0400 Subject: [PATCH] cmd_msg*() now work properly in guest mode. This completes the minimum required functionality for an anonymous guest client to traverse public rooms and read messages. --- citadel/msgbase.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/citadel/msgbase.c b/citadel/msgbase.c index a62daa15c..cd4fd5e41 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -1457,16 +1457,18 @@ void extract_encapsulated_message(char *name, char *filename, char *partnum, cha memcpy(encap->msg, content, length); return; } - } - - - - +/* + * Determine whether the currently logged in session has permission to read + * messages in the current room. + */ int CtdlDoIHavePermissionToReadMessagesInThisRoom(void) { - if ((!(CC->logged_in)) && (!(CC->internal_pgm))) { + if ( (!(CC->logged_in)) + && (!(CC->internal_pgm)) + && (!config.c_guest_logins) + ) { return(om_not_logged_in); } return(om_ok); -- 2.39.2