From 0770c9936ef1fc404f04fb4004adc8546abeba7a Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sat, 3 Jul 2010 00:44:55 -0500 Subject: [PATCH] Stop griefing through taunting while hiding behind CALLERID. This shouldn't provide any way for a client to get on a CALLERID list without authorization, as if a client is +g already, a CTCP request, for example, won't be replied to. --- modules/core/m_message.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/core/m_message.c b/modules/core/m_message.c index faca8137..e2dd4de6 100644 --- a/modules/core/m_message.c +++ b/modules/core/m_message.c @@ -726,6 +726,17 @@ msg_client(int p_or_n, const char *command, sendto_one_numeric(source_p, RPL_AWAY, form_str(RPL_AWAY), target_p->name, target_p->user->away); + /* + * XXX: Controversial? Allow target users to send replies through a +g. + * Rationale is that people can presently use +g as a way to taunt users, + * e.g. harass them and hide behind +g as a way of griefing. --nenolod + */ + if(MyClient(source_p) && IsSetCallerId(source_p) && !accept_message(target_p, source_p)) + { + rb_dlinkAddAlloc(target_p, &source_p->localClient->allow_list); + rb_dlinkAddAlloc(source_p, &target_p->on_allow_list); + } + if(MyClient(target_p)) { /* XXX Controversial? allow opers always to send through a +g */