summaryrefslogtreecommitdiff
path: root/protocols/IRCG/src/scripting.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-08 19:39:48 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-08 19:39:48 +0000
commit05cd7934d4bdb097e112efdda356946868f3f5d6 (patch)
tree0fa678b494af8b994abf7319298a1af06fc9218a /protocols/IRCG/src/scripting.cpp
parent50a2ba5bf6827b8f010288021c1797c11bd1531e (diff)
- end of ANSI support in chats;
- manual crit section control removed from chat engine; - bunch of memory-related clutches either removed or replaced with smart pointers git-svn-id: http://svn.miranda-ng.org/main/trunk@7549 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IRCG/src/scripting.cpp')
-rw-r--r--protocols/IRCG/src/scripting.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/protocols/IRCG/src/scripting.cpp b/protocols/IRCG/src/scripting.cpp
index f03b58d252..ea63dc16a2 100644
--- a/protocols/IRCG/src/scripting.cpp
+++ b/protocols/IRCG/src/scripting.cpp
@@ -78,17 +78,10 @@ INT_PTR __cdecl CIrcProto::Scripting_InsertGuiIn(WPARAM wParam,LPARAM lParam)
static void __stdcall OnHook(void * pi)
{
GCHOOK* gch = ( GCHOOK* )pi;
-
- //Service_GCEventHook(1, (LPARAM) gch);
-
- if(gch->pszUID)
- free(gch->pszUID);
- if(gch->pszText)
- free(gch->pszText);
- if(gch->pDest->ptszID)
- free(gch->pDest->ptszID);
- if(gch->pDest->pszModule)
- free(gch->pDest->pszModule);
+ free(gch->ptszUID);
+ free(gch->ptszText);
+ free(gch->pDest->ptszID);
+ free(gch->pDest->pszModule);
delete gch->pDest;
delete gch;
}
@@ -111,11 +104,12 @@ INT_PTR __cdecl CIrcProto::Scripting_InsertGuiOut( WPARAM, LPARAM lParam )
gchook->pDest->iType = gch->pDest->iType;
if ( gch->ptszText )
gchook->ptszText = _tcsdup( gch->ptszText );
- else gchook->pszText = NULL;
+ else gchook->ptszText = NULL;
if ( gch->ptszUID )
gchook->ptszUID = _tcsdup( gch->ptszUID );
- else gchook->pszUID = NULL;
+ else
+ gchook->ptszUID = NULL;
if ( gch->pDest->ptszID ) {
CMString S = MakeWndID( gch->pDest->ptszID );
@@ -152,7 +146,7 @@ BOOL CIrcProto::Scripting_TriggerMSPRawOut(char ** pszRaw)
return iVal > 0 ? FALSE : TRUE;
}
-BOOL CIrcProto::Scripting_TriggerMSPGuiIn(WPARAM * wparam, GCEVENT * gce)
+BOOL CIrcProto::Scripting_TriggerMSPGuiIn(WPARAM * wparam, GCEVENT *gce)
{
WPARAM_GUI_IN wgi = {0};