note aide that we have a new user.
authorWilfried Göesgens <willi@citadel.org>
Tue, 14 Nov 2006 00:02:23 +0000 (00:02 +0000)
committerWilfried Göesgens <willi@citadel.org>
Tue, 14 Nov 2006 00:02:23 +0000 (00:02 +0000)
citadel/user_ops.c

index ff56484ca016121f1f2fc7bab6be967f0fd3d679..ab92c90f324db33f4aaf6e0f7eb0d2c05ca8808d 100644 (file)
@@ -47,7 +47,7 @@
 #include "config.h"
 #include "tools.h"
 #include "citserver.h"
-
+#include "genstamp.h"
 
 /*
  * makeuserkey() - convert a username into the format used as a database key
@@ -806,6 +806,8 @@ int create_user(char *newusername, int become_user)
        struct ctdlroom qrbuf;
        char username[256];
        char mailboxname[ROOMNAMELEN];
+       char buf[SIZ];
+       char nowstamp[SIZ];
        uid_t uid = (-1);
 
        safestrncpy(username, newusername, sizeof username);
@@ -889,7 +891,17 @@ int create_user(char *newusername, int become_user)
                        return (ERROR + INTERNAL_ERROR);
                }
        }
-
+       
+       datestring(nowstamp, sizeof nowstamp, time(NULL), DATESTRING_RFC822);
+       snprintf(buf, SIZ, 
+               "A new user signed in with the nick %s from (%s [%s])\n"
+               "       by %s; %s\n",
+                       username,
+                       CC->cs_host,
+                       CC->cs_addr,
+                       config.c_fqdn,
+                       nowstamp);
+       aide_message(buf, "User Creation Notice");
        lprintf(CTDL_NOTICE, "New user <%s> created\n", username);
        return (0);
 }