Merge pull request #322 from edk0/invite-umode-g

m_invite: Don't punch through +g
This commit is contained in:
Aaron Jones 2020-06-25 17:37:04 +00:00 committed by GitHub
commit 9d65d599c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -213,18 +213,26 @@ m_invite(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
} }
else else
{ {
/* instead of sending RPL_UMODEGMSG, sendto_one_numeric(source_p, ERR_TARGUMODEG,
* just let the invite through form_str(ERR_TARGUMODEG),
*/ target_p->name);
if((target_p->localClient->last_caller_id_time + if((target_p->localClient->last_caller_id_time +
ConfigFileEntry.caller_id_wait) >= rb_current_time()) ConfigFileEntry.caller_id_wait) < rb_current_time())
{ {
sendto_one_numeric(source_p, ERR_TARGUMODEG, sendto_one_numeric(source_p, RPL_TARGNOTIFY,
form_str(ERR_TARGUMODEG), form_str(RPL_TARGNOTIFY),
target_p->name); target_p->name);
return;
add_reply_target(target_p, source_p);
sendto_one(target_p, form_str(RPL_UMODEGMSG),
me.name, target_p->name, source_p->name,
source_p->username, source_p->host);
target_p->localClient->last_caller_id_time = rb_current_time();
} }
target_p->localClient->last_caller_id_time = rb_current_time();
return;
} }
} }