summaryrefslogtreecommitdiff
path: root/protocols/IRCG/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/IRCG/src')
-rw-r--r--protocols/IRCG/src/scripting.cpp13
-rw-r--r--protocols/IRCG/src/services.cpp4
2 files changed, 2 insertions, 15 deletions
diff --git a/protocols/IRCG/src/scripting.cpp b/protocols/IRCG/src/scripting.cpp
index 3926b6aefc..620072fa8e 100644
--- a/protocols/IRCG/src/scripting.cpp
+++ b/protocols/IRCG/src/scripting.cpp
@@ -59,8 +59,6 @@ static void __stdcall OnHook(void * pi)
GCHOOK* gch = (GCHOOK*)pi;
free(gch->ptszUID);
free(gch->ptszText);
- free((void*)gch->ptszID);
- free((void*)gch->pszModule);
delete gch;
}
@@ -88,17 +86,6 @@ INT_PTR __cdecl CIrcProto::Scripting_InsertGuiOut(WPARAM, LPARAM lParam)
else
gchook->ptszUID = nullptr;
- if (gch->ptszID) {
- CMStringW S = MakeWndID(gch->ptszID);
- gchook->ptszID = wcsdup(S.c_str());
- }
- else gchook->ptszID = nullptr;
-
- if (gch->pszModule)
- gchook->pszModule = _strdup(gch->pszModule);
- else
- gchook->pszModule = nullptr;
-
mir_forkThread<GCHOOK>(GuiOutThread, gchook);
return 0;
}
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp
index acc55c5654..04a1ea6936 100644
--- a/protocols/IRCG/src/services.cpp
+++ b/protocols/IRCG/src/services.cpp
@@ -462,8 +462,8 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam)
// handle the hook
if (gch) {
- if (!mir_strcmpi(gch->pszModule, m_szModuleName)) {
- wchar_t *p1 = mir_wstrdup(gch->ptszID);
+ if (!mir_strcmpi(gch->si->pszModule, m_szModuleName)) {
+ wchar_t *p1 = mir_wstrdup(gch->si->ptszID);
wchar_t *p2 = wcsstr(p1, L" - ");
if (p2)
*p2 = 0;