invite: remove hardcoded UMODE_REGONLYMSG code
This commit is contained in:
parent
01ef07c1c8
commit
0b8910e40b
1 changed files with 19 additions and 31 deletions
|
@ -158,7 +158,7 @@ m_invite(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
|
||||||
{
|
{
|
||||||
if (hdata.error)
|
if (hdata.error)
|
||||||
sendto_one_numeric(source_p, hdata.approved, "%s", hdata.error);
|
sendto_one_numeric(source_p, hdata.approved, "%s", hdata.error);
|
||||||
else
|
else if (hdata.approved == ERR_CHANOPRIVSNEEDED)
|
||||||
sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
|
sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
|
||||||
me.name, source_p->name, parv[2]);
|
me.name, source_p->name, parv[2]);
|
||||||
return;
|
return;
|
||||||
|
@ -200,18 +200,7 @@ m_invite(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
|
||||||
|
|
||||||
if(MyConnect(target_p))
|
if(MyConnect(target_p))
|
||||||
{
|
{
|
||||||
if(!IsOper(source_p) && (IsSetCallerId(target_p) ||
|
if(!IsOper(source_p) && (IsSetCallerId(target_p)) && !accept_message(source_p, target_p))
|
||||||
(IsSetRegOnlyMsg(target_p) && !source_p->user->suser[0])) &&
|
|
||||||
!accept_message(source_p, target_p))
|
|
||||||
{
|
|
||||||
if (IsSetRegOnlyMsg(target_p) && !source_p->user->suser[0])
|
|
||||||
{
|
|
||||||
sendto_one_numeric(source_p, ERR_NONONREG,
|
|
||||||
form_str(ERR_NONONREG),
|
|
||||||
target_p->name);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
sendto_one_numeric(source_p, ERR_TARGUMODEG,
|
sendto_one_numeric(source_p, ERR_TARGUMODEG,
|
||||||
form_str(ERR_TARGUMODEG),
|
form_str(ERR_TARGUMODEG),
|
||||||
|
@ -234,7 +223,6 @@ m_invite(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
hdata.chptr = chptr;
|
hdata.chptr = chptr;
|
||||||
hdata.msptr = msptr;
|
hdata.msptr = msptr;
|
||||||
|
|
Loading…
Reference in a new issue