]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_test.c
Changeover to new room structure. See ChangeLog for details.
[citadel.git] / citadel / serv_test.c
index 9eb23122c06db2596447192d017f1104a6e412a5..dc7915a599b0de295543fd38c0efd02d60e97863 100644 (file)
@@ -9,6 +9,7 @@
 #include <sys/time.h>
 #include <sys/wait.h>
 #include <string.h>
+#include <limits.h>
 #include <pthread.h>
 #include "citadel.h"
 #include "server.h"
@@ -58,6 +59,14 @@ void LoginTest(void) {
        lprintf(9, "--- Hello, %s ---\n", CC->curr_user);
        }
 
+
+void Ygorl(char *username, long usernum) {
+       if (!strcasecmp(username, "Hexslinger")) {
+               strcpy(username, "Flaming Asshole");
+               }
+       }
+
+
 struct DLModule_Info *Dynamic_Module_Init(void)
 {
    CtdlRegisterCleanupHook(CleanupTest);
@@ -65,5 +74,6 @@ struct DLModule_Info *Dynamic_Module_Init(void)
    CtdlRegisterSessionHook(SessionStartTest, EVT_START);
    CtdlRegisterSessionHook(SessionStopTest, EVT_STOP);
    CtdlRegisterSessionHook(LoginTest, EVT_LOGIN);
+   CtdlRegisterUserHook(Ygorl, EVT_OUTPUTMSG);
    return &info;
 }