mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 05:49:27 +01:00
Fix misc usage messages
This commit is contained in:
parent
fb938c716c
commit
fbc50184dc
@ -160,7 +160,7 @@ sub whitelist {
|
||||
}
|
||||
when ("set") {
|
||||
my ($channel, $mask, $flag, $value) = $self->{pbot}->{interpreter}->split_args($arglist, 4);
|
||||
return "Usage: whitelist set <channel> <mask> [flag] [value]" if not defined $channel or not defined $mask;
|
||||
return "Usage: whitelist set <channel> <mask> [flag [value]]" if not defined $channel or not defined $mask;
|
||||
|
||||
if (not exists $self->{whitelist}->{hash}->{lc $channel}) {
|
||||
return "There is no such channel `$channel` in the whitelist.";
|
||||
|
@ -97,7 +97,7 @@ sub antispam_cmd {
|
||||
}
|
||||
when ("set") {
|
||||
my ($namespace, $keyword, $flag, $value) = $self->{pbot}->{interpreter}->split_args($arglist, 4);
|
||||
return "Usage: antispam set <namespace> <regex> [flag] [value]" if not defined $namespace or not defined $keyword;
|
||||
return "Usage: antispam set <namespace> <regex> [flag [value]]" if not defined $namespace or not defined $keyword;
|
||||
|
||||
if (not exists $self->{keywords}->{hash}->{lc $namespace}) {
|
||||
return "There is no such namespace `$namespace`.";
|
||||
|
@ -477,7 +477,7 @@ sub unban_user {
|
||||
}
|
||||
|
||||
if (not defined $target) {
|
||||
return "/msg $nick Usage: unban <nick/mask> [[channel] [false value to use unban queue]]";
|
||||
return "/msg $nick Usage: unban <nick/mask> [channel [false value to use unban queue]]";
|
||||
}
|
||||
|
||||
$channel = exists $stuff->{admin_channel_override} ? $stuff->{admin_channel_override} : $from if not defined $channel;
|
||||
@ -608,7 +608,7 @@ sub unmute_user {
|
||||
}
|
||||
|
||||
if (not defined $target) {
|
||||
return "/msg $nick Usage: unmute <nick/mask> [[channel] [false value to use unban queue]]";
|
||||
return "/msg $nick Usage: unmute <nick/mask> [channel [false value to use unban queue]]";
|
||||
}
|
||||
|
||||
$channel = exists $stuff->{admin_channel_override} ? $stuff->{admin_channel_override} : $from if not defined $channel;
|
||||
|
@ -122,7 +122,7 @@ sub perform_op_commands {
|
||||
while (my $command = shift @{ $self->{op_commands}->{$channel} }) {
|
||||
if ($command =~ /^mode (.*?) (.*)/i) {
|
||||
$self->{pbot}->{conn}->mode($1, $2);
|
||||
$self->{pbot}->{logger}->log(" executing mode [$1] [$2]\n");
|
||||
$self->{pbot}->{logger}->log(" executing mode $1 $2\n");
|
||||
} elsif ($command =~ /^kick (.*?) (.*?) (.*)/i) {
|
||||
$self->{pbot}->{conn}->kick($1, $2, $3) unless $1 =~ /^\Q$botnick\E$/i;
|
||||
$self->{pbot}->{logger}->log(" executing kick on $1 $2 $3\n");
|
||||
|
@ -48,12 +48,12 @@ sub ignore_user {
|
||||
my $self = shift;
|
||||
my ($from, $nick, $user, $host, $arguments, $stuff) = @_;
|
||||
|
||||
return "/msg $nick Usage: ignore nick!user\@host [channel] [timeout]" if not defined $arguments;
|
||||
return "Usage: ignore <hostmask> [channel [timeout]]" if not defined $arguments;
|
||||
|
||||
my ($target, $channel, $length) = $self->{pbot}->{interpreter}->split_args($stuff->{arglist}, 3);
|
||||
|
||||
if (not defined $target) {
|
||||
return "/msg $nick Usage: ignore host [channel] [timeout]";
|
||||
return "Usage: ignore <hostmask> [channel [timeout]]";
|
||||
}
|
||||
|
||||
if ($target =~ /^list$/i) {
|
||||
@ -99,7 +99,7 @@ sub unignore_user {
|
||||
my ($target, $channel) = $self->{pbot}->{interpreter}->split_args($stuff->{arglist}, 2);
|
||||
|
||||
if (not defined $target) {
|
||||
return "/msg $nick Usage: unignore host [channel]";
|
||||
return "Usage: unignore <hostmask> [channel]";
|
||||
}
|
||||
|
||||
if (not defined $channel) {
|
||||
|
@ -347,7 +347,7 @@ sub useradd {
|
||||
$level //= 0;
|
||||
|
||||
if (not defined $name or not defined $channel or not defined $hostmask) {
|
||||
return "/msg $nick Usage: useradd <account name> <channel> <hostmask> [level] [password]";
|
||||
return "/msg $nick Usage: useradd <account name> <channel> <hostmask> [level [password]]";
|
||||
}
|
||||
|
||||
$channel = '.*' if $channel !~ /^#/;
|
||||
@ -392,7 +392,7 @@ sub userset {
|
||||
my ($channel, $hostmask, $key, $value) = $self->{pbot}->{interpreter}->split_args($stuff->{arglist}, 4);
|
||||
|
||||
if (not defined $hostmask) {
|
||||
return "Usage: userset [channel] <hostmask or account name> [key] [value]";
|
||||
return "Usage: userset [channel] <hostmask or account name> [key [value]]";
|
||||
}
|
||||
|
||||
my $admin = $self->find_admin($channel, "$nick!$user\@$host");
|
||||
|
@ -364,7 +364,7 @@ sub spinach_cmd {
|
||||
my ($id, $key, $value) = split /\s+/, $arguments, 3;
|
||||
|
||||
if (not defined $id) {
|
||||
return "Usage: spinach edit <question id> [key] [value]";
|
||||
return "Usage: spinach edit <question id> [key [value]]";
|
||||
}
|
||||
|
||||
$id =~ s/,//g;
|
||||
|
Loading…
Reference in New Issue
Block a user