summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/core/m_kill.c18
-rw-r--r--modules/core/m_squit.c3
-rw-r--r--modules/m_connect.c8
3 files changed, 15 insertions, 14 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);
diff --git a/modules/m_connect.c b/modules/m_connect.c
index 1d27f53..775fb50 100644
--- a/modules/m_connect.c
+++ b/modules/m_connect.c
@@ -67,7 +67,7 @@ mo_connect(struct Client *client_p, struct Client *source_p,
if (parc > 3)
{
- if (!HasOFlag(source_p, OPER_FLAG_REMOTE))
+ if (!HasOFlag(source_p, OPER_FLAG_CONNECT_REMOTE))
{
sendto_one(source_p, form_str(ERR_NOPRIVS),
me.name, source_p->name, "connect");
@@ -78,6 +78,12 @@ mo_connect(struct Client *client_p, struct Client *source_p,
parc, parv) != HUNTED_ISME)
return;
}
+ else if (!HasOFlag(source_p, OPER_FLAG_CONNECT))
+ {
+ sendto_one(source_p, form_str(ERR_NOPRIVS),
+ me.name, source_p->name, "connect");
+ return;
+ }
if ((target_p = hash_find_server(parv[1])))
{