From 860a6be156a1f78a8e8d15aa46661d62b8b9d20d Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Mon, 17 Apr 2023 10:33:02 -0700 Subject: [PATCH] Fix some inconsistent arguments --- lib/PBot/Core/Commands/Factoids.pm | 6 +++--- lib/PBot/Core/Storage/DualIndexHashObject.pm | 2 +- lib/PBot/Core/Utils/SQLiteLoggerLayer.pm | 6 +++--- lib/PBot/VERSION.pm | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/PBot/Core/Commands/Factoids.pm b/lib/PBot/Core/Commands/Factoids.pm index 0f7b2e08..6d6e01d2 100644 --- a/lib/PBot/Core/Commands/Factoids.pm +++ b/lib/PBot/Core/Commands/Factoids.pm @@ -225,7 +225,7 @@ sub cmd_factundo($self, $context) { } } - $self->{pbot}->{factoids}->{data}->{storage}->add($channel, $trigger, $undos->{list}->[$undos->{idx}], 0, 1); + $self->{pbot}->{factoids}->{data}->{storage}->add($channel, $trigger, $undos->{list}->[$undos->{idx}]); my $changes = $self->hash_differences_as_string($undos->{list}->[$undos->{idx} + 1], $undos->{list}->[$undos->{idx}]); $self->log_factoid($channel, $trigger, $context->{hostmask}, "reverted (undo): $changes", 1); @@ -315,7 +315,7 @@ sub cmd_factredo($self, $context) { $self->{pbot}->{logger}->log("Error storing undo: $@\n") if $@; } - $self->{pbot}->{factoids}->{data}->{storage}->add($channel, $trigger, $undos->{list}->[$undos->{idx}], 0, 1); + $self->{pbot}->{factoids}->{data}->{storage}->add($channel, $trigger, $undos->{list}->[$undos->{idx}]); my $changes = $self->hash_differences_as_string($undos->{list}->[$undos->{idx} - 1], $undos->{list}->[$undos->{idx}]); @@ -585,7 +585,7 @@ sub cmd_factmove($self, $context) { my $data = $factoids->get_data($found_src_channel, $found_source); $factoids->remove($found_src_channel, $found_source, undef, 1); - $factoids->add($target_channel, $target, $data, 0, 1); + $factoids->add($target_channel, $target, $data); $found_src_channel = 'global' if $found_src_channel eq '.*'; $target_channel = 'global' if $target_channel eq '.*'; diff --git a/lib/PBot/Core/Storage/DualIndexHashObject.pm b/lib/PBot/Core/Storage/DualIndexHashObject.pm index 1a156a33..c39b4d9a 100644 --- a/lib/PBot/Core/Storage/DualIndexHashObject.pm +++ b/lib/PBot/Core/Storage/DualIndexHashObject.pm @@ -137,7 +137,7 @@ sub clear($self) { $self->{hash} = {}; } -sub levenshtein_matches($self, $primary_index, $secondary_index, $distance = 0.60, $strictnamespace = 0) { +sub levenshtein_matches($self, $primary_index = undef, $secondary_index = undef, $distance = 0.60, $strictnamespace = 0) { my $comma = ''; my $result = ""; diff --git a/lib/PBot/Core/Utils/SQLiteLoggerLayer.pm b/lib/PBot/Core/Utils/SQLiteLoggerLayer.pm index 7482dc09..7e45b28a 100644 --- a/lib/PBot/Core/Utils/SQLiteLoggerLayer.pm +++ b/lib/PBot/Core/Utils/SQLiteLoggerLayer.pm @@ -9,17 +9,17 @@ package PBot::Core::Utils::SQLiteLoggerLayer; use PBot::Imports; -sub PUSHED($class, $mode, $fh) { +sub PUSHED($class, $mode, $fh = undef) { my $logger; return bless \$logger, $class; } -sub OPEN($self, $path, $mode, $fh) { +sub OPEN($self, $path, $mode = undef, $fh = undef) { $$self = $path; # path is our PBot::Logger object return 1; } -sub WRITE($self, $buf, $fh) { +sub WRITE($self, $buf, $fh = undef) { $$self->log($buf); # log message return length($buf); } diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index a5a9d79a..ca075fdd 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,8 +25,8 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4648, - BUILD_DATE => "2023-04-13", + BUILD_REVISION => 4650, + BUILD_DATE => "2023-04-17", }; sub initialize {}