summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-10 21:46:59 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-10 21:47:09 +0300
commitb9a3a98d6f2695a36ca27fa2d88e99fedd72cc98 (patch)
treebeea931b224074701afadd5072db524d1b179219 /protocols
parentbdbb894df1353ba2f5e8eb61a59acf901fd652e5 (diff)
Group chats:
- GC_CONTROL_MSG left us forever; - tons of old/unused/useless slack simply wiped out; - new function: CSrmmBaseDialog::ClearLog
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Discord/src/utils.cpp2
-rw-r--r--protocols/IRCG/src/commandmonitor.cpp2
-rw-r--r--protocols/IRCG/src/services.cpp2
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp5
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp5
5 files changed, 11 insertions, 5 deletions
diff --git a/protocols/Discord/src/utils.cpp b/protocols/Discord/src/utils.cpp
index 6fc1e8b23a..bd21fbd48a 100644
--- a/protocols/Discord/src/utils.cpp
+++ b/protocols/Discord/src/utils.cpp
@@ -23,7 +23,7 @@ void CDiscordProto::SetAllContactStatuses(int status)
if (!getByte(hContact, "ChatRoom"))
setWord(hContact, "Status", (WORD)status);
else if (status == ID_STATUS_OFFLINE)
- Chat_Control(m_szModuleName, ptrW(getWStringA(hContact, "ChatRoomID")), SESSION_TERMINATE);
+ Chat_Terminate(m_szModuleName, ptrW(getWStringA(hContact, "ChatRoomID")));
}
}
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp
index 45265b9d54..7c460538c1 100644
--- a/protocols/IRCG/src/commandmonitor.cpp
+++ b/protocols/IRCG/src/commandmonitor.cpp
@@ -1381,7 +1381,7 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg)
Chat_Control(m_szModuleName, sID, WINDOW_HIDDEN);
break;
case 'X':
- Chat_Control(m_szModuleName, sID, WINDOW_MAXIMIZE);
+ Chat_Control(m_szModuleName, sID, WINDOW_VISIBLE);
break;
default:
Chat_Control(m_szModuleName, sID, SESSION_INITDONE);
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp
index 28b070caf3..6dae62da22 100644
--- a/protocols/IRCG/src/services.cpp
+++ b/protocols/IRCG/src/services.cpp
@@ -1045,7 +1045,7 @@ void CIrcProto::DisconnectFromServer(void)
if (m_perform && IsConnected())
DoPerform("Event: Disconnect");
- Chat_Terminate(m_szModuleName, NULL);
+ Chat_Terminate(m_szModuleName, nullptr);
ForkThread(&CIrcProto::DisconnectServerThread, 0);
}
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index 6cb09aabc2..c431395078 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -327,7 +327,10 @@ void CJabberProto::GcQuit(JABBER_LIST_ITEM *item, int code, HXML reason)
GcLogUpdateMemberStatus(item, myNick, myNick, NULL, GC_EVENT_KICK, reason);
}
- Chat_Control(m_szModuleName, item->jid, (code == 200) ? SESSION_TERMINATE : SESSION_OFFLINE);
+ if (code == 200)
+ Chat_Terminate(m_szModuleName, item->jid);
+ else
+ Chat_Control(m_szModuleName, item->jid, SESSION_OFFLINE);
db_unset(item->hContact, "CList", "Hidden");
item->bChatActive = false;
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index 975bcd9fdc..4cac5fb957 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -613,7 +613,10 @@ void CVkProto::LeaveChat(int chat_id, bool close_window, bool delete_chat)
if (cc == NULL)
return;
- Chat_Control(m_szModuleName, cc->m_wszId, close_window ? SESSION_TERMINATE : SESSION_OFFLINE);
+ if (close_window)
+ Chat_Terminate(m_szModuleName, cc->m_wszId);
+ else
+ Chat_Control(m_szModuleName, cc->m_wszId, SESSION_OFFLINE);
if (delete_chat)
db_delete_contact(cc->m_hContact);