*/
void cmd_wiki(char *argbuf) {
cprintf("%d FIXME not finished\n", ERROR);
+
+ /* mime_parser(mptr, NULL, *mime_download, NULL, NULL, NULL, 0); */
}
+
+
+int CtdlDoIHavePermissionToReadMessagesInThisRoom(void) {
+ if ((!(CC->logged_in)) && (!(CC->internal_pgm))) {
+ return(om_not_logged_in);
+ }
+ return(om_ok);
+}
+
+
/*
* Get a message off disk. (returns om_* values found in msgbase.h)
*
struct CtdlMessage *TheMessage = NULL;
int retcode = om_no_such_msg;
struct encapmsg encap;
+ int r;
- CtdlLogPrintf(CTDL_DEBUG, "CtdlOutputMsg() msgnum=%ld, mode=%d, section=%s\n",
+ CtdlLogPrintf(CTDL_DEBUG, "CtdlOutputMsg(msgnum=%ld, mode=%d, section=%s)\n",
msg_num, mode,
(section ? section : "<>")
);
- if ((!(CC->logged_in)) && (!(CC->internal_pgm))) {
- if (do_proto) cprintf("%d Not logged in.\n",
- ERROR + NOT_LOGGED_IN);
- return(om_not_logged_in);
+ r = CtdlDoIHavePermissionToReadMessagesInThisRoom();
+ if (r != om_ok) {
+ if (do_proto) {
+ if (r == om_not_logged_in) {
+ cprintf("%d Not logged in.\n", ERROR + NOT_LOGGED_IN);
+ }
+ else {
+ cprintf("%d An unknown error has occurred.\n", ERROR);
+ }
+ }
+ return(r);
}
/* FIXME: check message id against msglist for this room */
int CtdlOutputPreLoadedMsg(struct CtdlMessage *,
int mode, /* how would you like that message? */
int headers_only, /* eschew the message body? */
- int do_proto, /* do Citadel protocol responses? */
+ int do_proto, /* do Citadel protocol responses? */
int crlf, /* 0=LF, 1=CRLF */
int flags /* should the bessage be exported clean? */
);
int CtdlDoIHavePermissionToDeleteMessagesFromThisRoom(void);
+int CtdlDoIHavePermissionToReadMessagesInThisRoom(void);
enum {
POST_LOGGED_IN,