Add umode +B, which marks users with it set as a bot in whois.
This commit is contained in:
parent
2678f87a51
commit
930629c5f2
|
@ -13,6 +13,7 @@ Usermodes: (* designates that the umode is oper only)
|
|||
* +l - Can see oper locops (local wallops).
|
||||
* +s - Can see server notices (see /quote help snomask).
|
||||
* +z - Can see operwalls.
|
||||
+B - Marks you as a bot in /whois.
|
||||
+C - Prevents you from receiving CTCPs other than ACTION.
|
||||
+D - Deaf - ignores all channel messages.
|
||||
+Q - Prevents you from being affected by channel forwarding.
|
||||
|
|
|
@ -9,6 +9,7 @@ Usermodes:
|
|||
+i - Designates this client 'invisible'.
|
||||
+g - "caller id" mode only allow accept clients to message you
|
||||
+w - Can see oper wallops.
|
||||
+B - Marks you as a bot in /whois.
|
||||
+C - Prevents you from receiving CTCPs other than ACTION.
|
||||
+D - Deaf - ignores all channel messages.
|
||||
+Q - Prevents you from being affected by channel forwarding.
|
||||
|
|
|
@ -423,6 +423,7 @@ struct ListClient
|
|||
#define UMODE_REGONLYMSG 0x0200 /* only allow logged in users to msg */
|
||||
#define UMODE_NOCTCP 0x0400 /* block CTCPs except for ACTION */
|
||||
#define UMODE_NOINVITE 0x0800 /* block invites */
|
||||
#define UMODE_BOT 0x8000 /* mark as a bot in whois */
|
||||
|
||||
/* user information flags, only settable by remote mode or local oper */
|
||||
#define UMODE_OPER 0x1000 /* Operator */
|
||||
|
@ -518,6 +519,7 @@ struct ListClient
|
|||
#define IsSetRegOnlyMsg(x) ((x)->umodes & UMODE_REGONLYMSG)
|
||||
#define IsSetNoCTCP(x) ((x)->umodes & UMODE_NOCTCP)
|
||||
#define IsSetNoInvite(x) ((x)->umodes & UMODE_NOINVITE)
|
||||
#define IsSetBot(x) ((x)->umodes & UMODE_BOT)
|
||||
|
||||
#define SetGotId(x) ((x)->flags |= FLAGS_GOTID)
|
||||
#define IsGotId(x) (((x)->flags & FLAGS_GOTID) != 0)
|
||||
|
|
|
@ -164,6 +164,9 @@ extern const char *form_str(int);
|
|||
#define RPL_NOTOPIC 331
|
||||
#define RPL_TOPIC 332
|
||||
#define RPL_TOPICWHOTIME 333
|
||||
|
||||
#define RPL_WHOISBOT 335
|
||||
|
||||
#define RPL_WHOISACTUALLY 338
|
||||
|
||||
#define RPL_INVITING 341
|
||||
|
|
|
@ -326,6 +326,11 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
|
|||
form_str(RPL_WHOISCERTFP),
|
||||
target_p->name, target_p->certfp);
|
||||
|
||||
if(IsSetBot(target_p))
|
||||
sendto_one_numeric(source_p, RPL_WHOISBOT,
|
||||
form_str(RPL_WHOISBOT),
|
||||
target_p->name);
|
||||
|
||||
if(MyClient(target_p))
|
||||
{
|
||||
if (IsDynSpoof(target_p) && (IsOper(source_p) || source_p == target_p))
|
||||
|
|
|
@ -356,7 +356,7 @@ static const char * replies[] = {
|
|||
/* 332 RPL_TOPIC, */ ":%s 332 %s %s :%s",
|
||||
/* 333 RPL_TOPICWHOTIME, */ ":%s 333 %s %s %s %lu",
|
||||
/* 334 */ NULL,
|
||||
/* 335 */ NULL,
|
||||
/* 335 RPL_WHOISBOT */ "%s :is a bot",
|
||||
/* 336 */ NULL,
|
||||
/* 337 */ NULL,
|
||||
/* 338 RPL_WHOISACTUALLY, */ "%s %s :actually using host",
|
||||
|
|
|
@ -305,6 +305,7 @@ static struct mode_table umode_table[] = {
|
|||
{"operwall", UMODE_OPERWALL },
|
||||
{"noctcp", UMODE_NOCTCP },
|
||||
{"noinvite", UMODE_NOINVITE },
|
||||
{"bot", UMODE_BOT },
|
||||
{NULL, 0}
|
||||
};
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ int user_modes[256] = {
|
|||
/* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x3F */
|
||||
0, /* @ */
|
||||
0, /* A */
|
||||
0, /* B */
|
||||
UMODE_BOT, /* B */
|
||||
UMODE_NOCTCP, /* C */
|
||||
UMODE_DEAF, /* D */
|
||||
0, /* E */
|
||||
|
|
Loading…
Reference in New Issue