invite: remove hardcoded UMODE_REGONLYMSG code

This commit is contained in:
Ariadne Conill 2020-06-26 11:41:05 -06:00
parent 01ef07c1c8
commit 0b8910e40b

View file

@ -158,7 +158,7 @@ m_invite(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
{
if (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),
me.name, source_p->name, parv[2]);
return;
@ -200,18 +200,7 @@ m_invite(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
if(MyConnect(target_p))
{
if(!IsOper(source_p) && (IsSetCallerId(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
if(!IsOper(source_p) && (IsSetCallerId(target_p)) && !accept_message(source_p, target_p))
{
sendto_one_numeric(source_p, ERR_TARGUMODEG,
form_str(ERR_TARGUMODEG),
@ -234,7 +223,6 @@ m_invite(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
return;
}
}
hdata.chptr = chptr;
hdata.msptr = msptr;