diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hs_del.c | 12 | ||||
| -rw-r--r-- | src/core/hs_delall.c | 12 | ||||
| -rw-r--r-- | src/core/hs_set.c | 12 | ||||
| -rw-r--r-- | src/core/hs_setall.c | 12 |
4 files changed, 28 insertions, 20 deletions
diff --git a/src/core/hs_del.c b/src/core/hs_del.c index 97bb9f07d..c0d0ae40c 100644 --- a/src/core/hs_del.c +++ b/src/core/hs_del.c @@ -26,6 +26,12 @@ class CommandHSDel : public Command CommandReturn Execute(User *u, std::vector<std::string> ¶ms) { + if (!u->nc->HasPriv("hostserv/set")) + { + notice_lang(s_HostServ, u, ACCESS_DENIED); + return MOD_CONT; + } + NickAlias *na; const char *nick = params[0].c_str(); if ((na = findnick(nick))) @@ -46,9 +52,6 @@ class CommandHSDel : public Command bool OnHelp(User *u, const std::string &subcommand) { - if (!is_host_remover(u)) - return false; - notice_help(s_HostServ, u, HOST_HELP_DEL); return true; } @@ -80,8 +83,7 @@ class HSDel : public Module **/ void myHostServHelp(User *u) { - if (is_host_remover(u)) - notice_lang(s_HostServ, u, HOST_HELP_CMD_DEL); + notice_lang(s_HostServ, u, HOST_HELP_CMD_DEL); } MODULE_INIT("hs_del", HSDel) diff --git a/src/core/hs_delall.c b/src/core/hs_delall.c index 60d64639e..4de865ebe 100644 --- a/src/core/hs_delall.c +++ b/src/core/hs_delall.c @@ -26,6 +26,12 @@ class CommandHSDelAll : public Command CommandReturn Execute(User *u, std::vector<std::string> ¶ms) { + if (!u->nc->HasPriv("hostserv/set")) + { + notice_lang(s_HostServ, u, ACCESS_DENIED); + return MOD_CONT; + } + int i; const char *nick = params[0].c_str(); NickAlias *na; @@ -53,9 +59,6 @@ class CommandHSDelAll : public Command bool OnHelp(User *u, const std::string &subcommand) { - if (!is_host_remover(u)) - return false; - notice_help(s_HostServ, u, HOST_HELP_DELALL); return true; } @@ -87,8 +90,7 @@ class HSDelAll : public Module **/ void myHostServHelp(User *u) { - if (is_host_remover(u)) - notice_lang(s_HostServ, u, HOST_HELP_CMD_DELALL); + notice_lang(s_HostServ, u, HOST_HELP_CMD_DELALL); } MODULE_INIT("hs_delall", HSDelAll) diff --git a/src/core/hs_set.c b/src/core/hs_set.c index fd66ca911..a117f7540 100644 --- a/src/core/hs_set.c +++ b/src/core/hs_set.c @@ -26,6 +26,12 @@ class CommandHSSet : public Command CommandReturn Execute(User *u, std::vector<std::string> ¶ms) { + if (!u->nc->HasPriv("hostserv/set")) + { + notice_lang(s_HostServ, u, ACCESS_DENIED); + return MOD_CONT; + } + const char *nick = params[0].c_str(); const char *rawhostmask = params[1].c_str(); char *hostmask = new char[HOSTMAX]; @@ -143,9 +149,6 @@ class CommandHSSet : public Command bool OnHelp(User *u, const std::string &subcommand) { - if (!is_host_setter(u)) - return false; - notice_help(s_HostServ, u, HOST_HELP_SET); return true; } @@ -177,8 +180,7 @@ class HSSet : public Module **/ void myHostServHelp(User *u) { - if (is_host_setter(u)) - notice_lang(s_HostServ, u, HOST_HELP_CMD_SET); + notice_lang(s_HostServ, u, HOST_HELP_CMD_SET); } MODULE_INIT("hs_set", HSSet) diff --git a/src/core/hs_setall.c b/src/core/hs_setall.c index 6811bb7f3..1177ca5d8 100644 --- a/src/core/hs_setall.c +++ b/src/core/hs_setall.c @@ -27,6 +27,12 @@ class CommandHSSetAll : public Command CommandReturn Execute(User *u, std::vector<std::string> ¶ms) { + if (!u->nc->HasPriv("hostserv/set")) + { + notice_lang(s_HostServ, u, ACCESS_DENIED); + return MOD_CONT; + } + const char *nick = params[0].c_str(); const char *rawhostmask = params[1].c_str(); char *hostmask = new char[HOSTMAX]; @@ -143,9 +149,6 @@ class CommandHSSetAll : public Command bool OnHelp(User *u, const std::string &subcommand) { - if (!is_host_setter(u)) - return false; - notice_help(s_HostServ, u, HOST_HELP_SETALL); return true; } @@ -176,8 +179,7 @@ class HSSetAll : public Module **/ void myHostServHelp(User *u) { - if (is_host_setter(u)) - notice_lang(s_HostServ, u, HOST_HELP_CMD_SETALL); + notice_lang(s_HostServ, u, HOST_HELP_CMD_SETALL); } MODULE_INIT("hs_setall", HSSetAll) |
