* move serv_info into the session, here we can control its de/allocation the right...
[citadel.git] / webcit / userlist.c
index 20450d9281d7a7b8309c669d3b6f7cccea1e9ddf..83d82e3cf10b1606367bd2c746949dac7ffe772a 100644 (file)
@@ -1,24 +1,19 @@
 /*
  * $Id$
  */
-/**
- * \defgroup AccDisplay Display a list of all accounts on a Citadel system.
- * \ingroup CitadelConfig
- */
 
-/*@{*/
 #include "webcit.h"
 
-/** 
- * \brief structure to keep namelists in
+/* 
+ * structure to keep namelists in
  */
 struct namelist {
        struct namelist *next; /**< next item of the linked list */
        char name[32];         /**< name of the userentry */
 };
 
-/**
- * \brief display the userlist
+/*
+ * display the userlist
  */
 void userlist(void)
 {
@@ -44,7 +39,7 @@ void userlist(void)
        output_headers(1, 1, 2, 0, 0, 0);
        wprintf("<div id=\"banner\">\n");
        wprintf("<h1>");
-       snprintf(title, sizeof title, _("User list for %s"), serv_info.serv_humannode);
+       snprintf(title, sizeof title, _("User list for %s"), ChrPtr(WC->serv_info->serv_humannode));
        escputs(title);
        wprintf("</h1>");
         wprintf("</div>");
@@ -109,8 +104,8 @@ DONE:       wDumpContent(1);
 }
 
 
-/**
- * \brief Display (non confidential) information about a particular user
+/*
+ * Display (non confidential) information about a particular user
  */
 void showuser(void)
 {
@@ -170,5 +165,10 @@ void showuser(void)
        wDumpContent(1);
 }
 
-
-/*@}*/
+void 
+InitModule_USERLIST
+(void)
+{
+       WebcitAddUrlHandler(HKEY("userlist"), userlist, 0);
+       WebcitAddUrlHandler(HKEY("showuser"), showuser, 0);
+}