&DEBUG("chan => '$1', msg => '$msg'.");
if (&validChan($chan)) {
- &msg($chan, $2);
+ &msg($chan, $msg);
} else {
- &msg($who,"i'm not on \002$1\002, sorry.");
+ &msg($who,"i'm not on \002$chan\002, sorry.");
}
return;
}
&DEBUG("after joinnextchan");
&status("USER reset $who");
- &msg($who,"resetted");
+ &msg($who,"reset complete");
return;
}
my @chans;
while ($args =~ s/^($mask{chan})\s*//) {
- push(@chans, $1);
+ push(@chans, lc($1));
}
if (!scalar @chans) {
my %vals;
foreach (keys %chanconf) {
- my $val = $chanconf{$_}{$what} || "NOT-SET";
+ my $val;
+ if (defined $chanconf{$_}{$what}) {
+ $val = $chanconf{$_}{$what};
+ } else {
+ $val = "NOT-SET";
+ }
$vals{$val}{$_} = 1;
}
if ($cmd eq "chanset" and !defined $what) {
&DEBUG("showing channel conf.");
- foreach $chan ($chan, "_default") {
- &pSReply("chan: $chan");
- ### TODO: merge 2 or 3 per line.
+ foreach $chan (@chans) {
+ &pSReply("chan: $chan (will also use _default)");
my @items;
my $str = "";
foreach (sort keys %{ $chanconf{$chan} }) {
my $newstr = join(', ', @items);
- if (length $newstr > 63) {
+ ### TODO: make length use channel line limit?
+ if (length $newstr > 400) {
&pSReply(" $str");
@items = ();
}
if (!$state) { # delignore.
if ( &ignoreDel($mask) ) {
- &pSReply("ok, deleted X ignores.");
+ &pSReply("ok, deleted ignores for $mask.");
} else {
&pSReply("could not find $mask in ignore list.");
}
# time.
if ($args =~ s/^(\d+)\s*//) {
- $time = $1*60; # ??
+ $time = $1; # time is in minutes
} else {
$time = 0;
}