From 619ff86a94e740838355967b524a3271d171b60f Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Mon, 14 Feb 2022 16:47:46 -0800 Subject: [PATCH] Rename `compiler` factoid to `vm-client` --- data/factoids.sqlite3 | Bin 2297856 -> 2297856 bytes doc/VirtualMachine.md | 6 +++--- lib/PBot/Core/Factoids/Code.pm | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/data/factoids.sqlite3 b/data/factoids.sqlite3 index 03f8755c179f1125e809bab3707826da6e7f62c3..4f596026227e2788251da66c9f91029811fa8037 100644 GIT binary patch delta 646 zcmZ|MT}YEr7zgn8+1{_ScVF+e+~%Cya%)AQ3S}~TE(cZck zf}~^NSr<_x8eTO)Js`{vkmyE|=o7q{&{dEj(Sj)G*@EzGOinkA<7)1;D<*2MaZGq}VN(jnakO_&sX=3(6zQwgGOYxQ^U7SxY9jYsuNwf)42s&sGb< zN=PV;|IXIY<)RRR&A;7!S`hqOuu6rZ_+Do@PuGj$3aw0w5%y|Ye4)TQcEGBC4K|fm zeY$#cnQ&*&N(c1Rn_Z$&tNxp$bxaM0RUds>hF#nKu~LSf|8G|soVpcma<|ZpHgAye iZf_fi2W#)-k1qw4Z9B;(>b2c<(r2f>3|(m&X8jgZV8 z_U2&;D;i&}(!=AQ)h3CJbw@j<0ByOg4Efog9Ik zGHoTHi!R$BGJ6w(Own&%zrU9wxxHLrZLSSD5YN`;gw>d^n2kT(rH!f(gYExITT6o3 zf_GG?iXZ9Ms<=vj)xqcQ=LP9bk$cYrBA{TNa4SA4`yvT?AXdl{- z+ED-nQ3!Rgg^A9=M=nAB%qbs~!(_;rmZ^2#|EYe|`%{u~&nLUPg1vOJ&xkTUX!Jq( a!s{q?1P#5A4jJeG3L_ImSUPmDy!#Kvd%%+b 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