From 4c19dfeed86fa4f42ab062ded09a9bfa42a2e3eb Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 3 Nov 2006 08:30:37 +0000 Subject: 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 --- src/command_parse.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/command_parse.cpp') 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::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) -- cgit v1.3.1-10-gc9f91