diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-07 11:41:47 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-07 11:41:47 +0000 |
commit | 2c0804208ad58e1c6b8644bc4abdbc5ee79323fe (patch) | |
tree | fb97b367442bddffc72fb2aa3c0c892528afb9ee /src/users.cpp | |
parent | 17bdb60205e74211452967bc0e9c34faaeb33912 (diff) |
Added ability to put command named * into a class to make it cover all
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2250 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/users.cpp b/src/users.cpp index bf7ac6230..1920e8dcd 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -167,33 +167,26 @@ bool userrec::HasPermission(char* command) // are they even an oper at all? if (strchr(this->modes,'o')) { - log(DEBUG,"*** HasPermission: %s is an oper",this->nick); for (int j =0; j < ConfValueEnum("type",&config_f); j++) { ConfValue("type","name",j,TypeName,&config_f); if (!strcmp(TypeName,this->oper)) { - log(DEBUG,"*** HasPermission: %s is an oper of type '%s'",this->nick,this->oper); ConfValue("type","classes",j,Classes,&config_f); char* myclass = strtok_r(Classes," ",&savept); while (myclass) { - log(DEBUG,"*** HasPermission: checking classtype '%s'",myclass); for (int k =0; k < ConfValueEnum("class",&config_f); k++) { ConfValue("class","name",k,ClassName,&config_f); if (!strcmp(ClassName,myclass)) { ConfValue("class","commands",k,CommandList,&config_f); - log(DEBUG,"*** HasPermission: found class named %s with commands: '%s'",ClassName,CommandList); - - mycmd = strtok_r(CommandList," ",&savept2); while (mycmd) { - if (!strcasecmp(mycmd,command)) + if ((!strcasecmp(mycmd,command)) || (*mycmd == '*')) { - log(DEBUG,"*** Command %s found, returning true",command); return true; } mycmd = strtok_r(NULL," ",&savept2); |