Fix up +G and make it actually work.
This commit is contained in:
parent
c279d43b75
commit
12cbce8059
|
@ -767,7 +767,7 @@ msg_client(int p_or_n, const char *command,
|
||||||
}
|
}
|
||||||
/* XXX Controversial? allow opers always to send through a +g */
|
/* XXX Controversial? allow opers always to send through a +g */
|
||||||
else if(!IsServer(source_p) && (IsSetCallerId(target_p) ||
|
else if(!IsServer(source_p) && (IsSetCallerId(target_p) ||
|
||||||
(IsSetRegOnlyMsg(target_p) && !source_p->user->suser[0])))
|
(IsSetSCallerId(target_p) || (IsSetRegOnlyMsg(target_p) && !source_p->user->suser[0]))))
|
||||||
{
|
{
|
||||||
/* Here is the anti-flood bot/spambot code -db */
|
/* Here is the anti-flood bot/spambot code -db */
|
||||||
if(accept_message(source_p, target_p) || IsOper(source_p))
|
if(accept_message(source_p, target_p) || IsOper(source_p))
|
||||||
|
@ -779,21 +779,24 @@ msg_client(int p_or_n, const char *command,
|
||||||
source_p->host, command, target_p->name, text);
|
source_p->host, command, target_p->name, text);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (IsSetRegOnlyMsg(target_p) && !source_p->user->suser[0])
|
if (!IsSetCallerId(target_p))
|
||||||
{
|
{
|
||||||
if (p_or_n != NOTICE)
|
if (IsSetRegOnlyMsg(target_p) && !source_p->user->suser[0])
|
||||||
sendto_one_numeric(source_p, ERR_NONONREG,
|
{
|
||||||
form_str(ERR_NONONREG),
|
if (p_or_n != NOTICE)
|
||||||
target_p->name);
|
sendto_one_numeric(source_p, ERR_NONONREG,
|
||||||
return;
|
form_str(ERR_NONONREG),
|
||||||
}
|
target_p->name);
|
||||||
if (IsSetSCallerId(target_p) && !source_p->user->suser[0])
|
return;
|
||||||
{
|
}
|
||||||
if (p_or_n != NOTICE)
|
if (IsSetSCallerId(target_p)&& !has_common_channel(source_p, target_p))
|
||||||
sendto_one_numeric(source_p, ERR_NOCOMMONCHAN,
|
{
|
||||||
form_str(ERR_NOCOMMONCHAN),
|
if (p_or_n != NOTICE)
|
||||||
target_p->name);
|
sendto_one_numeric(source_p, ERR_NOCOMMONCHAN,
|
||||||
return;
|
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)
|
||||||
|
|
Loading…
Reference in New Issue