From 37adbb87dd60fa816235e9e8f2c216f20d03b635 Mon Sep 17 00:00:00 2001 From: aunsane Date: Sun, 3 Jun 2018 15:18:14 +0300 Subject: MirLua: reworked http module - removed Send method - added Request method to create request without sending - added async callbacks - version bump --- plugins/MirLua/src/Modules/m_protocols.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'plugins/MirLua/src/Modules/m_protocols.cpp') diff --git a/plugins/MirLua/src/Modules/m_protocols.cpp b/plugins/MirLua/src/Modules/m_protocols.cpp index 1dac3e3ea6..158f6a4c4c 100644 --- a/plugins/MirLua/src/Modules/m_protocols.cpp +++ b/plugins/MirLua/src/Modules/m_protocols.cpp @@ -96,8 +96,7 @@ static int lua_GetAccount(lua_State *L) { const char *name = nullptr; - switch (lua_type(L, 1)) - { + switch (lua_type(L, 1)) { case LUA_TNUMBER: name = GetContactProto(lua_tonumber(L, 1)); break; @@ -128,8 +127,7 @@ static int lua_AccountIterator(lua_State *L) while (i < count && mir_strcmp(szProto, accounts[i]->szProtoName)) i++; - if (i < count) - { + if (i < count) { lua_pushinteger(L, (i + 1)); lua_replace(L, lua_upvalueindex(1)); MT::Apply(L, accounts[i]); @@ -144,8 +142,7 @@ static int lua_Accounts(lua_State *L) { const char *szProto = nullptr; - switch (lua_type(L, 1)) - { + switch (lua_type(L, 1)) { case LUA_TNONE: break; case LUA_TSTRING: @@ -178,8 +175,7 @@ static int lua_CallService(lua_State *L) { const char *szModule = nullptr; - switch (lua_type(L, 1)) - { + switch (lua_type(L, 1)) { case LUA_TNUMBER: szModule = GetContactProto(lua_tonumber(L, 1)); break; -- cgit v1.2.3