diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-30 14:40:20 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-30 14:40:20 +0000 |
commit | 9f40c69ca062be39abecc06870824332da558c25 (patch) | |
tree | 4b8647ed7d5bdd16b8977c76bb2b2afb86e10b19 /src/inspircd.cpp | |
parent | 2977a23070faaddc9972b2ce6f22452be471b12e (diff) |
Added oper classes and types (done through the planned privilage system on a per-command basis)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@756 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 6a8b85348..f313c64c7 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -2739,6 +2739,13 @@ void process_command(userrec *user, char* cmd) cmd_found = 1; return; } + if ((cmdlist[i].flags_needed) && (!user->HasPermission(command))) + { + log(DEBUG,"process_command: permission denied: %s %s",user->nick,command); + WriteServ(user->fd,"481 %s :Permission Denied- Oper type %s does not have access to command %s",user->nick,user->oper,command); + cmd_found = 1; + return; + } /* if the command isnt USER, PASS, or NICK, and nick is empty, * deny command! */ if ((strncmp(command,"USER",4)) && (strncmp(command,"NICK",4)) && (strncmp(command,"PASS",4))) |