]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/listener.c
Generate the "Temporary K-line %d min" part from aconf->hold - aconf->created.
[irc/rqf/shadowircd.git] / src / listener.c
index 489aee7ec648b452ec8a2f8c25325f26cfe9e011..3b8a1fbc83d1d2bcc67514922837cd6ddbc56ce8 100644 (file)
@@ -480,6 +480,7 @@ accept_precallback(rb_fde_t *F, struct sockaddr *addr, rb_socklen_t addrlen, voi
        char buf[BUFSIZE];
        struct ConfItem *aconf;
        static time_t last_oper_notice = 0;
+       int len;
 
        if(listener->ssl && (!ssl_ok || !get_ssld_count()))
        {
@@ -519,7 +520,8 @@ accept_precallback(rb_fde_t *F, struct sockaddr *addr, rb_socklen_t addrlen, voi
                        
                if(ConfigFileEntry.dline_with_reason)
                {
-                       if (rb_snprintf(buf, sizeof(buf), "ERROR :*** Banned: %s\r\n", aconf->passwd) >= (int)(sizeof(buf)-1))
+                       len = rb_snprintf(buf, sizeof(buf), "ERROR :*** Banned: %s\r\n", get_user_ban_reason(aconf));
+                       if (len >= (int)(sizeof(buf)-1))
                        {
                                buf[sizeof(buf) - 3] = '\r';
                                buf[sizeof(buf) - 2] = '\n';