diff --git a/PBot/ChanOpCommands.pm b/PBot/ChanOpCommands.pm index 281a0db5..6076c871 100644 --- a/PBot/ChanOpCommands.pm +++ b/PBot/ChanOpCommands.pm @@ -119,6 +119,10 @@ sub mute_user { return ""; } + if (not defined $channel and $from !~ m/^#/) { + return "/msg $nick Usage from private message: mute [timeout (default: 24 hours)]"; + } + if ($channel !~ m/^#/) { $length = "$channel $length"; $length = undef if $length eq ' '; @@ -127,6 +131,10 @@ sub mute_user { $channel = $from if not defined $channel; + if ($channel !~ m/^#/) { + return "/msg $nick Please specify a channel."; + } + if(not defined $target) { return "/msg $nick Usage: mute [channel [timeout (default: 24 hours)]]"; }