summaryrefslogtreecommitdiff
path: root/modules/core
diff options
context:
space:
mode:
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;
}