]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/command_parse.cpp
Replace hardcoded mode letters, part 2
[user/henk/code/inspircd.git] / src / command_parse.cpp
index 08e28557ce871f5f6c2bbc5a55bb384bbe99ff48..457934d2b1a6a480af48bf6be98160ba2688c1be 100644 (file)
@@ -108,30 +108,6 @@ bool CommandParser::LoopCall(User* user, Command* handler, const std::vector<std
        return true;
 }
 
-bool CommandParser::IsValidCommand(const std::string &commandname, unsigned int pcnt, User * user)
-{
-       Commandtable::iterator n = cmdlist.find(commandname);
-
-       if (n != cmdlist.end())
-       {
-               if ((pcnt >= n->second->min_params))
-               {
-                       if (IS_LOCAL(user) && n->second->flags_needed)
-                       {
-                               if (user->IsModeSet(n->second->flags_needed))
-                               {
-                                       return (user->HasPermission(commandname));
-                               }
-                       }
-                       else
-                       {
-                               return true;
-                       }
-               }
-       }
-       return false;
-}
-
 Command* CommandParser::GetHandler(const std::string &commandname)
 {
        Commandtable::iterator n = cmdlist.find(commandname);
@@ -435,7 +411,6 @@ void CommandParser::TranslateSingleParam(TranslateType to, const std::string& it
                        }
                        // If no custom translator was given, fall through
                }
-               case TR_END:
                case TR_TEXT:
                default:
                        /* Do nothing */