]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/whowas.c
dlink -> rb_dlink
[irc/rqf/shadowircd.git] / src / whowas.c
index d72cea15e2a6430eb96d0c92ebcd6f00bc210292..cd615c12b650eeb931ba651937c3503f400bcf88 100644 (file)
@@ -87,7 +87,7 @@ void add_history(struct Client *client_p, int online)
        else
                who->sockhost[0] = '\0';
 
-       who->servername = find_or_add(client_p->servptr->name);
+       who->servername = scache_get_name(client_p->servptr->serv->nameinfo);
 
        if(online)
        {
@@ -135,23 +135,8 @@ struct Client *get_history(const char *nick, time_t timelimit)
 
 void count_whowas_memory(size_t * wwu, size_t * wwum)
 {
-       struct Whowas *tmp;
-       int i;
-       size_t u = 0;
-       size_t um = 0;
-
-       /* count the number of used whowas structs in 'u' */
-       /* count up the memory used of whowas structs in um */
-
-       for (i = 0, tmp = &WHOWAS[0]; i < NICKNAMEHISTORYLENGTH; i++, tmp++)
-               if(tmp->hashv != -1)
-               {
-                       u++;
-                       um += sizeof(struct Whowas);
-               }
-       *wwu = u;
-       *wwum = um;
-       return;
+       *wwu = NICKNAMEHISTORYLENGTH;
+       *wwum = NICKNAMEHISTORYLENGTH * sizeof(struct Whowas);
 }
 
 void