diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-09-24 19:45:18 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-09-24 19:45:18 +0000 |
commit | a0d2cd360477acf24963e479773588b01f3d8a10 (patch) | |
tree | d6e208ebf7b83d49396f35b64a2f151ab2661478 /plugins/MirLua/src/main.cpp | |
parent | ac49502476c6319e6d942d5815405b961713b663 (diff) |
MirLua: added OnProtoAck and OnReceiveMessage in m_protocols
git-svn-id: http://svn.miranda-ng.org/main/trunk@15440 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/main.cpp')
-rw-r--r-- | plugins/MirLua/src/main.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/plugins/MirLua/src/main.cpp b/plugins/MirLua/src/main.cpp index 2ec8920988..5381b34c19 100644 --- a/plugins/MirLua/src/main.cpp +++ b/plugins/MirLua/src/main.cpp @@ -43,11 +43,14 @@ int OnModulesLoaded(WPARAM, LPARAM) {
g_hCommonScriptFolder = FoldersRegisterCustomPathT(MODULE, Translate("Common scripts folder"), COMMON_SCRIPTS_PATHT);
+ HookEvent(ME_OPT_INITIALISE, CLuaOptions::OnOptionsInit);
+
+ hRecvMessage = CreateHookableEvent(MODULE PSR_MESSAGE);
+ CreateProtoServiceFunction(MODULE, PSR_MESSAGE, FilterRecvMessage);
+
g_mLua = new CMLua();
g_mLua->Load();
- HookEvent(ME_OPT_INITIALISE, CLuaOptions::OnOptionsInit);
-
return 0;
}
@@ -64,6 +67,20 @@ extern "C" int __declspec(dllexport) Load(void) nlu.szSettingsModule = MODULE;
hNetlib = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
+ PROTOCOLDESCRIPTOR pd = { 0 };
+ pd.cbSize = sizeof(pd);
+ pd.szName = MODULE;
+ pd.type = PROTOTYPE_FILTER;
+ Proto_RegisterModule(&pd);
+
+ CreateProtoServiceFunction(MODULE, PSR_MESSAGE, FilterRecvMessage);
+ /*CreateProtoServiceFunction(MODULE, PSR_AUTH, FilterRecvAuth);
+ CreateProtoServiceFunction(MODULE, PSR_FILE, FilterRecvFile);
+ CreateProtoServiceFunction(MODULE, PSR_URL, FilterRecvUrl);
+ CreateProtoServiceFunction(MODULE, PSR_CONTACTS, FilterRecvUrl);
+ CreateProtoServiceFunction(MODULE, PSR_AWAYMSG, FilterRecvUrl);*/
+
+
return 0;
}
|