mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-23 11:12:42 +01:00
Fix some inconsistent arguments
This commit is contained in:
parent
208df255a1
commit
860a6be156
@ -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 '.*';
|
||||
|
@ -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 = "";
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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 {}
|
||||
|
Loading…
Reference in New Issue
Block a user