summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-03 04:02:29 +0000
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-03 04:02:29 +0000
commit2abef9282f22092a5421c66cb4d30507eb91119b (patch)
tree17de11da64c35d4f627f2bb997176d1200b4f31c /src/modules
parentf1dbe14881f19e46de86dcfd7f3c32146a51c563 (diff)
Switched m_sqloper to use OnPostCommand instead of OnPreCommand, meaning the config tags are checked before MySQL
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5635 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_sqloper.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp
index 774dbce25..0771ab30a 100644
--- a/src/modules/extra/m_sqloper.cpp
+++ b/src/modules/extra/m_sqloper.cpp
@@ -62,23 +62,15 @@ public:
void Implements(char* List)
{
- List[I_OnRequest] = List[I_OnRehash] = List[I_OnPreCommand] = 1;
+ List[I_OnRequest] = List[I_OnRehash] = List[I_OnPostCommand] = 1;
}
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line)
+ virtual void OnPostCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, CmdResult result, const std::string &original_line)
{
- if (validated && (command == "OPER"))
+ if ((result == CMD_FAILURE) && (command == "OPER"))
{
- if (LookupOper(user, parameters[0], parameters[1]))
- {
- /* Returning true here just means the query is in progress, or on it's way to being
- * in progress. Nothing about the /oper actually being successful..
- */
- return 1;
- }
+ LookupOper(user, parameters[0], parameters[1]);
}
-
- return 0;
}
bool LookupOper(userrec* user, const std::string &username, const std::string &password)