15 #include <sys/types.h>
23 #include "sysdep_decls.h"
24 #include "citserver.h"
28 #include "dynloader.h"
41 void cmd_mmod(char *argbuf) {
44 struct SuppMsgInfo smi;
45 int is_message_in_room;
47 /* user must be at least a Room Aide to moderate */
48 if (CtdlAccessCheck(ac_room_aide)) return;
50 msgnum = extract_long(argbuf, 0);
51 newlevel = extract_int(argbuf, 1);
53 if ( (newlevel < (-63)) || (newlevel > (+63)) ) {
54 cprintf("%d %d is not a valid moderation level.\n",
55 ERROR+ILLEGAL_VALUE, newlevel);
59 is_message_in_room = CtdlForEachMessage(MSGS_EQ, msgnum, (-127),
61 if (!is_message_in_room) {
62 cprintf("%d Message %ld is not in this room.\n",
63 ERROR+ILLEGAL_VALUE, msgnum);
67 GetSuppMsgInfo(&smi, msgnum);
68 smi.smi_mod = newlevel;
71 cprintf("%d Message %ld is moderated to %d\n", OK, msgnum, newlevel);
75 char *Dynamic_Module_Init(void)
77 CtdlRegisterProtoHook(cmd_mmod, "MMOD", "Moderate a message");