mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 03:33:06 +01:00
Minor bug/typo fixes
This commit is contained in:
parent
21603632c2
commit
cf4478c1a4
@ -100,6 +100,7 @@ sub get_baninfo {
|
||||
my ($self, $mask, $channel, $account) = @_;
|
||||
my ($bans, $ban_account);
|
||||
|
||||
$account = undef if not length $account;
|
||||
$account = lc $account if defined $account;
|
||||
|
||||
if ($self->{pbot}->{registry}->get_value('bantracker', 'debug')) {
|
||||
|
@ -51,6 +51,9 @@ sub ban_user {
|
||||
my ($from, $nick, $user, $host, $arguments) = @_;
|
||||
my ($target, $channel, $length) = split(/\s+/, $arguments, 3);
|
||||
|
||||
$channel = '' if not defined $channel;
|
||||
$length = '' if not defined $length;
|
||||
|
||||
if(not defined $from) {
|
||||
$self->{pbot}->{logger}->log("Command missing ~from parameter!\n");
|
||||
return "";
|
||||
@ -62,7 +65,7 @@ sub ban_user {
|
||||
$channel = $from;
|
||||
}
|
||||
|
||||
$channel = $from if not defined $channel;
|
||||
$channel = $from if not defined $channel or not length $channel;
|
||||
|
||||
if(not defined $target) {
|
||||
return "/msg $nick Usage: ban <mask> [channel [timeout (default: 24 hours)]]";
|
||||
|
Loading…
Reference in New Issue
Block a user