Author: Ghostwolf <foxxe@wtfs.net>
[ircu2.10.12-pk.git] / ircd / whowas.c
index 48ab1035d497af62baeaa47ac5691a0f8327913b..2aa93998d2341d260c208257011dce10fbc398cc 100644 (file)
@@ -176,6 +176,8 @@ whowas_clean(struct Whowas *ww)
     MyFree(ww->username);
   if (ww->hostname)
     MyFree(ww->hostname);
+  if (ww->realhost)
+    MyFree(ww->realhost);
   if (ww->servername)
     MyFree(ww->servername);
   if (ww->realname)
@@ -218,6 +220,7 @@ whowas_init(struct Whowas *ww)
   ww->name = 0;
   ww->username = 0;
   ww->hostname = 0;
+  ww->realhost = 0;
   ww->servername = 0;
   ww->realname = 0;
   ww->away = 0;
@@ -290,6 +293,8 @@ void add_history(struct Client *cptr, int still_on)
   DupString(ww->name, cli_name(cptr));
   DupString(ww->username, cli_user(cptr)->username);
   DupString(ww->hostname, cli_user(cptr)->host);
+  if (HasHiddenHost(cptr))
+    DupString(ww->realhost, cli_user(cptr)->realhost);
   DupString(ww->servername, cli_name(cli_user(cptr)->server));
   DupString(ww->realname, cli_info(cptr));
   if (cli_user(cptr)->away)