* +l - Can see oper locops (local wallops).
* +s - Can see server notices (see /quote help snomask).
* +z - Can see operwalls.
+ +C - Prevents you from receiving CTCPs other than ACTION.
+D - Deaf - ignores all channel messages.
+Q - Prevents you from being affected by channel forwarding.
+R - Prevents non accept unidentified users from messaging you.
+i - Designates this client 'invisible'.
+g - "caller id" mode only allow accept clients to message you
+w - Can see oper wallops.
+ +C - Prevents you from receiving CTCPs other than ACTION.
+D - Deaf - ignores all channel messages.
+Q - Prevents you from being affected by channel forwarding.
+R - Prevents non accept unidentified users from messaging you.
#define UMODE_DEAF 0x0080
#define UMODE_NOFORWARD 0x0100 /* don't forward */
#define UMODE_REGONLYMSG 0x0200 /* only allow logged in users to msg */
+#define UMODE_NOCTCP 0x0400 /* block CTCPs except for ACTION */
/* user information flags, only settable by remote mode or local oper */
#define UMODE_OPER 0x1000 /* Operator */
#define IsDeaf(x) ((x)->umodes & UMODE_DEAF)
#define IsNoForward(x) ((x)->umodes & UMODE_NOFORWARD)
#define IsSetRegOnlyMsg(x) ((x)->umodes & UMODE_REGONLYMSG)
+#define IsSetNoCTCP(x) ((x)->umodes & UMODE_NOCTCP)
#define SetGotId(x) ((x)->flags |= FLAGS_GOTID)
#define IsGotId(x) (((x)->flags & FLAGS_GOTID) != 0)
#define ERR_NOOPERHOST 491
+#define ERR_NOCTCP 492
+
#define ERR_UMODEUNKNOWNFLAG 501
#define ERR_USERSDONTMATCH 502
if(MyClient(target_p))
{
+ if (IsSetNoCTCP(target_p) && p_or_n != NOTICE && *text == '\001' && strncasecmp(text + 1, "ACTION", 6))
+ {
+ sendto_one_numeric(source_p, ERR_NOCTCP,
+ form_str(ERR_NOCTCP),
+ target_p->name);
+ }
/* XXX Controversial? allow opers always to send through a +g */
- if(!IsServer(source_p) && (IsSetCallerId(target_p) ||
+ else if(!IsServer(source_p) && (IsSetCallerId(target_p) ||
(IsSetRegOnlyMsg(target_p) && !source_p->user->suser[0])))
{
/* Here is the anti-flood bot/spambot code -db */
/* 489 ERR_VOICENEEDED */ ":%s 489 %s %s :You're neither voiced nor channel operator",
/* 490 */ NULL,
/* 491 ERR_NOOPERHOST, */ ":No appropriate operator blocks were found for your host",
-/* 492 */ NULL,
+/* 492 ERR_NOCTCP */ ":Can't send CTCP to %s (+C set)",
/* 493 */ NULL,
/* 494 */ NULL,
/* 495 */ NULL,
{"servnotice", UMODE_SERVNOTICE},
{"wallop", UMODE_WALLOP },
{"operwall", UMODE_OPERWALL },
+ {"noctcp", UMODE_NOCTCP },
{NULL, 0}
};
0, /* @ */
0, /* A */
0, /* B */
- 0, /* C */
+ UMODE_NOCTCP, /* C */
UMODE_DEAF, /* D */
0, /* E */
0, /* F */