Add basic lua scripting capabilities (#4341)

The scripting capabilities is locked behind a cmake flag, and is not enabled by default.

Co-authored-by: nerix <nerixdev@outlook.de>
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Mm2PL
2023-04-02 15:31:53 +02:00
committed by GitHub
parent 5836073d52
commit 5ba809804e
37 changed files with 2087 additions and 3 deletions
@@ -42,6 +42,15 @@ public:
const QStringList &words, const Command &command, bool dryRun,
ChannelPtr channel, const Message *message = nullptr,
std::unordered_map<QString, QString> context = {});
#ifdef CHATTERINO_HAVE_PLUGINS
bool registerPluginCommand(const QString &commandName);
bool unregisterPluginCommand(const QString &commandName);
const QStringList &pluginCommands()
{
return this->pluginCommands_;
}
#endif
private:
void load(Paths &paths);
@@ -73,6 +82,9 @@ private:
commandsSetting_;
QStringList defaultChatterinoCommandAutoCompletions_;
#ifdef CHATTERINO_HAVE_PLUGINS
QStringList pluginCommands_;
#endif
};
} // namespace chatterino