X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/a4bf26dd347625504e9215eebc8a6753ba9895d9..6cac5cce0fedf3f0ed0de91d51539c8b8629fd9f:/extensions/m_sendbans.c diff --git a/extensions/m_sendbans.c b/extensions/m_sendbans.c index 882c82ec..a6e15512 100644 --- a/extensions/m_sendbans.c +++ b/extensions/m_sendbans.c @@ -31,7 +31,6 @@ #include "stdinc.h" #include "client.h" -#include "common.h" #include "ircd.h" #include "match.h" #include "numeric.h" @@ -45,7 +44,10 @@ #include "messages.h" #include "rb_radixtree.h" -static int mo_sendbans(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); +static const char sendbands_desc[] = + "Adds the ability to send all permanent RESVs and XLINEs to given server"; + +static void mo_sendbans(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); struct Message sendbans_msgtab = { "SENDBANS", 0, 0, 0, 0, @@ -57,7 +59,7 @@ mapi_clist_av1 sendbans_clist[] = { NULL }; -DECLARE_MODULE_AV1(sendbans, NULL, NULL, sendbans_clist, NULL, NULL, "$Revision$"); +DECLARE_MODULE_AV2(sendbans, NULL, NULL, sendbans_clist, NULL, NULL, NULL, NULL, sendbands_desc); static const char *expand_xline(const char *mask) { @@ -83,11 +85,12 @@ static const char *expand_xline(const char *mask) return buf; } -static int mo_sendbans(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) +static void +mo_sendbans(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) { struct ConfItem *aconf; rb_dlink_node *ptr; - int i, count; + int count; const char *target, *mask2; struct Client *server_p; struct rb_radixtree_iteration_state state; @@ -96,19 +99,19 @@ static int mo_sendbans(struct MsgBuf *msgbuf_p, struct Client *client_p, struct { sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "remoteban"); - return 0; + return; } if (!IsOperXline(source_p)) { sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "xline"); - return 0; + return; } if (!IsOperResv(source_p)) { sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "resv"); - return 0; + return; } target = parv[1]; @@ -125,7 +128,7 @@ static int mo_sendbans(struct MsgBuf *msgbuf_p, struct Client *client_p, struct { sendto_one_numeric(source_p, ERR_NOSUCHSERVER, form_str(ERR_NOSUCHSERVER), target); - return 0; + return; } sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, @@ -171,6 +174,4 @@ static int mo_sendbans(struct MsgBuf *msgbuf_p, struct Client *client_p, struct "ENCAP %s XLINE 0 %s 2 :%s", target, mask2, aconf->passwd); } - - return 0; }