Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl -w
- # InspIRCd 2.0 Configuration File Generator
- # Run from run/conf in your InspIRCd directory.
- # E-Mail bugs/suggestions to miniCruzer@InsaneIRC.com
- use Term::ANSIColor;
- print color 'bold blue';
- @ConfFiles = ("inspircd.conf","opers.conf","links.conf","modules.conf");
- unlink @ConfFiles;
- system("rm -rf *.example");
- system("clear");
- print " ___ ___ ____ ____ _ \n";
- print " |_ _|_ __ ___ _ __|_ _| _ \\ / ___|__| | \n";
- print " | || '_ \\/ __| '_ \\| || |_) | | / _` | \n";
- print " | || | | \\__ \\ |_) | || _ <| |__| (_| | \n";
- print " |___|_| |_|___/ .__/___|_| \\_\\\\____\\__,_| \n";
- print " |_| \n";
- print " ____ __ _ _ _ \n";
- print " / ___|___ _ __ / _(_) __ _ _ _ _ __ __ _| |_(_) ___ _ __ \n";
- print " | | / _ \\| '_ \\| |_| |/ _` | | | | '__/ _` | __| |/ _ \\| '_ \\ \n";
- print " | |__| (_) | | | | _| | (_| | |_| | | | (_| | |_| | (_) | | | | \n";
- print " \\____\\___/|_| |_|_| |_|\\__, |\\__,_|_| \\__,_|\\__|_|\\___/|_| |_| \n";
- print " |___/ \n";
- print color 'reset';
- print color 'bold';
- print "This is an auto-conf for InspIRCd2.0\n";
- print "You must run this from run\/conf of your InspIRCd directory.\n";
- print "Filling in incorrect information will result in a broken IRCd.\n";
- print "Please do not make up information.\n";
- print "*************************************************************\n";
- print "Please input the IP your IRCd will run on. [Required]\n";
- $bindip = <STDIN>;
- chomp($bindip);
- print "Please input the name of your IRC Network. [Required]\n";
- $NetName = <STDIN>;
- chomp($NetName);
- print "Please input your network address. ($NetName.com/.org/.net) [Required]\n";
- $NetAddress = <STDIN>;
- chomp($NetAddress);
- print "Please input your server name. [Required]\n";
- $ServName = <STDIN>;
- chomp($ServName);
- print "Please input YOUR resolved hostname. (Example: *@*.dhcp.insightbb.com). [Recommended]\n";
- $MyHost = <STDIN>;
- chomp($MyHost);
- print "Please input your email address. [Optional]\n";
- $MyEmail = <STDIN>;
- chomp($MyEmail);
- print "Please input your full name. [Optional]\n";
- $MyName = <STDIN>;
- chomp($MyName);
- print "Please input your IRC Nickname. [Recommended]\n";
- $MyNick = <STDIN>;
- chomp($MyNick);
- print "Please input a password to use (this will be used to oper up, and restart\/kill the IRCd.) [REQUIRED]\n";
- $MyPass = <STDIN>;
- chomp($MyPass);
- open (INSPIRCDCONF, '>>inspircd.conf');
- print INSPIRCDCONF "# Executable Include Example:\n";
- print INSPIRCDCONF "#<include executable=\"\/usr\/bin\/wget -q -O - http:\/\/$NetName.com\/inspircd.conf\">\n";
- print INSPIRCDCONF "<config format=\"xml\">\n";
- print INSPIRCDCONF "<define name=\"bindip\" value=\"1.2.\">\n";
- print INSPIRCDCONF "<server\n";
- print INSPIRCDCONF " name=\"$ServName\"\n";
- print INSPIRCDCONF " description=\"$NetName Client Server\"\n";
- print INSPIRCDCONF " network=\"$NetName\">\n";
- print INSPIRCDCONF "<admin\n";
- print INSPIRCDCONF " name=\"$MyName\"\n";
- print INSPIRCDCONF " nick=\"$MyNick\"\n";
- print INSPIRCDCONF " email=\"$MyEmail\">\n";
- print INSPIRCDCONF "<bind address=\"$bindip\" port=\"6660-6669\" type=\"clients\">\n";
- print INSPIRCDCONF "<bind address=\"$bindip\" port=\"7252\" type=\"servers\" ssl=\"openssl\">\n";
- print INSPIRCDCONF "<bind address=\"$bindip\" port=\"4400\" type=\"servers\">\n";
- print INSPIRCDCONF "<bind address=\"$bindip\" port=\"+7000,6697,9999\" type=\"clients\" ssl=\"openssl\">\n";
- print INSPIRCDCONF "<power\n";
- print INSPIRCDCONF " diepass=\"$MyPass\"\n";
- print INSPIRCDCONF " restartpass=\"$MyPass\">\n";
- print INSPIRCDCONF "<connect\n";
- print INSPIRCDCONF " name=\"main\"\n";
- print INSPIRCDCONF " allow=\"*\"\n";
- print INSPIRCDCONF " timeout=\"10\"\n";
- print INSPIRCDCONF " pingfreq=\"120\"\n";
- print INSPIRCDCONF " hardsendq=\"3048576\"\n";
- print INSPIRCDCONF " softsendq=\"1118192\"\n";
- print INSPIRCDCONF " recvq=\"12318192\"\n";
- print INSPIRCDCONF " threshold=\"10\"\n";
- print INSPIRCDCONF " commandrate=\"1000\"\n";
- print INSPIRCDCONF " fakelag=\"on\"\n";
- print INSPIRCDCONF " localmax=\"3\"\n";
- print INSPIRCDCONF " globalmax=\"3\"\n";
- print INSPIRCDCONF " useident=\"no\"\n";
- print INSPIRCDCONF " limit=\"5000\"\n";
- print INSPIRCDCONF " modes=\"+ix\">\n";
- print INSPIRCDCONF "<cidr\n";
- print INSPIRCDCONF " ipv4clone=\"32\"\n";
- print INSPIRCDCONF " ipv6clone=\"128\">\n";
- print INSPIRCDCONF "<include file=\"conf\/opers.conf\">\n";
- print INSPIRCDCONF "<include file=\"conf\/links.conf\">\n";
- print INSPIRCDCONF "<files motd=\"conf\/inspircd.motd\" rules=\"conf/inspircd.rules\">\n";
- print INSPIRCDCONF "#<execfiles rules=\"wget -O - http:\/\/www.example.com\/rules.txt\">\n";
- print INSPIRCDCONF "<channels users=\"20\" opers=\"60\">\n";
- print INSPIRCDCONF "<banlist chan=\"#morons\" limit=\"128\">\n";
- print INSPIRCDCONF "<banlist chan=\"*\" limit=\"69\">\n";
- print INSPIRCDCONF "<disabled commands=\"KILL GLINE ZLINE KLINE SQUIT TLINE QLINE\" usermodes=\"\" chanmodes=\"O\" fakenonexistant=\"yes\">\n";
- print INSPIRCDCONF "<options\n";
- print INSPIRCDCONF " prefixquit=\"Quit: \"\n";
- print INSPIRCDCONF " suffixquit=\"\"\n";
- print INSPIRCDCONF " prefixpart=\""\"\n";
- print INSPIRCDCONF " suffixpart=\""\"\n";
- print INSPIRCDCONF " syntaxhints=\"yes\"\n";
- print INSPIRCDCONF " cyclehosts=\"yes\"\n";
- print INSPIRCDCONF " ircumsgprefix=\"no\"\n";
- print INSPIRCDCONF " announcets=\"yes\"\n";
- print INSPIRCDCONF " allowmismatched=\"no\"\n";
- print INSPIRCDCONF " defaultbind=\"auto\"\n";
- print INSPIRCDCONF " hostintopic=\"yes\"\n";
- print INSPIRCDCONF " pingwarning=\"15\"\n";
- print INSPIRCDCONF " serverpingfreq=\"60\"\n";
- print INSPIRCDCONF " defaultmodes=\"nt\"\n";
- print INSPIRCDCONF " moronbanner=\"You\'re banned! Email $MyEmail with the ERROR line below for help.\"\n";
- print INSPIRCDCONF " exemptchanops=\"nonick:v flood:o\"\n";
- print INSPIRCDCONF " invitebypassmodes=\"yes\">\n";
- print INSPIRCDCONF "<performance\n";
- print INSPIRCDCONF " netbuffersize=\"10240\"\n";
- print INSPIRCDCONF " maxwho=\"4096\"\n";
- print INSPIRCDCONF " somaxconn=\"128\"\n";
- print INSPIRCDCONF " softlimit=\"12800\"\n";
- print INSPIRCDCONF " quietbursts=\"yes\"\n";
- print INSPIRCDCONF " nouserdns=\"no\">\n";
- print INSPIRCDCONF "<security\n";
- print INSPIRCDCONF " announceinvites=\"dynamic\"\n";
- print INSPIRCDCONF " hidemodes=\"eI\"\n";
- print INSPIRCDCONF " hideulines=\"yes\"\n";
- print INSPIRCDCONF " flatlinks=\"yes\"\n";
- print INSPIRCDCONF " hidebans=\"yes\"\n";
- print INSPIRCDCONF " hidekills=\"Disconnected\"\n";
- print INSPIRCDCONF " hidesplits=\"no\"\n";
- print INSPIRCDCONF " maxtargets=\"20\"\n";
- print INSPIRCDCONF " customversion=\"$NetName\"\n";
- print INSPIRCDCONF " operspywhois=\"yes\"\n";
- print INSPIRCDCONF " restrictbannedusers=\"yes\"\n";
- print INSPIRCDCONF " genericoper=\"no\"\n";
- print INSPIRCDCONF " userstats=\"GZKsfqPu\">\n";
- print INSPIRCDCONF "<limits\n";
- print INSPIRCDCONF " maxnick=\"40\"\n";
- print INSPIRCDCONF " maxchan=\"64\"\n";
- print INSPIRCDCONF " maxmodes=\"20\"\n";
- print INSPIRCDCONF " maxident=\"11\"\n";
- print INSPIRCDCONF " maxquit=\"255\"\n";
- print INSPIRCDCONF " maxtopic=\"307\"\n";
- print INSPIRCDCONF " maxkick=\"255\"\n";
- print INSPIRCDCONF " maxgecos=\"128\"\n";
- print INSPIRCDCONF " maxaway=\"200\">\n";
- print INSPIRCDCONF "<log method=\"file\" type=\"*\" level=\"default\" target=\"ircd.log\">\n";
- print INSPIRCDCONF "<whowas groupsize=\"10\" maxgroups=\"100000\" maxkeep=\"3d\">\n";
- print INSPIRCDCONF "<badnick nick=\"ChanServ\" reason=\"Reserved For Services\">\n";
- print INSPIRCDCONF "<badnick nick=\"NickServ\" reason=\"Reserved For Services\">\n";
- print INSPIRCDCONF "<badnick nick=\"OperServ\" reason=\"Reserved For Services\">\n";
- print INSPIRCDCONF "<badnick nick=\"MemoServ\" reason=\"Reserved For Services\">\n";
- print INSPIRCDCONF "<exception host=\"$MyHost\" reason=\"$MyNick\">\n";
- print INSPIRCDCONF "<insane\n";
- print INSPIRCDCONF " hostmasks=\"no\"\n";
- print INSPIRCDCONF " ipmasks=\"no\"\n";
- print INSPIRCDCONF " nickmasks=\"no\"\n";
- print INSPIRCDCONF " trigger=\"95.5\">\n";
- print INSPIRCDCONF "<include file=\"conf\/modules.conf\">\n";
- close (INSPIRCDCONF);
- open (OPERSCONF, '>>opers.conf');
- print OPERSCONF "<class name=\"Everything\" commands=\"*\" privs=\"*\" usermodes=\"*\" chanmodes=\"*\">\n";
- print OPERSCONF "<class name=\"Shutdown\"\n";
- print OPERSCONF " commands=\"DIE RESTART REHASH LOADMODULE UNLOADMODULE RELOAD GUNLOADMODULE GRELOADMODULE SAJOIN SAPART SANICK SAQUIT SATOPIC\"\n";
- print OPERSCONF " privs=\"users\/auspex channels\/auspex servers\/auspex users\/mass-message channels\/high-join-limit channels\/set-permanent users\/flood/no-throttle users\/flood\/increased-buffers\"\n";
- print OPERSCONF " usermodes=\"*\"\n";
- print OPERSCONF " chanmodes=\"*\">\n";
- print OPERSCONF "<class name=\"ServerLink\" commands=\"CONNECT SQUIT CONNECT MKPASSWD ALLTIME SWHOIS CLOSE JUMPSERVER LOCKSERV\" usermodes=\"*\" chanmodes=\"*\" privs=\"servers\/auspex\">\n";
- print OPERSCONF "<class name=\"BanControl\" commands=\"KILL GLINE KLINE ZLINE QLINE ELINE TLINE RLINE CHECK NICKLOCK SHUN CLONES CBAN\" usermodes=\"*\" chanmodes=\"*\">\n";
- print OPERSCONF "<class name=\"OperChat\" commands=\"WALLOPS GLOBOPS SETIDLE\" usermodes=\"*\" chanmodes=\"*\" privs=\"users\/mass-message\">\n";
- print OPERSCONF "<class name=\"HostCloak\" commands=\"SETHOST SETIDENT SETNAME CHGHOST CHGIDENT TAXONOMY\" usermodes=\"*\" chanmodes=\"*\" privs=\"users\/auspex\">\n";
- print OPERSCONF "\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\n";
- print OPERSCONF "\# OPER TYPES \#\n";
- print OPERSCONF "\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\n";
- print OPERSCONF "<type name=\"NetAdmin\" classes=\"Everything\" vhost=\"NetAdmin.$NetAddress\" modes=\"+s +AaCcQqkKLlOodXxtf\" override=\"*\" level=\"2\">\n";
- print OPERSCONF "<type name=\"GlobalOp\" classes=\"OperChat BanControl HostCloak ServerLink\" vhost=\"GlobalOp.$NetAddress\" level=\"1\" override=\"*\">\n";
- print OPERSCONF "<type name=\"Helper\" classes=\"HostCloak\" vhost=\"helper.$NetAddress\">\n";
- print OPERSCONF "\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\n";
- print OPERSCONF "\# OPERS \#\n";
- print OPERSCONF "\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\n";
- print OPERSCONF "<oper\n";
- print OPERSCONF " name=\"$MyNick\"\n";
- print OPERSCONF " password=\"$MyPass\"\n";
- print OPERSCONF " host=\"$MyHost *\@127.0.0.1\"\n";
- print OPERSCONF " sslonly=\"yes\"\n";
- print OPERSCONF " vhost=\"$MyNick.NetAdmin.$NetAddress\"\n";
- print OPERSCONF " type=\"NetAdmin\">\n";
- close (OPERSCONF);
- print "Your inspircd.conf and opers.conf have been created.\n";
- print "To oper up, connect to your IRCd on port +6697, and use $MyNick as your opernick, and $MyPass as your oper pass.\n";
- print "To shutdown\/restart the IRCd, use $MyPass as a password.\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement