summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure45
1 files changed, 39 insertions, 6 deletions
diff --git a/configure b/configure
index 42532c167..b0ddf16a3 100755
--- a/configure
+++ b/configure
@@ -232,7 +232,7 @@ you wish to do this? It may cause the IRCd to malfunction [y/n]
my $continue = 0;
while (!$continue) {
- print "What is the Maximum length of nicknames?\n";
+ print "What is the maximum length of nicknames?\n";
print "[\033[1;32m$config{NICK_LENGT}\033[0m] -> ";
chomp($var = <STDIN>);
if ($var eq "") { $var = $config{NICK_LENGT}; }
@@ -248,7 +248,40 @@ while (!$continue) {
my $continue = 0;
while (!$continue) {
- print "What is the Maximum number of mode changes in one line?\n";
+ print "What is the maximum length of channel names?\n";
+ print "[\033[1;32m$config{CHAN_LENGT}\033[0m] -> ";
+ chomp($var = <STDIN>);
+ if ($var eq "") { $var = $config{CHAN_LENGT}; }
+ if ($var =~ /^\d+$/) {
+ # We don't care what the number is, set it and be on our way.
+ $config{CHAN_LENGT} = $var;
+ $continue = 1;
+ print "\n";
+ } else {
+ print "You must enter a number in this field. Please try again.\n\n";
+ }
+}
+
+my $continue = 0;
+while (!$continue) {
+ print "What is the maximum number of channels a user may join at any one time?\n";
+ print "[\033[1;32m$config{MAX_CHANNE}\033[0m] -> ";
+ chomp($var = <STDIN>);
+ if ($var eq "") { $var = $config{MAX_CHANNE}; }
+ if ($var =~ /^\d+$/) {
+ # We don't care what the number is, set it and be on our way.
+ $config{MAX_CHANNE} = $var;
+ $continue = 1;
+ print "\n";
+ } else {
+ print "You must enter a number in this field. Please try again.\n\n";
+ }
+}
+
+
+my $continue = 0;
+while (!$continue) {
+ print "What is the maximum number of mode changes in one line?\n";
print "[\033[1;32m$config{MAXI_MODES}\033[0m] -> ";
chomp($var = <STDIN>);
if ($var eq "") { $var = $config{MAXI_MODES}; }
@@ -476,16 +509,16 @@ sub writefiles {
chomp(my $incos = `uname -n -s -r`);
chomp(my $version = `sh ./src/version.sh`);
open(FILEHANDLE, ">include/inspircd_config.h");
+ my $NL = $config{NICK_LENGT}+1;
+ my $CL = $config{CHAN_LENGT}+1;
print FILEHANDLE <<EOF;
/* Auto generated by configure, do not modify! */
-#define SYSLOG_FACILITY LOG_DAEMON
-#define SYSLOG_LEVEL LOG_NOTICE
#define CONFIG_FILE "$config{CONFIG_DIR}/inspircd.conf"
#define MOD_PATH "$config{MODULE_DIR}"
#define VERSION "$version"
#define MAXCLIENTS $config{MAX_CLIENT}
-#define NICKMAX $config{NICK_LENGT}
-#define CHANMAX $config{CHAN_LENGT}
+#define NICKMAX $NL
+#define CHANMAX $CL
#define MAXCHANS $config{MAX_CHANNE}
#define MAXMODES $config{MAXI_MODES}
#define OPTIMISATION $config{OPTIMITEMP}