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