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 ++++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) (limited to 'modules/core') 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; } -- cgit