X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/6d70eae633e36eca8e3eed399ac97588517ad8e4..157c1f04bd3b04cbdcef5efb3cb280d0e10f1e7f:/src/listener.c diff --git a/src/listener.c b/src/listener.c index 489aee7..3b8a1fb 100644 --- a/src/listener.c +++ b/src/listener.c @@ -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';