X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/13a467bb98966810d26b6a2dd28b01820d609c27..6a52011244bb7ebfc2d9d5087f6bdcc22350048f:/modules/core/m_message.c diff --git a/modules/core/m_message.c b/modules/core/m_message.c index f855f4d..1ac0cfb 100644 --- a/modules/core/m_message.c +++ b/modules/core/m_message.c @@ -767,6 +767,7 @@ msg_client(int p_or_n, const char *command, } /* XXX Controversial? allow opers always to send through a +g */ else if(!IsServer(source_p) && (IsSetCallerId(target_p) || + (IsSetSCallerId(target_p) && !has_common_channel(source_p, target_p)) || (IsSetRegOnlyMsg(target_p) && !source_p->user->suser[0]))) { /* Here is the anti-flood bot/spambot code -db */ @@ -785,6 +786,13 @@ msg_client(int p_or_n, const char *command, form_str(ERR_NONONREG), target_p->name); } + else if (IsSetSCallerId(target_p) && !has_common_channel(source_p, target_p)) + { + if (p_or_n != NOTICE) + sendto_one_numeric(source_p, ERR_NOCOMMONCHAN, + form_str(ERR_NOCOMMONCHAN), + target_p->name); + } else { /* check for accept, flag recipient incoming message */