summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/IRCG/src/ircproto.cpp1
-rw-r--r--protocols/IRCG/src/ircproto.h1
-rw-r--r--protocols/IRCG/src/tools.cpp17
3 files changed, 19 insertions, 0 deletions
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp
index 77ac527e30..5c7d9fb3ef 100644
--- a/protocols/IRCG/src/ircproto.cpp
+++ b/protocols/IRCG/src/ircproto.cpp
@@ -62,6 +62,7 @@ CIrcProto::CIrcProto(const char* szModuleName, const wchar_t* tszUserName) :
codepage = CP_ACP;
InitPrefs();
+ CheckUpdate();
CList_SetAllOffline(true);
diff --git a/protocols/IRCG/src/ircproto.h b/protocols/IRCG/src/ircproto.h
index 0e2ee41f68..ee40589a8a 100644
--- a/protocols/IRCG/src/ircproto.h
+++ b/protocols/IRCG/src/ircproto.h
@@ -264,6 +264,7 @@ struct CIrcProto : public PROTO<CIrcProto>
// tools.cpp
void AddToJTemp(wchar_t op, CMStringW& sCommand);
bool AddWindowItemData(CMStringW window, const wchar_t *pszLimit, const wchar_t *pszMode, const wchar_t *pszPassword, const wchar_t *pszTopic);
+ void CheckUpdate();
INT_PTR DoEvent(int iEvent, const wchar_t *pszWindow, const wchar_t *pszNick, const wchar_t *pszText, const wchar_t *pszStatus, const wchar_t *pszUserInfo, DWORD_PTR dwItemData, bool bAddToLog, bool bIsMe, time_t timestamp = 1);
void FindLocalIP(HNETLIBCONN con);
bool FreeWindowItemData(CMStringW window, CHANNELINFO* wis);
diff --git a/protocols/IRCG/src/tools.cpp b/protocols/IRCG/src/tools.cpp
index dd0f6d158d..4748f34534 100644
--- a/protocols/IRCG/src/tools.cpp
+++ b/protocols/IRCG/src/tools.cpp
@@ -21,6 +21,23 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
+void CIrcProto::CheckUpdate()
+{
+ if (getByte("Compatibility") < 1) {
+ for (auto &cc : AccContacts()) {
+ if (getByte(cc, "ChatRoom") == GCW_SERVER)
+ db_delete_contact(cc);
+ else {
+ ptrA szNick(getUStringA(cc, "Nick"));
+ if (szNick)
+ setUString(cc, "ID", szNick);
+ }
+ }
+
+ setByte("Compatibility", 1);
+ }
+}
+
CHANNELINFO *CIrcProto::GetChannelInfo(const wchar_t *pwszChatName)
{
return (CHANNELINFO *)Chat_GetUserInfo(Chat_Find(pwszChatName, m_szModuleName));