pax_global_header00006660000000000000000000000064131073124120014504gustar00rootroot0000000000000052 comment=b7facc2474ff5fb229c66ed130ed67207620f55d inspircd-2.0.24/000077500000000000000000000000001310731241200134045ustar00rootroot00000000000000inspircd-2.0.24/.gitignore000066400000000000000000000010561310731241200153760ustar00rootroot00000000000000*~ *.pem *.swp /.config.cache /.modulemanager /BSDmakefile /GNUmakefile /build /docs/doxygen /inspircd /org.inspircd.plist /run /bin /include/inspircd_config.h /include/inspircd_version.h /src/modules/m_geoip.cpp /src/modules/m_ldapauth.cpp /src/modules/m_ldapoper.cpp /src/modules/m_mssql.cpp /src/modules/m_mysql.cpp /src/modules/m_pgsql.cpp /src/modules/m_regex_pcre.cpp /src/modules/m_regex_posix.cpp /src/modules/m_regex_stdlib.cpp /src/modules/m_regex_tre.cpp /src/modules/m_sqlite3.cpp /src/modules/m_ssl_gnutls.cpp /src/modules/m_ssl_openssl.cpp inspircd-2.0.24/.travis.yml000066400000000000000000000002431310731241200155140ustar00rootroot00000000000000compiler: - clang - gcc dist: trusty env: - PURE_STATIC=1 - language: cpp notifications: email: false script: - sh ./tools/travis-ci.sh sudo: required inspircd-2.0.24/README.md000066400000000000000000000015661310731241200146730ustar00rootroot00000000000000### About InspIRCd is a modular Internet Relay Chat (IRC) server written in C++ for Linux, BSD, Windows and Mac OS X systems which was created from scratch to be stable, modern and lightweight. As InspIRCd is one of the few IRC servers written from scratch, it avoids a number of design flaws and performance issues that plague other more established projects, such as UnrealIRCd, while providing the same level of feature parity. InspIRCd is one of only a few IRC servers to provide a tunable number of features through the use of an advanced but well documented module system. By keeping core functionality to a minimum we hope to increase the stability, security and speed of InspIRCd while also making it customisable to the needs of many different users. ### Links * [Website](http://inspircd.org) * [GitHub](https://github.com/inspircd) * IRC: \#inspircd on irc.inspircd.org inspircd-2.0.24/configure000077500000000000000000001162211310731241200153160ustar00rootroot00000000000000#!/usr/bin/env perl # # InspIRCd -- Internet Relay Chat Daemon # # Copyright (C) 2009-2010 Daniel De Graaf # Copyright (C) 2007, 2009 Dennis Friis # Copyright (C) 2003, 2006-2008 Craig Edwards # Copyright (C) 2006-2008 Robin Burchell # Copyright (C) 2008 Thomas Stagner # Copyright (C) 2007 John Brooks # Copyright (C) 2006 Oliver Lupton # Copyright (C) 2003-2006 Craig McLure # # This file is part of InspIRCd. InspIRCd is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # BEGIN { require 5.8.0; push @INC, '.'; } use strict; use warnings FATAL => qw(all); use File::Copy (); use Socket; use Cwd; use Getopt::Long; # Utility functions for our buildsystem use make::utilities; use make::configure; use make::gnutlscert; use make::opensslcert; ############################################################################################### # # NON-EDITABLE VARIABLES # ############################################################################################### our ($opt_use_gnutls, $opt_rebuild, $opt_use_openssl, $opt_nointeractive, $opt_ports, $opt_epoll, $opt_kqueue, $opt_noports, $opt_noepoll, $opt_nokqueue, $opt_noipv6, $opt_maxbuf, $opt_disable_debug, $opt_freebsd_port, $opt_system, $opt_uid); our ($opt_cc, $opt_base_dir, $opt_config_dir, $opt_module_dir, $opt_binary_dir, $opt_data_dir, $opt_log_dir); sub list_extras (); sub enable_extras (@); sub disable_extras (@); my @opt_enableextras; my @opt_disableextras; GetOptions ( 'enable-gnutls' => \$opt_use_gnutls, 'rebuild' => \$opt_rebuild, 'system' => \$opt_system, 'uid=s' => \$opt_uid, 'enable-openssl' => \$opt_use_openssl, 'disable-interactive' => \$opt_nointeractive, 'enable-ports' => \$opt_ports, 'enable-epoll' => \$opt_epoll, 'enable-kqueue' => \$opt_kqueue, 'disable-ports' => \$opt_noports, 'disable-epoll' => \$opt_noepoll, 'disable-kqueue' => \$opt_nokqueue, 'disable-ipv6' => \$opt_noipv6, 'with-cc=s' => \$opt_cc, 'with-maxbuf=i' => \$opt_maxbuf, 'enable-freebsd-ports-openssl' => \$opt_freebsd_port, 'prefix=s' => \$opt_base_dir, 'config-dir=s' => \$opt_config_dir, 'module-dir=s' => \$opt_module_dir, 'binary-dir=s' => \$opt_binary_dir, 'data-dir=s' => \$opt_data_dir, 'log-dir=s' => \$opt_log_dir, 'disable-debuginfo' => sub { $opt_disable_debug = 1 }, 'help' => sub { showhelp(); }, 'update' => sub { update(); }, 'clean' => sub { clean(); }, 'list-extras' => sub { list_extras; exit 0; }, # This, --enable-extras, and --disable-extras are for non-interactive managing. 'enable-extras=s@' => \@opt_enableextras, # ^ 'disable-extras=s@' => \@opt_disableextras, # ^ 'generate-openssl-cert' => sub { make_openssl_cert(); exit(0); }, 'generate-gnutls-cert' => sub { make_gnutls_cert(); exit(0); } ); if (scalar(@opt_enableextras) + scalar(@opt_disableextras) > 0) { @opt_enableextras = split /,/, join(',', @opt_enableextras); @opt_disableextras = split /,/, join(',', @opt_disableextras); enable_extras(@opt_enableextras); disable_extras(@opt_disableextras); list_extras; print "Remember: YOU are responsible for making sure any libraries needed have been installed!\n"; exit 0; } our $interactive = !( (defined $opt_base_dir) || (defined $opt_config_dir) || (defined $opt_module_dir) || (defined $opt_base_dir) || (defined $opt_binary_dir) || (defined $opt_data_dir) || (defined $opt_log_dir) || (defined $opt_nointeractive) || (defined $opt_cc) || (defined $opt_noipv6) || (defined $opt_kqueue) || (defined $opt_epoll) || (defined $opt_ports) || (defined $opt_use_openssl) || (defined $opt_nokqueue) || (defined $opt_noepoll) || (defined $opt_noports) || (defined $opt_maxbuf) || (defined $opt_system) || (defined $opt_uid) || (defined $opt_use_gnutls) || (defined $opt_freebsd_port) ); chomp(our $topdir = getcwd()); our $this = resolve_directory($topdir); # PWD, Regardless. our @modlist = (); # Declare for Module List.. our %config = (); # Initiate Configuration Hash.. our $cache_loaded = getcache(); $config{ME} = resolve_directory($topdir); # Present Working Directory $config{BASE_DIR} ||= $config{ME}."/run"; if (defined $opt_base_dir) { $config{BASE_DIR} = $opt_base_dir; } elsif (defined $opt_system) { $config{BASE_DIR} = '/var/lib/inspircd'; } if (defined $opt_system) { $config{UID} = $opt_uid || 'ircd'; $config{CONFIG_DIR} = '/etc/inspircd'; $config{MODULE_DIR} = '/usr/lib/inspircd'; $config{BINARY_DIR} = '/usr/sbin/'; $config{BUILD_DIR} = resolve_directory($config{ME}."/build"); # Build Directory $config{DATA_DIR} = '/var/inspircd'; $config{LOG_DIR} = '/var/log/inspircd'; } else { $config{UID} = $opt_uid || $config{UID} || $<; $config{CONFIG_DIR} ||= resolve_directory($config{BASE_DIR}."/conf"); # Configuration Directory $config{MODULE_DIR} ||= resolve_directory($config{BASE_DIR}."/modules"); # Modules Directory $config{BINARY_DIR} ||= resolve_directory($config{BASE_DIR}."/bin"); # Binary Directory $config{BUILD_DIR} ||= resolve_directory($config{ME}."/build"); # Build Directory $config{DATA_DIR} ||= resolve_directory($config{BASE_DIR}."/data"); # Data directory $config{LOG_DIR} ||= resolve_directory($config{BASE_DIR}."/logs"); # Log directory } if (defined $opt_config_dir) { $config{CONFIG_DIR} = $opt_config_dir; } if (defined $opt_module_dir) { $config{MODULE_DIR} = $opt_module_dir; } if (defined $opt_binary_dir) { $config{BINARY_DIR} = $opt_binary_dir; } if (defined $opt_data_dir) { $config{DATA_DIR} = $opt_data_dir; } if (defined $opt_log_dir) { $config{LOG_DIR} = $opt_log_dir; } chomp($config{HAS_GNUTLS} = `pkg-config --modversion gnutls 2>/dev/null`); # GNUTLS Version. if (defined $opt_freebsd_port) { chomp($config{HAS_OPENSSL} = `pkg-config --modversion openssl 2>/dev/null`); chomp($config{HAS_OPENSSL_PORT} = `pkg-config --modversion openssl 2>/dev/null`); $config{USE_FREEBSD_BASE_SSL} = "n"; } else { if ($^O eq "freebsd") { # default: use base ssl chomp($config{HAS_OPENSSL} = `openssl version | cut -d ' ' -f 2`); # OpenSSL version, freebsd specific chomp($config{HAS_OPENSSL_PORT} = `pkg-config --modversion openssl 2>/dev/null`); # Port version, may be different } else { chomp($config{HAS_OPENSSL} = `pkg-config --modversion openssl 2>/dev/null`); # Openssl version, others $config{HAS_OPENSSL_PORT} = ""; $config{USE_FREEBSD_BASE_SSL} = "n"; } } chomp(our $gnutls_ver = $config{HAS_GNUTLS}); chomp(our $openssl_ver = $config{HAS_OPENSSL}); $config{USE_GNUTLS} ||= "n"; if (defined $opt_use_gnutls) { $config{USE_GNUTLS} = "y"; # Use gnutls. } $config{USE_OPENSSL} ||= "n"; # Use openssl. if (defined $opt_use_openssl) { $config{USE_OPENSSL} = "y"; } if (!defined $opt_disable_debug) { $config{OPTIMISATI} = "-g1"; # Optimisation Flag } else { $config{OPTIMISATI} = "-O2"; } $config{HAS_STRLCPY} = "false"; # strlcpy Check. $config{HAS_STDINT} = "false"; # stdint.h check $config{USE_KQUEUE} = "y"; # kqueue enabled if (defined $opt_nokqueue) { $config{USE_KQUEUE} = "n"; } $config{USE_POLL} = "y"; # poll enabled $config{USE_EPOLL} = "y"; # epoll enabled if (defined $opt_noepoll) { $config{USE_EPOLL} = "n"; } $config{USE_PORTS} = "y"; # epoll enabled if (defined $opt_noports) { $config{USE_PORTS} = "n"; } $config{_SOMAXCONN} = SOMAXCONN; # Max connections in accept queue $config{OSNAME} = $^O; # Operating System Name $config{IS_DARWIN} = "NO"; # Is OSX? $config{STARTSCRIPT} = "inspircd"; # start script? $config{DESTINATION} = "BASE"; # Is target path. if ($config{OSNAME} =~ /darwin/i) { $config{IS_DARWIN} = "YES"; $config{STARTSCRIPT} = "org.inspircd.plist"; # start script for OSX. $config{CC} = "xcrun clang++"; # C++ compiler for OSX. } elsif ($config{OSNAME} =~ /freebsd/i) { chomp(my $fbsd_version = `uname -r`); $fbsd_version =~ s/^(\d+\.\d+).*/$1/g; $config{CC} = $fbsd_version >= 10.0 ? 'clang++' : 'g++'; } else { $config{CC} = "g++"; # C++ compiler } if (defined $opt_cc) { $config{CC} = $opt_cc; } `$config{CC} -dumpversion` =~ /^(\d+)(?:\.(\d+))?/; $config{GCCVER} = defined $1 ? $1 : ''; $config{GCCMINOR} = defined $2 ? $2 : '0'; $config{MAXBUF} = "512"; # Max buffer size if ($config{HAS_OPENSSL} =~ /^([-[:digit:].]+)(?:[a-z])?(?:\-[a-z][0-9])?/) { $config{HAS_OPENSSL} = $1; } else { $config{HAS_OPENSSL} = ""; } if (($config{GCCVER} eq "") || ($config{GCCMINOR} eq "")) { print "`$config{CC}` was not found! A C++ compiler is required to build InspIRCd!\n"; print "You can pass a custom compiler to $0 using --with-cc=[name].\n"; exit; } # Get and Set some important vars.. getmodules(); sub clean { unlink(".config.cache"); } our ($has_epoll, $has_ports, $has_kqueue) = (0, 0, 0); sub update { eval { chomp($topdir = getcwd()); $this = resolve_directory($topdir); # PWD, Regardless. getmodules(); # Does the cache file exist? if (!getcache()) { # No, No it doesn't.. *BASH* print "You have not run ./configure before. Please do this before trying to run the update script.\n"; exit 0; } else { # We've Loaded the cache file and all our variables.. print "Updating files...\n"; if (defined($opt_disable_debug) && $opt_disable_debug == 1) { print "Disabling debug information (-g).\n"; $config{OPTIMISATI} = ""; } $has_epoll = $config{HAS_EPOLL}; $has_ports = $config{HAS_PORTS}; $has_kqueue = $config{HAS_KQUEUE}; writefiles(1); makecache(); print "Complete.\n"; exit; } }; if ($@) { print "Configure update failed: $@\n"; } exit; } sub test_compile { my $feature = shift; my $fail = 0; $fail ||= system "$config{CC} -o test_$feature make/check_$feature.cpp >/dev/null 2>&1"; $fail ||= system "./test_$feature"; unlink "test_$feature"; return !$fail; } print "Running non-interactive configure...\n" unless $interactive; print "Checking for cache from previous configure... "; print ($cache_loaded ? "found\n" : "not found\n"); $config{SYSTEM} = lc $^O; print "Checking operating system version... $config{SYSTEM}\n"; `$config{CC} -dumpversion` =~ /^(\d+)(?:\.(\d+))?/; $config{GCCVER} = defined $1 ? $1 : ''; $config{GCCMINOR} = defined $2 ? $2 : '0'; printf "Checking if stdint.h exists... "; $config{HAS_STDINT} = test_compile('stdint'); print $config{HAS_STDINT} ? "yes\n" : "no\n"; printf "Checking if strlcpy exists... "; $config{HAS_STRLCPY} = test_compile('strlcpy'); print $config{HAS_STRLCPY} ? "yes\n" : "no\n"; printf "Checking if kqueue exists... "; $has_kqueue = test_compile('kqueue'); print $has_kqueue ? "yes\n" : "no\n"; printf "Checking for epoll support... "; $has_epoll = test_compile('epoll'); print $has_epoll ? "yes\n" : "no\n"; printf "Checking for eventfd support... "; $config{HAS_EVENTFD} = test_compile('eventfd') ? 'true' : 'false'; print $config{HAS_EVENTFD} eq 'true' ? "yes\n" : "no\n"; printf "Checking if Solaris I/O completion ports are available... "; $has_ports = 0; our $system = `uname -s`; chomp ($system); $has_ports = 1 if ($system eq "SunOS"); if ($has_ports) { my $kernel = `uname -r`; chomp($kernel); if (($kernel !~ /^5\.1./)) { $has_ports = 0; } } print "yes\n" if $has_ports == 1; print "no\n" if $has_ports == 0; $config{HAS_EPOLL} = $has_epoll; $config{HAS_KQUEUE} = $has_kqueue; printf "Checking for libgnutls... "; if (defined($config{HAS_GNUTLS}) && (($config{HAS_GNUTLS}) || ($config{HAS_GNUTLS} eq "y"))) { if (defined($gnutls_ver) && ($gnutls_ver ne "")) { print "yes\n"; $config{HAS_GNUTLS} = "y"; } else { print "no\n"; $config{HAS_GNUTLS} = "n"; } } else { print "no\n"; $config{HAS_GNUTLS} = "n"; } printf "Checking for openssl... "; if (defined($config{HAS_OPENSSL}) && (($config{HAS_OPENSSL}) || ($config{HAS_OPENSSL} eq "y"))) { if (defined($openssl_ver) && ($openssl_ver ne "")) { print "yes\n"; $config{HAS_OPENSSL} = "y"; } else { print "no\n"; $config{HAS_OPENSSL} = "n"; } } else { print "no\n"; $config{HAS_OPENSSL} = "n"; } printf "Checking if you are running an ancient, unsupported OS... "; if ($config{OSNAME} =~ /FreeBSD/i) { my $version = `uname -r`; if ($version =~ /^4\./) { print "yes.\n"; print "FreeBSD 4.x is no longer supported. By ANYONE.\n"; print "To build, you will need to add the following to CXXFLAGS:\n"; print "\t-L/usr/local/lib -lgnugetopt -DHAVE_DECL_GETOPT=1\n"; } else { print "no ($version)\n"; } } else { print "no ($config{OSNAME})\n"; } ################################################################################ # BEGIN INTERACTIVE PART # ################################################################################ # Clear the Screen.. if ($interactive) { print "\e[2J\e[0G\e[0d"; # J = Erase in Display, 2 = Entire Screen, (G, d) = Move cursor to (..,..) my $wholeos = $^O; my $rev = getrevision(); # Display Introduction Message.. print <<"STOP" ; Welcome to the \e[1mInspIRCd\e[0m configuration program! (\e[1minteractive mode\e[0m) \e[1mPackage maintainers: Type ./configure --help for non-interactive help\e[0m *** If you are unsure of any of these values, leave it blank for *** *** standard settings that will work, and your server will run *** *** using them. Please consult your IRC network admin if in doubt. *** Press \e[1m\e[0m to accept the default for any option, or enter a new value. Please note: You will \e[1mHAVE\e[0m to read the docs dir, otherwise you won't have a config file! Your operating system is: \e[1;32m$config{OSNAME}\e[0m ($wholeos) Your InspIRCd revision ID is \e[1;32mr$rev\e[0m STOP if ($rev eq "r0") { print " (Non-SVN build)"; } print ".\n\n"; $config{CHANGE_COMPILER} = "n"; print "I have detected the following compiler: \e[1;32m$config{CC}\e[0m (version \e[1;32m$config{GCCVER}.$config{GCCMINOR}\e[0m)\n"; while (($config{GCCVER} < 3) || ($config{GCCVER} eq "")) { print "\e[1;32mIMPORTANT!\e[0m A GCC 2.x compiler has been detected, and should NOT be used. You should probably specify a newer compiler.\n\n"; yesno('CHANGE_COMPILER',"Do you want to change the compiler?"); if ($config{CHANGE_COMPILER} =~ /y/i) { print "What command do you want to use to invoke your compiler?\n"; print "[\e[1;32m$config{CC}\e[0m] -> "; chomp($config{CC} = ); if ($config{CC} eq "") { $config{CC} = "g++"; } chomp(my $foo = `$config{CC} -dumpversion | cut -c 1`); if ($foo ne "") { `$config{CC} -dumpversion` =~ /^(\d+)(?:\.(\d+))?/; $config{GCCVER} = defined $1 ? $1 : ''; $config{GCCMINOR} = defined $2 ? $2 : '0'; print "Queried compiler: \e[1;32m$config{CC}\e[0m (version \e[1;32m$config{GCCVER}.$config{GCCMINOR}\e[0m)\n"; if ($config{GCCVER} < 3) { print "\e[1;32mGCC 2.x WILL NOT WORK!\e[0m. Let's try that again, shall we?\n"; } } else { print "\e[1;32mWARNING!\e[0m Could not execute the compiler you specified. You may want to try again.\n"; } } } print "\n"; # Directory Settings.. my $tmpbase = $config{BASE_DIR}; dir_check("do you wish to install the InspIRCd base", "BASE_DIR"); if ($tmpbase ne $config{BASE_DIR}) { $config{CONFIG_DIR} = resolve_directory($config{BASE_DIR}."/conf"); # Configuration Dir $config{MODULE_DIR} = resolve_directory($config{BASE_DIR}."/modules"); # Modules Directory $config{DATA_DIR} = resolve_directory($config{BASE_DIR}."/data"); # Data Directory $config{LOG_DIR} = resolve_directory($config{BASE_DIR}."/logs"); # Log Directory $config{BINARY_DIR} = resolve_directory($config{BASE_DIR}."/bin"); # Binary Directory } dir_check("are the configuration files", "CONFIG_DIR"); dir_check("are the modules to be compiled to", "MODULE_DIR"); dir_check("is the IRCd binary to be placed", "BINARY_DIR"); dir_check("are variable data files to be located in", "DATA_DIR"); dir_check("are the logs to be stored in", "LOG_DIR"); dir_check("do you want the build to take place", "BUILD_DIR"); my $chose_hiperf = 0; if ($has_kqueue) { yesno('USE_KQUEUE',"You are running a BSD operating system, and kqueue\nwas detected. Would you like to enable kqueue support?\nThis is likely to increase performance.\nIf you are unsure, answer yes.\n\nEnable kqueue?"); print "\n"; if ($config{USE_KQUEUE} eq "y") { $chose_hiperf = 1; } } if ($has_epoll) { yesno('USE_EPOLL',"You are running a Linux 2.6+ operating system, and epoll\nwas detected. Would you like to enable epoll support?\nThis is likely to increase performance.\nIf you are unsure, answer yes.\n\nEnable epoll?"); print "\n"; if ($config{USE_EPOLL} eq "y") { $chose_hiperf = 1; } } if ($has_ports) { yesno('USE_PORTS',"You are running Solaris 10.\nWould you like to enable I/O completion ports support?\nThis is likely to increase performance.\nIf you are unsure, answer yes.\n\nEnable support for I/O completion ports?"); print "\n"; if ($config{USE_PORTS} eq "y") { $chose_hiperf = 1; } } if (!$chose_hiperf) { yesno('USE_POLL', "Would you like to use poll?\n This is likely to increase performance.\nIf you are unsure, answer yes.\n\nEnable poll?"); if ($config{USE_POLL} ne "y") { print "No high-performance socket engines are available, or you chose\n"; print "not to enable one. Defaulting to select() engine.\n\n"; } } $config{USE_FREEBSD_BASE_SSL} = "n"; $config{USE_FREEBSD_PORTS_SSL} = "n"; if ($config{HAS_OPENSSL_PORT} ne "") { $config{USE_FREEBSD_PORTS_SSL} = "y"; print "I have detected the OpenSSL FreeBSD port installed on your system,\n"; print "version \e[1;32m".$config{HAS_OPENSSL_PORT}."\e[0m. Your base system OpenSSL is version \e[1;32m".$openssl_ver."\e[0m.\n\n"; yesno('USE_FREEBSD_PORTS_SSL', "Do you want to use the FreeBSD ports version?"); print "\n"; $config{USE_FREEBSD_BASE_SSL} = "y" if ($config{USE_FREEBSD_PORTS_SSL} eq "n"); if ($config{USE_FREEBSD_BASE_SSL} eq "n") { # update to port version $openssl_ver = $config{HAS_OPENSSL_PORT}; } } else { $config{USE_FREEBSD_BASE_SSL} = "y" if ($^O eq "freebsd"); } $config{USE_SSL} ||= "n"; $config{MODUPDATE} ||= 'n'; if ($config{HAS_GNUTLS} eq "y" || $config{HAS_OPENSSL} eq "y") { print "Detected GnuTLS version: \e[1;32m" . $gnutls_ver . "\e[0m\n"; print "Detected OpenSSL version: \e[1;32m" . $openssl_ver . "\e[0m\n\n"; yesno('USE_SSL', "One or more SSL libraries detected. Would you like to enable SSL support?"); if ($config{USE_SSL} eq "y") { if ($config{HAS_GNUTLS} eq "y") { yesno('USE_GNUTLS',"Would you like to enable SSL with m_ssl_gnutls? (recommended)"); if ($config{USE_GNUTLS} eq "y") { print "\nUsing GnuTLS SSL module.\n"; } } if ($config{HAS_OPENSSL} eq "y") { yesno('USE_OPENSSL', "Would you like to enable SSL with m_ssl_openssl?"); if ($config{USE_OPENSSL} eq "y") { print "\nUsing OpenSSL SSL module.\nYou will get better performance if you move to GnuTLS in the future.\n"; } } } } else { print "\nCould not detect OpenSSL or GnuTLS. Make sure pkg-config is installed and\n"; print "is in your path.\n\n"; } yesno('MODUPDATE',"Would you like to check for updates to third-party modules?"); print "\n"; if ($config{MODUPDATE} eq "y") { print "Checking for upgrades to extra and third-party modules... "; system "./modulemanager upgrade"; } } # We are on a POSIX system, we can enable POSIX extras without asking symlink "extra/m_regex_posix.cpp", "src/modules/m_regex_posix.cpp"; dumphash(); if (($config{USE_GNUTLS} eq "y") && ($config{HAS_GNUTLS} ne "y")) { print "Sorry, but I couldn't detect GnuTLS. Make sure pkg-config is in your path.\n"; exit(0); } if (($config{USE_OPENSSL} eq "y") && ($config{HAS_OPENSSL} ne "y")) { print "Sorry, but I couldn't detect OpenSSL. Make sure pkg-config and openssl are in your path.\n"; exit(0); } our $failed = 0; $config{CERTGEN} ||= 'y'; yesno('CERTGEN',"Would you like to generate SSL certificates now?") if ($interactive && ($config{USE_GNUTLS} eq "y" || $config{USE_OPENSSL} eq "y")); if ($config{USE_GNUTLS} eq "y") { unless (-r "src/modules/m_ssl_gnutls.cpp") { print "Symlinking src/modules/m_ssl_gnutls.cpp from extra/\n"; symlink "extra/m_ssl_gnutls.cpp", "src/modules/m_ssl_gnutls.cpp" or print STDERR "Symlink failed: $!"; } if ($interactive && $config{CERTGEN} eq 'y') { unless (-r "$config{CONFIG_DIR}/key.pem" && -r "$config{CONFIG_DIR}/cert.pem") { print "SSL certificates not found, generating.. \n\n ************************************************************* * Generating the private key may take some time, once done, * * answer the questions which follow. If you are unsure, * * just hit enter! * *************************************************************\n\n"; $failed = make_gnutls_cert(); if ($failed) { print "\n\e[1;32mCertificate generation failed!\e[0m\n\n"; } else { print "\nCertificate generation complete, copying to config directory... "; File::Copy::move("key.pem", "$config{CONFIG_DIR}/key.pem") or print STDERR "Could not copy key.pem!\n"; File::Copy::move("cert.pem", "$config{CONFIG_DIR}/cert.pem") or print STDERR "Could not copy cert.pem!\n"; print "Done.\n\n"; } } else { print "SSL certificates found, skipping.\n\n"; } } else { print "Skipping SSL certificate generation\nin non-interactive mode.\n\n"; } } if ($config{USE_OPENSSL} eq "y") { unless (-r "src/modules/m_ssl_openssl.cpp") { print "Symlinking src/modules/m_ssl_openssl.cpp from extra/\n"; symlink "extra/m_ssl_openssl.cpp", "src/modules/m_ssl_openssl.cpp" or print STDERR "Symlink failed: $!"; } $failed = 0; if ($interactive && $config{CERTGEN} eq 'y') { unless (-r "$config{CONFIG_DIR}/key.pem" && -r "$config{CONFIG_DIR}/cert.pem") { print "SSL certificates not found, generating.. \n\n ************************************************************* * Generating the certificates may take some time, go grab a * * coffee or something. * *************************************************************\n\n"; make_openssl_cert(); print "\nCertificate generation complete, copying to config directory... "; File::Copy::move("key.pem", "$config{CONFIG_DIR}/key.pem") or print STDERR "Could not copy key.pem!\n"; File::Copy::move("cert.pem", "$config{CONFIG_DIR}/cert.pem") or print STDERR "Could not copy cert.pem!\n"; File::Copy::move("dhparams.pem", "$config{CONFIG_DIR}/dhparams.pem") or print STDERR "Could not copy dhparams.pem!\n"; print "Done.\n\n"; } else { print "SSL certificates found, skipping.\n\n" } } else { print "Skipping SSL certificate generation\nin non-interactive mode.\n\n"; } } if (($config{USE_GNUTLS} eq "n") && ($config{USE_OPENSSL} eq "n")) { print "Skipping SSL certificate generation as SSL support is not available.\n\n"; } depcheck(); writefiles(1); makecache(); print "\n\n"; print "To build your server with these settings, please run '\e[1;32mmake\e[0m' now.\n"; if (($config{USE_GNUTLS} eq "y") || ($config{USE_OPENSSL} eq "y")) { print "Please note: for \e[1;32mSSL support\e[0m you will need to load required\n"; print "modules in your config. This configure script has added those modules to the\n"; print "build process. For more info, please refer to:\n"; print "\e[1;32mhttp://wiki.inspircd.org/Installation_From_Tarball\e[0m\n"; } print "*** \e[1;32mRemember to edit your configuration files!!!\e[0m ***\n\n\n"; if (($config{OSNAME} eq "OpenBSD") && ($config{CC} ne "eg++")) { print "\e[1;32mWARNING!\e[0m You are running OpenBSD but you are using the base gcc package\nrather than eg++. This compile will most likely fail, but I'm letting you\ngo ahead with it anyway, just in case I'm wrong :-)\n"; } if ($config{GCCVER} < "3") { print <) { chomp; # Ignore Blank lines, and comments.. next if /^\s*$/; next if /^\s*#/; my ($key, $value) = split("=", $_, 2); $value =~ /^\"(.*)\"$/; # Do something with data here! $config{$key} = $1; } close(CACHE); return 1; } sub makecache { # Dump the contents of %config print "Writing \e[1;32mcache file\e[0m for future ./configures ...\n"; open(FILEHANDLE, ">.config.cache"); foreach my $key (keys %config) { print FILEHANDLE "$key=\"$config{$key}\"\n"; } close(FILEHANDLE); } sub dir_check { my ($desc, $hash_key) = @_; my $complete = 0; while (!$complete) { print "In what directory $desc?\n"; print "[\e[1;32m$config{$hash_key}\e[0m] -> "; chomp(my $var = ); if ($var eq "") { $var = $config{$hash_key}; } if ($var =~ /^\~\/(.+)$/) { # Convert it to a full path.. $var = resolve_directory($ENV{HOME} . "/" . $1); } elsif ((($config{OSNAME} =~ /MINGW32/i) and ($var !~ /^[A-Z]{1}:\\.*/)) and (substr($var,0,1) ne "/")) { # Assume relative Path was given.. fill in the rest. $var = $this . "/$var"; } $var = resolve_directory($var); if (! -e $var) { print "$var does not exist. Create it?\n[\e[1;32my\e[0m] "; chomp(my $tmp = ); if (($tmp eq "") || ($tmp =~ /^y/i)) { # Attempt to Create the Dir.. my $chk = eval { use File::Path (); File::Path::mkpath($var, 0, 0777); 1; }; unless (defined($chk) && -d $var) { print "Unable to create directory. ($var)\n\n"; # Restart Loop.. next; } } else { # They said they don't want to create, and we can't install there. print "\n\n"; next; } } else { if (!is_dir($var)) { # Target exists, but is not a directory. print "File $var exists, but is not a directory.\n\n"; next; } } # Either Dir Exists, or was created fine. $config{$hash_key} = $var; $complete = 1; print "\n"; } } our $SHARED = ""; my ($mliflags, $mfrules, $mobjs, $mfcount) = ("", "", "", 0); sub writefiles { my($writeheader) = @_; # First File.. inspircd_config.h chomp(my $incos = `uname -n -s -r`); chomp(my $version = `sh src/version.sh`); chomp(my $revision2 = getrevision()); my $branch = "InspIRCd-0.0"; if ($version =~ /^(InspIRCd-[0-9]+\.[0-9]+)\.[0-9]+/) { $branch = $1; } if ($writeheader == 1) { print "Writing \e[1;32minspircd_config.h\e[0m\n"; open(FILEHANDLE, ">include/inspircd_config.h.tmp"); print FILEHANDLE <= 3) { print FILEHANDLE "#define GCC3\n"; } if ($config{HAS_STRLCPY} eq "true") { print FILEHANDLE "#define HAS_STRLCPY\n"; } if ($config{HAS_STDINT} eq "true") { print FILEHANDLE "#define HAS_STDINT\n"; } if ($config{HAS_EVENTFD} eq 'true') { print FILEHANDLE "#define HAS_EVENTFD\n"; } if ($config{OSNAME} !~ /DARWIN/i) { print FILEHANDLE "#define HAS_CLOCK_GETTIME\n"; } else { print FILEHANDLE "#ifdef MAC_OS_X_VERSION_10_12\n"; print FILEHANDLE "# define HAS_CLOCK_GETTIME\n"; print FILEHANDLE "#endif\n"; } my $use_hiperf = 0; if (($has_kqueue) && ($config{USE_KQUEUE} eq "y")) { print FILEHANDLE "#define USE_KQUEUE\n"; $config{SOCKETENGINE} = "socketengine_kqueue"; $use_hiperf = 1; } if (($has_epoll) && ($config{USE_EPOLL} eq "y")) { print FILEHANDLE "#define USE_EPOLL\n"; $config{SOCKETENGINE} = "socketengine_epoll"; $use_hiperf = 1; } if (($has_ports) && ($config{USE_PORTS} eq "y")) { print FILEHANDLE "#define USE_PORTS\n"; $config{SOCKETENGINE} = "socketengine_ports"; $use_hiperf = 1; } # user didn't choose either epoll or select for their OS. # default them to USE_SELECT (ewwy puke puke) if (!$use_hiperf) { print "no hi-perf, " . $config{USE_POLL}; if ($config{USE_POLL} eq "y") { print FILEHANDLE "#define USE_POLL\n"; $config{SOCKETENGINE} = "socketengine_poll"; } else { print FILEHANDLE "#define USE_SELECT\n"; $config{SOCKETENGINE} = "socketengine_select"; } } print FILEHANDLE "\n#include \"threadengines/threadengine_pthread.h\"\n\n#endif\n"; close(FILEHANDLE); open(FILEHANDLE, ">include/inspircd_version.h.tmp"); print FILEHANDLE <; my $line2 = <$fh2>; if (defined($line1) != defined($line2)) { $diff = 1; } elsif (!defined $line1) { last; } else { $diff = ($line1 ne $line2); } } if ($diff) { unlink $file; rename "$file.tmp", $file; } else { unlink "$file.tmp"; } } } # Write all .in files. my $tmp = ""; my $file = ""; my $exe = "inspircd"; # Do this once here, and cache it in the .*.inc files, # rather than attempting to read src/version.sh from # compiled code -- we might not have the source to hand. # Fix for bug#177 by Brain. chomp($version = `sh ./src/version.sh`); chomp(my $revision = getrevision()); $version = "$version(r$revision)"; # We can actually parse any file starting with . and ending with .inc, # but right now we only parse .inspircd.inc to form './inspircd' prepare_dynamic_makefile(); my @dotfiles = qw(main.mk inspircd); push @dotfiles, 'org.inspircd.plist' if $config{OSNAME} eq 'darwin'; # HACK: we need to know if we are on GCC6 to disable the omission of `this` null pointer checks. $config{GCC6} = `$config{CC} --version 2>/dev/null` =~ /gcc/i && $config{GCCVER} ge "6" ? "true" : "false"; foreach my $file (@dotfiles) { open(FILEHANDLE, "make/template/$file") or die "Can't open make/template/$file: $!"; $_ = join '', ; close(FILEHANDLE); $config{BUILD_DIR} ||= resolve_directory($config{ME}."/build"); for my $var (qw( CC SYSTEM BASE_DIR CONFIG_DIR MODULE_DIR BINARY_DIR BUILD_DIR DATA_DIR UID STARTSCRIPT DESTINATION SOCKETENGINE LOG_DIR GCC6 )) { s/\@$var\@/$config{$var}/g; } s/\@EXECUTABLE\@/$exe/ if defined $exe; s/\@VERSION\@/$version/ if defined $version; if ($file eq 'main.mk') { print "Writing \e[1;32mGNUmakefile\e[0m ...\n"; my $mk_tmp = $_; s/\@IFDEF (\S+)/ifdef $1/g; s/\@IFNDEF (\S+)/ifndef $1/g; s/\@IFEQ (\S+) (\S+)/ifeq ($1,$2)/g; s/\@ELSIFEQ (\S+) (\S+)/else ifeq ($1,$2)/g; s/\@ELSE/else/g; s/\@ENDIF/endif/g; s/ *\@BSD_ONLY .*\n//g; s/\@GNU_ONLY //g; s/\@DO_EXPORT (.*)/export $1/g; open MKF, '>GNUmakefile' or die "Can't write to GNUmakefile: $!"; print MKF $_; close MKF; print "Writing \e[1;32mBSDmakefile\e[0m ...\n"; $_ = $mk_tmp; s/\@IFDEF (\S+)/.if defined($1)/g; s/\@IFNDEF (\S+)/.if !defined($1)/g; s/\@IFEQ (\S+) (\S+)/.if $1 == $2/g; s/\@ELSIFEQ (\S+) (\S+)/.elif $1 == $2/g; s/\@ELSE/.else/g; s/\@ENDIF/.endif/g; s/\@BSD_ONLY //g; s/ *\@GNU_ONLY .*\n//g; $mk_tmp = $_; $mk_tmp =~ s#\@DO_EXPORT (.*)#"MAKEENV += ".join ' ', map "$_='\${$_}'", split /\s/, $1#eg; open MKF, '>BSDmakefile' or die "Can't write to BSDmakefile: $!"; print MKF $mk_tmp; close MKF; } else { print "Writing \e[1;32m$file\e[0m ...\n"; open(FILEHANDLE, ">$file") or die("Can't write to $file: $!\n"); print FILEHANDLE $_; close(FILEHANDLE); } } chmod 0755, 'inspircd'; } sub depcheck { getmodules(); for my $mod (@modlist) { getcompilerflags("src/modules/m_$mod.cpp"); getlinkerflags("src/modules/m_$mod.cpp"); } } sub prepare_dynamic_makefile { my $i = 0; if (!$has_epoll) { $config{USE_EPOLL} = 0; } if (!$has_kqueue) { $config{USE_KQUEUE} = 0; } if (!$has_ports) { $config{USE_PORTS} = 0; } } # Routine to list out the extra/ modules that have been enabled. # Note: when getting any filenames out and comparing, it's important to lc it if the # file system is not case-sensitive (== Epoc, MacOS, OS/2 (incl DOS/DJGPP), VMS, Win32 # (incl NetWare, Symbian)). Cygwin may or may not be case-sensitive, depending on # configuration, however, File::Spec does not currently tell us (it assumes Unix behavior). sub list_extras () { use File::Spec; # @_ not used my $srcdir = File::Spec->catdir("src", "modules"); my $abs_srcdir = File::Spec->rel2abs($srcdir); local $_; my $dd; opendir $dd, File::Spec->catdir($abs_srcdir, "extra") or die (File::Spec->catdir($abs_srcdir, "extra") . ": $!\n"); my @extras = map { File::Spec->case_tolerant() ? lc($_) : $_ } (readdir($dd)); closedir $dd; undef $dd; opendir $dd, $abs_srcdir or die "$abs_srcdir: $!\n"; my @sources = map { File::Spec->case_tolerant() ? lc($_) : $_ } (readdir($dd)); closedir $dd; undef $dd; my $maxlen = (sort { $b <=> $a } (map {length($_)} (@extras)))[0]; my %extras = (); EXTRA: for my $extra (@extras) { next if (File::Spec->curdir() eq $extra || File::Spec->updir() eq $extra); my $abs_extra = File::Spec->catfile($abs_srcdir, "extra", $extra); my $abs_source = File::Spec->catfile($abs_srcdir, $extra); next unless ($extra =~ m/\.(cpp|h)$/ || (-d $abs_extra)); # C++ Source/Header, or directory if (-l $abs_source) { # Symlink, is it in the right place? my $targ = readlink($abs_source); my $abs_targ = File::Spec->rel2abs($targ, $abs_srcdir); if ($abs_targ eq $abs_extra) { $extras{$extra} = "\e[32;1menabled\e[0m"; } else { $extras{$extra} = sprintf("\e[31;1mwrong symlink target (%s)\e[0m", $abs_targ); } } elsif (-e $abs_source) { my ($devext, $inoext) = stat($abs_extra); my ($devsrc, $inosrc, undef, $lnksrc) = stat($abs_source); if ($lnksrc > 1) { if ($devsrc == $devext && $inosrc == $inoext) { $extras{$extra} = "\e[32;1menabled\e[0m"; } else { $extras{$extra} = sprintf("\e[31;1mwrong hardlink target (%d:%d)\e[0m", $devsrc, $inosrc); } } else { open my $extfd, "<", $abs_extra; open my $srcfd, "<", $abs_source; local $/ = undef; if (scalar(<$extfd>) eq scalar(<$srcfd>)) { $extras{$extra} = "\e[32;1menabled\e[0m"; } else { $extras{$extra} = sprintf("\e[31;1mout of synch (re-copy)\e[0m"); } } } else { $extras{$extra} = "\e[33;1mdisabled\e[0m"; } } # Now let's add dependency info for my $extra (keys(%extras)) { next unless $extras{$extra} =~ m/enabled/; # only process enabled extras. my $abs_extra = File::Spec->catfile($abs_srcdir, "extra", $extra); my @deps = split / +/, getdependencies($abs_extra); for my $dep (@deps) { if (exists($extras{$dep})) { my $ref = \$extras{$dep}; # Take reference. if ($$ref !~ m/needed by/) { # First dependency found. if ($$ref =~ m/enabled/) { $$ref .= " (needed by \e[32;1m$extra\e[0m"; } else { $$ref =~ s/\e\[.*?m//g; # Strip out previous coloring. Will be set in bold+red+blink later. $$ref .= " (needed by \e[0;32;1;5m$extra\e[0;31;1;5m"; } } else { if ($$ref =~ m/enabled/) { $$ref .= ", \e[32;1m$extra\e[0m"; } else { $$ref .= ", \e[0;32;1;5m$extra\e[0;31;1;5m"; } } } } } for my $extra (sort {$a cmp $b} keys(%extras)) { my $text = $extras{$extra}; if ($text =~ m/needed by/ && $text !~ m/enabled/) { printf "\e[31;1;5m%-*s = %s%s\e[0m\n", $maxlen, $extra, $text, ($text =~ m/needed by/ ? ")" : ""); } else { printf "%-*s = %s%s\n", $maxlen, $extra, $text, ($text =~ m/needed by/ ? "\e[0m)" : ""); } } return keys(%extras) if wantarray; # Can be used by manage_extras. } sub enable_extras (@) { my (@extras) = @_; for my $extra (@extras) { my $extrapath = "src/modules/extra/$extra"; if (!-e $extrapath) { print STDERR "Cannot enable \e[32;1m$extra\e[0m : No such file or directory in src/modules/extra\n"; next; } my $source = "src/modules/$extra"; if (-e $source) { print STDERR "Cannot enable \e[32;1m$extra\e[0m : destination in src/modules exists (might already be enabled?)\n"; next; } # Get dependencies, and add them to be processed. my @deps = split / +/, getdependencies($extrapath); for my $dep (@deps) { next if scalar(grep { $_ eq $dep } (@extras)) > 0; # Skip if we're going to be enabling it anyway. if (!-e "src/modules/$dep") { if (-e "src/modules/extra/$dep") { print STDERR "Will also enable extra \e[32;1m$dep\e[0m (needed by \e[32;1m$extra\e[0m)\n"; push @extras, $dep; } else { print STDERR "\e[33;1mWARNING:\e[0m module \e[32;1m$extra\e[0m might be missing dependency \e[32;1m$dep\e[0m - YOU are responsible for satisfying it!\n"; } } } print "Enabling $extra ... \n"; symlink "extra/$extra", $source or print STDERR "$source: Cannot link to 'extra/$extra': $!\n"; } } sub disable_extras (@) { opendir my $dd, "src/modules/extra/"; my @files = readdir($dd); closedir $dd; my (@extras) = @_; EXTRA: for my $extra (@extras) { my $extrapath = "src/modules/extra/$extra"; my $source = "src/modules/$extra"; if (!-e $extrapath) { print STDERR "Cannot disable \e[32;1m$extra\e[0m : Is not an extra\n"; next; } if ((! -l $source) || readlink($source) ne "extra/$extra") { print STDERR "Cannot disable \e[32;1m$extra\e[0m : Source is not a link or doesn't refer to the right file. Remove manually if this is in error.\n"; next; } # Check if anything needs this. for my $file (@files) { my @deps = split / +/, getdependencies("src/modules/extra/$file"); # File depends on this extra... if (scalar(grep { $_ eq $extra } @deps) > 0) { # And is both enabled and not about to be disabled. if (-e "src/modules/$file" && scalar(grep { $_ eq $file } @extras) < 1) { print STDERR "Cannot disable \e[32;1m$extra\e[0m : is needed by \e[32;1m$file\e[0m\n"; next EXTRA; } } } # Now remove. print "Disabling $extra ... \n"; unlink "src/modules/$extra" or print STDERR "Cannot disable \e[32;1m$extra\e[0m : $!\n"; } } inspircd-2.0.24/docs/000077500000000000000000000000001310731241200143345ustar00rootroot00000000000000inspircd-2.0.24/docs/COPYING000066400000000000000000000437471310731241200154060ustar00rootroot00000000000000 NOTE: InspIRCd is licensed under GPL version 2 only. "Upgrading" to a later version of the GENERAL PUBLIC LICENSE is not permitted. For further information on this, please contact us at irc.inspircd.org on #inspircd. ---------------------------------------------------------------------- GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. inspircd-2.0.24/docs/Doxyfile000066400000000000000000000166411310731241200160520ustar00rootroot00000000000000DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = InspIRCd PROJECT_NUMBER = 2.0 PROJECT_BRIEF = PROJECT_LOGO = OUTPUT_DIRECTORY = docs/doxygen CREATE_SUBDIRS = NO ALLOW_UNICODE_NAMES = NO OUTPUT_LANGUAGE = English BRIEF_MEMBER_DESC = YES REPEAT_BRIEF = YES ABBREVIATE_BRIEF = ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO FULL_PATH_NAMES = YES STRIP_FROM_PATH = STRIP_FROM_INC_PATH = SHORT_NAMES = NO JAVADOC_AUTOBRIEF = NO QT_AUTOBRIEF = NO MULTILINE_CPP_IS_BRIEF = NO INHERIT_DOCS = YES SEPARATE_MEMBER_PAGES = NO TAB_SIZE = 8 ALIASES = TCL_SUBST = OPTIMIZE_OUTPUT_FOR_C = NO OPTIMIZE_OUTPUT_JAVA = NO OPTIMIZE_FOR_FORTRAN = NO OPTIMIZE_OUTPUT_VHDL = NO EXTENSION_MAPPING = MARKDOWN_SUPPORT = YES AUTOLINK_SUPPORT = YES BUILTIN_STL_SUPPORT = YES CPP_CLI_SUPPORT = NO SIP_SUPPORT = NO IDL_PROPERTY_SUPPORT = YES DISTRIBUTE_GROUP_DOC = NO SUBGROUPING = YES INLINE_GROUPED_CLASSES = NO INLINE_SIMPLE_STRUCTS = NO TYPEDEF_HIDES_STRUCT = NO LOOKUP_CACHE_SIZE = 0 EXTRACT_ALL = NO EXTRACT_PRIVATE = NO EXTRACT_PACKAGE = NO EXTRACT_STATIC = NO EXTRACT_LOCAL_CLASSES = YES EXTRACT_LOCAL_METHODS = NO EXTRACT_ANON_NSPACES = NO HIDE_UNDOC_MEMBERS = NO HIDE_UNDOC_CLASSES = NO HIDE_FRIEND_COMPOUNDS = NO HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO CASE_SENSE_NAMES = NO HIDE_SCOPE_NAMES = NO HIDE_COMPOUND_REFERENCE= NO SHOW_INCLUDE_FILES = YES SHOW_GROUPED_MEMB_INC = NO FORCE_LOCAL_INCLUDES = NO INLINE_INFO = YES SORT_MEMBER_DOCS = YES SORT_BRIEF_DOCS = NO SORT_MEMBERS_CTORS_1ST = NO SORT_GROUP_NAMES = NO SORT_BY_SCOPE_NAME = NO STRICT_PROTO_MATCHING = NO GENERATE_TODOLIST = YES GENERATE_TESTLIST = YES GENERATE_BUGLIST = YES GENERATE_DEPRECATEDLIST= YES ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 SHOW_USED_FILES = YES SHOW_FILES = YES SHOW_NAMESPACES = YES FILE_VERSION_FILTER = LAYOUT_FILE = CITE_BIB_FILES = QUIET = NO WARNINGS = NO WARN_IF_UNDOCUMENTED = NO WARN_IF_DOC_ERROR = YES WARN_NO_PARAMDOC = NO WARN_FORMAT = "$file:$line: $text" WARN_LOGFILE = INPUT = INPUT_ENCODING = UTF-8 FILE_PATTERNS = RECURSIVE = YES EXCLUDE = EXCLUDE_SYMLINKS = YES EXCLUDE_PATTERNS = */.git/* \ */doxygen/* \ */commands/* \ */modes/* \ */modules/* EXCLUDE_SYMBOLS = EXAMPLE_PATH = EXAMPLE_PATTERNS = EXAMPLE_RECURSIVE = NO IMAGE_PATH = INPUT_FILTER = FILTER_PATTERNS = FILTER_SOURCE_FILES = NO FILTER_SOURCE_PATTERNS = USE_MDFILE_AS_MAINPAGE = README.md SOURCE_BROWSER = NO INLINE_SOURCES = NO STRIP_CODE_COMMENTS = YES REFERENCED_BY_RELATION = NO REFERENCES_RELATION = NO REFERENCES_LINK_SOURCE = YES SOURCE_TOOLTIPS = YES USE_HTAGS = NO VERBATIM_HEADERS = YES ALPHABETICAL_INDEX = YES COLS_IN_ALPHA_INDEX = 5 IGNORE_PREFIX = GENERATE_HTML = YES HTML_OUTPUT = html HTML_FILE_EXTENSION = .html HTML_HEADER = HTML_FOOTER = HTML_STYLESHEET = HTML_EXTRA_STYLESHEET = HTML_EXTRA_FILES = HTML_COLORSTYLE_HUE = 220 HTML_COLORSTYLE_SAT = 100 HTML_COLORSTYLE_GAMMA = 80 HTML_TIMESTAMP = NO HTML_DYNAMIC_SECTIONS = NO HTML_INDEX_NUM_ENTRIES = 100 GENERATE_DOCSET = YES DOCSET_FEEDNAME = "Doxygen generated documentation" DOCSET_BUNDLE_ID = org.doxygen.Project DOCSET_PUBLISHER_ID = org.doxygen.Publisher DOCSET_PUBLISHER_NAME = Publisher GENERATE_HTMLHELP = NO CHM_FILE = HHC_LOCATION = GENERATE_CHI = NO CHM_INDEX_ENCODING = BINARY_TOC = NO TOC_EXPAND = NO GENERATE_QHP = NO QCH_FILE = QHP_NAMESPACE = org.doxygen.Project QHP_VIRTUAL_FOLDER = doc QHP_CUST_FILTER_NAME = QHP_CUST_FILTER_ATTRS = QHP_SECT_FILTER_ATTRS = QHG_LOCATION = GENERATE_ECLIPSEHELP = NO ECLIPSE_DOC_ID = org.doxygen.Project DISABLE_INDEX = NO GENERATE_TREEVIEW = NO ENUM_VALUES_PER_LINE = 4 TREEVIEW_WIDTH = 250 EXT_LINKS_IN_WINDOW = NO FORMULA_FONTSIZE = 10 FORMULA_TRANSPARENT = YES USE_MATHJAX = NO MATHJAX_FORMAT = HTML-CSS MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest MATHJAX_EXTENSIONS = MATHJAX_CODEFILE = SEARCHENGINE = YES SERVER_BASED_SEARCH = NO EXTERNAL_SEARCH = NO SEARCHENGINE_URL = SEARCHDATA_FILE = searchdata.xml EXTERNAL_SEARCH_ID = EXTRA_SEARCH_MAPPINGS = GENERATE_LATEX = NO LATEX_OUTPUT = latex LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex COMPACT_LATEX = NO PAPER_TYPE = a4 EXTRA_PACKAGES = LATEX_HEADER = LATEX_FOOTER = LATEX_EXTRA_STYLESHEET = LATEX_EXTRA_FILES = PDF_HYPERLINKS = YES USE_PDFLATEX = YES LATEX_BATCHMODE = NO LATEX_HIDE_INDICES = NO LATEX_SOURCE_CODE = NO LATEX_BIB_STYLE = plain GENERATE_RTF = NO RTF_OUTPUT = rtf COMPACT_RTF = NO RTF_HYPERLINKS = NO RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = RTF_SOURCE_CODE = NO GENERATE_MAN = NO MAN_OUTPUT = man MAN_EXTENSION = .3 MAN_SUBDIR = MAN_LINKS = NO GENERATE_XML = NO XML_OUTPUT = xml XML_PROGRAMLISTING = YES GENERATE_DOCBOOK = NO DOCBOOK_OUTPUT = docbook DOCBOOK_PROGRAMLISTING = NO GENERATE_AUTOGEN_DEF = NO GENERATE_PERLMOD = NO PERLMOD_LATEX = NO PERLMOD_PRETTY = YES PERLMOD_MAKEVAR_PREFIX = ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = NO SEARCH_INCLUDES = YES INCLUDE_PATH = INCLUDE_FILE_PATTERNS = PREDEFINED = EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES TAGFILES = GENERATE_TAGFILE = ALLEXTERNALS = NO EXTERNAL_GROUPS = YES EXTERNAL_PAGES = YES PERL_PATH = /usr/bin/perl CLASS_DIAGRAMS = YES MSCGEN_PATH = DIA_PATH = HIDE_UNDOC_RELATIONS = YES HAVE_DOT = NO DOT_NUM_THREADS = 0 DOT_FONTNAME = Helvetica DOT_FONTSIZE = 10 DOT_FONTPATH = CLASS_GRAPH = YES COLLABORATION_GRAPH = YES GROUP_GRAPHS = YES UML_LOOK = NO UML_LIMIT_NUM_FIELDS = 10 TEMPLATE_RELATIONS = NO INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES CALL_GRAPH = NO CALLER_GRAPH = NO GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES DOT_IMAGE_FORMAT = png INTERACTIVE_SVG = NO DOT_PATH = DOTFILE_DIRS = MSCFILE_DIRS = DIAFILE_DIRS = PLANTUML_JAR_PATH = PLANTUML_INCLUDE_PATH = DOT_GRAPH_MAX_NODES = 50 MAX_DOT_GRAPH_DEPTH = 0 DOT_TRANSPARENT = NO DOT_MULTI_TARGETS = NO GENERATE_LEGEND = YES DOT_CLEANUP = YES inspircd-2.0.24/docs/conf/000077500000000000000000000000001310731241200152615ustar00rootroot00000000000000inspircd-2.0.24/docs/conf/aliases/000077500000000000000000000000001310731241200167025ustar00rootroot00000000000000inspircd-2.0.24/docs/conf/aliases/anope.conf.example000066400000000000000000000026701310731241200223120ustar00rootroot00000000000000# Aliases for nickserv, chanserv, operserv, memoserv, hostserv, botserv # Shorthand aliases for nickserv, chanserv, operserv, memoserv, hostserv, botserv # /id [account] # Identify for a nickname inspircd-2.0.24/docs/conf/aliases/atheme.conf.example000066400000000000000000000033331310731241200224500ustar00rootroot00000000000000# Aliases for nickserv, chanserv, operserv, memoserv # Shorthand aliases for nickserv, chanserv, operserv, memoserv # /id [channel] # Identify for a channel or nickname inspircd-2.0.24/docs/conf/censor.conf.example000066400000000000000000000005271310731241200210570ustar00rootroot00000000000000# Configuration file for m_censor.so # The tags for this module are formatted as follows: # # # # You can specify # to block lines containing the word inspircd-2.0.24/docs/conf/filter.conf.example000066400000000000000000000047421310731241200210560ustar00rootroot00000000000000# Configuration file for m_filter.so # The tags for this module are formatted as follows: # # # # Valid actions for 'action' are: # # block This blocks the line, sends out a notice to all opers with # +s and informs the user that their message was blocked. # # silent This blocks the line only, and informs the user their message # was blocked, but does not notify opers. # # none This action causes nothing to be done except logging. This # is the default action if none is specified. # # kill This disconnects the user, with the 'reason' parameter as # the kill reason. # # gline G-LINE the user for 'duration' length of time. Durations may # be specified using the notation 1y2d3h4m6s in a similar way to # other glines, omitting the duration or setting it to 0 makes # any glines set by this filter be permanent. # # You can add filters from IRC using the /FILTER command. If you do this, they # will be set globally to your entire network. # # Valid characters for 'flags' are one or more of: # # p: Block private and channel messages # n: Block private and channel notices # P: Block part messages # q: Block quit messages # o: Don't match against opers # c: Strip color codes from text before trying to match # *: Represents all of the above flags # -: Does nothing, a no-op for when you do not want to specify any flags # # IMPORTANT NOTE: Because the InspIRCd config reader places special meaning on the # '\' character, you must use '\\' if you wish to specify a '\' character in a regular # expression. For example, to indicate numbers, use \\d and not \d. This does not # apply when adding a regular expression over irc with the /FILTER command. # Example filters for m_filter: # # # # # An example regexp filter for m_filter_pcre: # # # An example of excluding a channel from filtering: # inspircd-2.0.24/docs/conf/helpop-full.conf.example000066400000000000000000001176561310731241200220310ustar00rootroot00000000000000##################### # Helpop Standard # ##################### ##################### # User Commands # ##################### ##################### # Oper Commands # ##################### ###################### # User/Channel Modes # ###################### ###################### # Stats Symbols # ###################### ###################### # SNOMASKS # ###################### ###################### # EXTBANS # ###################### inspircd-2.0.24/docs/conf/helpop.conf.example000066400000000000000000000352341310731241200210600ustar00rootroot00000000000000# Sample configuration file for m_helpop.so # You can either copy this into your conf folder and set up the module to use it, # or you can customize the responses for your network and/or add more. # # The way the new helpop system works is simple. You use one or more helpop tags. # . # key is what the user is looking for (i.e. /helpop moo), and value is what they get back # (note that it can span multiple lines!). # -- w00t 16/dec/2006 # inspircd-2.0.24/docs/conf/inspircd.conf.example000066400000000000000000001330431310731241200214010ustar00rootroot00000000000000######################################################################## # # # ___ ___ ____ ____ _ # # |_ _|_ __ ___ _ __|_ _| _ \ / ___|__| | # # | || '_ \/ __| '_ \| || |_) | | / _` | # # | || | | \__ \ |_) | || _ <| |__| (_| | # # |___|_| |_|___/ .__/___|_| \_\\____\__,_| # # |_| # # ____ __ _ _ _ # # / ___|___ _ __ / _(_) __ _ _ _ _ __ __ _| |_(_) ___ _ __ # # | | / _ \| '_ \| |_| |/ _` | | | | '__/ _` | __| |/ _ \| '_ \ # # | |__| (_) | | | | _| | (_| | |_| | | | (_| | |_| | (_) | | | | # # \____\___/|_| |_|_| |_|\__, |\__,_|_| \__,_|\__|_|\___/|_| |_| # # |___/ # # # ##################################||#################################### #||# ##################################||#################################### # # # This is an example of the config file for InspIRCd. # # Change the options to suit your network. # # # # # # ____ _ _____ _ _ ____ _ _ _ # # | _ \ ___ __ _ __| | |_ _| |__ (_)___ | __ )(_) |_| | # # | |_) / _ \/ _` |/ _` | | | | '_ \| / __| | _ \| | __| | # # | _ < __/ (_| | (_| | | | | | | | \__ \ | |_) | | |_|_| # # |_| \_\___|\__,_|\__,_| |_| |_| |_|_|___/ |____/|_|\__(_) # # # # Lines prefixed with READ THIS BIT, as shown above, are IMPORTANT # # lines, and you REALLY SHOULD READ THEM. Yes, THIS MEANS YOU. Even # # if you've configured InspIRCd before, these probably indicate # # something new or different to this version and you SHOULD READ IT. # # # ######################################################################## #-#-#-#-#-#-#-#-#-# INCLUDE CONFIGURATION #-#-#-#-#-#-#-#-#-#-#-#-#-# # # # This optional tag allows you to include another config file # # allowing you to keep your configuration tidy. The configuration # # file you include will be treated as part of the configuration file # # which includes it, in simple terms the inclusion is transparent. # # # # All paths to config files are relative to the directory that the # # process runs in. # # # # You may also include an executable file, in which case if you do so # # the output of the executable on the standard output will be added # # to your config at the point of the include tag. # # # # Syntax is as follows: # # # # # # # # Executable include example: # # # # #-#-#-#-#-#-#-#-#-#-#-# VARIABLE DEFINITIONS -#-#-#-#-#-#-#-#-#-#-#-# # # # You can define variables that will be substituted later in the # # configuration file. This can be useful to allow settings to be # # easily changed, or to parameterize a remote includes. # # # # Variables may be redefined and may reference other variables. # # Value expansion happens at the time the tag is read. # # # # Using variable definitions REQUIRES that the config format be # # changed to "xml" from the default "compat" that uses escape # # sequences such as "\"" and "\n", and does not support # #-#-#-#-#-#-#-#-#-#-#-#- SERVER DESCRIPTION -#-#-#-#-#-#-#-#-#-#-#-#- # # # Here is where you enter the information about your server. # # # #-#-#-#-#-#-#-#-#-#-#-#- ADMIN INFORMATION -#-#-#-#-#-#-#-#-#-#-#-# # # # Describes the Server Administrator's real name (optionally), # # nick, and email address. # # # #-#-#-#-#-#-#-#-#-#-#-#- PORT CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#- # # # Enter the port and address bindings here. # # # # # # ____ _ _____ _ _ ____ _ _ _ # # | _ \ ___ __ _ __| | |_ _| |__ (_)___ | __ )(_) |_| | # # | |_) / _ \/ _` |/ _` | | | | '_ \| / __| | _ \| | __| | # # | _ < __/ (_| | (_| | | | | | | | \__ \ | |_) | | |_|_| # # |_| \_\___|\__,_|\__,_| |_| |_| |_|_|___/ |____/|_|\__(_) # # # # If you want to link servers to InspIRCd you must load the # # m_spanningtree.so module! Please see the modules list for # # information on how to load this module! If you do not load this # # module, server ports will NOT work! # # When linking servers, the OpenSSL and GnuTLS implementations are completely # link-compatible and can be used alongside each other # on each end of the link without any significant issues. # Supported SSL types are: "openssl" and "gnutls". # You must load m_ssl_openssl for OpenSSL or m_ssl_gnutls for GnuTLS. #-#-#-#-#-#-#-#-#-#- DIE/RESTART CONFIGURATION -#-#-#-#-#-#-#-#-#-#- # # # You can configure the passwords here which you wish to use for # # the /DIE and /RESTART commands. Only trusted ircops who will # # need this ability should know the die and restart password. # # # #hash="sha256" # diepass: Password for opers to use if they need to shutdown (die) # a server. diepass="" # restartpass: Password for opers to use if they need to restart # a server. restartpass=""> #-#-#-#-#-#-#-#-#-#- CONNECTIONS CONFIGURATION -#-#-#-#-#-#-#-#-#-#-# # # # This is where you can configure which connections are allowed # # and denied access onto your server. The password is optional. # # You may have as many of these as you require. To allow/deny all # # connections, use a '*' or 0.0.0.0/0. # # # # -- It is important to note that connect tags are read from the -- # # TOP DOWN. This means that you should have more specific deny # # and allow tags at the top, progressively more general, followed # # by a # # connect:reason is the message that users will see if they match a deny block #hash="sha256" # password: Password to use for this block/user(s) password="secret" # maxchans: Maximum number of channels a user in this class # be in at one time. This overrides every other maxchans setting. #maxchans="30" # timeout: How long (in seconds) the server will wait before # disconnecting a user if they do not do anything on connect. # (Note, this is a client-side thing, if the client does not # send /nick, /user or /pass) timeout="10" # localmax: Maximum local connections per IP (or CIDR mask, see below). localmax="3" # globalmax: Maximum global (network-wide) connections per IP (or CIDR mask, see below). globalmax="3" # maxconnwarn: Enable warnings when localmax or globalmax are reached (defaults to on) maxconnwarn="off" # usednsbl: Defines whether or not users in this class are subject to DNSBL. Default is yes. # This setting only has effect when m_dnsbl is loaded. #usednsbl="yes" # useident: Defines if users in this class MUST respond to a ident query or not. useident="no" # limit: How many users are allowed in this class limit="5000" # modes: Usermodes that are set on users in this block on connect. # Enabling this option requires that the m_conn_umodes module be loaded. # This entry is highly recommended to use for/with IP Cloaking/masking. # For the example to work, this also requires that the m_cloaking # module be loaded as well. modes="+x" # requireident, requiressl, requireaccount: require that users of this # block have a valid ident response, use SSL, or have authenticated. # Requires m_ident, m_sslinfo, or m_services_account respectively. requiressl="on" # NOTE: For requireaccount, you must complete the signon prior to full # connection. Currently, this is only possible by using SASL # authentication; passforward and PRIVMSG NickServ happen after # your final connect block has been found. # Alternate MOTD file for this connect class. The contents of this file are # specified using or motd="secretmotd" # Allow color codes to be processed in the message of the day file. # the following characters are valid color code escapes: # \002 or \b = Bold # \037 or \u = Underline # \003 or \c = Color (with a code postfixed to this char) # \017 or \x = Stop all color sequences allowmotdcolors="false" # port: What port this user is allowed to connect on. (optional) # The port MUST be set to listen in the bind blocks above. port="6697"> #-#-#-#-#-#-#-#-#-#-#-#- CIDR CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#- # # # CIDR configuration allows detection of clones and applying of # # throttle limits across a CIDR range. (A CIDR range is a group of # # IPs, for example, the CIDR range 192.168.1.0-192.168.1.255 may be # # represented as 192.168.1.0/24). This means that abuse across an ISP # # is detected and curtailed much easier. Here is a good chart that # # shows how many IPs the different CIDRs correspond to: # # http://en.wikipedia.org/wiki/CIDR#Prefix_aggregation # # # # This file has all the information about oper classes, types and o:lines. # You *MUST* edit it. # This file has all the information about server links and ulined servers. # You *MUST* edit it if you intend to link servers. #-#-#-#-#-#-#-#-#-#- MISCELLANEOUS CONFIGURATION -#-#-#-#-#-#-#-#-#-# # # # Files block - contains files whose contents are used by the ircd # # motd - displayed on connect and when a user executes /MOTD # rules - displayed when the user executes /RULES # Modules can also define their own files # Example of an executable file include. Note this will be read on rehash, # not when the command is run. # #-#-#-#-#-#-#-#-#-#-#-# MAXIMUM CHANNELS -#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # # #-#-#-#-#-#-#-#-#-#-#-#-#-#-# DNS SERVER -#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # If these values are not defined, InspIRCd uses the default DNS resolver # of your system. # An example of using an IPv6 nameserver # #-#-#-#-#-#-#-#-#-#-#-#-#-#-# PID FILE -#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # # # Define the path to the PID file here. The PID file can be used to # # rehash the ircd from the shell or to terminate the ircd from the # # shell using shell scripts, perl scripts, etc... and to monitor the # # ircd's state via cron jobs. If this is a relative path, it will be # # relative to the configuration directory, and if it is not defined, # # the default of 'inspircd.pid' is used. # # # # #-#-#-#-#-#-#-#-#-#-#-#-#- BANLIST LIMITS #-#-#-#-#-#-#-#-#-#-#-#-#-#-# # # # Use these tags to customise the ban limits on a per channel basis. # # The tags are read from top to bottom, and any tag found which # # matches the channels name applies the banlimit to that channel. # # It is advisable to put an entry with the channel as '*' at the # # bottom of the list. If none are specified or no maxbans tag is # # matched, the banlist size defaults to 64 entries. # # # #-#-#-#-#-#-#-#-#-#-#- DISABLED FEATURES -#-#-#-#-#-#-#-#-#-#-#-#-#-# # # # This tag is optional, and specifies one or more features which are # # not available to non-operators. # # # # For example you may wish to disable NICK and prevent non-opers from # # changing their nicknames. # # Note that any disabled commands take effect only after the user has # # 'registered' (e.g. after the initial USER/NICK/PASS on connection) # # so for example disabling NICK will not cripple your network. # # # # You can also define if you want to disable any channelmodes # # or usermodes from your users. # # # # `fakenonexistant' will make the ircd pretend that nonexistant # # commands simply don't exist to non-opers ("no such command"). # # # # #-#-#-#-#-#-#-#-#-#-#-#-#-#-#- RTFM LINE -#-#-#-#-#-#-#-#-#-#-#-#-#-# # # # Just remove this... Its here to make you read ALL of the config # # file options ;) # #-#-#-#-#-#-#-#-#-#-#-#-#- SERVER OPTIONS -#-#-#-#-#-#-#-#-#-#-#-#-# # # # Settings to define which features are usable on your server. # # # # suffixpart: What (if anything) users' part message # should be suffixed with. suffixpart=""" # fixedquit: Set all users' quit messages to this value. #fixedquit="" # fixedpart: Set all users' part messages in all channels # to this value. #fixedpart="" # syntaxhints: If enabled, if a user fails to send the correct parameters # for a command, the ircd will give back some help text of what # the correct parameters are. syntaxhints="no" # cyclehosts: If enabled, when a user gets a host set, it will cycle # them in all their channels. If not, it will simply change their host # without cycling them. cyclehosts="yes" # cyclehostsfromuser: If enabled, the source of the mode change for # cyclehosts will be the user who cycled. This can look nicer, but # triggers anti-takeover mechanisms of some obsolete bots. cyclehostsfromuser="no" # ircumsgprefix: Use undernet-style message prefixing for NOTICE and # PRIVMSG. If enabled, it will add users' prefix to the line, if not, # it will just message the user normally. ircumsgprefix="no" # announcets: If set to yes, when the timestamp on a channel changes, all users # in the channel will be sent a NOTICE about it. announcets="yes" # allowmismatch: Setting this option to yes will allow servers to link even # if they don't have the same "optionally common" modules loaded. Setting this to # yes may introduce some desyncs and unwanted behaviour. allowmismatch="no" # defaultbind: Sets the default for tags without an address. Choices are # ipv4 or ipv6; if not specified, IPv6 will be used if your system has support, # falling back to IPv4 otherwise. defaultbind="auto" # hostintopic: If enabled, channels will show the host of the topic setter # in the topic. If set to no, it will only show the nick of the topic setter. hostintopic="yes" # pingwarning: If a server does not respond to a ping within x seconds, # it will send a notice to opers with snomask +l informing that the server # is about to ping timeout. pingwarning="15" # serverpingfreq: How often pings are sent between servers (in seconds). serverpingfreq="60" # defaultmodes: What modes are set on a empty channel when a user # joins it and it is unregistered. defaultmodes="nt" # moronbanner: This is the text that is sent to a user when they are # banned from the server. moronbanner="You're banned! Email abuse@example.com with the ERROR line below for help." # exemptchanops: exemptions for channel access restrictions based on prefix. exemptchanops="nonick:v flood:o" # invitebypassmodes: This allows /invite to bypass other channel modes. # (Such as +k, +j, +l, etc.) invitebypassmodes="yes" # nosnoticestack: This prevents snotices from 'stacking' and giving you # the message saying '(last message repeated X times)'. Defaults to no. nosnoticestack="no" # welcomenotice: When turned on, this sends a NOTICE to connecting users # with the text Welcome to ! after successful registration. # Defaults to yes. welcomenotice="yes"> #-#-#-#-#-#-#-#-#-#-#-# PERFORMANCE CONFIGURATION #-#-#-#-#-#-#-#-#-#-# # # #-#-#-#-#-#-#-#-#-#-#-# SECURITY CONFIGURATION #-#-#-#-#-#-#-#-#-#-#-# # #