]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/client.c
Generate the "Temporary K-line %d min" part from aconf->hold - aconf->created.
[irc/rqf/shadowircd.git] / src / client.c
index 816a5d2320491ee8a5f15dc0801d2e0911c1dc0c..534bec2860a2e92ad67cd83af392d5743153b354 100644 (file)
@@ -423,19 +423,10 @@ notify_banned_client(struct Client *client_p, struct ConfItem *aconf, int ban)
        static const char k_lined[] = "K-lined";
        const char *reason = NULL;
        const char *exit_reason = conn_closed;
-       char reasonbuf[BUFSIZE];
 
-       if(ConfigFileEntry.kline_with_reason && !EmptyString(aconf->passwd))
+       if(ConfigFileEntry.kline_with_reason)
        {
-               if(aconf->created)
-               {
-                       rb_snprintf(reasonbuf, sizeof reasonbuf, "%s (%s)",
-                                       aconf->passwd,
-                                       smalldate(aconf->created));
-                       reason = reasonbuf;
-               }
-               else
-                       reason = aconf->passwd;
+               reason = get_user_ban_reason(aconf);
                exit_reason = reason;
        }
        else