chore: remove Singleton & replace getIApp with getApp (#5514)
This commit is contained in:
@@ -174,7 +174,7 @@ int ChannelRef::send_message(lua_State *L)
|
||||
text = text.replace('\n', ' ');
|
||||
if (execcmds)
|
||||
{
|
||||
text = getIApp()->getCommands()->execCommand(text, that, false);
|
||||
text = getApp()->getCommands()->execCommand(text, that, false);
|
||||
}
|
||||
that->sendMessage(text);
|
||||
return 0;
|
||||
@@ -300,7 +300,7 @@ int ChannelRef::get_by_name(lua_State *L)
|
||||
lua_pushnil(L);
|
||||
return 1;
|
||||
}
|
||||
auto chn = getIApp()->getTwitchAbstract()->getChannelOrEmpty(name);
|
||||
auto chn = getApp()->getTwitchAbstract()->getChannelOrEmpty(name);
|
||||
lua::push(L, chn);
|
||||
return 1;
|
||||
}
|
||||
@@ -324,7 +324,7 @@ int ChannelRef::get_by_twitch_id(lua_State *L)
|
||||
lua_pushnil(L);
|
||||
return 1;
|
||||
}
|
||||
auto chn = getIApp()->getTwitch()->getChannelOrEmptyByID(id);
|
||||
auto chn = getApp()->getTwitch()->getChannelOrEmptyByID(id);
|
||||
|
||||
lua::push(L, chn);
|
||||
return 1;
|
||||
|
||||
@@ -309,7 +309,7 @@ int HTTPRequest::create(lua_State *L)
|
||||
L, "cannot get method (1st argument of HTTPRequest.create, "
|
||||
"expected a string)");
|
||||
}
|
||||
auto *pl = getIApp()->getPlugins()->getPluginByStatePtr(L);
|
||||
auto *pl = getApp()->getPlugins()->getPluginByStatePtr(L);
|
||||
if (!pl->hasHTTPPermissionFor(parsedurl))
|
||||
{
|
||||
return luaL_error(
|
||||
|
||||
Reference in New Issue
Block a user