3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-24 11:42:35 +01:00

Add error messages to a couple of commands

This commit is contained in:
Pragmatic Software 2016-11-16 19:14:39 -08:00
parent 0e4f2d1447
commit 5d3298462a

View File

@ -119,6 +119,10 @@ sub mute_user {
return "";
}
if (not defined $channel and $from !~ m/^#/) {
return "/msg $nick Usage from private message: mute <mask> <channel> [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 <mask> [channel [timeout (default: 24 hours)]]";
}