summaryrefslogtreecommitdiff
path: root/plugins/MirLua
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-06-11 22:08:39 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-06-11 22:08:39 +0000
commit465d1d9bdb29d7c527a572742478abcd4bbe9d1f (patch)
treed8d7bfb8fc5c511d06a3fda052cb0499825d9cc2 /plugins/MirLua
parent42e279369af861f61b08919650c10749191328cb (diff)
MirLua: added MirLua: added DeleteModule to database module
git-svn-id: http://svn.miranda-ng.org/main/trunk@14129 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua')
-rw-r--r--plugins/MirLua/src/m_database.cpp13
1 files changed, 13 insertions, 0 deletions
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 }
};