From 49b8a5c85f2c10b8406293e4529612db408a3bd2 Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 11 Jan 2014 21:23:56 +0000 Subject: - Fixed inconsistent ERR_NOPRIVS vs. ERR_NOPRIVILEGES mess git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2802 82007160-df01-0410-b94d-b575c5fd34c7 --- modules/core/m_kill.c | 14 ++++++++++---- modules/core/m_squit.c | 14 ++++++++++---- modules/m_connect.c | 4 ++-- modules/m_module.c | 4 ++-- 4 files changed, 24 insertions(+), 12 deletions(-) (limited to 'modules') diff --git a/modules/core/m_kill.c b/modules/core/m_kill.c index f09f8b5..49d8dcb 100644 --- a/modules/core/m_kill.c +++ b/modules/core/m_kill.c @@ -120,11 +120,17 @@ mo_kill(struct Client *client_p, struct Client *source_p, me.name, source_p->name, user, target_p->name); } - if ((!MyConnect(target_p) && !HasOFlag(source_p, OPER_FLAG_KILL_REMOTE)) || - (MyConnect(target_p) && !HasOFlag(source_p, OPER_FLAG_KILL))) + if (!MyConnect(target_p) && !HasOFlag(source_p, OPER_FLAG_KILL_REMOTE)) { - sendto_one(source_p, form_str(ERR_NOPRIVILEGES), - me.name, source_p->name); + sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, + source_p->name, "kill:remote"); + return; + } + + if (MyConnect(target_p) && !HasOFlag(source_p, OPER_FLAG_KILL)) + { + sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, + source_p->name, "kill"); return; } diff --git a/modules/core/m_squit.c b/modules/core/m_squit.c index abd795f..966a831 100644 --- a/modules/core/m_squit.c +++ b/modules/core/m_squit.c @@ -86,11 +86,17 @@ mo_squit(struct Client *client_p, struct Client *source_p, return; } - if ((!MyConnect(target_p) && !HasOFlag(source_p, OPER_FLAG_SQUIT_REMOTE)) || - (MyConnect(target_p) && !HasOFlag(source_p, OPER_FLAG_SQUIT))) + if (!MyConnect(target_p) && !HasOFlag(source_p, OPER_FLAG_SQUIT_REMOTE)) { - sendto_one(source_p, form_str(ERR_NOPRIVILEGES), - me.name, source_p->name); + sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, + source_p->name, "squit:remote"); + return; + } + + if (MyConnect(target_p) && !HasOFlag(source_p, OPER_FLAG_SQUIT)) + { + sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, + source_p->name, "squit"); return; } diff --git a/modules/m_connect.c b/modules/m_connect.c index 4f38fa7..e7ece76 100644 --- a/modules/m_connect.c +++ b/modules/m_connect.c @@ -69,8 +69,8 @@ mo_connect(struct Client *client_p, struct Client *source_p, { if (!HasOFlag(source_p, OPER_FLAG_CONNECT_REMOTE)) { - sendto_one(source_p, form_str(ERR_NOPRIVS), - me.name, source_p->name, "connect"); + sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, + source_p->name, "connect:remote"); return; } diff --git a/modules/m_module.c b/modules/m_module.c index b8ec8dd..307a873 100644 --- a/modules/m_module.c +++ b/modules/m_module.c @@ -64,8 +64,8 @@ mo_module(struct Client *client_p, struct Client *source_p, if (!HasOFlag(source_p, OPER_FLAG_MODULE)) { - sendto_one(source_p, form_str(ERR_NOPRIVILEGES), - me.name, source_p->name); + sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, + source_p->name, "module"); return; } -- cgit