summaryrefslogtreecommitdiff
path: root/src/modules.cpp
blob: 453a89a1a719dc10ac4d61a7eaa0e877f1ad9115 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* Modular support
 *
 * (C) 2003-2012 Anope Team
 * Contact us at team@anope.org
 *
 * Please read COPYING and README for further details.
 *
 * Based on the original code of Epona by Lara.
 * Based on the original code of Services by Andy Church.
 */


#include "services.h"
#include "modules.h"

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);
}