# InspIRCd Configuration Script
#
-# Copyright 2002-2006 The ChatSpike Development Team
+# Copyright 2002-2007 The ChatSpike Development Team
# <brain@chatspike.net>
# <Craig@chatspike.net>
#
require 5.6.0;
+use Socket;
use Cwd;
use Getopt::Long;
'with-channel-length=i' => \$opt_chan_length,
'with-max-channels=i' => \$opt_maxchans,
'with-max-oper-channels=i' => \$opt_opermaxchans,
- 'with-max-clients' => \$opt_maxclients,
+ 'with-max-clients=i' => \$opt_maxclients,
'enable-epoll' => \$opt_epoll,
'enable-kqueue' => \$opt_kqueue,
'disable-epoll' => \$opt_noepoll,
chomp($config{MAX_CLIENT_T} = `sh -c \"ulimit -n\"`); # FD Limit
chomp($config{MAX_DESCRIPTORS} = `sh -c \"ulimit -n\"`); # Hard FD Limit
chomp($config{GCCVER} = `g++ -dumpversion | cut -c 1`); # Major GCC Version
+$config{_SOMAXCONN} = SOMAXCONN; # Max connections in accept queue
$config{OSNAME} = $^O; # Operating System Name
$config{CC} = "g++"; # C++ compiler
if (defined $opt_cc)
#define VERSION "$version"
#define REVISION "$revision2"
#define MAXCLIENTS $config{MAX_CLIENT}
+#define MAXCLIENTS_S "$config{MAX_CLIENT}"
+#define SOMAXCONN_S "$config{_SOMAXCONN}"
#define MAX_DESCRIPTORS $config{MAX_DESCRIPTORS}
#define NICKMAX $NL
#define CHANMAX $CL