summaryrefslogtreecommitdiff
path: root/plugins/StopSpamMod/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-07 16:14:47 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-07 16:14:47 +0000
commit7339bc08a765b87b0140e350a05fcf0d22a57722 (patch)
treed3031f91d458a14cf4e24fe461c8e143c0f18cc9 /plugins/StopSpamMod/src
parentfa23da25513fa2d056413cadb51ae3fadc3b5e5d (diff)
mir_getCLI() - a helper for MS_CLIST_RETRIEVE_INTERFACE, just call it without parameters
git-svn-id: http://svn.miranda-ng.org/main/trunk@4368 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StopSpamMod/src')
-rwxr-xr-xplugins/StopSpamMod/src/init.cpp10
-rwxr-xr-xplugins/StopSpamMod/src/utilities.cpp15
2 files changed, 6 insertions, 19 deletions
diff --git a/plugins/StopSpamMod/src/init.cpp b/plugins/StopSpamMod/src/init.cpp
index f7c524af3a..4278ebef16 100755
--- a/plugins/StopSpamMod/src/init.cpp
+++ b/plugins/StopSpamMod/src/init.cpp
@@ -15,7 +15,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
#include "headers.h"
BOOL gbDosServiceExist = 0;
@@ -55,12 +54,9 @@ std::wstring gbAuthRepl;
extern TCHAR const * defQuestion;
extern int RemoveTmp(WPARAM,LPARAM);
-
-
/////////////////////////////////////////////////////////////////////////////////////////
// returns plugin's extended information
-
PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
@@ -137,19 +133,17 @@ HANDLE hEventFilter = 0, hOptInitialise = 0, hSettingChanged = 0;
BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
{
- /*if(DLL_PROCESS_ATTACH == fdwReason)
- hInst=hinstDLL;
- return TRUE;*/
hInst = hinstDLL;
return TRUE;
}
-
int hLangpack = 0;
+CLIST_INTERFACE *pcli;
extern "C" int __declspec(dllexport) Load()
{
mir_getLP(&pluginInfoEx);
+ mir_getCLI();
CreateServiceFunction("/RemoveTmp", (MIRANDASERVICE)RemoveTmp);
HookEvent(ME_SYSTEM_MODULESLOADED, OnSystemModulesLoaded);
diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp
index efef2f9e02..44ad773675 100755
--- a/plugins/StopSpamMod/src/utilities.cpp
+++ b/plugins/StopSpamMod/src/utilities.cpp
@@ -67,19 +67,12 @@ bool ProtoInList(std::string proto)
int CreateCListGroup(TCHAR* szGroupName)
{
- int hGroup;
- CLIST_INTERFACE *clint = NULL;
+ int hGroup = CallService(MS_CLIST_GROUPCREATE, 0, 0);
- if (ServiceExists(MS_CLIST_RETRIEVE_INTERFACE))
- clint = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, 0);
+ TCHAR* usTmp = szGroupName;
+ pcli->pfnRenameGroup(hGroup, usTmp);
- hGroup = CallService(MS_CLIST_GROUPCREATE, 0, 0);
-
- TCHAR* usTmp = szGroupName;
-
- clint->pfnRenameGroup(hGroup, usTmp);
-
- return hGroup;
+ return hGroup;
}
void DeleteCListGroupsByName(TCHAR* szGroupName)