3 # Take mIRC's servers.ini and create a networks.ini suitable for Quassel.
9 open SERVERS_INI, "<servers.ini" or die "Could not open servers.ini";
10 while(<SERVERS_INI>) {
11 my ($host, $portrange, $net) = /SERVER:(.+):(.+)GROUP:(.+)\r\n/;
13 foreach(split /,/, $portrange) {
15 push @{$serverlist->{$net}}, { Host => $host, Port => $_};
21 open NETWORKS_INI, ">networks.ini" or die "Could not open networks.ini for writing";
22 foreach(sort keys %$serverlist) {
23 print NETWORKS_INI "[$_]\n";
25 foreach(@{$serverlist->{$_}}) {
26 push @servers, "$_->{Host}:$_->{Port}";
28 print NETWORKS_INI "Servers=", join ',', @servers;
29 print NETWORKS_INI "\n\n";