This commit is contained in:
B.Greenham 2010-02-23 01:10:39 -05:00
commit dacfb79db6
4 changed files with 11 additions and 1 deletions

View File

@ -28,6 +28,8 @@ NO PARAMETERS:
(however, new forwards can still be set subject to +F). (however, new forwards can still be set subject to +F).
+C - Disable CTCP. All CTCP messages to the channel, except ACTION, +C - Disable CTCP. All CTCP messages to the channel, except ACTION,
are disallowed. 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. +T - Disable notice. All notices to the channel are disallowed.
WITH PARAMETERS: WITH PARAMETERS:

View File

@ -173,6 +173,7 @@ typedef int (*ExtbanFunc)(const char *data, struct Client *client_p,
#define MODE_DISFORWARD 0x2000 /* disable channel forwarding */ #define MODE_DISFORWARD 0x2000 /* disable channel forwarding */
#define MODE_NOCTCP 0x8000 /* Block CTCPs directed to this channel */ #define MODE_NOCTCP 0x8000 /* Block CTCPs directed to this channel */
#define MODE_NONOTICE 0x16000 /* Block notices 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_BAN 0x10000000 /* ban channel flag */
#define CHFL_EXCEPTION 0x20000000 /* exception to ban channel flag */ #define CHFL_EXCEPTION 0x20000000 /* exception to ban channel flag */

View File

@ -519,6 +519,13 @@ msg_channel(int p_or_n, const char *command,
form_str(ERR_CANNOTSENDTOCHAN), chptr->chname); form_str(ERR_CANNOTSENDTOCHAN), chptr->chname);
return; 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' && if (p_or_n != NOTICE && *text == '\001' &&
strncasecmp(text + 1, "ACTION", 6)) strncasecmp(text + 1, "ACTION", 6))
{ {

View File

@ -1400,7 +1400,7 @@ struct ChannelMode chmode_table[256] =
{chm_nosuch, 0 }, /* A */ {chm_nosuch, 0 }, /* A */
{chm_nosuch, 0 }, /* B */ {chm_nosuch, 0 }, /* B */
{chm_simple, MODE_NOCTCP }, /* C */ {chm_simple, MODE_NOCTCP }, /* C */
{chm_nosuch, 0 }, /* D */ {chm_simple, MODE_NOACTION }, /* D */
{chm_nosuch, 0 }, /* E */ {chm_nosuch, 0 }, /* E */
{chm_simple, MODE_FREETARGET }, /* F */ {chm_simple, MODE_FREETARGET }, /* F */
{chm_nosuch, 0 }, /* G */ {chm_nosuch, 0 }, /* G */