]> jfr.im git - solanum.git/blobdiff - modules/m_snote.c
add separate priv (oper:message) for walking over CALLERID (umode +g) (#152)
[solanum.git] / modules / m_snote.c
index e5320fccdb4c98774300506cf3de79ad74d9a5b4..37f5624b498d0b07aafb9a8eb2eda85c1a600a35 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  charybdis: an advanced Internet Relay Chat Daemon(ircd).
+ *  Solanum: a slightly advanced ircd
  *  m_snote.c: Server notice listener
  *
  *  Copyright (c) 2006 William Pitcock <nenolod -at- nenolod.net>
@@ -34,7 +34,6 @@
 #include "hook.h"
 #include "client.h"
 #include "hash.h"
-#include "common.h"
 #include "hash.h"
 #include "match.h"
 #include "ircd.h"
@@ -48,7 +47,9 @@
 #include "parse.h"
 #include "modules.h"
 
-static int me_snote(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static const char snote_desc[] = "Provides server notices via the SNOTE command";
+
+static void me_snote(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
 
 struct Message snote_msgtab = {
        "SNOTE", 0, 0, 0, 0,
@@ -56,14 +57,15 @@ struct Message snote_msgtab = {
 };
 
 mapi_clist_av1 snote_clist[] = { &snote_msgtab, NULL };
-DECLARE_MODULE_AV1(snote, NULL, NULL, snote_clist, NULL, NULL, "$Revision: 623 $");
+
+DECLARE_MODULE_AV2(snote, NULL, NULL, snote_clist, NULL, NULL, NULL, NULL, snote_desc);
 
 /*
  * me_snote
  *      parv[1] = snomask letter
  *     parv[2] = message
  */
-static int
+static void
 me_snote(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc,
        const char *parv[])
 {
@@ -72,12 +74,10 @@ me_snote(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
         * shit happens afterall -nenolod
         */
        if (parc > 3)
-               return 0;
+               return;
        if (!IsServer(source_p))
-               return 0;
+               return;
 
        sendto_realops_snomask_from(snomask_modes[(unsigned char) *parv[1]],
                L_ALL, source_p, "%s", parv[2]);
-
-       return 0;
 }