CPL command

This commit is contained in:
2026-05-26 15:07:42 -04:00
parent 933c1ac6c3
commit 8dab0d16b7
9 changed files with 64 additions and 47 deletions

View File

@@ -284,19 +284,20 @@ public:
// Rebuild the global environment from the source database.
//
// Error messages go to the specified actor.
//
// Returns true if the rebuild goes without errors.
//
bool rebuild_sourcedb();
bool rebuild_sourcedb(int64_t actor_id);
// Update the source database from disk, then rebuild the global environment.
//
// Special case: if the source pointer is nullptr, does not update.
// Error messages go to the specified actor.
//
// Returns true if the update goes without errors.
//
bool update_source(const util::LuaSourceVec &source);
bool update_source(const util::LuaSourcePtr &source);
bool update_source(std::string_view sourcepk);
bool update_source(const util::LuaSourceVec &source, int64_t actor_id);
bool update_source(std::string_view sourcepk, int64_t actor_id);
// Supply an HTTP response to an outstanding HTTP request.
//
@@ -375,8 +376,13 @@ public:
std::ostream *lthread_print_stream() { return &lthread_prints_; }
void lthread_prints_to_printbuffer();
void lthread_prints_to_dprint();
// Send the lthread_prints output to the specified actor.
//
// If actor_id == (-1) prints are discarded.
// If actor_id == (0) prints go to dprint.
// Anything else, and the prints go to a specific actor.
//
void lthread_prints_to_actor(int64_t actor_id);
// Set a lua global variable.
//