From 465d1d9bdb29d7c527a572742478abcd4bbe9d1f Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Thu, 11 Jun 2015 22:08:39 +0000 Subject: MirLua: added MirLua: added DeleteModule to database module git-svn-id: http://svn.miranda-ng.org/main/trunk@14129 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/m_database.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'plugins/MirLua') diff --git a/plugins/MirLua/src/m_database.cpp b/plugins/MirLua/src/m_database.cpp index 6adca91ecc..e786eb86d3 100644 --- a/plugins/MirLua/src/m_database.cpp +++ b/plugins/MirLua/src/m_database.cpp @@ -107,6 +107,17 @@ static int lua_DeleteContactSetting(lua_State *L) return 1; } +static int lua_DeleteModule(lua_State *L) +{ + MCONTACT hContact = lua_tointeger(L, 1); + LPCSTR szModule = luaL_checkstring(L, 2); + + INT_PTR res = ::CallService(MS_DB_MODULE_DELETE, 0, (LPARAM)szModule); + lua_pushinteger(L, res); + + return 1; +} + static luaL_Reg databaseApi[] = { { "FindFirstContact", lua_FindFirstContact }, @@ -116,6 +127,8 @@ static luaL_Reg databaseApi[] = { "GetContactSetting", lua_GetContactSetting }, { "DeleteContactSetting", lua_DeleteContactSetting }, + { "DeleteModule", lua_DeleteModule }, + { NULL, NULL } }; -- cgit v1.2.3