summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-05-24 19:34:25 +0200
committerattilamolnar <attilamolnar@hush.com>2013-06-07 01:00:10 +0200
commit78900eaa5ea5c02488b7d38b477912c2815f7faf (patch)
treed6b89437d25a5e7035981d00d319dc4f0809c86a
parent183d7a8dc01924ac69a5d160bf1b56ccccd06a4e (diff)
Remove deprecated Request cross-module communication mechanism
-rw-r--r--include/modules.h41
-rw-r--r--src/modules.cpp12
2 files changed, 0 insertions, 53 deletions
diff --git a/include/modules.h b/include/modules.h
index d04582901..5055e0b82 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -210,41 +210,6 @@ class CoreExport Version
virtual ~Version() {}
};
-/** The Request class is a unicast message directed at a given module.
- * When this class is properly instantiated it may be sent to a module
- * using the Send() method, which will call the given module's OnRequest
- * method with this class as its parameter.
- */
-class CoreExport Request : public classbase
-{
- public:
- /** This should be a null-terminated string identifying the type of request,
- * all modules should define this and use it to determine the nature of the
- * request before they attempt to cast the Request in any way.
- */
- const char* const id;
- /** This is a pointer to the sender of the message, which can be used to
- * directly trigger events, or to create a reply.
- */
- ModuleRef source;
- /** The single destination of the Request
- */
- ModuleRef dest;
-
- /** Create a new Request
- * This is for the 'new' way of defining a subclass
- * of Request and defining it in a common header,
- * passing an object of your Request subclass through
- * as a Request* and using the ID string to determine
- * what to cast it back to and the other end.
- */
- Request(Module* src, Module* dst, const char* idstr);
- /** Send the Request.
- */
- void Send();
-};
-
-
/** The Event class is a unicast message directed at all modules.
* When the class is properly instantiated it may be sent to all modules
* using the Send() method, which will trigger the OnEvent method in
@@ -1120,12 +1085,6 @@ class CoreExport Module : public classbase, public usecountbase
*/
virtual void OnEvent(Event& event);
- /** Called whenever a Request class is sent to your module by another module.
- * The value of Request::id should be used to determine the type of request.
- * @param request The Request class being received
- */
- virtual void OnRequest(Request& request);
-
/** Called whenever a password check is to be made. Replaces the old OldOperCompare API.
* The password field (from the config file) is in 'password' and is to be compared against
* 'input'. This method allows for encryption of passwords (oper, connect:allow, die/restart, etc).
diff --git a/src/modules.cpp b/src/modules.cpp
index f683f6b6c..75251ffdf 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -58,17 +58,6 @@ Version::Version(const std::string &desc, int flags, const std::string& linkdata
{
}
-Request::Request(Module* src, Module* dst, const char* idstr)
-: id(idstr), source(src), dest(dst)
-{
-}
-
-void Request::Send()
-{
- if (dest)
- dest->OnRequest(*this);
-}
-
Event::Event(Module* src, const std::string &eventid) : source(src), id(eventid) { }
void Event::Send()
@@ -132,7 +121,6 @@ ModResult Module::OnChangeLocalUserHost(LocalUser*, const std::string&) { return
ModResult Module::OnChangeLocalUserGECOS(LocalUser*, const std::string&) { return MOD_RES_PASSTHRU; }
ModResult Module::OnPreTopicChange(User*, Channel*, const std::string&) { return MOD_RES_PASSTHRU; }
void Module::OnEvent(Event&) { }
-void Module::OnRequest(Request&) { }
ModResult Module::OnPassCompare(Extensible* ex, const std::string &password, const std::string &input, const std::string& hashtype) { return MOD_RES_PASSTHRU; }
void Module::OnGlobalOper(User*) { }
void Module::OnPostConnect(User*) { }