summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-02-14 15:13:27 -0500
committerAdam <Adam@anope.org>2012-02-14 15:13:27 -0500
commita9772cde21407c89abd161d51aff45267f87b1fb (patch)
tree9e57ba6c121d3843888917d968dd4f5d030b57cf /src/modules.cpp
parent086790d6331357022f4da17c76b26b9fc6e2ad90 (diff)
Clean up and reorganize our header files
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index c978fdf16..e34c3597d 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -9,11 +9,24 @@
* Based on the original code of Services by Andy Church.
*/
+
+#include "services.h"
#include "modules.h"
message_map MessageMap;
std::list<Module *> Modules;
+CallBack::CallBack(Module *mod, long time_from_now, time_t now, bool repeating) : Timer(time_from_now, now, repeating), m(mod)
+{
+}
+
+CallBack::~CallBack()
+{
+ std::list<CallBack *>::iterator it = std::find(m->CallBacks.begin(), m->CallBacks.end(), this);
+ if (it != m->CallBacks.end())
+ m->CallBacks.erase(it);
+}
+
/** Message constructor, adds the message to Anope
* @param n The message name
* @param f A callback function