Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl -w
- # Autoconf for PlexusIRCd by miniCruzer
- # Thanks to jburges for providing configuration.
- # Email bugs/comments to miniCruzer@live.com
- use strict;
- use Term::ANSIColor; # Colors
- my $conffile = "ircd.conf";
- system('rm -rf *.example'); # Deletes pre-existing example files.
- unlink $conffile if -e 'ircd.conf'; # if ircd.conf exists, erase it.
- # Subroutine to generate Cloak Keys
- sub randomPassword {
- my $password;
- my $_rand;
- my $password_length = $_[0];
- if (!$password_length) {
- $password_length = 10;
- }
- my @chars = split(" ",
- "a b c d e f g h i j k l m n o
- p q r s t u v w x y z
- 0 1 2 3 4 5 6 7 8 9");
- srand;
- for (my $i=0; $i <= $password_length ;$i++) {
- $_rand = int(rand 41);
- $password .= $chars[$_rand];
- }
- return $password;
- }
- # Cloak keys
- my $Cloak1 = randomPassword(20);
- my $Cloak2 = randomPassword(20);
- my $Cloak3 = randomPassword(20);
- print "PleXuS IRCd may require extra configuration. This will simply generate the\n";
- print "config. Do not expect this to start without minor altercations.\n";
- print "What is the server's name?\n";
- my $ServName = <STDIN>;
- chomp($ServName);
- print "What is the network name?\n";
- my $NetName = <STDIN>;
- chomp($NetName);
- print "What is the network address? (Example: $NetName.com / $NetName.org / $NetName.net)\n";
- my $NetAddress = <STDIN>;
- chomp($NetAddress);
- print "What is your full name?\n";
- my $FullName = <STDIN>;
- chomp($FullName);
- print "What IP are we binding on? (* is acceptable)\n";
- my $BindIP = <STDIN>;
- chomp($BindIP);
- print "What is your e-mail address?\n";
- my $MyEmail = '';
- $MyEmail = <STDIN>;
- chomp($MyEmail);
- print "What is your IP address?\n";
- my $MyIP = <STDIN>;
- chomp($MyIP);
- print "What is your hostname? (What does your IP resovle to?)\n";
- my $MyHost = <STDIN>;
- chomp($MyHost);
- print "What do you want your spoof to be? (Example: i.still.hate.packets)\n";
- my $MySpoof = <STDIN>;
- chomp($MySpoof);
- print "What do you use as an IRC Nickname?\n";
- my $MyNick = <STDIN>;
- chomp($MyNick);
- print "What services are we using? (Example: services.$NetName.com)\n";
- my $Services = <STDIN>;
- chomp($Services);
- print "What password do you wish to oper-up with?\n";
- my $MyPassword = <STDIN>;
- chomp($MyPassword);
- my $config = qq(
- serverinfo
- {
- name = "$ServName";
- sid = "42D";
- description = "$NetName - Client Server";
- network_name = "$NetName";
- network_desc = "$NetName IRC Network";
- hub = yes;
- vhost = "$BindIP";
- max_clients = 512;
- rsa_private_key_file = "etc/ssl/rsa.key";
- ssl_certificate_file = "etc/ssl/cert.pem";
- };
- admin
- {
- name = "$FullName";
- description = "$ServName Server Administrator";
- email = "<$MyEmail>";
- };
- log
- {
- use_logging = yes;
- fuserlog = "logs/userlog";
- foperlog = "logs/operlog";
- ffailed_operlog = "logs/foperlog";
- log_level = L_INFO;
- };
- class
- {
- name = "users";
- ping_time = 90 seconds;
- number_per_ip = 3;
- max_local = 3;
- max_global = 10;
- max_number = 5000;
- cidr_bitlen_ipv4 = 24;
- cidr_bitlen_ipv6 = 120;
- number_per_cidr = 16;
- sendq = 1 megabyte;
- };
- class
- {
- name = "opers";
- ping_time = 90 seconds;
- number_per_ip = 10;
- max_number = 100;
- sendq = 2 megabytes;
- };
- class
- {
- name = "server";
- ping_time = 90 seconds;
- ping_warning = 15 seconds;
- connectfreq = 15 minutes;
- max_number = 1;
- sendq = 30 megabytes;
- };
- listen
- {
- flags = hidden, ssl;
- host = "$BindIP";
- port = 6697,9999;
- };
- listen
- {
- flags = hidden;
- host = "$BindIP";
- port = 6667,4400;
- };
- auth
- {
- user = "$MyIP";
- user = "$MyHost";
- spoof = "$MySpoof";
- class = "opers";
- flags = spoof_notice, exceed_limit, kline_exempt,
- gline_exempt, resv_exempt, no_tilde, can_flood, can_idle;
- };
- auth
- {
- user = "*@*";
- class = "users";
- };
- operator
- {
- name = "$MyNick";
- user = "$MySpoof";
- password = "$MyPassword";
- encrypted = yes;
- class = "opers";
- umodes = locops, servnotice, operwall, wallop, bots, cconn, cconn_full, debug, full, skill, nchange, rej, unauth, external, spy, operwall;
- flags = global_kill, remote, kline, unkline, xline,
- die, rehash, nick_changes, admin, operwall, gline, oper_spy;
- };
- cluster
- {
- name = "*.$NetAddress";
- type = all;
- };
- shared
- {
- name = "$Services";
- type = all, services;
- };
- exempt
- {
- ip = "$MyIP";
- };
- resv
- {
- reason = "Reserved for services/staff";
- nick = "nickserv";
- nick = "chanserv";
- nick = "operserv";
- nick = "memoserv";
- nick = "botserv";
- nick = "Global";
- nick = "JUPES";
- nick = "JUPE";
- nick = "CH?NF?X";
- nick = "oper";
- nick = "ircop";
- nick = "op";
- nick = "ident";
- nick = "pass";
- reason = "Clone bots";
- nick = "clone*";
- };
- channel
- {
- regex_bans = yes;
- cycle_on_hostchange = yes;
- disable_fake_channels = yes;
- restrict_channels = no;
- disable_local_channels = yes;
- use_invex = yes;
- use_except = yes;
- use_knock = yes;
- knock_delay = 1 minutes;
- knock_delay_channel = 1 minute;
- burst_topicwho = yes;
- max_chans_per_user = 25;
- quiet_on_ban = yes;
- max_bans = 100;
- join_flood_count = 16;
- join_flood_time = 8 seconds;
- default_split_user_count = 20000;
- default_split_server_count = 15;
- no_create_on_split = no;
- no_join_on_split = no;
- };
- serverhide
- {
- flatten_links = yes;
- links_delay = 5 minutes;
- hidden = yes;
- disable_hidden = no;
- hide_servers = yes;
- hidden_name = "*.$NetName";
- hide_server_ips = yes;
- };
- general
- {
- cloak_key1 = "$Cloak1";
- cloak_key2 = "$Cloak2";
- cloak_key3 = "$Cloak3";
- services_name = "$Services";
- gline_min_cidr = 16;
- gline_min_cidr6 = 48;
- invisible_on_connect = yes;
- burst_away = no;
- use_whois_actually = yes;
- kill_chase_time_limit = 90;
- hide_spoof_ips = yes;
- hide_killer = no;
- ignore_bogus_ts = no;
- disable_auth = no;
- disable_remote_commands = yes;
- tkline_expire_notices = no;
- default_floodcount = 10;
- failed_oper_notice = yes;
- dots_in_ident = 0;
- dot_in_ip6_addr = no;
- min_nonwildcard = 3;
- min_nonwildcard_simple = 3;
- max_accept = 20;
- anti_nick_flood = yes;
- max_nick_time = 20 seconds;
- max_nick_changes = 5;
- anti_spam_exit_message_time = 5 minutes;
- anti_spam_connect_numeric = yes;
- ts_warn_delta = 30 seconds;
- ts_max_delta = 5 minutes;
- kline_with_reason = yes;
- kline_reason = "Connection closed";
- reject_hold_time = 30 seconds;
- warn_no_nline = yes;
- stats_e_disabled = yes;
- stats_o_oper_only = yes;
- stats_P_oper_only = yes;
- stats_i_oper_only = yes;
- stats_k_oper_only = yes;
- caller_id_wait = 1 minute;
- opers_bypass_callerid = no;
- pace_wait_simple = 1 second;
- pace_wait = 10 seconds;
- short_motd = no;
- ping_cookie = no;
- no_oper_flood = yes;
- true_no_oper_flood = yes;
- oper_pass_resv = yes;
- idletime = 0;
- max_targets = 4;
- client_flood = 2560 bytes;
- message_locale = "standard";
- oper_only_umodes = bots, cconn, cconn_full, debug, full, skill,
- nchange, rej, spy, external, operwall, locops, unauth, hidechannels;
- oper_umodes = bots, locops, servnotice, operwall, wallop, external;
- throttle_time = 0;
- };
- glines
- {
- enable = yes;
- duration = 1 day;
- logging = reject, block;
- user = "I.still.hate.packets";
- name = "hades.arpa";
- action = reject, block;
- user = "god@*";
- name = "*";
- action = block;
- };
- modules
- {
- path = "ircd/modules";
- path = "ircd/modules/autoload";
- module = "m_samode.so";
- module = "m_spoof.so";
- module = "m_clearchan.so";
- module = "spy_info_notice.so";
- module = "spy_links_notice.so";
- module = "spy_motd_notice.so";
- module = "spy_stats_notice.so";
- module = "spy_stats_p_notice.so";
- module = "spy_trace_notice.so";
- module = "spy_whois_notice.so";
- module = "m_mkpasswd.so";
- module = "m_killhost.so";
- };
- );
- open (IRCDCONF, '>>ircd.conf');
- print IRCDCONF $config;
- close (IRCDCONF);
- print "Your config file has been generated. You may start the IRCd and oper up with /oper $MyNick $MyPassword\n";
- exit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement