diff options
| author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-06-10 22:29:59 +0000 |
|---|---|---|
| committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-06-10 22:29:59 +0000 |
| commit | 695644d0c479228feb92e2cd9501d15819778c24 (patch) | |
| tree | ec3389db1a9fa7a957618d1a02765a4df3c79aa0 /include | |
| parent | c8c89c7af098ad8825309dea4e118413b368a1d6 (diff) | |
New timer infrastructure, can be used inside modules. Replaces old ENFORCE/COLLIDE/inhabit timers, too. Patch by Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2317 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include')
| -rw-r--r-- | include/Makefile | 2 | ||||
| -rw-r--r-- | include/extern.h | 1 | ||||
| -rw-r--r-- | include/pseudo.h | 2 | ||||
| -rw-r--r-- | include/timeout.h | 45 |
4 files changed, 2 insertions, 48 deletions
diff --git a/include/Makefile b/include/Makefile index d4d8f5952..50efb6646 100644 --- a/include/Makefile +++ b/include/Makefile @@ -10,7 +10,7 @@ services.h: sysconf.h config.h extern.h extern.h: slist.h touch $@ -pseudo.h: commands.h timeout.h encrypt.h datafiles.h slist.h +pseudo.h: commands.h timers.h encrypt.h datafiles.h slist.h touch $@ clean: diff --git a/include/extern.h b/include/extern.h index 5dc597b4a..0ed14d8e7 100644 --- a/include/extern.h +++ b/include/extern.h @@ -726,7 +726,6 @@ E int delnick(NickAlias * na); E NickAlias *findnick(const char *nick); E NickAlias *findnick(const std::string &nick); E NickCore *findcore(const char *nick); -E void clean_ns_timeouts(NickAlias * na); E int is_on_access(User * u, NickCore * nc); /**** operserv.c ****/ diff --git a/include/pseudo.h b/include/pseudo.h index aa3054ba8..f63a5b645 100644 --- a/include/pseudo.h +++ b/include/pseudo.h @@ -14,7 +14,7 @@ #include "commands.h" #include "language.h" -#include "timeout.h" +#include "timers.h" #include "encrypt.h" #include "datafiles.h" #include "slist.h" diff --git a/include/timeout.h b/include/timeout.h index 71b26de10..e69de29bb 100644 --- a/include/timeout.h +++ b/include/timeout.h @@ -1,45 +0,0 @@ -/* Time-delay routine include stuff. - * - * (C) 2003-2009 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for furhter details. - * - * Based on the original code of Epona by Lara. - * Based on the original code of Services by Andy Church. - * - * $Id$ - * - */ - -#ifndef TIMEOUT_H -#define TIMEOUT_H - -#include <time.h> - - -/* Definitions for timeouts: */ -typedef struct timeout_ Timeout; -struct timeout_ { - Timeout *next, *prev; - time_t settime, timeout; - int repeat; /* Does this timeout repeat indefinitely? */ - void (*code)(Timeout *); /* This structure is passed to the code */ - void *data; /* Can be anything */ -}; - - -/* Check the timeout list for any pending actions. */ -extern void check_timeouts(); - -/* Add a timeout to the list to be triggered in `delay' seconds. Any - * timeout added from within a timeout routine will not be checked during - * that run through the timeout list. - */ -extern Timeout *add_timeout(int delay, void (*code)(Timeout *), int repeat); - -/* Remove a timeout from the list (if it's there). */ -extern void del_timeout(Timeout *t); - - -#endif /* TIMEOUT_H */ |
