From a66dbced567edb7943246a53902abc30e5ff4a83 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Wed, 23 Apr 2008 18:32:46 +0200 Subject: [PATCH] Require remoteban privilege to send dline/undline to other servers. --- modules/m_dline.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/m_dline.c b/modules/m_dline.c index f7f0945..ef7c1cd 100644 --- a/modules/m_dline.c +++ b/modules/m_dline.c @@ -100,6 +100,13 @@ mo_dline(struct Client *client_p, struct Client *source_p, if(parc >= loc+2 && !irccmp(parv[loc], "ON")) { + if(!IsOperRemoteBan(source_p)) + { + sendto_one(source_p, form_str(ERR_NOPRIVS), + me.name, source_p->name, "remoteban"); + return 0; + } + target_server = parv[loc+1]; loc += 2; } @@ -145,6 +152,13 @@ mo_undline(struct Client *client_p, struct Client *source_p, int parc, const cha if(parc >= 4 && !irccmp(parv[2], "ON")) { + if(!IsOperRemoteBan(source_p)) + { + sendto_one(source_p, form_str(ERR_NOPRIVS), + me.name, source_p->name, "remoteban"); + return 0; + } + target_server = parv[3]; sendto_match_servs(source_p, target_server, CAP_ENCAP, NOCAPS,