Add chmode +D, which blocks CTCP ACTION.
This commit is contained in:
parent
92504d43b1
commit
7e6c9180da
|
@ -28,6 +28,8 @@ NO PARAMETERS:
|
|||
(however, new forwards can still be set subject to +F).
|
||||
+C - Disable CTCP. All CTCP messages to the channel, except ACTION,
|
||||
are disallowed.
|
||||
+D - Disable CTCP ACTION. All CTCP ACTIONs to the channel will
|
||||
be blocked.
|
||||
+T - Disable notice. All notices to the channel are disallowed.
|
||||
|
||||
WITH PARAMETERS:
|
||||
|
|
|
@ -173,6 +173,7 @@ typedef int (*ExtbanFunc)(const char *data, struct Client *client_p,
|
|||
#define MODE_DISFORWARD 0x2000 /* disable channel forwarding */
|
||||
#define MODE_NOCTCP 0x8000 /* Block CTCPs directed to this channel */
|
||||
#define MODE_NONOTICE 0x16000 /* Block notices directed to this channel */
|
||||
#define MODE_NOACTION 0x32000 /* Block CTCP ACTION directed to this channel */
|
||||
|
||||
#define CHFL_BAN 0x10000000 /* ban channel flag */
|
||||
#define CHFL_EXCEPTION 0x20000000 /* exception to ban channel flag */
|
||||
|
|
|
@ -519,6 +519,13 @@ msg_channel(int p_or_n, const char *command,
|
|||
form_str(ERR_CANNOTSENDTOCHAN), chptr->chname);
|
||||
return;
|
||||
}
|
||||
if (p_or_n != NOTICE && chptr->mode.mode & MODE_NOACTION)
|
||||
!strncasecmp(text + 1, "ACTION", 6))
|
||||
{
|
||||
sendto_one_numeric(source_p, ERR_CANNOTSENDTOCHAN,
|
||||
form_str(ERR_CANNOTSENDTOCHAN), chptr->chname);
|
||||
return;
|
||||
}
|
||||
if (p_or_n != NOTICE && *text == '\001' &&
|
||||
strncasecmp(text + 1, "ACTION", 6))
|
||||
{
|
||||
|
|
|
@ -1400,7 +1400,7 @@ struct ChannelMode chmode_table[256] =
|
|||
{chm_nosuch, 0 }, /* A */
|
||||
{chm_nosuch, 0 }, /* B */
|
||||
{chm_simple, MODE_NOCTCP }, /* C */
|
||||
{chm_nosuch, 0 }, /* D */
|
||||
{chm_simple, MODE_NOACTION }, /* D */
|
||||
{chm_nosuch, 0 }, /* E */
|
||||
{chm_simple, MODE_FREETARGET }, /* F */
|
||||
{chm_nosuch, 0 }, /* G */
|
||||
|
|
Loading…
Reference in New Issue