Add umode +G, soft callerid.
This commit is contained in:
parent
ffffcf7321
commit
61ffa214b4
|
@ -6,6 +6,8 @@ Usermodes: (* designates that the umode is oper only)
|
||||||
-----------------------------------------------------------------
|
-----------------------------------------------------------------
|
||||||
+i - Designates this client 'invisible'.
|
+i - Designates this client 'invisible'.
|
||||||
+g - "caller id" mode only allow accept clients to message you
|
+g - "caller id" mode only allow accept clients to message you
|
||||||
|
+G - "soft caller id" mode - same as +g but automatically allows
|
||||||
|
anyone who's in a common channel with you to message you.
|
||||||
+w - Can see oper and server wallops.
|
+w - Can see oper and server wallops.
|
||||||
+o - Designates this client is an IRC Operator.
|
+o - Designates this client is an IRC Operator.
|
||||||
Use the /oper command to attain this.
|
Use the /oper command to attain this.
|
||||||
|
|
|
@ -8,6 +8,8 @@ Usermodes:
|
||||||
Use the /oper command to attain this.
|
Use the /oper command to attain this.
|
||||||
+i - Designates this client 'invisible'.
|
+i - Designates this client 'invisible'.
|
||||||
+g - "caller id" mode only allow accept clients to message you
|
+g - "caller id" mode only allow accept clients to message you
|
||||||
|
+G - "soft caller id" mode - same as +g but automatically allows
|
||||||
|
anyone who's in a common channel with you to message you.
|
||||||
+w - Can see oper wallops.
|
+w - Can see oper wallops.
|
||||||
+B - Marks you as a bot in /whois.
|
+B - Marks you as a bot in /whois.
|
||||||
+C - Prevents you from receiving CTCPs other than ACTION.
|
+C - Prevents you from receiving CTCPs other than ACTION.
|
||||||
|
|
|
@ -424,6 +424,7 @@ struct ListClient
|
||||||
#define UMODE_NOCTCP 0x0400 /* block CTCPs except for ACTION */
|
#define UMODE_NOCTCP 0x0400 /* block CTCPs except for ACTION */
|
||||||
#define UMODE_NOINVITE 0x0800 /* block invites */
|
#define UMODE_NOINVITE 0x0800 /* block invites */
|
||||||
#define UMODE_BOT 0x8000 /* mark as a bot in whois */
|
#define UMODE_BOT 0x8000 /* mark as a bot in whois */
|
||||||
|
#define UMODE_SCALLERID 0x40000 /* soft caller id */
|
||||||
|
|
||||||
/* user information flags, only settable by remote mode or local oper */
|
/* user information flags, only settable by remote mode or local oper */
|
||||||
#define UMODE_OPER 0x1000 /* Operator */
|
#define UMODE_OPER 0x1000 /* Operator */
|
||||||
|
@ -523,6 +524,7 @@ struct ListClient
|
||||||
#define IsSetNoCTCP(x) ((x)->umodes & UMODE_NOCTCP)
|
#define IsSetNoCTCP(x) ((x)->umodes & UMODE_NOCTCP)
|
||||||
#define IsSetNoInvite(x) ((x)->umodes & UMODE_NOINVITE)
|
#define IsSetNoInvite(x) ((x)->umodes & UMODE_NOINVITE)
|
||||||
#define IsSetBot(x) ((x)->umodes & UMODE_BOT)
|
#define IsSetBot(x) ((x)->umodes & UMODE_BOT)
|
||||||
|
#define IsSetSCallerId(x) ((x)->umodes & UMODE_SCALLERID)
|
||||||
|
|
||||||
#define SetGotId(x) ((x)->flags |= FLAGS_GOTID)
|
#define SetGotId(x) ((x)->flags |= FLAGS_GOTID)
|
||||||
#define IsGotId(x) (((x)->flags & FLAGS_GOTID) != 0)
|
#define IsGotId(x) (((x)->flags & FLAGS_GOTID) != 0)
|
||||||
|
|
|
@ -368,6 +368,8 @@ extern const char *form_str(int);
|
||||||
#define RPL_ENDOFMONLIST 733
|
#define RPL_ENDOFMONLIST 733
|
||||||
#define ERR_MONLISTFULL 734
|
#define ERR_MONLISTFULL 734
|
||||||
|
|
||||||
|
#define ERR_NOCOMMONCHAN 737
|
||||||
|
|
||||||
#define RPL_RSACHALLENGE2 740
|
#define RPL_RSACHALLENGE2 740
|
||||||
#define RPL_ENDOFRSACHALLENGE2 741
|
#define RPL_ENDOFRSACHALLENGE2 741
|
||||||
|
|
||||||
|
|
|
@ -777,16 +777,24 @@ msg_client(int p_or_n, const char *command,
|
||||||
source_p->name,
|
source_p->name,
|
||||||
source_p->username,
|
source_p->username,
|
||||||
source_p->host, command, target_p->name, text);
|
source_p->host, command, target_p->name, text);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else if (IsSetRegOnlyMsg(target_p) && !source_p->user->suser[0])
|
if (IsSetRegOnlyMsg(target_p) && !source_p->user->suser[0])
|
||||||
{
|
{
|
||||||
if (p_or_n != NOTICE)
|
if (p_or_n != NOTICE)
|
||||||
sendto_one_numeric(source_p, ERR_NONONREG,
|
sendto_one_numeric(source_p, ERR_NONONREG,
|
||||||
form_str(ERR_NONONREG),
|
form_str(ERR_NONONREG),
|
||||||
target_p->name);
|
target_p->name);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
if (IsSetSCallerId(target_p) && !source_p->user->suser[0])
|
||||||
{
|
{
|
||||||
|
if (p_or_n != NOTICE)
|
||||||
|
sendto_one_numeric(source_p, ERR_NOCOMMONCHAN,
|
||||||
|
form_str(ERR_NOCOMMONCHAN),
|
||||||
|
target_p->name);
|
||||||
|
return;
|
||||||
|
}
|
||||||
/* check for accept, flag recipient incoming message */
|
/* check for accept, flag recipient incoming message */
|
||||||
if(p_or_n != NOTICE)
|
if(p_or_n != NOTICE)
|
||||||
{
|
{
|
||||||
|
@ -811,7 +819,6 @@ msg_client(int p_or_n, const char *command,
|
||||||
target_p->localClient->last_caller_id_time = rb_current_time();
|
target_p->localClient->last_caller_id_time = rb_current_time();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
add_reply_target(target_p, source_p);
|
add_reply_target(target_p, source_p);
|
||||||
|
|
|
@ -758,7 +758,7 @@ static const char * replies[] = {
|
||||||
/* 734 ERR_MONLISTFULL */ ":%s 734 %s %d %s :Monitor list is full",
|
/* 734 ERR_MONLISTFULL */ ":%s 734 %s %d %s :Monitor list is full",
|
||||||
/* 735 */ NULL,
|
/* 735 */ NULL,
|
||||||
/* 736 */ NULL,
|
/* 736 */ NULL,
|
||||||
/* 737 */ NULL,
|
/* 737 ERR_NOCOMMONCHAN*/ "%s :is in +G mode (server-side ignore) and you do not share a common channel with them.",
|
||||||
/* 738 */ NULL,
|
/* 738 */ NULL,
|
||||||
/* 739 */ NULL,
|
/* 739 */ NULL,
|
||||||
/* 740 */ ":%s 740 %s :%s",
|
/* 740 */ ":%s 740 %s :%s",
|
||||||
|
|
|
@ -295,6 +295,7 @@ struct mode_table
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
static struct mode_table umode_table[] = {
|
static struct mode_table umode_table[] = {
|
||||||
{"callerid", UMODE_CALLERID },
|
{"callerid", UMODE_CALLERID },
|
||||||
|
{"softcallerid", UMODE_SCALLERID },
|
||||||
{"deaf", UMODE_DEAF },
|
{"deaf", UMODE_DEAF },
|
||||||
{"invisible", UMODE_INVISIBLE },
|
{"invisible", UMODE_INVISIBLE },
|
||||||
{"locops", UMODE_LOCOPS },
|
{"locops", UMODE_LOCOPS },
|
||||||
|
|
|
@ -73,7 +73,7 @@ int user_modes[256] = {
|
||||||
UMODE_DEAF, /* D */
|
UMODE_DEAF, /* D */
|
||||||
0, /* E */
|
0, /* E */
|
||||||
0, /* F */
|
0, /* F */
|
||||||
0, /* G */
|
UMODE_SCALLERID, /* G */
|
||||||
0, /* H */
|
0, /* H */
|
||||||
0, /* I */
|
0, /* I */
|
||||||
0, /* J */
|
0, /* J */
|
||||||
|
|
Loading…
Reference in New Issue