Move most Command variables into the CommandController shared variables (#3824)

This commit is contained in:
pajlada
2022-06-25 14:06:16 +02:00
committed by GitHub
parent 6a58ce1273
commit 34ea303607
4 changed files with 223 additions and 105 deletions
@@ -11,6 +11,7 @@
#include <memory>
#include <mutex>
#include <unordered_map>
namespace chatterino {
@@ -34,9 +35,10 @@ public:
CommandModel *createModel(QObject *parent);
QString execCustomCommand(const QStringList &words, const Command &command,
bool dryRun, ChannelPtr channel,
std::map<QString, QString> context = {});
QString execCustomCommand(
const QStringList &words, const Command &command, bool dryRun,
ChannelPtr channel, const Message *message = nullptr,
std::unordered_map<QString, QString> context = {});
private:
void load(Paths &paths);