From 5262fce019621330587fbae32feb5adf1c62c5ea Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sat, 24 Oct 2015 20:45:24 +0000 Subject: MirLua: massive bug fix git-svn-id: http://svn.miranda-ng.org/main/trunk@15610 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/m_protocols.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'plugins/MirLua/src/m_protocols.cpp') diff --git a/plugins/MirLua/src/m_protocols.cpp b/plugins/MirLua/src/m_protocols.cpp index 05be204deb..696b519cae 100644 --- a/plugins/MirLua/src/m_protocols.cpp +++ b/plugins/MirLua/src/m_protocols.cpp @@ -347,17 +347,17 @@ static int ack__index(lua_State *L) ACKDATA *ack = *(ACKDATA**)luaL_checkudata(L, 1, MT_ACKDATA); const char *key = lua_tostring(L, 2); - if (!mir_strcmpi(key, "Module")) + if (mir_strcmpi(key, "Module") == 0) lua_pushstring(L, ptrA(mir_utf8encode(ack->szModule))); - if (!mir_strcmpi(key, "hContact")) + else if (mir_strcmpi(key, "hContact") == 0) lua_pushinteger(L, ack->hContact); - if (!mir_strcmpi(key, "Type")) + else if (mir_strcmpi(key, "Type") == 0) lua_pushinteger(L, ack->type); - if (!mir_strcmpi(key, "Result")) + else if (mir_strcmpi(key, "Result") == 0) lua_pushinteger(L, ack->result); - if (!mir_strcmpi(key, "hProcess")) + else if (mir_strcmpi(key, "hProcess") == 0) lua_pushlightuserdata(L, ack->hProcess); - if (!mir_strcmpi(key, "lParam")) + else if (mir_strcmpi(key, "lParam") == 0) lua_pushnumber(L, ack->lParam); else lua_pushnil(L); @@ -396,9 +396,9 @@ static int ccs__index(lua_State *L) CCSDATA *ccs = *(CCSDATA**)luaL_checkudata(L, 1, MT_CCSDATA); const char *key = lua_tostring(L, 2); - if (!mir_strcmpi(key, "hContact")) + if (mir_strcmpi(key, "hContact") == 0) lua_pushinteger(L, ccs->hContact); - if (!mir_strcmpi(key, "Message")) + else if (mir_strcmpi(key, "Message") == 0) { PROTORECVEVENT *pre = (PROTORECVEVENT*)ccs->lParam; lua_pushstring(L, pre->szMessage); -- cgit v1.2.3