summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua/src')
-rw-r--r--plugins/MirLua/src/main.cpp7
-rw-r--r--plugins/MirLua/src/mlua_utils.cpp4
-rw-r--r--plugins/MirLua/src/stdafx.h2
3 files changed, 6 insertions, 7 deletions
diff --git a/plugins/MirLua/src/main.cpp b/plugins/MirLua/src/main.cpp
index ce2d3aa589..0539404a7d 100644
--- a/plugins/MirLua/src/main.cpp
+++ b/plugins/MirLua/src/main.cpp
@@ -9,7 +9,7 @@ CMLua *g_mLua;
HANDLE g_hCLibsFolder;
HANDLE g_hScriptsFolder;
-HANDLE hNetlib = NULL;
+HNETLIBUSER hNetlib = NULL;
PLUGININFOEX pluginInfo =
{
@@ -60,12 +60,11 @@ extern "C" int __declspec(dllexport) Load(void)
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
- NETLIBUSER nlu = { 0 };
- nlu.cbSize = sizeof(nlu);
+ NETLIBUSER nlu = {};
nlu.flags = NUF_NOOPTIONS;
nlu.szDescriptiveName = MODULE;
nlu.szSettingsModule = MODULE;
- hNetlib = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
+ hNetlib = Netlib_RegisterUser(&nlu);
PROTOCOLDESCRIPTOR pd = { 0 };
pd.cbSize = sizeof(pd);
diff --git a/plugins/MirLua/src/mlua_utils.cpp b/plugins/MirLua/src/mlua_utils.cpp
index 7323755ea5..5c84fb5c74 100644
--- a/plugins/MirLua/src/mlua_utils.cpp
+++ b/plugins/MirLua/src/mlua_utils.cpp
@@ -4,7 +4,7 @@ void Log(const char *format, ...)
{
va_list args;
va_start(args, format);
- CallService(MS_NETLIB_LOG, (WPARAM)hNetlib, (LPARAM)(CMStringA().FormatV(format, args)));
+ Netlib_Log(hNetlib, CMStringA().FormatV(format, args));
va_end(args);
}
@@ -12,7 +12,7 @@ void Log(const wchar_t *format, ...)
{
va_list args;
va_start(args, format);
- CallService(MS_NETLIB_LOGW, (WPARAM)hNetlib, (LPARAM)(CMStringW().FormatV(format, args)));
+ Netlib_LogW(hNetlib, CMStringW().FormatV(format, args));
va_end(args);
}
diff --git a/plugins/MirLua/src/stdafx.h b/plugins/MirLua/src/stdafx.h
index 645e30c906..dda365dd82 100644
--- a/plugins/MirLua/src/stdafx.h
+++ b/plugins/MirLua/src/stdafx.h
@@ -98,7 +98,7 @@ LUAMOD_API int (luaopen_m_sounds)(lua_State *L);
/* utils */
-extern HANDLE hNetlib;
+extern HNETLIBUSER hNetlib;
void Log(const char *format, ...);
void Log(const wchar_t *format, ...);