summaryrefslogtreecommitdiff
path: root/modules/extra/m_xmlrpc_main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/extra/m_xmlrpc_main.cpp')
-rw-r--r--modules/extra/m_xmlrpc_main.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/extra/m_xmlrpc_main.cpp b/modules/extra/m_xmlrpc_main.cpp
index 90c8fdc5d..94b655ad7 100644
--- a/modules/extra/m_xmlrpc_main.cpp
+++ b/modules/extra/m_xmlrpc_main.cpp
@@ -1,6 +1,8 @@
#include "module.h"
#include "xmlrpc.h"
+static Module *me;
+
class XMLRPCIdentifyRequest : public IdentifyRequest
{
XMLRPCRequest request;
@@ -8,7 +10,7 @@ class XMLRPCIdentifyRequest : public IdentifyRequest
dynamic_reference<XMLRPCClientSocket> source;
public:
- XMLRPCIdentifyRequest(XMLRPCRequest& req, XMLRPCServiceInterface* iface, XMLRPCClientSocket* s, const Anope::string &acc, const Anope::string &pass) : IdentifyRequest(acc, pass), request(req), xinterface(iface), source(s) { }
+ XMLRPCIdentifyRequest(Module *m, XMLRPCRequest& req, XMLRPCServiceInterface* iface, XMLRPCClientSocket* s, const Anope::string &acc, const Anope::string &pass) : IdentifyRequest(m, acc, pass), request(req), xinterface(iface), source(s) { }
void OnSuccess() anope_override
{
@@ -104,7 +106,7 @@ class MyXMLRPCEvent : public XMLRPCEvent
request->reply("error", "Invalid parameters");
else
{
- XMLRPCIdentifyRequest *req = new XMLRPCIdentifyRequest(*request, iface, source, username, password);
+ XMLRPCIdentifyRequest *req = new XMLRPCIdentifyRequest(me, *request, iface, source, username, password);
FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(NULL, req));
req->Dispatch();
}
@@ -248,6 +250,8 @@ class ModuleXMLRPCMain : public Module
if (!xmlrpc)
throw ModuleException("Unable to find xmlrpc reference, is m_xmlrpc loaded?");
+ me = this;
+
xmlrpc->Register(&stats);
}