Correct $length when no $channel or $length argument is provided

This commit is contained in:
Pragmatic Software 2015-06-10 02:27:13 -07:00
parent dfbefee904
commit 73c1c89b6a
1 changed files with 2 additions and 0 deletions

View File

@ -54,6 +54,7 @@ sub ban_user {
if ($channel !~ m/^#/) {
$length = "$channel $length";
$length = undef if $length eq ' ';
$channel = $from;
}
@ -120,6 +121,7 @@ sub mute_user {
if ($channel !~ m/^#/) {
$length = "$channel $length";
$length = undef if $length eq ' ';
$channel = $from;
}