]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
[svn] Don't allow /quote set max higher than the
authorjilles <redacted>
Thu, 5 Apr 2007 00:33:52 +0000 (17:33 -0700)
committerjilles <redacted>
Thu, 5 Apr 2007 00:33:52 +0000 (17:33 -0700)
serverinfo::max_clients ircd.conf value.

ChangeLog
include/serno.h
modules/m_set.c

index 690082cf48ed88c7623c538da1cf46078e587f83..ef5e0ad253ecfbea1a6065cc7c2e21760da5ee58 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+jilles      2007/04/05 00:24:47 UTC    (20070405-3392)
+  Log:
+  Change code that checks maxclients limit: allow exactly
+  the configured amount of non-exceed_limit clients.
+  Code that appeared to limit exceed_limit clients too
+  but less heavily removed (it was not effective because
+  the parentheses were wrong).
+  
+
+  Changes:     Modified:
+  +2 -4                trunk/src/s_user.c (File Modified) 
+
+
 jilles      2007/04/05 00:12:55 UTC    (20070405-3390)
   Log:
   By default, leave MAX_BUFFER fds free for log files,
index 9fdeed7bdddb899375bdb842df06f3f6a917d0df..1ab1504cf4c4095c5fefd5e979e2f7672863bc4c 100644 (file)
@@ -1 +1 @@
-#define SERNO "20070405-3390"
+#define SERNO "20070405-3392"
index b05a8ba6a5065ddcaf60461acbd9f381ada06f70..6166c0f29ca1ca2bbc2a82451f83e0baa10bf397 100644 (file)
@@ -21,7 +21,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_set.c 3253 2007-03-05 19:01:05Z nenolod $
+ *  $Id: m_set.c 3394 2007-04-05 00:33:52Z jilles $
  */
 
 /* rewritten by jdc */
@@ -52,7 +52,7 @@ struct Message set_msgtab = {
 };
 
 mapi_clist_av1 set_clist[] = { &set_msgtab, NULL };
-DECLARE_MODULE_AV1(set, NULL, NULL, set_clist, NULL, NULL, "$Revision: 3253 $");
+DECLARE_MODULE_AV1(set, NULL, NULL, set_clist, NULL, NULL, "$Revision: 3394 $");
 
 /* Structure used for the SET table itself */
 struct SetStruct
@@ -246,6 +246,14 @@ quote_max(struct Client *source_p, int newval)
 {
        if(newval > 0)
        {
+               if(newval > ServerInfo.max_clients)
+               {
+                       sendto_one(source_p,
+                                  ":%s NOTICE %s :You cannot set MAXCLIENTS to > max_clients (%d)",
+                                  me.name, source_p->name, ServerInfo.max_clients);
+                       return;
+               }
+
                if(newval < 32)
                {
                        sendto_one_notice(source_p, ":You cannot set MAXCLIENTS to < 32 (%d:%d)",