]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
commit 1df4ff0b0558e4698819f8e4ac6ecb7654b81a2c
authorJilles Tjoelker <redacted>
Sun, 25 Jan 2009 15:23:36 +0000 (16:23 +0100)
committerJilles Tjoelker <redacted>
Sun, 25 Jan 2009 15:23:36 +0000 (16:23 +0100)
Author: Stephen Bennett <redacted>
Date:   Sun Jan 18 16:30:27 2009 +0000

    Make testline show oper reason and setter information for K:lines, where applicable

modules/m_testline.c

index 215f48d9b2670ed82d3bd89fb4d7ed6f5b68c159..ee1cca669f02ca6c6945e227fb231371c26eaf74 100644 (file)
@@ -178,14 +178,19 @@ mo_testline(struct Client *client_p, struct Client *source_p, int parc, const ch
 
                if(aconf->status & CONF_KILL)
                {
+                       char *user, *host, *reason, *operreason;
+                       char reasonbuf[BUFSIZE];
+                       get_printable_kline(source_p, aconf, &host, &reason, &user, &operreason);
                        rb_snprintf(buf, sizeof(buf), "%s@%s", 
-                                       aconf->user, aconf->host);
+                                       user, host);
+                       rb_snprintf(reasonbuf, sizeof(reasonbuf), "%s%s%s", reason,
+                               operreason ? "|" : "", operreason ? operreason : "");
                        sendto_one(source_p, form_str(RPL_TESTLINE),
                                me.name, source_p->name,
                                (aconf->flags & CONF_FLAGS_TEMPORARY) ? 'k' : 'K',
                                (aconf->flags & CONF_FLAGS_TEMPORARY) ? 
                                 (long) ((aconf->hold - rb_current_time()) / 60) : 0L,
-                               buf, aconf->passwd);
+                               buf, reasonbuf);
                        return 0;
                }
        }