From f0e4d607c9f6a9833c74f3135df26852e104ca4e Mon Sep 17 00:00:00 2001 From: Ed Kellett Date: Sat, 2 May 2020 02:26:39 +0100 Subject: [PATCH] m_invite: Don't punch through +g --- modules/m_invite.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/modules/m_invite.c b/modules/m_invite.c index ae7e6d23..08bda62f 100644 --- a/modules/m_invite.c +++ b/modules/m_invite.c @@ -213,18 +213,26 @@ m_invite(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source } else { - /* instead of sending RPL_UMODEGMSG, - * just let the invite through - */ + sendto_one_numeric(source_p, ERR_TARGUMODEG, + form_str(ERR_TARGUMODEG), + target_p->name); + 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, - form_str(ERR_TARGUMODEG), - target_p->name); - return; + sendto_one_numeric(source_p, RPL_TARGNOTIFY, + form_str(RPL_TARGNOTIFY), + target_p->name); + + 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; } }