diff options
| author | Adam <Adam@anope.org> | 2010-10-04 16:38:25 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-10-04 16:38:25 -0400 |
| commit | ab5ebc224516abfe424f2e631eed2dc314c32ab9 (patch) | |
| tree | 116b0af44cd0b3d45e3fbf9715264f4c34c9439a /include | |
| parent | cf98cd3e06e4de0f9902824b0ef8239e947c5b6a (diff) | |
Automatically destruct messages when modules are unloaded
Diffstat (limited to 'include')
| -rw-r--r-- | include/anope.h | 14 | ||||
| -rw-r--r-- | include/modules.h | 3 |
2 files changed, 3 insertions, 14 deletions
diff --git a/include/anope.h b/include/anope.h index ce206bc8e..fe46dc0ed 100644 --- a/include/anope.h +++ b/include/anope.h @@ -304,20 +304,6 @@ namespace Anope */ extern CoreExport bool Match(const Anope::string &str, const Anope::string &mask, bool case_sensitive = false); - /** Add a message to Anope - * @param name The message name as sent by the IRCd - * @param func A callback function that will be called when this message is received - * @return The new message object - */ - extern CoreExport Message *AddMessage(const string &name, bool (*func)(const string &source, const std::vector<Anope::string> ¶ms)); - - /** Deletes a message from Anope - * XXX Im not sure what will happen if this function is called indirectly from message function pointed to by this message.. must check - * @param m The message - * @return true if the message was found and deleted, else false - */ - extern CoreExport bool DelMessage(Message *m); - /** Returns a list of pointers to message handlers * @param The message name as sent by the IRCd * @return a vector with pointers to the messagehandlers (you can bind more than one handler to a message) diff --git a/include/modules.h b/include/modules.h index 6d5b5d6e9..4377975b1 100644 --- a/include/modules.h +++ b/include/modules.h @@ -1269,6 +1269,9 @@ struct Message { Anope::string name; bool (*func)(const Anope::string &source, const std::vector<Anope::string> ¶ms); + + Message(const Anope::string &n, bool (*f)(const Anope::string &, const std::vector<Anope::string> &)); + ~Message(); }; #endif // MODULES_H |
