]> jfr.im git - solanum.git/blobdiff - modules/m_whowas.c
Implement operspy for /LIST.
[solanum.git] / modules / m_whowas.c
index 807f84a5d511f44364bd076a247b8a99d355f51e..336a6af4a3a3df36187c38750a0e46205097f193 100644 (file)
@@ -29,7 +29,7 @@
 #include "client.h"
 #include "common.h"
 #include "hash.h"
-#include "irc_string.h"
+#include "match.h"
 #include "ircd.h"
 #include "ircd_defs.h"
 #include "numeric.h"
@@ -53,7 +53,6 @@ DECLARE_MODULE_AV1(whowas, NULL, NULL, whowas_clist, NULL, NULL, "$Revision: 171
 
 /*
 ** m_whowas
-**      parv[0] = sender prefix
 **      parv[1] = nickname queried
 */
 static int
@@ -64,6 +63,7 @@ m_whowas(struct Client *client_p, struct Client *source_p, int parc, const char
        int max = -1, found = 0;
        char *p;
        const char *nick;
+       char tbuf[26];
 
        static time_t last_used = 0L;
 
@@ -115,10 +115,14 @@ m_whowas(struct Client *client_p, struct Client *source_p, int parc, const char
                                                   form_str(RPL_WHOISACTUALLY),
                                                   temp->name, temp->sockhost);
 #endif
+                       if (!EmptyString(temp->suser))
+                               sendto_one_numeric(source_p, RPL_WHOISLOGGEDIN,
+                                                  "%s %s :was logged in as",
+                                                  temp->name, temp->suser);
                        sendto_one_numeric(source_p, RPL_WHOISSERVER,
                                           form_str(RPL_WHOISSERVER),
                                           temp->name, temp->servername,
-                                          myctime(temp->logoff));
+                                          rb_ctime(temp->logoff, tbuf, sizeof(tbuf)));
                        cur++;
                        found++;
                }