From 73c1c89b6a588e43b27700099b13b2cada85e93a Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Wed, 10 Jun 2015 02:27:13 -0700 Subject: [PATCH] Correct $length when no $channel or $length argument is provided --- PBot/ChanOpCommands.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PBot/ChanOpCommands.pm b/PBot/ChanOpCommands.pm index 0015b7a1..bfb77868 100644 --- a/PBot/ChanOpCommands.pm +++ b/PBot/ChanOpCommands.pm @@ -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; }