summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/m_database.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua/src/m_database.cpp')
-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 }
};