19 #include "sysdep_decls.h"
20 #include "citserver.h"
23 #include "dynloader.h"
29 extern struct CitContext *ContextList;
31 #define MODULE_NAME "Dummy test module"
32 #define MODULE_AUTHOR "Art Cancro"
33 #define MODULE_EMAIL "ajc@uncnsrd.mt-kisco.ny.us"
34 #define MAJOR_VERSION 0
35 #define MINOR_VERSION 4
37 static struct DLModule_Info info = {
45 void CleanupTest(void) {
46 lprintf(9, "--- test of adding an unload hook --- \n");
49 void NewRoomTest(void) {
50 lprintf(9, "--- test module was told we're now in %s ---\n",
54 void SessionStartTest(void) {
55 lprintf(9, "--- starting up session %d ---\n",
59 void SessionStopTest(void) {
60 lprintf(9, "--- ending session %d ---\n",
64 void LoginTest(void) {
65 lprintf(9, "--- Hello, %s ---\n", CC->curr_user);
69 void Ygorl(char *username, long usernum) {
70 if (!strcasecmp(username, "Unsuspecting User")) {
71 strcpy(username, "Flaming Asshole");
75 void LogTest(char *buf) {
76 fprintf(stderr,"%c[1m%s%c[0m", 27, buf, 27);
81 struct DLModule_Info *Dynamic_Module_Init(void)
83 CtdlRegisterCleanupHook(CleanupTest);
84 CtdlRegisterSessionHook(NewRoomTest, EVT_NEWROOM);
85 CtdlRegisterSessionHook(SessionStartTest, EVT_START);
86 CtdlRegisterSessionHook(SessionStopTest, EVT_STOP);
87 CtdlRegisterSessionHook(LoginTest, EVT_LOGIN);
88 CtdlRegisterUserHook(Ygorl, EVT_OUTPUTMSG);
89 CtdlRegisterLogHook(LogTest, 1);