/* 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(CCC->room.QRname, CtdlGetConfigStr("c_logpages"))) && (transiently == 0))
- {
+ int add_room_to_known_list = 1;
+ if (transiently == 1) {
+ add_room_to_known_list = 0;
+ }
+ char *c_logpages = CtdlGetConfigStr("c_logpages");
+ if ( (c_logpages != NULL) && (!strcasecmp(CCC->room.QRname, c_logpages)) ) {
+ add_room_to_known_list = 0;
+ }
+ if (add_room_to_known_list) {
vbuf.v_flags = vbuf.v_flags & ~V_FORGET & ~V_LOCKOUT;
vbuf.v_flags = vbuf.v_flags | V_ACCESS;
}
/* Check for new mail */
newmailcount = NewMailCount();
- /* set info to 1 if the user needs to read the room's info file */
- if (CCC->room.QRinfo > vbuf.v_lastseen) {
+ /* Set info to 1 if the room banner is new since our last visit.
+ * Some clients only want to display it when it changes.
+ */
+ if (CCC->room.msgnum_info > vbuf.v_lastseen) {
info = 1;
}
void CtdlDeleteRoom(struct ctdlroom *qrbuf)
{
struct floor flbuf;
- char filename[PATH_MAX];
char configdbkeyname[25];
syslog(LOG_NOTICE, "Deleting room <%s>", qrbuf->QRname);
- /* Delete the info file */
- assoc_file_name(filename, sizeof filename, qrbuf, ctdl_info_dir);
- unlink(filename);
-
- /* Delete the image file */
- assoc_file_name(filename, sizeof filename, qrbuf, ctdl_image_dir);
- unlink(filename);
-
/* Delete the room's network configdb entry */
netcfg_keyname(configdbkeyname, qrbuf->QRnumber);
CtdlDelConfig(configdbkeyname);