From 64516fd98ad1dae35864617563ee9963c0f31917 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 21 Jan 2014 17:18:33 +0000 Subject: - OnSessionCreate was called too early; - function names normalization git-svn-id: http://svn.miranda-ng.org/main/trunk@7818 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/chat/chat_svc.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/modules/chat/chat_svc.cpp') diff --git a/src/modules/chat/chat_svc.cpp b/src/modules/chat/chat_svc.cpp index 5b3b2df05a..0644d3e983 100644 --- a/src/modules/chat/chat_svc.cpp +++ b/src/modules/chat/chat_svc.cpp @@ -214,7 +214,7 @@ static INT_PTR Service_NewChat(WPARAM wParam, LPARAM lParam) si->ptszStatusbarText = mir_tstrdup(gcw->ptszStatusbarText); si->iSplitterX = g_Settings->iSplitterX; si->iSplitterY = g_Settings->iSplitterY; - si->iLogFilterFlags = (int)db_get_dw(NULL, CHAT_MODULE, "FilterFlags", 0x03E0); + si->iLogFilterFlags = db_get_dw(NULL, CHAT_MODULE, "FilterFlags", 0x03E0); si->bFilterEnabled = db_get_b(NULL, CHAT_MODULE, "FilterEnabled", 0); si->bNicklistEnabled = db_get_b(NULL, CHAT_MODULE, "ShowNicklist", 1); @@ -239,6 +239,9 @@ static INT_PTR Service_NewChat(WPARAM wParam, LPARAM lParam) db_set_ts(si->hContact, si->pszModule, "StatusBar", si->ptszStatusbarText); else db_set_s(si->hContact, si->pszModule, "StatusBar", ""); + + if (ci.OnCreateSession) + ci.OnCreateSession(si, mi); } else if (si = ci.SM_FindSession(gcw->ptszID, gcw->pszModule)) { ci.UM_RemoveAll(&si->pUsers); @@ -247,8 +250,8 @@ static INT_PTR Service_NewChat(WPARAM wParam, LPARAM lParam) si->iStatusCount = 0; si->nUsersInNicklist = 0; - if (ci.OnSessionReplace) - ci.OnSessionReplace(si); + if (ci.OnReplaceSession) + ci.OnReplaceSession(si); } return 0; @@ -325,8 +328,8 @@ static int DoControl(GCEVENT *gce, WPARAM wp) replaceStrT(si->ptszName, gce->ptszText); if (si->hWnd) SendMessage(si->hWnd, GC_UPDATETITLE, 0, 0); - if (ci.OnSessionRename) - ci.OnSessionRename(si); + if (ci.OnRenameSession) + ci.OnRenameSession(si); } } -- cgit v1.2.3