Advertisement
Guest User

InspIRCd 1.2 Configuration File Generator

a guest
Jun 26th, 2010
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 6.25 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # InspIRCd 1.2 Config File Generator
  3. # Email bugs/suggestions to miniCruzer@live.com
  4. use Term::ANSIColor;
  5. print color 'bold';
  6. print "This will generate an InspIRCd 1.2 config file for you.\n";
  7. print "Do not make up any information, other wise you may find\n";
  8. print "that you have a broken IRCd.\n";
  9. print "*******************************************************\n";
  10. print "Please input the IP your IRCd will run on. [Required]\n";
  11. $BindIP = <STDIN>;
  12. chomp($BindIP);
  13. print "Please input the name of your IRC Network. [Required]\n";
  14. $NetName = <STDIN>;
  15. chomp($NetName);
  16. print "Please input your network address. ($NetName.com/.org/.net) [Required]\n";
  17. $NetAddress = <STDIN>;
  18. chomp($NetAddress);
  19. print "Please input your server name. [Required]\n";
  20. $ServName = <STDIN>;
  21. chomp($ServName);
  22. print "Please input YOUR resolved hostname. (Example: *@*.dhcp.insightbb.com). [Recommended]\n";
  23. $MyHost = <STDIN>;
  24. chomp($MyHost);
  25. print "Please input your email address. [Optional]\n";
  26. $MyEmail = <STDIN>;
  27. chomp($MyEmail);
  28. print "Please input your full name. [Optional]\n";
  29. $MyName = <STDIN>;
  30. chomp($MyName);
  31. print "Please input your IRC Nickname. [Recommended]\n";
  32. $MyNick = <STDIN>;
  33. chomp($MyNick);
  34. print "Please input a password to use (this will be used to oper up, and restart\/kill the IRCd.) [REQUIRED]\n";
  35. $MyPass = <STDIN>;
  36. chomp($MyPass);
  37. @ConfFiles = ('inspircd.conf','opers.conf','modules.conf');
  38. unlink @ConfFiles;
  39. system ('rm -rf *.example');
  40. my $inspircdconf = qq(
  41. <server name="$ServName" description="$NetName Client Server" network="$NetName">
  42. <admin name="$MyName" nick="$MyNick" email="$MyEmail">
  43. <bind address="$BindIP" port="6660-6669" type="clients">
  44. <bind address="$BindIP" port="7000,7001" type="servers">
  45. <bind address="$BindIP" port="7005" type="servers" transport="openssl">
  46. <power diepass="$MyPass" restartpass="$MyPass">
  47. <connect
  48.          name="main"
  49.          allow="*"
  50.          timeout="10"
  51.          pingfreq="120"
  52.          sendq="262144"
  53.          recvq="8192"
  54.          localmax="3"
  55.          globalmax="3"
  56.          useident="no"
  57.          limit="5000"
  58.          modes="+iwx">
  59. <cidr ipv4clone="32" ipv6clone="128">
  60. <include file="opers.conf">
  61. <include file="links.conf">
  62. <files motd="inspircd.motd" rules="inspircd.rules">
  63. <channels users="20" opers="60">
  64. <dns timeout="5">
  65. <banlist chan="*" limit="20">
  66. <disabled commands="GLINE KLINE ZLINE KILL TLINE QLINE FILTER" usermodes="gW" chanmodes="O" fakenonexistant="yes">
  67. <options
  68.          prefixquit="Quit: "
  69.          suffixquit=""
  70.          prefixpart=""
  71.          suffixpart=""
  72.          syntaxhints="yes"
  73.          cyclehosts="yes"
  74.          ircumsgprefix="no"
  75.          announcets="yes"
  76.          hostintopic="yes"
  77.          pingwarning="15"
  78.          serverpingfreq="60"
  79.          allowhalfop="yes"
  80.          defaultmodes="nt"
  81.          moronbanner="You're banned! Email $MyEmail with the ERROR line below for help."
  82.          exemptchanops="*"
  83.          invitebypassmodes="yes">
  84. <performance
  85.              netbuffersize="10240"
  86.              maxwho="128"
  87.              somaxconn="128"
  88.              softlimit="12800"
  89.              quietbursts="yes"
  90.              nouserdns="no">
  91. <security
  92.           announceinvites="dynamic"
  93.           hidemodes="eI"
  94.           hideulines="yes"
  95.           flatlinks="no"
  96.           hidebans="yes"
  97.           hidesplits="yes"
  98.           maxtargets="20"
  99.           customversion=""
  100.           operspywhois="yes"
  101.           restrictbannedusers="yes"
  102.           genericoper="no"
  103.           userstats="">
  104. <limits
  105.         maxnick="31"
  106.         maxchan="64"
  107.         maxmodes="20"
  108.         maxident="11"
  109.         maxquit="255"
  110.         maxtopic="307"
  111.         maxkick="255"
  112.         maxgecos="128"
  113.         maxaway="200">
  114. <log method="file" type="* -USERINPUT -USEROUTPUT -m_spanningtree" level="default" target="ircd.log">
  115. <whowas groupsize="10" maxgroups="100000" maxkeep="3d">
  116. <badnick nick="ChanServ" reason="Reserved For Services">
  117. <badnick nick="NickServ" reason="Reserved For Services">
  118. <badnick nick="OperServ" reason="Reserved For Services">
  119. <badnick nick="MemoServ" reason="Reserved For Services">
  120. <exception host="$MyHost" reason="$MyNick">
  121. <insane
  122.         hostmasks="no"
  123.         ipmasks="no"
  124.         nickmasks="no"
  125.         trigger="95.5">
  126. <include file="modules.conf">
  127. );
  128. open (INSPIRCDCONF, '>>inspircd.conf');
  129. print INSPIRCDCONF $inspircdconf;
  130. close INSPIRCDCONF;
  131. my $opersconf = qq(
  132. <class name="Everything" commands="*" privs="*" usermodes="*" chanmodes="*">
  133. <class name="Shutdown"
  134.      commands="DIE RESTART REHASH LOADMODULE UNLOADMODULE RELOAD GUNLOADMODULE GRELOADMODULE SAJOIN SAPART SANICK SAQUIT SATOPIC"
  135.      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"
  136.      usermodes="*"
  137.      chanmodes="*">
  138. <class name="ServerLink" commands="CONNECT SQUIT CONNECT MKPASSWD ALLTIME SWHOIS CLOSE JUMPSERVER LOCKSERV" usermodes="*" chanmodes="*" privs="servers/auspex">
  139. <class name="BanControl" commands="KILL GLINE KLINE ZLINE QLINE ELINE TLINE RLINE CHECK NICKLOCK SHUN CLONES CBAN" usermodes="*" chanmodes="*">
  140. <class name="OperChat" commands="WALLOPS GLOBOPS SETIDLE" usermodes="*" chanmodes="*" privs="users/mass-message">
  141. <class name="HostCloak" commands="SETHOST SETIDENT SETNAME CHGHOST CHGIDENT TAXONOMY" usermodes="*" chanmodes="*" privs="users/auspex">
  142.  
  143.  
  144. ######################
  145. #     OPER TYPES     #
  146. ######################
  147. <type name="NetAdmin" classes="Everything" vhost="netadmin.$NetAddress" modes="+Wgs +AaCcQqkKLlOodXxtf" override="*" level="2" >
  148. <type name="GlobalOp" classes="OperChat BanControl HostCloak ServerLink" vhost="globalop.$NetAddress" level="1" override="*">
  149. <type name="Helper" classes="HostCloak" vhost="helper.$NetAddress">
  150.  
  151.  
  152. ######################
  153. #       OPERS        #
  154. ######################
  155. <oper
  156.       name="$MyNick"
  157.       password="$MyPass"
  158.       host="$MyHost"
  159.       type="NetAdmin">
  160. );
  161. open (OPERSCONF, '>>opers.conf');
  162. print OPERSCONF $opersconf;
  163. close (OPERSCONF);
  164. print "Your inspircd.conf has been written. Review it to make sure there\n";
  165. print "were no errors. Your modules.conf, and links.conf still\n";
  166. print "need to be done. Email bugs/suggestions to miniCruzer\@insaneirc.com\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement