diff --git a/data/factoids.sqlite3 b/data/factoids.sqlite3 index 03f8755c..4f596026 100644 Binary files a/data/factoids.sqlite3 and b/data/factoids.sqlite3 differ diff --git a/doc/VirtualMachine.md b/doc/VirtualMachine.md index 6c9c5a7d..e5724ead 100644 --- a/doc/VirtualMachine.md +++ b/doc/VirtualMachine.md @@ -339,9 +339,9 @@ script to send VM commands to `vm-server` on the default port `9000`: factshow sh [global] sh: /call cc -lang=sh factshow cc - [global] cc: /call compiler {"nick":"$nick:json","channel":"$channel:json","code":"$args:json"} - factshow compiler - [global] compiler: pbot-vm/host/bin/vm-client [applet] + [global] cc: /call vm-client {"nick":"$nick:json","channel":"$channel:json","code":"$args:json"} + factshow vm-client + [global] vm-client: pbot-vm/host/bin/vm-client [applet] In your instance of PBot, the `sh echo hello` command should output `hello`. diff --git a/lib/PBot/Core/Factoids/Code.pm b/lib/PBot/Core/Factoids/Code.pm index 24a936a7..4d9191c0 100644 --- a/lib/PBot/Core/Factoids/Code.pm +++ b/lib/PBot/Core/Factoids/Code.pm @@ -1,7 +1,7 @@ # File: Code.pm # # Purpose: Launching pad for code factoids. Configures $context as a code -# factoid and executes the compiler-vm applet. +# factoid and executes the vm-client applet. # SPDX-FileCopyrightText: 2021 Pragmatic Software # SPDX-License-Identifier: MIT @@ -50,7 +50,7 @@ sub execute { $context->{nickprefix_disabled} = 0; } - # set up `compiler` applet arguments + # set up `vm-client` applet arguments my %args = ( nick => $context->{nick}, channel => $context->{from}, @@ -74,11 +74,11 @@ sub execute { # update context details $context->{special} = 'code-factoid'; # ensure handle_result(), etc, process this as a code-factoid $context->{root_channel} = $context->{channel}; # override root channel to current channel - $context->{keyword} = 'compiler'; # code-factoid uses `compiler` command to invoke vm - $context->{arguments} = $json; # set arguments to json string as `compiler` wants + $context->{keyword} = 'vm-client'; # code-factoid uses `vm-client` command to invoke vm + $context->{arguments} = $json; # set arguments to json string as `vm-client` expects $context->{args_utf8} = 1; # arguments are utf8 encoded by encode_json - # launch the `compiler` applet + # launch the `vm-client` applet $self->{pbot}->{applets}->execute_applet($context); # return empty string since the applet process reader will