16 #include "sysdep_decls.h"
17 #include "citserver.h"
20 #include "dynloader.h"
22 symtab *My_Symtab = NULL; /* dyn */
24 extern struct CitContext *ContextList;
26 #define MODULE_NAME "Dummy test module"
27 #define MODULE_AUTHOR "Art Cancro"
28 #define MODULE_EMAIL "ajc@uncnsrd.mt-kisco.ny.us"
29 #define MAJOR_VERSION 0
30 #define MINOR_VERSION 1
32 void CleanupTest(void) {
33 lprintf(9, "--- test of adding an unload hook --- \n");
36 void NewRoomTest(char *RoomName) {
37 lprintf(9, "--- test module was told we're now in %s ---\n", RoomName);
40 void SessionStartTest(int WhichSession) {
41 lprintf(9, "--- starting up session %d ---\n", WhichSession);
44 void SessionStopTest(int WhichSession) {
45 lprintf(9, "--- ending session %d ---\n", WhichSession);
48 void LoginTest(void) {
49 lprintf(9, "--- Hello, %s ---\n", CC->curr_user);
52 void Dynamic_Module_Init(struct DLModule_Info *info)
54 strncpy(info->module_name, MODULE_NAME, 30);
55 strncpy(info->module_author, MODULE_AUTHOR, 30);
56 strncpy(info->module_author_email, MODULE_EMAIL, 30);
57 info->major_version = MAJOR_VERSION;
58 info->minor_version = MINOR_VERSION;
60 CtdlRegisterCleanupHook(CleanupTest);
61 CtdlRegisterNewRoomHook(NewRoomTest);
62 CtdlRegisterSessionHook(SessionStartTest, 1);
63 CtdlRegisterSessionHook(SessionStopTest, 0);
64 CtdlRegisterLoginHook(LoginTest);
68 void Get_Symtab(symtab **the_symtab)
70 (*the_symtab) = My_Symtab;