mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-25 04:02:37 +01:00
Add error messages to a couple of commands
This commit is contained in:
parent
0e4f2d1447
commit
5d3298462a
@ -119,6 +119,10 @@ sub mute_user {
|
|||||||
return "";
|
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/^#/) {
|
if ($channel !~ m/^#/) {
|
||||||
$length = "$channel $length";
|
$length = "$channel $length";
|
||||||
$length = undef if $length eq ' ';
|
$length = undef if $length eq ' ';
|
||||||
@ -127,6 +131,10 @@ sub mute_user {
|
|||||||
|
|
||||||
$channel = $from if not defined $channel;
|
$channel = $from if not defined $channel;
|
||||||
|
|
||||||
|
if ($channel !~ m/^#/) {
|
||||||
|
return "/msg $nick Please specify a channel.";
|
||||||
|
}
|
||||||
|
|
||||||
if(not defined $target) {
|
if(not defined $target) {
|
||||||
return "/msg $nick Usage: mute <mask> [channel [timeout (default: 24 hours)]]";
|
return "/msg $nick Usage: mute <mask> [channel [timeout (default: 24 hours)]]";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user