Explorar o código

* cmd_newleaf now modifies USERENTRY_ADDED for .whois

svn: 521
Bryan Drewery %!s(int64=22) %!d(string=hai) anos
pai
achega
559f79205b
Modificáronse 2 ficheiros con 4 adicións e 0 borrados
  1. 1 0
      doc/UPDATES
  2. 3 0
      src/cmds.c

+ 1 - 0
doc/UPDATES

@@ -28,6 +28,7 @@ This is a summary of ChangeLog basically.
 25.Fixed a bug with .config msginvite.
 26.Added a config option for msgident.
 27.Changed bad op-cookie (TS) to LOG_DEBUG.
+28.cmd_newleaf now modifies USERENTRY_ADDED for .whois
 
 1.0.13
 1.Fixed a fatal bug in console_gotshare()

+ 3 - 0
src/cmds.c

@@ -3039,6 +3039,7 @@ static void cmd_newleaf(struct userrec *u, int idx, char *par)
     else if (strchr(BADHANDCHARS, handle[0]) != NULL)
       dprintf(idx, STR("You can't start a botnick with '%c'.\n"), handle[0]);
     else {
+      char tmp[81];
       userlist = adduser(userlist, handle, STR("none"), "-", USER_BOT | USER_OP);
       u1 = get_user_by_handle(userlist, handle);
       bi = user_malloc(sizeof(struct bot_addr));
@@ -3059,6 +3060,8 @@ static void cmd_newleaf(struct userrec *u, int idx, char *par)
         host = newsplit(&par);
       }
       /* set_user(&USERENTRY_PASS, u1, SALT2); */
+      sprintf(tmp, STR("%lu %s"), time(NULL), u->handle);
+      set_user(&USERENTRY_ADDED, u1, tmp);
       dprintf(idx, STR("Added new leaf: %s\n"), handle);
 #ifdef HUB
       write_userfile(idx);