X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/6a64b9cea9d7f537ce31c8df38fd738a3657fc39..4a2a9a4e6a8fccd440da203bdfb8bba3f0b973a9:/src/mod-memoserv.c diff --git a/src/mod-memoserv.c b/src/mod-memoserv.c index 8de5874..4c9011f 100644 --- a/src/mod-memoserv.c +++ b/src/mod-memoserv.c @@ -42,6 +42,7 @@ #include "conf.h" #include "modcmd.h" #include "nickserv.h" +#include "opserv.h" #include "saxdb.h" #include "timeq.h" @@ -108,6 +109,8 @@ static const struct message_entry msgtab[] = { { "MSMSG_LIST_END", "--------------End of Memos--------------" }, { "MSMSG_BAR", "----------------------------------------"}, + { "MSMSG_DEFCON_NO_NEW_MEMOS", "You cannot send new memos at this time, please try again soon." }, + { NULL, NULL } }; @@ -401,6 +404,11 @@ static MODCMD_FUNC(cmd_send) MEMOSERV_MIN_PARAMS(3); + if (checkDefCon(DEFCON_NO_NEW_MEMOS) && !IsOper(user)) { + reply("MSMSG_DEFCON_NO_NEW_MEMOS"); + return 0; + } + if (!(hi = modcmd_get_handle_info(user, argv[1]))) return 0;