summaryrefslogtreecommitdiff
path: root/modules/core
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-01-11 21:23:56 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-01-11 21:23:56 +0000
commit49b8a5c85f2c10b8406293e4529612db408a3bd2 (patch)
treedfeabb201012a8feb85ea9ff97dce5286b885f6c /modules/core
parent0ef5ae6d09ff4c2a341f59ac3fed25ffe413b89e (diff)
- 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
Diffstat (limited to 'modules/core')
-rw-r--r--modules/core/m_kill.c14
-rw-r--r--modules/core/m_squit.c14
2 files changed, 20 insertions, 8 deletions
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;
}