diff options
author | aunsane <aunsane@gmail.com> | 2018-06-03 15:18:14 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-06-03 15:19:57 +0300 |
commit | 37adbb87dd60fa816235e9e8f2c216f20d03b635 (patch) | |
tree | 97a491efca28f946b638d7f21794cd545f040428 /plugins/MirLua/src/Modules/m_protocols.cpp | |
parent | 1062351afffd71b038312fe21741b7ce0ec6729f (diff) |
MirLua: reworked http module
- removed Send method
- added Request method to create request without sending
- added async callbacks
- version bump
Diffstat (limited to 'plugins/MirLua/src/Modules/m_protocols.cpp')
-rw-r--r-- | plugins/MirLua/src/Modules/m_protocols.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
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<PROTOACCOUNT>::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;
|