- chop;
-
- next if /^$/;
- next if /^#/;
-
- if (/^--(\S+)[\s\t]+(.*)$/) { # user: middle entry.
- my ($what,$val) = ($1,$2);
-
- if (!defined $val or $val eq "") {
- &WARN("$what: val == NULL.");
- next;
- }
-
- if (!defined $nick) {
- &WARN("DynaConfig: invalid line: $_");
- next;
- }
-
- # nice little hack.
- if ($what eq "HOSTS") {
- $users{$nick}{$what}{$val} = 1;
- } else {
- $users{$nick}{$what} = $val;
- }
-
- } elsif (/^(\S+)$/) { # user: start entry.
- $nick = $1;
-
- } elsif (/^::(\S+) ignore$/) { # ignore: start entry.
- $chan = $1;
- $type = "ignore";
-
- } elsif (/^- (\S+):\+(\d+):\+(\d+):(\S+):(.*)$/ and $type eq "ignore") {
- ### ignore: middle entry.
- my $mask = $1;
- my(@array) = ($2,$3,$4,$5);
- ### DEBUG purposes only!
- if ($mask !~ /^$mask{nuh}$/) {
- &WARN("ignore: mask $mask is invalid.");
- next;
- }
- $ignore{$chan}{$mask} = \@array;
-
- } elsif (/^::(\S+) bans$/) { # bans: start entry.
- $chan = $1;
- $type = "bans";
-
- } elsif (/^- (\S+):\+(\d+):\+(\d+):(\d+):(\S+):(.*)$/ and $type eq "bans") {
- ### bans: middle entry.
- # $btime, $atime, $count, $whoby, $reason.
- my(@array) = ($2,$3,$4,$5,$6);
- $bans{$chan}{$1} = \@array;
-
- } else { # unknown.
- &WARN("unknown line: $_");
- }
+ chop;
+
+ next if /^$/;
+ next if /^#/;
+
+ if (/^--(\S+)[\s\t]+(.*)$/) { # user: middle entry.
+ my ( $what, $val ) = ( $1, $2 );
+
+ if ( !defined $val or $val eq '' ) {
+ &WARN("$what: val == NULL.");
+ next;
+ }
+
+ if ( !defined $nick ) {
+ &WARN("DynaConfig: invalid line: $_");
+ next;
+ }
+
+ # nice little hack.
+ if ( $what eq 'HOSTS' ) {
+ $users{$nick}{$what}{$val} = 1;
+ }
+ else {
+ $users{$nick}{$what} = $val;
+ }
+
+ }
+ elsif (/^(\S+)$/) { # user: start entry.
+ $nick = $1;
+
+ }
+ elsif (/^::(\S+) ignore$/) { # ignore: start entry.
+ $chan = $1;
+ $type = 'ignore';
+
+ }
+ elsif ( /^- (\S+):\+(\d+):\+(\d+):(\S+):(.*)$/ and $type eq 'ignore' ) {
+ ### ignore: middle entry.
+ my $mask = $1;
+ my (@array) = ( $2, $3, $4, $5 );
+ ### DEBUG purposes only!
+ if ( $mask !~ /^$mask{nuh}$/ ) {
+ &WARN("ignore: mask $mask is invalid.");
+ next;
+ }
+ $ignore{$chan}{$mask} = \@array;
+
+ }
+ elsif (/^::(\S+) bans$/) { # bans: start entry.
+ $chan = $1;
+ $type = 'bans';
+
+ }
+ elsif ( /^- (\S+):\+(\d+):\+(\d+):(\d+):(\S+):(.*)$/
+ and $type eq 'bans' )
+ {
+ ### bans: middle entry.
+ # $btime, $atime, $count, $whoby, $reason.
+ my (@array) = ( $2, $3, $4, $5, $6 );
+ $bans{$chan}{$1} = \@array;
+
+ }
+ else { # unknown.
+ &WARN("unknown line: $_");
+ }