diff options
-rw-r--r-- | modules/core/m_kill.c | 14 | ||||
-rw-r--r-- | modules/core/m_squit.c | 14 | ||||
-rw-r--r-- | modules/m_connect.c | 4 | ||||
-rw-r--r-- | modules/m_module.c | 4 |
4 files changed, 24 insertions, 12 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; } diff --git a/modules/m_connect.c b/modules/m_connect.c index 4f38fa7..e7ece76 100644 --- a/modules/m_connect.c +++ b/modules/m_connect.c @@ -69,8 +69,8 @@ mo_connect(struct Client *client_p, struct Client *source_p, { if (!HasOFlag(source_p, OPER_FLAG_CONNECT_REMOTE)) { - sendto_one(source_p, form_str(ERR_NOPRIVS), - me.name, source_p->name, "connect"); + sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, + source_p->name, "connect:remote"); return; } diff --git a/modules/m_module.c b/modules/m_module.c index b8ec8dd..307a873 100644 --- a/modules/m_module.c +++ b/modules/m_module.c @@ -64,8 +64,8 @@ mo_module(struct Client *client_p, struct Client *source_p, if (!HasOFlag(source_p, OPER_FLAG_MODULE)) { - 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, "module"); return; } |