$Log$
+ Revision 591.30 2002/05/23 03:33:21 ajc
+ * Added a GTSN (GeT list of SeeN messages) command
+
Revision 591.29 2002/05/20 14:29:59 ajc
* commands.c: fixed bug in the scan for idle_threshold= which didn't include
the = sign and ended up always setting this value to 0
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
cmd_seen(&cmdbuf[5]);
}
+ else if (!strncasecmp(cmdbuf, "GTSN", 4)) {
+ cmd_gtsn(&cmdbuf[5]);
+ }
+
else if (!strncasecmp(cmdbuf, "VIEW", 4)) {
cmd_view(&cmdbuf[5]);
}
}
+
+/*
+ * Retrieve the "seen" message list for the current room.
+ */
+void CtdlGetSeen(char *buf) {
+ struct visit vbuf;
+
+ /* Learn about the user and room in question */
+ CtdlGetRelationship(&vbuf, &CC->usersupp, &CC->quickroom);
+
+ safestrncpy(buf, vbuf.v_seen, SIZ);
+}
+
+
+
/*
* Manipulate the "seen msgs" string.
*/
int num_msgs = 0;
/* Learn about the user and room in question */
- get_mm();
- getuser(&CC->usersupp, CC->curr_user);
CtdlGetRelationship(&vbuf, &CC->usersupp, &CC->quickroom);
/* Load the message list */
int CtdlDoIHavePermissionToPostInThisRoom(char *errmsgbuf, size_t n);
void CtdlSetSeen(long target_msgnum, int target_setting);
struct recptypes *validate_recipients(char *recipients);
+void CtdlGetSeen(char *buf);
command simply returns OK without doing anything.
+ GTSN (GeT the list of SeeN messages)
+
+ This command retrieves the list of "seen" (as opposed to unread) messages for
+the current room. It returns OK followed by an IMAP-format message list.
+
+
SMTP (utility commands for the SMTP gateway)
This command, accessible only by Aides, supports several utility operations
}
+void cmd_gtsn(char *argbuf) {
+ char buf[SIZ];
+
+ if (CtdlAccessCheck(ac_logged_in)) {
+ return;
+ }
+
+ CtdlGetSeen(buf);
+ cprintf("%d %s\n", buf);
+}
+
+
+
/*
* INVT and KICK commands
*/