Minor bug/typo fixes

This commit is contained in:
Pragmatic Software 2017-04-10 19:13:56 -07:00
parent 21603632c2
commit cf4478c1a4
2 changed files with 5 additions and 1 deletions

View File

@ -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')) {

View File

@ -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)]]";