int retval = 0;
struct visit vbuf;
- /* Make sure we're dealing with a real, existing room */
- if (roombuf->QRflags & QR_INUSE) {
- retval = retval | UA_INUSE;
- }
- else {
- return(0);
- }
-
/* for internal programs, always do everything */
if (((CC->internal_pgm))&&(roombuf->QRflags & QR_INUSE)) {
- return(UA_INUSE | UA_KNOWN | UA_GOTOALLOWED);
+ return(UA_KNOWN | UA_GOTOALLOWED);
}
/* For mailbox rooms, only allow access to the owner */
/* Locate any applicable user/room relationships */
CtdlGetRelationship(&vbuf, userbuf, roombuf);
+ /* For mailboxes, we skip all the access stuff (and we've
+ * already checked by this point that the mailbox belongs
+ * to the user)
+ */
+ if (roombuf->QRflags & QR_MAILBOX) {
+ retval = UA_KNOWN | UA_GOTOALLOWED;
+ goto NEWMSG;
+ }
+
/* If this is a public room, it's accessible... */
if ((roombuf->QRflags & QR_PRIVATE) == 0) {
retval = retval | UA_KNOWN | UA_GOTOALLOWED;
/* Aides get access to everything */
if (userbuf->axlevel >= 6) {
- retval = retval | UA_INUSE | UA_KNOWN | UA_GOTOALLOWED;
+ retval = retval | UA_KNOWN | UA_GOTOALLOWED;
retval = retval & ~UA_ZAPPED;
}
- /* By the way, we also check for the presence of new messages */
+NEWMSG: /* By the way, we also check for the presence of new messages */
if ( (roombuf->QRhighest) > (vbuf.v_lastseen) ) {
retval = retval | UA_HASNEWMSGS;
}
strcpy(truncated_roomname, &truncated_roomname[11]);
cprintf("%s", truncated_roomname);
}
-
/* For all other rooms, just display the name in its entirety */
- else {
+ else {
cprintf("%s", qrbuf->QRname);
}