From 9f2794abc3ff576382e36ec1a3fdc6c8988bb568 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Mon, 20 Jul 2020 13:04:35 -0700 Subject: [PATCH] Update Plang submodule --- Plang | 2 +- Plugins/Plang.pm | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Plang b/Plang index 843f8e36..c08e55ea 160000 --- a/Plang +++ b/Plang @@ -1 +1 @@ -Subproject commit 843f8e361c8d57193515db360f10104829acb2fc +Subproject commit c08e55ea9e7d7842d229d089b58ca0fc13240d4f diff --git a/Plugins/Plang.pm b/Plugins/Plang.pm index f6697303..23ee8cde 100644 --- a/Plugins/Plang.pm +++ b/Plugins/Plang.pm @@ -38,21 +38,21 @@ sub initialize { $self->{plang} = Plang::Interpreter->new(embedded => 1, debug => $debug); # register some PBot-specific built-in functions - $self->{plang}->{interpreter}->add_function_builtin('factset', + $self->{plang}->{interpreter}->add_builtin_function('factset', # parameters are [['param1 name', default arg], ['param2 name', default arg], ...] [['namespace', undef], ['keyword', undef], ['text', undef]], sub { $self->set_factoid(@_) }); - $self->{plang}->{interpreter}->add_function_builtin('factget', + $self->{plang}->{interpreter}->add_builtin_function('factget', [['namespace', undef], ['keyword', undef], ['meta', ['STRING', 'action']]], sub { $self->get_factoid(@_) }); - $self->{plang}->{interpreter}->add_function_builtin('factappend', + $self->{plang}->{interpreter}->add_builtin_function('factappend', [['namespace', undef], ['keyword', undef], ['text', undef]], sub { $self->append_factoid(@_) }); # override the built-in `print` function to send to our output buffer instead - $self->{plang}->{interpreter}->add_function_builtin('print', + $self->{plang}->{interpreter}->add_builtin_function('print', [['stmt', undef], ['end', ['STRING', "\n"]]], sub { $self->print_override(@_) });