[srvx-commits] CVS: services/src mod-snoop.c,1.13,1.14 modules.c,1.26,1.27
Brought to you by:
entrope
|
From: Entrope <en...@us...> - 2003-07-29 02:09:22
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv19534a/src
Modified Files:
mod-snoop.c modules.c
Log Message:
make modules.c truly agnostic about supported modules
Index: mod-snoop.c
===================================================================
RCS file: /cvsroot/srvx/services/src/mod-snoop.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** mod-snoop.c 22 Jul 2003 18:32:20 -0000 1.13
--- mod-snoop.c 29 Jul 2003 01:51:24 -0000 1.14
***************
*** 44,47 ****
--- 44,48 ----
} snoop_cfg;
static char timestamp[16];
+ const char *snoop_module_deps[] = { NULL };
#define SNOOP(FORMAT, ARGS...) send_channel_message(snoop_cfg.channel, snoop_cfg.bot, "%s "FORMAT, timestamp , ## ARGS)
Index: modules.c
===================================================================
RCS file: /cvsroot/srvx/services/src/modules.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** modules.c 7 Jul 2003 16:29:33 -0000 1.26
--- modules.c 29 Jul 2003 01:51:24 -0000 1.27
***************
*** 21,25 ****
#include "log.h"
#include "modules.h"
- #include "modules-list.h"
enum init_state {
--- 21,24 ----
***************
*** 37,57 ****
};
! #ifdef WITH_MODULE_SNOOP
! extern int snoop_init(void);
! const char *snoop_deps[] = { NULL };
! #endif
!
! #ifdef WITH_MODULE_SERVERSPY
! extern int serverspy_init(void);
! const char *serverspy_deps[] = { NULL };
! #endif
static struct cmodule cmodules[] = {
! #ifdef WITH_MODULE_SNOOP
! { "snoop", snoop_init, snoop_deps, UNINIT },
! #endif
! #ifdef WITH_MODULE_SERVERSPY
! { "serverspy", serverspy_init, serverspy_deps, UNINIT },
! #endif
/* Placeholder at end of array */
{ NULL, NULL, NULL, UNINIT }
--- 36,47 ----
};
! #define WITH_MODULE(x) extern int x##_init(void); extern const char *x##_module_deps[];
! #include "modules-list.h"
! #undef WITH_MODULE
static struct cmodule cmodules[] = {
! #define WITH_MODULE(x) { #x, x##_init, x##_module_deps, UNINIT },
! #include "modules-list.h"
! #undef WITH_MODULE
/* Placeholder at end of array */
{ NULL, NULL, NULL, UNINIT }
|