From 88262a23383c916c8a7b6d4887b88a7493168546 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Tue, 21 Jul 2020 16:41:45 -0700 Subject: [PATCH] Update Plang --- Plang | 2 +- Plugins/Plang.pm | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Plang b/Plang index ac144eb8..82e771cd 160000 --- a/Plang +++ b/Plang @@ -1 +1 @@ -Subproject commit ac144eb83eb8a817742e9b25bca0d0ed218543fb +Subproject commit 82e771cd3bf5bcefec6241c66b56aa985884060e diff --git a/Plugins/Plang.pm b/Plugins/Plang.pm index b915ba93..7d1367be 100644 --- a/Plugins/Plang.pm +++ b/Plugins/Plang.pm @@ -103,7 +103,7 @@ sub cmd_plangrepl { # overridden `print` built-in sub print_override { - my ($self, $plang, $name, $arguments) = @_; + my ($self, $plang, $context, $name, $arguments) = @_; my ($stmt, $end) = ($plang->output_value($arguments->[0]), $arguments->[1]->[1]); $self->{output} .= "$stmt$end"; return ['NIL', undef]; @@ -117,14 +117,14 @@ sub is_locked { } sub get_factoid { - my ($self, $plang, $name, $arguments) = @_; + my ($self, $plang, $context, $name, $arguments) = @_; my ($namespace, $keyword, $meta) = ($arguments->[0]->[1], $arguments->[1]->[1], $arguments->[2]->[1]); my $result = $self->{pbot}->{factoids}->get_meta($namespace, $keyword, $meta); return ['STRING', $result]; } sub set_factoid { - my ($self, $plang, $name, $arguments) = @_; + my ($self, $plang, $context, $name, $arguments) = @_; my ($namespace, $keyword, $text) = ($arguments->[0]->[1], $arguments->[1]->[1], $arguments->[2]->[1]); return ['ERROR', "Factoid $namespace.$keyword is locked. Cannot set."] if $self->is_locked($namespace, $keyword); $self->{pbot}->{factoids}->add_factoid('text', $namespace, 'Plang', $keyword, $text); @@ -132,7 +132,7 @@ sub set_factoid { } sub append_factoid { - my ($self, $plang, $name, $arguments) = @_; + my ($self, $plang, $context, $name, $arguments) = @_; my ($namespace, $keyword, $text) = ($arguments->[0]->[1], $arguments->[1]->[1], $arguments->[2]->[1]); return ['ERROR', "Factoid $namespace.$keyword is locked. Cannot append."] if $self->is_locked($namespace, $keyword); my $action = $self->{pbot}->{factoids}->get_meta($namespace, $keyword, 'action');