mirror of
https://github.com/pragma-/pbot.git
synced 2025-05-02 20:57:28 +02:00
Correct $length when no $channel or $length argument is provided
This commit is contained in:
parent
dfbefee904
commit
73c1c89b6a
@ -54,6 +54,7 @@ sub ban_user {
|
|||||||
|
|
||||||
if ($channel !~ m/^#/) {
|
if ($channel !~ m/^#/) {
|
||||||
$length = "$channel $length";
|
$length = "$channel $length";
|
||||||
|
$length = undef if $length eq ' ';
|
||||||
$channel = $from;
|
$channel = $from;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,6 +121,7 @@ sub mute_user {
|
|||||||
|
|
||||||
if ($channel !~ m/^#/) {
|
if ($channel !~ m/^#/) {
|
||||||
$length = "$channel $length";
|
$length = "$channel $length";
|
||||||
|
$length = undef if $length eq ' ';
|
||||||
$channel = $from;
|
$channel = $from;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user