mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Make lualol test command use callEveryWithArgs
This commit is contained in:
parent
f5f0a3301f
commit
b329fca547
1 changed files with 8 additions and 1 deletions
|
@ -51,6 +51,10 @@
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
#include <lua.h>
|
||||||
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
using namespace chatterino;
|
using namespace chatterino;
|
||||||
|
@ -3127,7 +3131,10 @@ void CommandController::initialize(Settings &, Paths &paths)
|
||||||
return "";
|
return "";
|
||||||
});
|
});
|
||||||
this->registerCommand("lualol", [](const auto &ctx) {
|
this->registerCommand("lualol", [](const auto &ctx) {
|
||||||
getApp()->plugins->callEvery("test");
|
getApp()->plugins->callEveryWithArgs(
|
||||||
|
"test", 1, [ctx](const auto & /*pl*/, lua_State *L) {
|
||||||
|
lua_pushstring(L, ctx.channel->getName().toStdString().c_str());
|
||||||
|
});
|
||||||
return "";
|
return "";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue