]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_set.c
Much clear maxconnections stuff - ported from ratbox3.
[irc/rqf/shadowircd.git] / modules / m_set.c
index 0224a369349d3373e0d8a10aac2d799b74d0c380..3f336c1edebe3af2c5f73e257a26fde265a13a5f 100644 (file)
@@ -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)\r
+               {\r
+                       sendto_one_notice(source_p,\r
+                                         ":You cannot set MAXCLIENTS to > %d",\r
+                                         maxconnections - MAX_BUFFER);\r
+                       return;\r
                }
 
                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;
                }