summaryrefslogtreecommitdiff
path: root/modules/core
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-05-12 14:51:41 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-05-12 14:51:41 +0000
commitf12ebd1f2ac718e17c438410c332192d1360d6a3 (patch)
tree3ff48bf3a9c651e93c5df42f43e9c3dcc271a0cc /modules/core
parentdf0978f4c17d55ce78679463d9a00f4fddbd14fe (diff)
- Removed 'remote', and 'global_kill' oper flags, and added 'connect',
'squit', and 'kill' flags for better fine-tuning instead. Whether or not a specific action is allowed on a remote server can be controlled by appeding the ':remote' flag. For example: 'kill' allows only local clients to be killed, whereas 'kill:remote' allows to issue a KILL for remote clients git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2013 82007160-df01-0410-b94d-b575c5fd34c7
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);