16 #include "sysdep_decls.h"
17 #include "citserver.h"
20 #include "dynloader.h"
22 extern struct CitContext *ContextList;
24 #define MODULE_NAME "Dummy test module"
25 #define MODULE_AUTHOR "Art Cancro"
26 #define MODULE_EMAIL "ajc@uncnsrd.mt-kisco.ny.us"
27 #define MAJOR_VERSION 0
28 #define MINOR_VERSION 2
30 static struct DLModule_Info info = {
38 void CleanupTest(void) {
39 lprintf(9, "--- test of adding an unload hook --- \n");
42 void NewRoomTest(void) {
43 lprintf(9, "--- test module was told we're now in %s ---\n",
47 void SessionStartTest(void) {
48 lprintf(9, "--- starting up session %d ---\n",
52 void SessionStopTest(void) {
53 lprintf(9, "--- ending session %d ---\n",
57 void LoginTest(void) {
58 lprintf(9, "--- Hello, %s ---\n", CC->curr_user);
62 void Ygorl(char *username, long usernum) {
63 if (!strcasecmp(username, "Hexslinger")) {
64 strcpy(username, "Flaming Asshole");
69 struct DLModule_Info *Dynamic_Module_Init(void)
71 CtdlRegisterCleanupHook(CleanupTest);
72 CtdlRegisterSessionHook(NewRoomTest, EVT_NEWROOM);
73 CtdlRegisterSessionHook(SessionStartTest, EVT_START);
74 CtdlRegisterSessionHook(SessionStopTest, EVT_STOP);
75 CtdlRegisterSessionHook(LoginTest, EVT_LOGIN);
76 CtdlRegisterUserHook(Ygorl, EVT_OUTPUTMSG);