X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/81af5bcb394280ff1af82486961d852b102b923b..f8838806ef332738fd17e725c9e7d5b1418a9756:/modules/m_snote.c diff --git a/modules/m_snote.c b/modules/m_snote.c index 785901e4..37f5624b 100644 --- a/modules/m_snote.c +++ b/modules/m_snote.c @@ -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 @@ -27,8 +27,6 @@ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * $Id: m_snote.c 623 2006-01-29 13:47:35Z jilles $ */ #include "stdinc.h" @@ -36,9 +34,8 @@ #include "hook.h" #include "client.h" #include "hash.h" -#include "common.h" #include "hash.h" -#include "irc_string.h" +#include "match.h" #include "ircd.h" #include "numeric.h" #include "s_serv.h" @@ -50,24 +47,26 @@ #include "parse.h" #include "modules.h" -static int me_snote(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, MFLG_SLOW, + "SNOTE", 0, 0, 0, 0, {mg_ignore, mg_not_oper, mg_ignore, mg_ignore, {me_snote, 3}, mg_ignore} }; 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[0] = sender prefix * parv[1] = snomask letter * parv[2] = message */ -static int -me_snote(struct Client *client_p, struct Client *source_p, int parc, +static void +me_snote(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) { /* if there's more than just two params, this is a protocol @@ -75,12 +74,10 @@ me_snote(struct Client *client_p, struct Client *source_p, int parc, * 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; }