#include "stdinc.h"
#include "client.h"
#include "ircd.h"
-#include "irc_string.h"
+#include "match.h"
#include "numeric.h"
#include "send.h"
#include "s_user.h"
#include "modules.h"
#include "s_serv.h"
-static int mo_operwall(struct Client *, struct Client *, int, const char **);
-static int ms_operwall(struct Client *, struct Client *, int, const char **);
-static int ms_wallops(struct Client *, struct Client *, int, const char **);
+static int mo_operwall(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int ms_operwall(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int ms_wallops(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
struct Message wallops_msgtab = {
- "WALLOPS", 0, 0, 0, MFLG_SLOW,
+ "WALLOPS", 0, 0, 0, 0,
{mg_unreg, mg_not_oper, {ms_wallops, 2}, {ms_wallops, 2}, mg_ignore, {ms_wallops, 2}}
};
struct Message operwall_msgtab = {
- "OPERWALL", 0, 0, 0, MFLG_SLOW,
+ "OPERWALL", 0, 0, 0, 0,
{mg_unreg, mg_not_oper, {ms_operwall, 2}, mg_ignore, mg_ignore, {mo_operwall, 2}}
};
* parv[1] = message text
*/
static int
-mo_operwall(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+mo_operwall(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
if(!IsOperOperwall(source_p))
{
}
sendto_wallops_flags(UMODE_OPERWALL, source_p, "OPERWALL - %s", parv[1]);
- sendto_server(client_p, NULL, CAP_TS6, NOCAPS, ":%s OPERWALL :%s",
+ sendto_server(client_p, NULL, CAP_TS6, NOCAPS, ":%s OPERWALL :%s",
use_id(source_p), parv[1]);
- sendto_server(client_p, NULL, NOCAPS, CAP_TS6, ":%s OPERWALL :%s",
- source_p->name, parv[1]);
return 0;
}
/*
* ms_operwall - OPERWALL message handler
* (write to *all* local opers currently online)
- * parv[0] = sender prefix
* parv[1] = message text
*/
static int
-ms_operwall(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+ms_operwall(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
sendto_server(client_p, NULL, CAP_TS6, NOCAPS, ":%s OPERWALL :%s",
use_id(source_p), parv[1]);
- sendto_server(client_p, NULL, NOCAPS, CAP_TS6, ":%s OPERWALL :%s",
- source_p->name, parv[1]);
sendto_wallops_flags(UMODE_OPERWALL, source_p, "OPERWALL - %s", parv[1]);
return 0;
* parv[1] = message text
*/
static int
-ms_wallops(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+ms_wallops(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
const char *prefix = "";
+ if (MyClient(source_p) && !IsOperMassNotice(source_p))
+ {
+ sendto_one(source_p, form_str(ERR_NOPRIVS),
+ me.name, source_p->name, "mass_notice");
+ return 0;
+ }
+
if (IsPerson(source_p))
{
if (!strncmp(parv[1], "OPERWALL - ", 11) ||
!strncmp(parv[1], "LOCOPS - ", 9) ||
- !strncmp(parv[1], "SLOCOPS - ", 10))
+ !strncmp(parv[1], "SLOCOPS - ", 10) ||
+ !strncmp(parv[1], "ADMINWALL - ", 12))
prefix = "WALLOPS - ";
}
sendto_wallops_flags(UMODE_WALLOP, source_p, "%s%s", prefix, parv[1]);
- sendto_server(client_p, NULL, CAP_TS6, NOCAPS, ":%s WALLOPS :%s",
+ sendto_server(client_p, NULL, CAP_TS6, NOCAPS, ":%s WALLOPS :%s",
use_id(source_p), parv[1]);
- sendto_server(client_p, NULL, NOCAPS, CAP_TS6, ":%s WALLOPS :%s",
- source_p->name, parv[1]);
return 0;
}