X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/f0fbdf6c8df0f9897d8bd57ed2fe9d2a9888b35d..8a78afe43d8c11af9e1d50ef438f0f193dcd12b3:/modules/m_set.c diff --git a/modules/m_set.c b/modules/m_set.c index 0224a36..3f336c1 100644 --- a/modules/m_set.c +++ b/modules/m_set.c @@ -215,18 +215,18 @@ quote_max(struct Client *source_p, int newval) { if(newval > 0) { - if(newval > ServerInfo.max_clients) - { - sendto_one_notice(source_p, - ":You cannot set MAXCLIENTS to > max_clients (%d)", - ServerInfo.max_clients); - return; + if(newval > maxconnections - MAX_BUFFER) + { + sendto_one_notice(source_p, + ":You cannot set MAXCLIENTS to > %d", + maxconnections - MAX_BUFFER); + return; } if(newval < 32) { - sendto_one_notice(source_p, ":You cannot set MAXCLIENTS to < 32 (%d)", - GlobalSetOptions.maxclients); + sendto_one_notice(source_p, ":You cannot set MAXCLIENTS to < 32 (%d:%d)", + GlobalSetOptions.maxclients, rb_getmaxconnect()); return; }