summaryrefslogtreecommitdiff
path: root/modules/core
diff options
context:
space:
mode:
Diffstat (limited to 'modules/core')
-rw-r--r--modules/core/m_kill.c18
-rw-r--r--modules/core/m_squit.c3
2 files changed, 8 insertions, 13 deletions
diff --git a/modules/core/m_kill.c b/modules/core/m_kill.c
index 434c906..5fb5297 100644
--- a/modules/core/m_kill.c
+++ b/modules/core/m_kill.c
@@ -92,13 +92,6 @@ mo_kill(struct Client *client_p, struct Client *source_p,
return;
}
- if (!HasOFlag(source_p, OPER_FLAG_GLOBAL_KILL|OPER_FLAG_K))
- {
- sendto_one(source_p, form_str(ERR_NOPRIVILEGES),
- me.name, source_p->name);
- return;
- }
-
if (!EmptyString(reason))
{
if (strlen(reason) > (size_t)KILLLEN)
@@ -127,17 +120,18 @@ mo_kill(struct Client *client_p, struct Client *source_p,
me.name, source_p->name, user, target_p->name);
}
- if (IsServer(target_p) || IsMe(target_p))
+ if ((!MyConnect(target_p) && !HasOFlag(source_p, OPER_FLAG_KILL_REMOTE)) ||
+ (MyConnect(target_p) && !HasOFlag(source_p, OPER_FLAG_KILL)))
{
- sendto_one(source_p, form_str(ERR_CANTKILLSERVER),
+ sendto_one(source_p, form_str(ERR_NOPRIVILEGES),
me.name, source_p->name);
return;
}
- if (!MyConnect(target_p) && !HasOFlag(source_p, OPER_FLAG_GLOBAL_KILL))
+ if (IsServer(target_p) || IsMe(target_p))
{
- sendto_one(source_p, ":%s NOTICE %s :Nick %s isnt on your server",
- me.name, source_p->name, target_p->name);
+ sendto_one(source_p, form_str(ERR_CANTKILLSERVER),
+ me.name, source_p->name);
return;
}
diff --git a/modules/core/m_squit.c b/modules/core/m_squit.c
index 6fef291..abd795f 100644
--- a/modules/core/m_squit.c
+++ b/modules/core/m_squit.c
@@ -86,7 +86,8 @@ mo_squit(struct Client *client_p, struct Client *source_p,
return;
}
- if (!MyConnect(target_p) && !HasOFlag(source_p, OPER_FLAG_REMOTE))
+ if ((!MyConnect(target_p) && !HasOFlag(source_p, OPER_FLAG_SQUIT_REMOTE)) ||
+ (MyConnect(target_p) && !HasOFlag(source_p, OPER_FLAG_SQUIT)))
{
sendto_one(source_p, form_str(ERR_NOPRIVILEGES),
me.name, source_p->name);