message: run privmsg_user hook on both source and target

This commit is contained in:
Ariadne Conill 2020-07-09 16:04:56 -06:00
parent 4abf8eb2e6
commit 92f5320e1d

View file

@ -765,8 +765,6 @@ msg_client(enum message_type msgtype,
sendto_one_numeric(source_p, RPL_AWAY, form_str(RPL_AWAY), sendto_one_numeric(source_p, RPL_AWAY, form_str(RPL_AWAY),
target_p->name, target_p->user->away); target_p->name, target_p->user->away);
if(MyClient(target_p))
{
hdata.msgtype = msgtype; hdata.msgtype = msgtype;
hdata.source_p = source_p; hdata.source_p = source_p;
hdata.target_p = target_p; hdata.target_p = target_p;
@ -781,6 +779,8 @@ msg_client(enum message_type msgtype,
if (hdata.approved != 0) if (hdata.approved != 0)
return; return;
if(MyClient(target_p))
{
if (EmptyString(text)) if (EmptyString(text))
{ {
/* could be empty after colour stripping and /* could be empty after colour stripping and