summaryrefslogtreecommitdiff
path: root/src/modules.c
diff options
context:
space:
mode:
authorrob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-07-13 09:51:57 +0000
committerrob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-07-13 09:51:57 +0000
commit18c0fe03fc7688a739ac7cb69717cabe23df872b (patch)
tree7b5714c448525f27b6ccdb36a4af923f2a2b437b /src/modules.c
parent9389fcfc68f7a1560a955d60e7505d7e75d5d81e (diff)
BUILD : 1.7.14 (1086) BUGS : N/A NOTES : Applied gds socket buffering patch, we should play nice with inspircd now.
git-svn-id: svn://svn.anope.org/anope/trunk@1086 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@810 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modules.c')
-rw-r--r--src/modules.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/modules.c b/src/modules.c
index 2f42654da..ba93f317e 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -1718,21 +1718,17 @@ int moduleAddCallback(char *name, time_t when,
void moduleCallBackRun(void)
{
ModuleCallBack *tmp;
- if (!moduleCallBackHead) {
- return;
- }
- tmp = moduleCallBackHead;
- if (tmp->when <= time(NULL)) {
- if (debug)
- alog("debug: executing callback: %s", tmp->name ? tmp->name : "?");
- if (tmp->func) {
- mod_current_module_name = tmp->owner_name;
- tmp->func(tmp->argc, tmp->argv);
- mod_current_module = NULL;
- moduleCallBackDeleteEntry(NULL); /* delete the head */
- }
- }
- return;
+
+ while ((tmp = moduleCallBackHead) && (tmp->when <= time(NULL))) {
+ if (debug)
+ alog("debug: executing callback: %s", tmp->name ? tmp->name : "<unknown>");
+ if (tmp->func) {
+ mod_current_module_name = tmp->owner_name;
+ tmp->func(tmp->argc, tmp->argv);
+ mod_current_module = NULL;
+ moduleCallBackDeleteEntry(NULL);
+ }
+ }
}
/**