diff options
Diffstat (limited to 'src/commands.c')
-rw-r--r-- | src/commands.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/commands.c b/src/commands.c index 5f9c682ab..a95a9f7b2 100644 --- a/src/commands.c +++ b/src/commands.c @@ -88,6 +88,17 @@ void mod_run_cmd(char *service, User * u, CommandHash * cmdTable[], const char * // Check whether or not access string is empty } + if (!c->permission.empty()) + { + if (!u->nc->HasPriv(c->permission) && !u->nc->HasCommand(c->permission)) + { + notice_lang(service, u, ACCESS_DENIED); + alog("Access denied for user %s with service %s and command %s", u->nick, service, cmd); + return; + } + + } + std::vector<std::string> params; std::string curparam; char *s = NULL; |