diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-11-03 08:30:37 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-11-03 08:30:37 +0000 |
commit | 4c19dfeed86fa4f42ab062ded09a9bfa42a2e3eb (patch) | |
tree | 28b5b685701fb1b33486b474d8d25eb41dd134bb /src/command_parse.cpp | |
parent | 2abef9282f22092a5421c66cb4d30507eb91119b (diff) |
Revert special's sqloper change, nice try but only half a biscuit.
With the old fix, it would echo out all the oper failure notices first then try again, annoying all the opers.
The new version uses a CommandParser method i added, to again use OnPreCommand, halt the /oper command, but after doing the sql lookup call the original handler of the OPER command with the original user and pass, so the original handler handles the definitive failure message.
DAMNIT STOP COMMITTING
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5636 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r-- | src/command_parse.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 50ed7439b..e413bc4ac 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -281,6 +281,15 @@ bool CommandParser::IsValidCommand(const std::string &commandname, int pcnt, use return false; } +command_t* CommandParser::GetHandler(const std::string &commandname) +{ + nspace::hash_map<std::string,command_t*>::iterator n = cmdlist.find(commandname); + if (n != cmdlist.end()) + return n->second; + + return NULL; +} + // calls a handler function for a command CmdResult CommandParser::CallHandler(const std::string &commandname,const char** parameters, int pcnt, userrec *user) |