Revert "invite: rework the way can_invite hook is called"
This reverts commit ed06fed70a67b0cdd4e53aad575fca7b9d046061.
This commit is contained in:
parent
ddb063e2f9
commit
e3c27d7dbd
1 changed files with 14 additions and 13 deletions
|
@ -145,6 +145,8 @@ m_invite(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (MyClient(source_p))
|
||||||
|
{
|
||||||
hdata.chptr = chptr;
|
hdata.chptr = chptr;
|
||||||
hdata.msptr = msptr;
|
hdata.msptr = msptr;
|
||||||
hdata.client = source_p;
|
hdata.client = source_p;
|
||||||
|
@ -153,8 +155,6 @@ m_invite(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
|
||||||
|
|
||||||
call_hook(can_invite_hook, &hdata);
|
call_hook(can_invite_hook, &hdata);
|
||||||
if (hdata.approved)
|
if (hdata.approved)
|
||||||
{
|
|
||||||
if (MyClient(target_p))
|
|
||||||
{
|
{
|
||||||
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);
|
||||||
|
@ -162,11 +162,12 @@ m_invite(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
|
||||||
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]);
|
||||||
|
|
||||||
|
if (MyClient(target_p))
|
||||||
add_reply_target(target_p, source_p);
|
add_reply_target(target_p, source_p);
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* store invites when they could affect the ability to join
|
/* store invites when they could affect the ability to join
|
||||||
* for +l/+j just check if the mode is set, this varies over time
|
* for +l/+j just check if the mode is set, this varies over time
|
||||||
|
|
Loading…
Add table
Reference in a new issue