| 23 |
|
*/ |
| 24 |
|
|
| 25 |
|
#include "stdinc.h" |
| 26 |
– |
#include "handlers.h" |
| 26 |
|
#include "client.h" |
| 27 |
|
#include "ircd.h" |
| 28 |
|
#include "irc_string.h" |
| 29 |
|
#include "numeric.h" |
| 30 |
|
#include "send.h" |
| 31 |
|
#include "s_user.h" |
| 33 |
– |
#include "msg.h" |
| 32 |
|
#include "parse.h" |
| 33 |
|
#include "modules.h" |
| 34 |
|
#include "s_serv.h" |
| 35 |
|
|
| 38 |
– |
static void mo_operwall(struct Client *, struct Client *, int, char *[]); |
| 39 |
– |
static void ms_operwall(struct Client *, struct Client *, int, char *[]); |
| 40 |
– |
static void me_operwall(struct Client *, struct Client *, int, char *[]); |
| 41 |
– |
|
| 42 |
– |
struct Message operwall_msgtab = { |
| 43 |
– |
"OPERWALL", 0, 0, 2, MAXPARA, MFLG_SLOW, 0, |
| 44 |
– |
{m_unregistered, m_not_oper, ms_operwall, me_operwall, mo_operwall, m_ignore} |
| 45 |
– |
}; |
| 46 |
– |
|
| 47 |
– |
void |
| 48 |
– |
_modinit(void) |
| 49 |
– |
{ |
| 50 |
– |
mod_add_cmd(&operwall_msgtab); |
| 51 |
– |
} |
| 52 |
– |
|
| 53 |
– |
void |
| 54 |
– |
_moddeinit(void) |
| 55 |
– |
{ |
| 56 |
– |
mod_del_cmd(&operwall_msgtab); |
| 57 |
– |
} |
| 58 |
– |
|
| 59 |
– |
const char *_version = "$Revision$"; |
| 60 |
– |
|
| 36 |
|
|
| 37 |
|
/* |
| 38 |
|
* mo_operwall - OPERWALL message handler |
| 46 |
|
{ |
| 47 |
|
const char *message = parv[1]; |
| 48 |
|
|
| 49 |
< |
if (!IsOperWall(source_p)) |
| 49 |
> |
if (!HasOFlag(source_p, OPER_FLAG_OPERWALL)) |
| 50 |
|
{ |
| 51 |
|
sendto_one(source_p, form_str(ERR_NOPRIVS), |
| 52 |
|
me.name, source_p->name, "operwall"); |
| 60 |
|
return; |
| 61 |
|
} |
| 62 |
|
|
| 63 |
< |
sendto_server(NULL, NULL, CAP_TS6, NOCAPS, |
| 63 |
> |
sendto_server(NULL, CAP_TS6, NOCAPS, |
| 64 |
|
":%s OPERWALL :%s", ID(source_p), message); |
| 65 |
< |
sendto_server(NULL, NULL, NOCAPS, CAP_TS6, |
| 65 |
> |
sendto_server(NULL, NOCAPS, CAP_TS6, |
| 66 |
|
":%s OPERWALL :%s", source_p->name, message); |
| 67 |
|
sendto_wallops_flags(UMODE_OPERWALL, source_p, "OPERWALL - %s", message); |
| 68 |
|
} |
| 82 |
|
if (EmptyString(message)) |
| 83 |
|
return; |
| 84 |
|
|
| 85 |
< |
sendto_server(client_p, NULL, CAP_TS6, NOCAPS, ":%s OPERWALL :%s", |
| 85 |
> |
sendto_server(client_p, CAP_TS6, NOCAPS, ":%s OPERWALL :%s", |
| 86 |
|
ID(source_p), message); |
| 87 |
< |
sendto_server(client_p, NULL, NOCAPS, CAP_TS6, ":%s OPERWALL :%s", |
| 87 |
> |
sendto_server(client_p, NOCAPS, CAP_TS6, ":%s OPERWALL :%s", |
| 88 |
|
source_p->name, message); |
| 89 |
|
sendto_wallops_flags(UMODE_OPERWALL, source_p, "OPERWALL - %s", message); |
| 90 |
|
} |
| 108 |
|
|
| 109 |
|
sendto_wallops_flags(UMODE_OPERWALL, source_p, "OPERWALL - %s", message); |
| 110 |
|
} |
| 111 |
+ |
|
| 112 |
+ |
static struct Message operwall_msgtab = { |
| 113 |
+ |
"OPERWALL", 0, 0, 2, MAXPARA, MFLG_SLOW, 0, |
| 114 |
+ |
{m_unregistered, m_not_oper, ms_operwall, me_operwall, mo_operwall, m_ignore} |
| 115 |
+ |
}; |
| 116 |
+ |
|
| 117 |
+ |
static void |
| 118 |
+ |
module_init(void) |
| 119 |
+ |
{ |
| 120 |
+ |
mod_add_cmd(&operwall_msgtab); |
| 121 |
+ |
} |
| 122 |
+ |
|
| 123 |
+ |
static void |
| 124 |
+ |
module_exit(void) |
| 125 |
+ |
{ |
| 126 |
+ |
mod_del_cmd(&operwall_msgtab); |
| 127 |
+ |
} |
| 128 |
+ |
|
| 129 |
+ |
struct module module_entry = { |
| 130 |
+ |
.node = { NULL, NULL, NULL }, |
| 131 |
+ |
.name = NULL, |
| 132 |
+ |
.version = "$Revision$", |
| 133 |
+ |
.handle = NULL, |
| 134 |
+ |
.modinit = module_init, |
| 135 |
+ |
.modexit = module_exit, |
| 136 |
+ |
.flags = 0 |
| 137 |
+ |
}; |