$wtime_userfile = time();
&status("--- Saved USERFILE ($cusers users; $cbans bans; $cignore ignore) at $time");
if (defined $msgType and $msgType =~ /^chat$/) {
- &performStrictReply("--- Writing user file...");
+ &pSReply("--- Writing user file...");
}
}
while (<IN>) {
chop;
- next if /^$/;
+ next if /^\s*$/;
+ next if /^\// or /^\;/; # / or ; are comment lines.
if (/^(\S+)\s*$/) {
$chan = $1;
### TODO: check against valid params.
foreach $chan (keys %chanconf) {
foreach (keys %{ $chanconf{$chan} }) {
- next unless (/^[+-]/);
+ next unless /^[+-]/;
+
&WARN("invalid param: chanconf{$chan}{$_}; removing.");
delete $chanconf{$chan}{$_};
undef $chanconf{$chan}{$_};
next if ($chan eq "_default");
next unless (exists $chanconf{$chan}{$opt});
next unless ($val eq $chanconf{$chan}{$opt});
+
push(@chans,$chan);
delete $chanconf{$chan}{$opt};
}
" chans) at $time");
if (defined $msgType and $msgType =~ /^chat$/) {
- &performStrictReply("--- Writing chan file...");
+ &pSReply("--- Writing chan file...");
}
}
return 1;
} else {
&status("DCC CHAT: <$who> $message -- not enough flags.");
- &performStrictReply("error: you do not have enough flags for that. ($flag required)");
+ &pSReply("error: you do not have enough flags for that. ($flag required)");
return 0;
}
}