From e254312f9a660c83081ce2062ab14ba3c3614089 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 19 Sep 2017 14:12:58 +0300 Subject: useless structure GCDEST finally removed --- plugins/MirLua/src/m_chat.cpp | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'plugins/MirLua/src/m_chat.cpp') diff --git a/plugins/MirLua/src/m_chat.cpp b/plugins/MirLua/src/m_chat.cpp index dbecbc774e..f84caa4591 100644 --- a/plugins/MirLua/src/m_chat.cpp +++ b/plugins/MirLua/src/m_chat.cpp @@ -5,29 +5,14 @@ static luaL_Reg chatApi[] = { NULL, NULL } }; -template <> -int MT::Index(lua_State *L, GCEVENT *gce) -{ - const char *key = lua_tostring(L, 2); - - if (mir_strcmp(key, "Destination") == 0) - MT::Set(L, gce->pDest); - else - lua_pushnil(L); - - return 1; -} - LUAMOD_API int luaopen_m_chat(lua_State *L) { luaL_newlib(L, chatApi); - MT(L, "GCDEST") - .Field(&GCDEST::pszModule, "Module", LUA_TSTRINGA) - .Field(&GCDEST::ptszID, "Id", LUA_TSTRINGW) - .Field(&GCDEST::iType, "Type", LUA_TINTEGER); - MT(L, "GCEVENT") + .Field(&GCEVENT::pszModule, "Module", LUA_TSTRINGA) + .Field(&GCEVENT::ptszID, "Id", LUA_TSTRINGW) + .Field(&GCEVENT::iType, "Type", LUA_TINTEGER) .Field(&GCEVENT::time, "Timestamp", LUA_TINTEGER) .Field(&GCEVENT::time, "IsMe", LUA_TINTEGER) .Field(&GCEVENT::time, "Flags", LUA_TINTEGER) -- cgit v1.2.3