X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2Fmodules.c;h=0de4505ea9df74c1474f0c7ce95298e0360d59fc;hp=ba3562abe1209129b54a08e8edcf7042ac04580b;hb=4812835346f724fcea86e78f741cc6c72c86b676;hpb=d80ff9e6b878be4f29854f4fe99f59efeb5e6e10 diff --git a/src/modules.c b/src/modules.c index ba3562a..0de4505 100644 --- a/src/modules.c +++ b/src/modules.c @@ -1,4 +1,4 @@ -/* modules.c - NeonServ v5.5 +/* modules.c - NeonServ v5.6 * Copyright (C) 2011-2012 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify @@ -48,6 +48,8 @@ /* 190 */ /* UserNode.h */ /* 191-193 */ #include "ModuleFunctions.h" /* 194 */ /* bots.h */ +/* 195-196 */ /* version.h */ +/* 197-198 */ /* IRCEvents.h */ #define Function void * @@ -89,7 +91,7 @@ void *global_functions[] = { /* 030 */ (Function) create_socket, /* 031 */ (Function) connect_socket, /* 032 */ (Function) close_socket, -/* 033 */ (Function) disconnect_socket, +/* 033 */ (Function) destroy_socket, /* 034 */ (Function) write_socket, /* 035 */ (Function) putsock, /* 036 */ (Function) getBots, @@ -113,8 +115,8 @@ void *global_functions[] = { /* 054 */ (Function) unbind_nick, /* 055 */ (Function) bind_part, /* 056 */ (Function) unbind_part, -/* 057 */ (Function) NULL, /* deprecated */ -/* 058 */ (Function) NULL, /* deprecated */ +/* 057 */ (Function) bind_reload, +/* 058 */ (Function) unbind_reload, /* 059 */ (Function) bind_kick, /* 060 */ (Function) unbind_kick, /* 061 */ (Function) bind_topic, @@ -257,7 +259,11 @@ void *global_functions[] = { /* 191 */ (Function) module_global_cmd_register_neonbackup, /* 192 */ (Function) module_global_cmd_unregister_neonbackup, /* 193 */ (Function) module_neonbackup_recover_chan, -/* 194 */ (Function) requestInvite +/* 194 */ (Function) requestInvite, +/* 195 */ (Function) is_stable_revision, +/* 196 */ (Function) get_dev_revision, +/* 197 */ (Function) bind_freeclient, +/* 198 */ (Function) unbind_freeclient }; static int module_id_counter = 1; @@ -308,7 +314,6 @@ struct ModuleInfo *loadModule(char *name) { } void* initfunc = dlsym(module, "init_module"); void* startfunc = dlsym(module, "start_module"); - void* loopfunc = dlsym(module, "loop_module"); void* stopfunc = dlsym(module, "stop_module"); void* modversion = dlsym(module, "modversion"); #else @@ -320,11 +325,10 @@ struct ModuleInfo *loadModule(char *name) { } FARPROC initfunc = GetProcAddress(module, "init_module"); FARPROC startfunc = GetProcAddress(module, "start_module"); - FARPROC loopfunc = GetProcAddress(module, "loop_module"); FARPROC stopfunc = GetProcAddress(module, "stop_module"); FARPROC modversion = GetProcAddress(module, "modversion"); #endif - if(!startfunc || !loopfunc || !stopfunc || !modversion) { + if(!startfunc || !stopfunc || !modversion) { putlog(LOGLEVEL_ERROR, "Error loading module '%s': required symbols not found.\n", name); return NULL; } @@ -349,7 +353,6 @@ struct ModuleInfo *loadModule(char *name) { modinfo->module_id = module_id; modinfo->module = module; modinfo->startfunc = startfunc; - modinfo->loopfunc = loopfunc; modinfo->stopfunc = stopfunc; modinfo->state = 0; modinfo->next = modules; @@ -451,13 +454,6 @@ void start_modules() { } } -void loop_modules() { - struct ModuleInfo *modinfo; - for(modinfo = modules; modinfo; modinfo = modinfo->next) { - ((void (*)(void)) modinfo->loopfunc)(); - } -} - void stop_modules() { struct ModuleInfo *modinfo, *next; for(modinfo = modules; modinfo; modinfo = next) {