]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
[svn] - add config option for setting max_clients.
authornenolod <redacted>
Mon, 5 Mar 2007 18:58:38 +0000 (10:58 -0800)
committernenolod <redacted>
Mon, 5 Mar 2007 18:58:38 +0000 (10:58 -0800)
ChangeLog
doc/example.conf
doc/reference.conf
include/s_conf.h
include/serno.h
src/ircd.c
src/newconf.c
src/s_conf.c

index 3defbdb8d0eb6afacaeb14fd31b8f295ac650362..426f628bfe65028d9246478f5a5777be0b2e30a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+nenolod     2007/03/05 18:51:17 UTC    (20070305-3249)
+  Log:
+  - remove get_maxrss() and all of that insecure and unsafe nonsense
+  
+
+  Changes:     Modified:
+  +3 -38       trunk/src/ircd.c (File Modified) 
+  +1 -1                trunk/src/restart.c (File Modified) 
+  +0 -4                trunk/src/s_stats.c (File Modified) 
+
+
 nenolod     2007/03/05 18:42:24 UTC    (20070305-3247)
   Log:
   - avoid some potential NULL dereferencing
index 1550d547f720225ff66153b8775be43c126df59d..dd10abdbed05c35e955e1101724b83470a5671d8 100755 (executable)
@@ -4,7 +4,7 @@
  * Copyright (C) 2002-2005 ircd-ratbox development team
  * Copyright (C) 2005-2006 charybdis development team
  *
- * $Id: example.conf 3195 2007-02-01 01:44:31Z jilles $
+ * $Id: example.conf 3251 2007-03-05 18:58:38Z nenolod $
  *
  * See reference.conf for more information.
  */
@@ -42,6 +42,11 @@ serverinfo {
        #vhost = "192.169.0.1";
        /* for IPv6 */
        #vhost6 = "3ffe:80e8:546::2";
+
+       /* max_clients: This should be set to the amount of connections
+        * the server can handle.
+        */
+       max_clients = 1024;
 };
 
 admin {
index 4b43faef792143c652fb448ad49ee9ea91ac12a1..d5a4f59ece456c9b30e01a8e8817ce15ea38c2d0 100755 (executable)
@@ -6,7 +6,7 @@
  *
  * Written by ejb, wcampbel, db, leeh and others
  *
- * $Id: reference.conf 3159 2007-01-25 07:08:21Z nenolod $
+ * $Id: reference.conf 3251 2007-03-05 18:58:38Z nenolod $
  */
 
 /* IMPORTANT NOTES:
@@ -118,6 +118,11 @@ serverinfo {
         * This should be an ipv6 IP only.
         */
        #vhost6 = "3ffe:80e8:546::2";
+
+       /* max_clients: this should be set to the maximum amount of clients
+        * that the server should support.
+        */
+       max_clients = 1024;
 };
 
 /* admin {}: contains admin information about the server. (OLD A:) */
index 628afc25dd28cc95962fffeb5fa6a01f505ca7a8..df1725868dedcf0c13b123354bad77d8ede7dc6f 100644 (file)
@@ -21,7 +21,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_conf.h 3131 2007-01-21 15:36:31Z jilles $
+ *  $Id: s_conf.h 3251 2007-03-05 18:58:38Z nenolod $
  */
 
 #ifndef INCLUDED_s_conf_h
@@ -298,6 +298,8 @@ struct server_info
 #ifdef IPV6
        int specific_ipv6_vhost;
 #endif
+
+       int max_clients;
 };
 
 struct admin_info
index 6277065b499a827eac84df03b193748446523c2e..c1985d583a73eb8bb3ef8b5ee7fb33a643934d17 100644 (file)
@@ -1 +1 @@
-#define SERNO "20070305-3247"
+#define SERNO "20070305-3249"
index bef2eabc4d1ef91aeaaeb399ea49339c60899f68..0646555c40d8b86fe5137ad24c5165b6a5b8b6ac 100644 (file)
@@ -21,7 +21,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: ircd.c 3249 2007-03-05 18:51:17Z nenolod $
+ *  $Id: ircd.c 3251 2007-03-05 18:58:38Z nenolod $
  */
 
 #include "stdinc.h"
@@ -318,7 +318,7 @@ initialize_global_set_options(void)
        memset(&GlobalSetOptions, 0, sizeof(GlobalSetOptions));
        /* memset( &ConfigFileEntry, 0, sizeof(ConfigFileEntry)); */
 
-       GlobalSetOptions.maxclients = MAX_CLIENTS;
+       GlobalSetOptions.maxclients = ServerInfo.max_clients;
        GlobalSetOptions.autoconn = 1;
 
        GlobalSetOptions.spam_time = MIN_JOIN_LEAVE_TIME;
index 7e2a3766ec99e7fd85a556104098b0b0cdfd8bcf..c65633f2984bb22a24731250c0be79a334a0bdc6 100644 (file)
@@ -1,5 +1,5 @@
 /* This code is in the public domain.
- * $Id: newconf.c 3131 2007-01-21 15:36:31Z jilles $
+ * $Id: newconf.c 3251 2007-03-05 18:58:38Z nenolod $
  */
 
 #include "stdinc.h"
@@ -1918,6 +1918,8 @@ static struct ConfEntry conf_serverinfo_table[] =
        { "vhost",              CF_QSTRING, conf_set_serverinfo_vhost,  0, NULL },
        { "vhost6",             CF_QSTRING, conf_set_serverinfo_vhost6, 0, NULL },
 
+       { "max_clients",        CF_INT,     NULL, 0, &ServerInfo.max_clients    },
+
        { "\0", 0, NULL, 0, NULL }
 };
 
index 4283333eb01f17f23ea87b3888c7e4d4c417f85b..5cdccf381eae92c0778e0787cb2516d45ed9cdc3 100644 (file)
@@ -21,7 +21,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_conf.c 3223 2007-03-02 17:45:47Z jilles $
+ *  $Id: s_conf.c 3251 2007-03-05 18:58:38Z nenolod $
  */
 
 #include "stdinc.h"
@@ -852,7 +852,8 @@ set_default_conf(void)
         ConfigFileEntry.reject_after_count = 5;
        ConfigFileEntry.reject_ban_time = 300;  
        ConfigFileEntry.reject_duration = 120;
-                        
+
+       ServerInfo.max_clients = MAXCONNECTIONS;
 }
 
 #undef YES