diff options
Diffstat (limited to 'protocols')
64 files changed, 187 insertions, 47 deletions
diff --git a/protocols/Discord/proto_discord/src/resource.h b/protocols/Discord/proto_discord/src/resource.h index df3be36b36..70e0dd0372 100644 --- a/protocols/Discord/proto_discord/src/resource.h +++ b/protocols/Discord/proto_discord/src/resource.h @@ -9,6 +9,7 @@ #define IDI_ICON5 131 #define IDI_ICON6 158 #define IDI_ICON7 159 +#define IDI_ICON8 129 // Next default values for new objects // diff --git a/protocols/Dummy/proto_dummy/res/FFC.ico b/protocols/Dummy/proto_dummy/res/FFC.ico Binary files differnew file mode 100644 index 0000000000..f0d7976014 --- /dev/null +++ b/protocols/Dummy/proto_dummy/res/FFC.ico diff --git a/protocols/Dummy/proto_dummy/res/Proto_Dummy.rc b/protocols/Dummy/proto_dummy/res/Proto_Dummy.rc index 8aa8f437ee..6ee7d50d4e 100644 --- a/protocols/Dummy/proto_dummy/res/Proto_Dummy.rc +++ b/protocols/Dummy/proto_dummy/res/Proto_Dummy.rc @@ -58,6 +58,7 @@ IDI_ICON4 ICON "Invisible.ico" IDI_ICON5 ICON "NA.ico" IDI_ICON6 ICON "DND.ico" IDI_ICON7 ICON "Occupied.ico" +IDI_ICON8 ICON "FFC.ico" #endif // Russian (Russia) resources ///////////////////////////////////////////////////////////////////////////// diff --git a/protocols/Dummy/proto_dummy/src/resource.h b/protocols/Dummy/proto_dummy/src/resource.h index 4db7c6c8e9..8a14b9dbc0 100644 --- a/protocols/Dummy/proto_dummy/src/resource.h +++ b/protocols/Dummy/proto_dummy/src/resource.h @@ -9,6 +9,7 @@ #define IDI_ICON5 131 #define IDI_ICON6 158 #define IDI_ICON7 159 +#define IDI_ICON8 129 // Next default values for new objects // diff --git a/protocols/Dummy/src/dummy_proto.cpp b/protocols/Dummy/src/dummy_proto.cpp index b17c86f3a5..0911ce15a5 100644 --- a/protocols/Dummy/src/dummy_proto.cpp +++ b/protocols/Dummy/src/dummy_proto.cpp @@ -93,7 +93,7 @@ INT_PTR CDummyProto::GetCaps(int type, MCONTACT) return PF1_IM | PF1_BASICSEARCH | PF1_ADDSEARCHRES; case PFLAGNUM_2: - return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND; + return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT; case PFLAGNUM_3: return 0; @@ -102,7 +102,7 @@ INT_PTR CDummyProto::GetCaps(int type, MCONTACT) return PF4_AVATARS | PF4_NOAUTHDENYREASON | PF4_NOCUSTOMAUTH; case PFLAGNUM_5: - return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND; + return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT; case PFLAG_MAXLENOFMESSAGE: return 0; diff --git a/protocols/EmLanProto/src/amdproto.cpp b/protocols/EmLanProto/src/amdproto.cpp index 31609cec3e..fc620b8cae 100644 --- a/protocols/EmLanProto/src/amdproto.cpp +++ b/protocols/EmLanProto/src/amdproto.cpp @@ -66,9 +66,9 @@ static INT_PTR __cdecl EMPGetCaps(WPARAM wParam, LPARAM) return PF1_IM | PF1_BASICSEARCH | PF1_ADDSEARCHRES | PF1_PEER2PEER | PF1_INDIVSTATUS |
PF1_MODEMSG | PF1_FILE | PF1_CANRENAMEFILE | PF1_FILERESUME;
case PFLAGNUM_2:
- return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND;
+ return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT;
case PFLAGNUM_3:
- return PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND;
+ return PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT;
case PFLAG_UNIQUEIDTEXT:
return (INT_PTR)Translate("User name, IP address or '*'");
default:
diff --git a/protocols/EmLanProto/src/mlan.cpp b/protocols/EmLanProto/src/mlan.cpp index 6c2b9e13b2..6ad76e2f95 100644 --- a/protocols/EmLanProto/src/mlan.cpp +++ b/protocols/EmLanProto/src/mlan.cpp @@ -41,6 +41,7 @@ CMLan::CMLan() m_amesNa = nullptr; m_amesOccupied = nullptr; m_amesDnd = nullptr; + m_amesFfc = nullptr; m_pFileConnectionList = nullptr; @@ -61,6 +62,7 @@ CMLan::~CMLan() delete[] m_amesNa; delete[] m_amesOccupied; delete[] m_amesDnd; + delete[] m_amesFfc; } void CMLan::DeleteCache() @@ -321,6 +323,7 @@ void CMLan::OnRecvPacket(u_char *mes, int len, in_addr from) case ID_STATUS_NA: mesAway = m_amesNa; break; case ID_STATUS_OCCUPIED: mesAway = m_amesOccupied; break; case ID_STATUS_DND: mesAway = m_amesDnd; break; + case ID_STATUS_FREECHAT: mesAway = m_amesFfc; break; } if (mesAway) { @@ -508,6 +511,9 @@ int CMLan::SetAwayMsg(u_int status, char* msg) case ID_STATUS_DND: ppMsg = &m_amesDnd; break; + case ID_STATUS_FREECHAT: + ppMsg = &m_amesFfc; + break; default: return 1; } diff --git a/protocols/EmLanProto/src/mlan.h b/protocols/EmLanProto/src/mlan.h index df3793a3a1..8396f5d105 100644 --- a/protocols/EmLanProto/src/mlan.h +++ b/protocols/EmLanProto/src/mlan.h @@ -141,6 +141,7 @@ private: char* m_amesNa;
char* m_amesOccupied;
char* m_amesDnd;
+ char* m_amesFfc;
struct TFileConnection
{
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index 4901848b7d..1e309e9c1e 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -1062,7 +1062,7 @@ int FacebookProto::ParseMessages(std::string &pData, std::vector<facebook_messag // const JSONNode &ol_ = itNodes["ol"]; // possible values: -1 (when goes to offline), 0 (when goes back online) (something more?) // const JSONNode &p_ = itNodes["p"]; // class with fbAppStatus, messengerStatus, otherStatus, status, webStatus - int status = ID_STATUS_INVISIBLE; // INVISIBLE to easily spot some problem, as we expect it will always be p==0 or p==2 below + int status = ID_STATUS_FREECHAT; // FREECHAT to easily spot some problem, as we expect it will always be p==0 or p==2 below if (a_) { int a = a_.as_int(); diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index 916614a34f..294a3411b6 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -176,6 +176,9 @@ int FacebookProto::SetStatus(int new_status) case ID_STATUS_NA: m_iDesiredStatus = ID_STATUS_AWAY; break; + case ID_STATUS_FREECHAT: + m_iDesiredStatus = ID_STATUS_ONLINE; + break; default: m_iDesiredStatus = getByte(FACEBOOK_KEY_MAP_STATUSES, DEFAULT_MAP_STATUSES) ? ID_STATUS_INVISIBLE : ID_STATUS_AWAY; break; diff --git a/protocols/Gadu-Gadu/proto_gg/res/FFC.ico b/protocols/Gadu-Gadu/proto_gg/res/FFC.ico Binary files differnew file mode 100644 index 0000000000..d145072f08 --- /dev/null +++ b/protocols/Gadu-Gadu/proto_gg/res/FFC.ico diff --git a/protocols/Gadu-Gadu/proto_gg/res/Proto_GG.rc b/protocols/Gadu-Gadu/proto_gg/res/Proto_GG.rc index f6a19debab..3a9e85cae0 100644 --- a/protocols/Gadu-Gadu/proto_gg/res/Proto_GG.rc +++ b/protocols/Gadu-Gadu/proto_gg/res/Proto_GG.rc @@ -57,6 +57,7 @@ IDI_ICON3 ICON "Away.ico" IDI_ICON4 ICON "Invisible.ico"
IDI_ICON5 ICON "NA.ico"
IDI_ICON6 ICON "DND.ico"
+IDI_ICON7 ICON "FFC.ico"
#endif // Russian (Russia) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/Gadu-Gadu/proto_gg/src/resource.h b/protocols/Gadu-Gadu/proto_gg/src/resource.h index f3e095d876..16c501a888 100644 --- a/protocols/Gadu-Gadu/proto_gg/src/resource.h +++ b/protocols/Gadu-Gadu/proto_gg/src/resource.h @@ -8,6 +8,7 @@ #define IDI_ICON4 130
#define IDI_ICON5 131
#define IDI_ICON6 158
+#define IDI_ICON7 129
// Next default values for new objects
//
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index ba9d0597b2..1ed90ba67c 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -98,6 +98,17 @@ void GaduProto::disconnect() }
break;
+ case ID_STATUS_FREECHAT:
+ gg_EnterCriticalSection(&modemsg_mutex, "disconnect", 9, "modemsg_mutex", 1);
+ szMsg = mir_utf8encodeW(modemsg.freechat);
+ gg_LeaveCriticalSection(&modemsg_mutex, "disconnect", 9, 1, "modemsg_mutex", 1);
+ if (!szMsg && !db_get_s(0, "SRAway", gg_status2db(ID_STATUS_FREECHAT, "Default"), &dbv, DBVT_WCHAR)) {
+ if (dbv.pwszVal && *(dbv.pwszVal))
+ szMsg = mir_utf8encodeW(dbv.pwszVal);
+ db_free(&dbv);
+ }
+ break;
+
case ID_STATUS_INVISIBLE:
gg_EnterCriticalSection(&modemsg_mutex, "disconnect", 10, "modemsg_mutex", 1);
szMsg = mir_utf8encodeW(modemsg.invisible);
@@ -1536,6 +1547,7 @@ int GaduProto::status_m2gg(int status, int descr) case ID_STATUS_ONLINE: return GG_STATUS_AVAIL_DESCR | mask;
case ID_STATUS_AWAY: return GG_STATUS_BUSY_DESCR | mask;
case ID_STATUS_DND: return GG_STATUS_DND_DESCR | mask;
+ case ID_STATUS_FREECHAT: return GG_STATUS_FFC_DESCR | mask;
case ID_STATUS_INVISIBLE: return GG_STATUS_INVISIBLE_DESCR | mask;
default: return GG_STATUS_BUSY_DESCR | mask;
}
@@ -1546,6 +1558,7 @@ int GaduProto::status_m2gg(int status, int descr) case ID_STATUS_ONLINE: return GG_STATUS_AVAIL | mask;
case ID_STATUS_AWAY: return GG_STATUS_BUSY | mask;
case ID_STATUS_DND: return GG_STATUS_DND | mask;
+ case ID_STATUS_FREECHAT: return GG_STATUS_FFC | mask;
case ID_STATUS_INVISIBLE: return GG_STATUS_INVISIBLE | mask;
default: return GG_STATUS_BUSY | mask;
}
@@ -1569,8 +1582,6 @@ int GaduProto::status_gg2m(int status) case GG_STATUS_AVAIL:
case GG_STATUS_AVAIL_DESCR:
- case GG_STATUS_FFC:
- case GG_STATUS_FFC_DESCR:
return ID_STATUS_ONLINE;
case GG_STATUS_BUSY:
@@ -1580,6 +1591,10 @@ int GaduProto::status_gg2m(int status) case GG_STATUS_DND:
case GG_STATUS_DND_DESCR:
return ID_STATUS_DND;
+
+ case GG_STATUS_FFC:
+ case GG_STATUS_FFC_DESCR:
+ return ID_STATUS_FREECHAT;
case GG_STATUS_INVISIBLE:
case GG_STATUS_INVISIBLE_DESCR:
diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp index a9d5bb73c9..4302ba3cbd 100644 --- a/protocols/Gadu-Gadu/src/dialogs.cpp +++ b/protocols/Gadu-Gadu/src/dialogs.cpp @@ -263,6 +263,7 @@ static INT_PTR CALLBACK gg_genoptsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, SendDlgItemMessage(hwndDlg, IDC_LEAVESTATUS, CB_ADDSTRING, 0, (LPARAM)Clist_GetStatusModeDescription(ID_STATUS_ONLINE, 0)); SendDlgItemMessage(hwndDlg, IDC_LEAVESTATUS, CB_ADDSTRING, 0, (LPARAM)Clist_GetStatusModeDescription(ID_STATUS_AWAY, 0)); SendDlgItemMessage(hwndDlg, IDC_LEAVESTATUS, CB_ADDSTRING, 0, (LPARAM)Clist_GetStatusModeDescription(ID_STATUS_DND, 0)); + SendDlgItemMessage(hwndDlg, IDC_LEAVESTATUS, CB_ADDSTRING, 0, (LPARAM)Clist_GetStatusModeDescription(ID_STATUS_FREECHAT, 0)); SendDlgItemMessage(hwndDlg, IDC_LEAVESTATUS, CB_ADDSTRING, 0, (LPARAM)Clist_GetStatusModeDescription(ID_STATUS_INVISIBLE, 0)); switch (gg->getWord(GG_KEY_LEAVESTATUS, GG_KEYDEF_LEAVESTATUS)) { @@ -275,6 +276,9 @@ static INT_PTR CALLBACK gg_genoptsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, case ID_STATUS_DND: SendDlgItemMessage(hwndDlg, IDC_LEAVESTATUS, CB_SETCURSEL, 3, 0); break; + case ID_STATUS_FREECHAT: + SendDlgItemMessage(hwndDlg, IDC_LEAVESTATUS, CB_SETCURSEL, 4, 0); + break; case ID_STATUS_INVISIBLE: SendDlgItemMessage(hwndDlg, IDC_LEAVESTATUS, CB_SETCURSEL, 5, 0); break; @@ -464,6 +468,9 @@ static INT_PTR CALLBACK gg_genoptsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, gg->setWord(GG_KEY_LEAVESTATUS, ID_STATUS_DND); break; case 4: + gg->setWord(GG_KEY_LEAVESTATUS, ID_STATUS_FREECHAT); + break; + case 5: gg->setWord(GG_KEY_LEAVESTATUS, ID_STATUS_INVISIBLE); break; default: diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 6554b18d49..4c11cd975a 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -112,6 +112,7 @@ GaduProto::~GaduProto() if (modemsg.online) mir_free(modemsg.online);
if (modemsg.away) mir_free(modemsg.away);
if (modemsg.dnd) mir_free(modemsg.dnd);
+ if (modemsg.freechat) mir_free(modemsg.freechat);
if (modemsg.invisible) mir_free(modemsg.invisible);
if (modemsg.offline) mir_free(modemsg.offline);
}
@@ -145,10 +146,10 @@ INT_PTR GaduProto::GetCaps(int type, MCONTACT) return PF1_IM | PF1_BASICSEARCH | PF1_EXTSEARCH | PF1_EXTSEARCHUI | PF1_SEARCHBYNAME |
PF1_MODEMSG | PF1_NUMERICUSERID | PF1_VISLIST | PF1_FILE;
case PFLAGNUM_2:
- return PF2_ONLINE | PF2_SHORTAWAY | PF2_HEAVYDND | PF2_INVISIBLE |
+ return PF2_ONLINE | PF2_SHORTAWAY | PF2_HEAVYDND | PF2_FREECHAT | PF2_INVISIBLE |
PF2_LONGAWAY;
case PFLAGNUM_3:
- return PF2_ONLINE | PF2_SHORTAWAY | PF2_HEAVYDND | PF2_INVISIBLE;
+ return PF2_ONLINE | PF2_SHORTAWAY | PF2_HEAVYDND | PF2_FREECHAT | PF2_INVISIBLE;
case PFLAGNUM_4:
return PF4_NOCUSTOMAUTH | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_IMSENDOFFLINE;
case PFLAGNUM_5:
@@ -631,6 +632,9 @@ int GaduProto::SetAwayMsg(int iStatus, const wchar_t *newMsg) case ID_STATUS_DND:
msgPtr = &modemsg.dnd;
break;
+ case ID_STATUS_FREECHAT:
+ msgPtr = &modemsg.freechat;
+ break;
case ID_STATUS_INVISIBLE:
msgPtr = &modemsg.invisible;
break;
diff --git a/protocols/Gadu-Gadu/src/gg_proto.h b/protocols/Gadu-Gadu/src/gg_proto.h index 2e9db7566c..ada0efe1d8 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.h +++ b/protocols/Gadu-Gadu/src/gg_proto.h @@ -239,6 +239,7 @@ struct GaduProto : public PROTO<GaduProto> wchar_t *online;
wchar_t *away;
wchar_t *dnd;
+ wchar_t *freechat;
wchar_t *invisible;
wchar_t *offline;
};
diff --git a/protocols/Gadu-Gadu/src/services.cpp b/protocols/Gadu-Gadu/src/services.cpp index eac7fcbd63..2b959d6e9d 100644 --- a/protocols/Gadu-Gadu/src/services.cpp +++ b/protocols/Gadu-Gadu/src/services.cpp @@ -32,6 +32,7 @@ char *gg_status2db(int status, const char *suffix) case ID_STATUS_NA: prefix = "Na"; break;
case ID_STATUS_DND: prefix = "Dnd"; break;
case ID_STATUS_OCCUPIED: prefix = "Occupied"; break;
+ case ID_STATUS_FREECHAT: prefix = "FreeChat"; break;
case ID_STATUS_ONLINE: prefix = "On"; break;
case ID_STATUS_OFFLINE: prefix = "Off"; break;
case ID_STATUS_INVISIBLE: prefix = "Inv"; break;
@@ -56,6 +57,9 @@ wchar_t* GaduProto::getstatusmsg(int status) case ID_STATUS_DND:
return modemsg.dnd;
break;
+ case ID_STATUS_FREECHAT:
+ return modemsg.freechat;
+ break;
case ID_STATUS_INVISIBLE:
return modemsg.invisible;
break;
@@ -128,6 +132,7 @@ int gg_normalizestatus(int status) switch (status) {
case ID_STATUS_ONLINE: return ID_STATUS_ONLINE;
case ID_STATUS_DND: return ID_STATUS_DND;
+ case ID_STATUS_FREECHAT: return ID_STATUS_FREECHAT;
case ID_STATUS_OFFLINE: return ID_STATUS_OFFLINE;
case ID_STATUS_INVISIBLE: return ID_STATUS_INVISIBLE;
}
diff --git a/protocols/ICQ-WIM/proto_icq/src/resource.h b/protocols/ICQ-WIM/proto_icq/src/resource.h index df3be36b36..70e0dd0372 100644 --- a/protocols/ICQ-WIM/proto_icq/src/resource.h +++ b/protocols/ICQ-WIM/proto_icq/src/resource.h @@ -9,6 +9,7 @@ #define IDI_ICON5 131 #define IDI_ICON6 158 #define IDI_ICON7 159 +#define IDI_ICON8 129 // Next default values for new objects // diff --git a/protocols/ICQ-WIM/proto_mra/src/resource.h b/protocols/ICQ-WIM/proto_mra/src/resource.h index 862336f18a..fcdca143d6 100644 --- a/protocols/ICQ-WIM/proto_mra/src/resource.h +++ b/protocols/ICQ-WIM/proto_mra/src/resource.h @@ -9,6 +9,7 @@ #define IDI_ICON5 131 #define IDI_ICON6 158 #define IDI_ICON7 159 +#define IDI_ICON8 129 // Next default values for new objects // diff --git a/protocols/ICQCorp/src/protocol.cpp b/protocols/ICQCorp/src/protocol.cpp index bdf3686354..c43c3b6fad 100644 --- a/protocols/ICQCorp/src/protocol.cpp +++ b/protocols/ICQCorp/src/protocol.cpp @@ -32,6 +32,7 @@ unsigned short toIcqStatus(unsigned short status) case ID_STATUS_DND: return ICQ_STATUS_DND;
case ID_STATUS_NA: return ICQ_STATUS_NA;
case ID_STATUS_OCCUPIED: return ICQ_STATUS_OCCUPIED;
+ case ID_STATUS_FREECHAT: return ICQ_STATUS_FREECHAT;
case ID_STATUS_INVISIBLE: return ICQ_STATUS_PRIVATE;
}
return ICQ_STATUS_ONLINE;
@@ -48,6 +49,7 @@ unsigned short toIdStatus(unsigned short status) case ICQ_STATUS_DND: return ID_STATUS_DND;
case ICQ_STATUS_NA: return ID_STATUS_NA;
case ICQ_STATUS_OCCUPIED: return ID_STATUS_OCCUPIED;
+ case ICQ_STATUS_FREECHAT: return ID_STATUS_FREECHAT;
case ICQ_STATUS_PRIVATE: return ID_STATUS_INVISIBLE;
}
return ID_STATUS_ONLINE;
@@ -1401,6 +1403,7 @@ ICQEvent *ICQ::sendTCP(ICQUser *u, unsigned short cmd, char *cmdStr, char *m) unsigned int status;
switch (statusVal) {
case ID_STATUS_ONLINE: status = 0x00100000; break;
+ case ID_STATUS_FREECHAT: status = 0x00000000; break; // ??
case ID_STATUS_AWAY: status = 0x01100000; break;
case ID_STATUS_NA: status = 0x00100000; break;
case ID_STATUS_DND: status = 0x00100000; break;
@@ -1526,6 +1529,7 @@ ICQEvent *ICQ::sendReadAwayMsg(ICQUser *u) case ID_STATUS_DND: cmd = ICQ_CMDxTCP_READxDNDxMSG; break;
case ID_STATUS_NA: cmd = ICQ_CMDxTCP_READxNAxMSG; break;
case ID_STATUS_OCCUPIED: cmd = ICQ_CMDxTCP_READxOCCUPIEDxMSG; break;
+ case ID_STATUS_FREECHAT: cmd = ICQ_CMDxTCP_READxFREECHATxMSG; break;
default: return nullptr;
}
@@ -1566,6 +1570,7 @@ ICQTransfer *ICQ::sendFile(ICQUser *u, char *description, char *filename, unsign unsigned int status;
switch (statusVal) {
case ID_STATUS_ONLINE: status = 0x00100000; break;
+ case ID_STATUS_FREECHAT: status = 0x00000000; break; // ??
case ID_STATUS_AWAY: status = 0x01100000; break;
case ID_STATUS_NA: status = 0x00100000; break;
case ID_STATUS_DND: status = 0x00100000; break;
@@ -1612,6 +1617,7 @@ void ICQ::acceptFile(ICQUser *u, unsigned long hTransfer, char*) unsigned long status;
switch (statusVal) {
case ID_STATUS_ONLINE: status = 0x00100000; break;
+ case ID_STATUS_FREECHAT: status = 0x00000000; break; // ??
case ID_STATUS_AWAY: status = 0x01100000; break;
case ID_STATUS_NA: status = 0x00100000; break;
case ID_STATUS_DND: status = 0x00100000; break;
@@ -1656,6 +1662,7 @@ void ICQ::refuseFile(ICQUser *u, unsigned long hTransfer, char *reason) unsigned int status;
switch (statusVal) {
case ID_STATUS_ONLINE: status = 0x00100000; break;
+ case ID_STATUS_FREECHAT: status = 0x00000000; break; // ??
case ID_STATUS_AWAY: status = 0x01100000; break;
case ID_STATUS_NA: status = 0x00100000; break;
case ID_STATUS_DND: status = 0x00100000; break;
@@ -1798,6 +1805,7 @@ void ICQ::processTcpPacket(Packet &packet, unsigned int hSocket) case ICQ_CMDxTCP_READxOCCUPIEDxMSG:
case ICQ_CMDxTCP_READxNAxMSG:
case ICQ_CMDxTCP_READxDNDxMSG:
+ case ICQ_CMDxTCP_READxFREECHATxMSG:
Netlib_Logf(hNetlibUser, "[tcp] %d requested read of away message.\n", checkUin);
packet >> theTCPSequence;
@@ -1871,6 +1879,7 @@ void ICQ::processTcpPacket(Packet &packet, unsigned int hSocket) case ICQ_CMDxTCP_READxOCCUPIEDxMSG:
case ICQ_CMDxTCP_READxNAxMSG:
case ICQ_CMDxTCP_READxDNDxMSG:
+ case ICQ_CMDxTCP_READxFREECHATxMSG:
packet >> theTCPSequence;
addAwayMsg(u, message, theTCPSequence, time(0));
break;
@@ -1919,6 +1928,7 @@ void ICQ::ackTCP(Packet &packet, ICQUser *u, unsigned short newCommand, unsigned switch (statusVal) {
case ID_STATUS_ONLINE: status = 0x00100000; break;
+ case ID_STATUS_FREECHAT: status = 0x00000000; break; // ??
case ID_STATUS_AWAY: status = 0x01100000; break;
case ID_STATUS_NA: status = 0x00100000; break;
case ID_STATUS_DND: status = 0x00100000; break;
diff --git a/protocols/ICQCorp/src/protocol.h b/protocols/ICQCorp/src/protocol.h index b3b3e875dd..ba75de163b 100644 --- a/protocols/ICQCorp/src/protocol.h +++ b/protocols/ICQCorp/src/protocol.h @@ -98,6 +98,7 @@ const unsigned short ICQ_CMDxTCP_READxAWAYxMSG = 0x03E8; const unsigned short ICQ_CMDxTCP_READxOCCUPIEDxMSG = 0x03E9;
const unsigned short ICQ_CMDxTCP_READxNAxMSG = 0x03EA;
const unsigned short ICQ_CMDxTCP_READxDNDxMSG = 0x03EB;
+const unsigned short ICQ_CMDxTCP_READxFREECHATxMSG = 0x03EC;
const unsigned short ICQ_CMDxTCP_HANDSHAKE = 0x03FF;
const unsigned short ICQ_CMDxTCP_HANDSHAKE2 = 0x04FF;
const unsigned short ICQ_CMDxTCP_HANDSHAKE3 = 0x02FF;
@@ -109,6 +110,7 @@ const unsigned short int ICQ_STATUS_AWAY = 0x0001; const unsigned short int ICQ_STATUS_NA = 0x0005;
const unsigned short int ICQ_STATUS_OCCUPIED = 0x0011;
const unsigned short int ICQ_STATUS_DND = 0x0013;
+const unsigned short int ICQ_STATUS_FREECHAT = 0x0020;
const unsigned short int ICQ_STATUS_PRIVATE = 0x0100;
// miscellaneous constants
diff --git a/protocols/ICQCorp/src/services.cpp b/protocols/ICQCorp/src/services.cpp index f632f67c64..0781c67d5c 100644 --- a/protocols/ICQCorp/src/services.cpp +++ b/protocols/ICQCorp/src/services.cpp @@ -28,10 +28,10 @@ static INT_PTR icqGetCaps(WPARAM wParam, LPARAM) return PF1_IM | PF1_FILE | PF1_MODEMSG | PF1_AUTHREQ | PF1_PEER2PEER | PF1_BASICSEARCH | PF1_EXTSEARCH | PF1_CANRENAMEFILE | PF1_FILERESUME | PF1_ADDSEARCHRES | PF1_SEARCHBYEMAIL | PF1_SEARCHBYNAME | PF1_NUMERICUSERID;
case PFLAGNUM_2:
- return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND;
+ return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT;
case PFLAGNUM_3:
- return PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND;
+ return PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT;
case PFLAG_UNIQUEIDTEXT:
return (INT_PTR)Translate("ICQ number");
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 9f3e6cd526..448336e3c9 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -2349,6 +2349,7 @@ bool CIrcProto::DoOnConnect(const CIrcMessage*) if (IsConnected()) {
DoPerform(_T2A(m_info.sNetwork));
switch (Temp) {
+ case ID_STATUS_FREECHAT: DoPerform("Event: Free for chat"); break;
case ID_STATUS_ONLINE: DoPerform("Event: Available"); break;
}
}
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 4e70654649..d05c5a5027 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -721,12 +721,12 @@ int CIrcProto::SetStatusInternal(int iNewStatus, bool bIsInternal) if (!bIsInternal)
m_iDesiredStatus = iNewStatus;
- if ((iNewStatus == ID_STATUS_ONLINE || iNewStatus == ID_STATUS_AWAY) && !IsConnected()) //go from offline to online
+ if ((iNewStatus == ID_STATUS_ONLINE || iNewStatus == ID_STATUS_AWAY || iNewStatus == ID_STATUS_FREECHAT) && !IsConnected()) //go from offline to online
{
if (!m_bConnectThreadRunning)
ConnectToServer();
}
- else if (iNewStatus == ID_STATUS_ONLINE && IsConnected() && m_iStatus == ID_STATUS_AWAY) //go to online while connected
+ else if ((iNewStatus == ID_STATUS_ONLINE || iNewStatus == ID_STATUS_FREECHAT) && IsConnected() && m_iStatus == ID_STATUS_AWAY) //go to online while connected
{
m_statusMessage = L"";
PostIrcMessage(L"/AWAY");
@@ -784,7 +784,7 @@ HANDLE CIrcProto::GetAwayMsg(MCONTACT hContact) int CIrcProto::SetAwayMsg(int status, const wchar_t* msg)
{
switch (status) {
- case ID_STATUS_ONLINE: case ID_STATUS_INVISIBLE:
+ case ID_STATUS_ONLINE: case ID_STATUS_INVISIBLE: case ID_STATUS_FREECHAT:
case ID_STATUS_CONNECTING: case ID_STATUS_OFFLINE:
break;
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index 74bdeb75bf..e289ccaeb6 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -930,6 +930,7 @@ static char* sttPerformEvents[] = { LPGEN("Event: Not available"),
LPGEN("Event: Occupied"),
LPGEN("Event: Do not disturb"),
+ LPGEN("Event: Free for chat"),
LPGEN("Event: Disconnect"),
LPGEN("ALL NETWORKS")
};
diff --git a/protocols/JabberG/proto_jabber/res/FFC.ico b/protocols/JabberG/proto_jabber/res/FFC.ico Binary files differnew file mode 100644 index 0000000000..dbc899c02a --- /dev/null +++ b/protocols/JabberG/proto_jabber/res/FFC.ico diff --git a/protocols/JabberG/proto_jabber/res/Proto_Jabber.rc b/protocols/JabberG/proto_jabber/res/Proto_Jabber.rc index f6a19debab..3a9e85cae0 100644 --- a/protocols/JabberG/proto_jabber/res/Proto_Jabber.rc +++ b/protocols/JabberG/proto_jabber/res/Proto_Jabber.rc @@ -57,6 +57,7 @@ IDI_ICON3 ICON "Away.ico" IDI_ICON4 ICON "Invisible.ico"
IDI_ICON5 ICON "NA.ico"
IDI_ICON6 ICON "DND.ico"
+IDI_ICON7 ICON "FFC.ico"
#endif // Russian (Russia) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/JabberG/proto_jabber/src/resource.h b/protocols/JabberG/proto_jabber/src/resource.h index f59e3ec356..e1031b138e 100644 --- a/protocols/JabberG/proto_jabber/src/resource.h +++ b/protocols/JabberG/proto_jabber/src/resource.h @@ -8,6 +8,7 @@ #define IDI_ICON4 130
#define IDI_ICON5 131
#define IDI_ICON6 158
+#define IDI_ICON7 129
// Next default values for new objects
//
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 99556d85b7..c0e3fa6923 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -49,7 +49,8 @@ enum { IDM_PRESENCE_ONLINE = ID_STATUS_ONLINE,
IDM_PRESENCE_AWAY = ID_STATUS_AWAY,
IDM_PRESENCE_NA = ID_STATUS_NA,
- IDM_PRESENCE_DND = ID_STATUS_DND
+ IDM_PRESENCE_DND = ID_STATUS_DND,
+ IDM_PRESENCE_FREE4CHAT = ID_STATUS_FREECHAT
};
struct TRoleOrAffiliationInfo
@@ -425,6 +426,7 @@ static gc_item sttLogListItems[] = { LPGENW("Away"), IDM_PRESENCE_AWAY, MENU_POPUPITEM },
{ LPGENW("Not available"), IDM_PRESENCE_NA, MENU_POPUPITEM },
{ LPGENW("Do not disturb"), IDM_PRESENCE_DND, MENU_POPUPITEM },
+ { LPGENW("Free for chat"), IDM_PRESENCE_FREE4CHAT, MENU_POPUPITEM },
{ LPGENW("&Leave chat session"), IDM_LEAVE, MENU_ITEM }
};
@@ -1294,6 +1296,7 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g case IDM_PRESENCE_AWAY:
case IDM_PRESENCE_NA:
case IDM_PRESENCE_DND:
+ case IDM_PRESENCE_FREE4CHAT:
if (MCONTACT h = ppro->HContactFromJID(item->jid))
ppro->OnMenuHandleDirectPresence((WPARAM)h, 0, gch->dwData);
break;
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index 67b3d17568..7e18ceae1b 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -844,6 +844,7 @@ void CJabberProto::GroupchatProcessPresence(const TiXmlElement *node) if (!mir_strcmp(pszStatus, "away")) status = ID_STATUS_AWAY;
else if (!mir_strcmp(pszStatus, "xa")) status = ID_STATUS_NA;
else if (!mir_strcmp(pszStatus, "dnd")) status = ID_STATUS_DND;
+ else if (!mir_strcmp(pszStatus, "chat")) status = ID_STATUS_FREECHAT;
}
// process custom nick change
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index 6a81703261..feedbec77a 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -29,6 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define IDI_ONLINE 104
#define IDI_OFFLINE 105
#define IDI_AWAY 128
+#define IDI_FREE4CHAT 129
#define IDI_INVISIBLE 130
#define IDI_NA 131
#define IDI_DND 158
@@ -72,7 +73,7 @@ static CTransportProtoTableItem TransportProtoTable[] = { "meinvz*", "MeinVZ" },
};
-static int skinIconStatusToResourceId[] = { IDI_OFFLINE, IDI_ONLINE, IDI_AWAY, IDI_DND, IDI_NA, IDI_NA, IDI_OCCUPIED, IDI_INVISIBLE };
+static int skinIconStatusToResourceId[] = { IDI_OFFLINE, IDI_ONLINE, IDI_AWAY, IDI_DND, IDI_NA, IDI_NA, IDI_OCCUPIED, IDI_FREE4CHAT, IDI_INVISIBLE };
///////////////////////////////////////////////////////////////////////////////
// CIconPool class
diff --git a/protocols/JabberG/src/jabber_list.cpp b/protocols/JabberG/src/jabber_list.cpp index 8582963ebe..08e7eb0cff 100644 --- a/protocols/JabberG/src/jabber_list.cpp +++ b/protocols/JabberG/src/jabber_list.cpp @@ -394,19 +394,23 @@ char* CJabberProto::ListGetBestClientResourceNamePtr(const char *jid) for (auto &it : LI->arResources) {
bool foundBetter = false;
switch (it->m_iStatus) {
- case ID_STATUS_ONLINE:
+ case ID_STATUS_FREECHAT:
foundBetter = true;
break;
+ case ID_STATUS_ONLINE:
+ if (status != ID_STATUS_FREECHAT)
+ foundBetter = true;
+ break;
case ID_STATUS_DND:
- if (status != ID_STATUS_ONLINE)
+ if (status != ID_STATUS_FREECHAT && status != ID_STATUS_ONLINE)
foundBetter = true;
break;
case ID_STATUS_AWAY:
- if (status != ID_STATUS_ONLINE && status != ID_STATUS_DND)
+ if (status != ID_STATUS_FREECHAT && status != ID_STATUS_ONLINE && status != ID_STATUS_DND)
foundBetter = true;
break;
case ID_STATUS_NA:
- if (status != ID_STATUS_ONLINE && status != ID_STATUS_DND && status != ID_STATUS_AWAY)
+ if (status != ID_STATUS_FREECHAT && status != ID_STATUS_ONLINE && status != ID_STATUS_DND && status != ID_STATUS_AWAY)
foundBetter = true;
break;
}
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 0f7fcf3409..bdd1684ca2 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -61,6 +61,7 @@ static PresenceModeArray[] = { SKINICON_STATUS_AWAY, ID_STATUS_AWAY },
{ SKINICON_STATUS_NA, ID_STATUS_NA },
{ SKINICON_STATUS_DND, ID_STATUS_DND },
+ { SKINICON_STATUS_FREE4CHAT, ID_STATUS_FREECHAT },
};
static HGENMENU g_hMenuDirectPresence[_countof(PresenceModeArray) + 1];
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index 9395d2b6a5..b6ef4735d9 100755 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -215,6 +215,7 @@ void CJabberProto::SetServerStatus(int iNewStatus) switch (iNewStatus) {
case ID_STATUS_ONLINE:
case ID_STATUS_NA:
+ case ID_STATUS_FREECHAT:
case ID_STATUS_INVISIBLE:
m_iStatus = iNewStatus;
break;
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 296f12e516..2803329e83 100755 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -240,6 +240,7 @@ CJabberProto::~CJabberProto() mir_free(m_modeMsgs.szAway);
mir_free(m_modeMsgs.szNa);
mir_free(m_modeMsgs.szDnd);
+ mir_free(m_modeMsgs.szFreechat);
mir_free(m_transportProtoTableStartIndex);
@@ -579,9 +580,9 @@ INT_PTR CJabberProto::GetCaps(int type, MCONTACT hContact) case PFLAGNUM_1:
return PF1_IM | PF1_AUTHREQ | PF1_CHAT | PF1_SERVERCLIST | PF1_MODEMSG | PF1_BASICSEARCH | PF1_EXTSEARCH | PF1_FILE | PF1_CONTACT;
case PFLAGNUM_2:
- return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_HEAVYDND;
+ return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_HEAVYDND | PF2_FREECHAT;
case PFLAGNUM_3:
- return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_HEAVYDND;
+ return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_HEAVYDND | PF2_FREECHAT;
case PFLAGNUM_4:
return PF4_FORCEAUTH | PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON | PF4_SUPPORTTYPING | PF4_AVATARS;
case PFLAG_UNIQUEIDTEXT:
@@ -1198,6 +1199,10 @@ int CJabberProto::SetAwayMsg(int status, const wchar_t *msg) szMsg = &m_modeMsgs.szDnd;
status = ID_STATUS_DND;
break;
+
+ case ID_STATUS_FREECHAT:
+ szMsg = &m_modeMsgs.szFreechat;
+ break;
default:
return 1;
diff --git a/protocols/JabberG/src/jabber_rc.cpp b/protocols/JabberG/src/jabber_rc.cpp index e880fb9f60..3f19deda87 100644 --- a/protocols/JabberG/src/jabber_rc.cpp +++ b/protocols/JabberG/src/jabber_rc.cpp @@ -238,6 +238,7 @@ static char *StatusModeToDbSetting(int status, const char *suffix) case ID_STATUS_NA: prefix = "Na"; break;
case ID_STATUS_DND: prefix = "Dnd"; break;
case ID_STATUS_OCCUPIED: prefix = "Occupied"; break;
+ case ID_STATUS_FREECHAT: prefix = "FreeChat"; break;
case ID_STATUS_ONLINE: prefix = "On"; break;
case ID_STATUS_OFFLINE: prefix = "Off"; break;
case ID_STATUS_INVISIBLE: prefix = "Inv"; break;
@@ -286,6 +287,9 @@ int CJabberProto::AdhocSetStatusHandler(const TiXmlElement*, CJabberIqInfo *pInf case ID_STATUS_OCCUPIED:
fieldNode << XCHILD("value", "dnd");
break;
+ case ID_STATUS_FREECHAT:
+ fieldNode << XCHILD("value", "chat");
+ break;
case ID_STATUS_ONLINE:
default:
fieldNode << XCHILD("value", "online");
@@ -342,6 +346,7 @@ int CJabberProto::AdhocSetStatusHandler(const TiXmlElement*, CJabberIqInfo *pInf if (!mir_strcmp(pszValue, "away")) status = ID_STATUS_AWAY;
else if (!mir_strcmp(pszValue, "xa")) status = ID_STATUS_NA;
else if (!mir_strcmp(pszValue, "dnd")) status = ID_STATUS_DND;
+ else if (!mir_strcmp(pszValue, "chat")) status = ID_STATUS_FREECHAT;
else if (!mir_strcmp(pszValue, "online")) status = ID_STATUS_ONLINE;
else if (!mir_strcmp(pszValue, "invisible")) status = ID_STATUS_INVISIBLE;
else if (!mir_strcmp(pszValue, "offline")) status = ID_STATUS_OFFLINE;
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index d1119b6bbf..ad263039bd 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -54,6 +54,9 @@ INT_PTR __cdecl CJabberProto::GetMyAwayMsg(WPARAM wParam, LPARAM lParam) case ID_STATUS_OCCUPIED:
szStatus = m_modeMsgs.szDnd;
break;
+ case ID_STATUS_FREECHAT:
+ szStatus = m_modeMsgs.szFreechat;
+ break;
default: // Should not reach here
break;
}
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 64ea91d5b4..bd146d967a 100755 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -1614,6 +1614,7 @@ void CJabberProto::OnProcessPresence(const TiXmlElement *node, ThreadData *info) if (!mir_strcmp(show, "away")) status = ID_STATUS_AWAY;
else if (!mir_strcmp(show, "xa")) status = ID_STATUS_NA;
else if (!mir_strcmp(show, "dnd")) status = ID_STATUS_DND;
+ else if (!mir_strcmp(show, "chat")) status = ID_STATUS_FREECHAT;
}
int priority = XmlGetChildInt(node, "priority");
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index db99565983..87b69204e7 100755 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -197,6 +197,7 @@ void JabberHttpUrlDecode(wchar_t *str) int JabberCombineStatus(int status1, int status2)
{
// Combine according to the following priority (high to low)
+ // ID_STATUS_FREECHAT
// ID_STATUS_ONLINE
// ID_STATUS_DND
// ID_STATUS_AWAY
@@ -204,6 +205,8 @@ int JabberCombineStatus(int status1, int status2) // ID_STATUS_INVISIBLE (valid only for TLEN_PLUGIN)
// ID_STATUS_OFFLINE
// other ID_STATUS in random order (actually return status1)
+ if (status1 == ID_STATUS_FREECHAT || status2 == ID_STATUS_FREECHAT)
+ return ID_STATUS_FREECHAT;
if (status1 == ID_STATUS_ONLINE || status2 == ID_STATUS_ONLINE)
return ID_STATUS_ONLINE;
if (status1 == ID_STATUS_DND || status2 == ID_STATUS_DND)
@@ -475,6 +478,10 @@ void CJabberProto::SendPresenceTo(int status, const char *to, const TiXmlElement p << XCHILD("show", "dnd");
if (!msg) msg = m_modeMsgs.szDnd;
break;
+ case ID_STATUS_FREECHAT:
+ p << XCHILD("show", "chat");
+ if (!msg) msg = m_modeMsgs.szFreechat;
+ break;
default: // Should not reach here
break;
}
diff --git a/protocols/JabberG/src/stdafx.h b/protocols/JabberG/src/stdafx.h index 71067a498c..d7710f32a6 100755 --- a/protocols/JabberG/src/stdafx.h +++ b/protocols/JabberG/src/stdafx.h @@ -401,6 +401,7 @@ struct JABBER_MODEMSGS char *szAway;
char *szNa;
char *szDnd;
+ char *szFreechat;
};
typedef enum { FT_SI, FT_OOB, FT_BYTESTREAM, FT_IBB } JABBER_FT_TYPE;
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index cbb853a090..d38ac42e3c 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -62,6 +62,7 @@ char** CMsnProto::GetStatusMsgLoc(int status) ID_STATUS_DND,
ID_STATUS_NA,
ID_STATUS_OCCUPIED,
+ ID_STATUS_FREECHAT,
ID_STATUS_INVISIBLE,
};
diff --git a/protocols/Non-IM Contact/res/resource.rc b/protocols/Non-IM Contact/res/resource.rc index f4e7ae70ff..27d8600dba 100644 --- a/protocols/Non-IM Contact/res/resource.rc +++ b/protocols/Non-IM Contact/res/resource.rc @@ -74,6 +74,7 @@ BEGIN CONTROL "",CHK_NA,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,109,95,16,16 CONTROL "",CHK_OCC,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,128,95,16,16 CONTROL "",CHK_DND,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,147,95,16,16 + CONTROL "",CHK_FFC,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,166,95,16,16 CONTROL "",CHK_INVISIBLE,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,185,95,16,16 LTEXT "Group:",IDC_STATIC,12,81,29,8 LTEXT "Status Icon",IDC_STATIC,12,99,54,8 diff --git a/protocols/Non-IM Contact/src/contactinfo.cpp b/protocols/Non-IM Contact/src/contactinfo.cpp index 38a6312728..797a328501 100644 --- a/protocols/Non-IM Contact/src/contactinfo.cpp +++ b/protocols/Non-IM Contact/src/contactinfo.cpp @@ -140,7 +140,7 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP SetDlgItemTextW(hwnd, IDC_GROUP, wszGroup); /* icons */ - CheckRadioButton(hwnd, 40072, 40077, g_plugin.getWord(hContact, "Icon", ID_STATUS_ONLINE)); + CheckRadioButton(hwnd, 40072, 40078, g_plugin.getWord(hContact, "Icon", ID_STATUS_ONLINE)); SetWindowLongPtr(GetDlgItem(hwnd, CHK_ONLINE), GWLP_USERDATA, (LONG_PTR)Skin_LoadProtoIcon(MODNAME, ID_STATUS_ONLINE)); g_PrevBtnWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwnd, CHK_ONLINE), GWLP_WNDPROC, (LONG_PTR)ButtWndProc); for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_MAX; i++) { @@ -599,6 +599,8 @@ INT_PTR ImportContacts(WPARAM, LPARAM) mir_snprintf(tmp, "Icon: DND\r\n"); else if (icon == ID_STATUS_OCCUPIED) mir_snprintf(tmp, "Icon: Occupied\r\n"); + else if (icon == ID_STATUS_FREECHAT) + mir_snprintf(tmp, "Icon: Free for chat\r\n"); else if (icon == ID_STATUS_INVISIBLE) mir_snprintf(tmp, "Icon: Invisible\r\n"); else { diff --git a/protocols/Non-IM Contact/src/resource.h b/protocols/Non-IM Contact/src/resource.h index 6cf12110fc..a81de3f2a4 100644 --- a/protocols/Non-IM Contact/src/resource.h +++ b/protocols/Non-IM Contact/src/resource.h @@ -59,7 +59,8 @@ #define CHK_DND 40074 #define CHK_NA 40075 #define CHK_OCC 40076 -#define CHK_INVISIBLE 40077 +#define CHK_FFC 40077 +#define CHK_INVISIBLE 40078 // Next default values for new objects // diff --git a/protocols/Non-IM Contact/src/services.cpp b/protocols/Non-IM Contact/src/services.cpp index 72ef8ec790..4a584e653a 100644 --- a/protocols/Non-IM Contact/src/services.cpp +++ b/protocols/Non-IM Contact/src/services.cpp @@ -9,7 +9,7 @@ INT_PTR GetLCCaps(WPARAM wParam, LPARAM) if (wParam == PFLAGNUM_1) return 0; if (wParam == PFLAGNUM_2) - return PF2_ONLINE | PF2_LONGAWAY | PF2_SHORTAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_INVISIBLE; // add the possible statuses here. + return PF2_ONLINE | PF2_LONGAWAY | PF2_SHORTAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT | PF2_INVISIBLE; // add the possible statuses here. if (wParam == PFLAGNUM_3) return 0; return 0; diff --git a/protocols/Sametime/src/sametime_session.cpp b/protocols/Sametime/src/sametime_session.cpp index 4b01d29174..e9cd06818c 100644 --- a/protocols/Sametime/src/sametime_session.cpp +++ b/protocols/Sametime/src/sametime_session.cpp @@ -249,6 +249,7 @@ int CSametimeProto::SetSessionStatus(int status) //us.time = 0;
switch (status) {
+ case ID_STATUS_FREECHAT:
case ID_STATUS_ONLINE:
us.desc = AwayMessages.szOnline; us.status = mwStatus_ACTIVE;
break;
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index eb57d4741d..9ca67827bb 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -241,6 +241,10 @@ int CSkypeProto::SetStatus(int iNewStatus) return 0; switch (iNewStatus) { + case ID_STATUS_FREECHAT: + iNewStatus = ID_STATUS_ONLINE; + break; + case ID_STATUS_NA: iNewStatus = ID_STATUS_AWAY; break; diff --git a/protocols/Steam/proto_steam/res/FFC.ico b/protocols/Steam/proto_steam/res/FFC.ico Binary files differnew file mode 100644 index 0000000000..1e8b4f3bad --- /dev/null +++ b/protocols/Steam/proto_steam/res/FFC.ico diff --git a/protocols/Steam/proto_steam/res/Proto_Steam.rc b/protocols/Steam/proto_steam/res/Proto_Steam.rc index 7658ab5894..00ad7ff43c 100644 --- a/protocols/Steam/proto_steam/res/Proto_Steam.rc +++ b/protocols/Steam/proto_steam/res/Proto_Steam.rc @@ -56,6 +56,7 @@ IDI_ICON2 ICON "Online.ico" IDI_ICON3 ICON "Away.ico"
IDI_ICON5 ICON "NA.ico"
IDI_ICON6 ICON "DND.ico"
+IDI_ICON8 ICON "FFC.ico"
#endif // Russian (Russia) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/Steam/proto_steam/src/resource.h b/protocols/Steam/proto_steam/src/resource.h index f0b1594ea6..0ecf950bc3 100644 --- a/protocols/Steam/proto_steam/src/resource.h +++ b/protocols/Steam/proto_steam/src/resource.h @@ -7,6 +7,7 @@ #define IDI_ICON3 128
#define IDI_ICON5 131
#define IDI_ICON6 158
+#define IDI_ICON8 129
// Next default values for new objects
//
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index 4cd9ffc563..63e4c05905 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -19,6 +19,11 @@ void CSteamProto::SetContactStatus(MCONTACT hContact, WORD status) // Special handling of some statuses switch (status) { + case ID_STATUS_FREECHAT: + // Contact is looking to play, save it to as status message + db_set_ws(hContact, "CList", "StatusMsg", TranslateT("Looking to play")); + break; + case ID_STATUS_OFFLINE: // if contact is offline, remove played game info delSetting(hContact, "GameID"); @@ -162,7 +167,7 @@ void CSteamProto::UpdateContactDetails(MCONTACT hContact, const JSONNode &data) if (stateflags == PersonaStateFlag::None) { // nothing special, either standard client or in different status (only online, I want to play, I want to trade statuses support this flags) WORD status = getWord(hContact, "Status", ID_STATUS_OFFLINE); - if (status == ID_STATUS_ONLINE) + if (status == ID_STATUS_ONLINE || status == ID_STATUS_FREECHAT) setWString(hContact, "MirVer", L"Steam"); } else if (contains_flag(stateflags, PersonaStateFlag::InJoinableGame)) { diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index 143a26e444..40d6e8ae09 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -189,11 +189,11 @@ INT_PTR CSteamProto::GetCaps(int type, MCONTACT) case PFLAGNUM_1: return PF1_IM | PF1_BASICSEARCH | PF1_SEARCHBYNAME | PF1_AUTHREQ | PF1_SERVERCLIST | PF1_ADDSEARCHRES | PF1_MODEMSGRECV; case PFLAGNUM_2: - return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_HEAVYDND; + return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_HEAVYDND | PF2_FREECHAT; case PFLAGNUM_4: return PF4_AVATARS | PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON | PF4_FORCEAUTH | PF4_SUPPORTIDLE | PF4_SUPPORTTYPING;// | PF4_IMSENDOFFLINE; case PFLAGNUM_5: - return PF2_HEAVYDND; + return PF2_HEAVYDND | PF2_FREECHAT; case PFLAG_UNIQUEIDTEXT: return (INT_PTR)Translate("SteamID"); default: diff --git a/protocols/Steam/src/steam_utils.cpp b/protocols/Steam/src/steam_utils.cpp index e4a45e7dbe..ad6b8b3732 100644 --- a/protocols/Steam/src/steam_utils.cpp +++ b/protocols/Steam/src/steam_utils.cpp @@ -13,9 +13,9 @@ WORD CSteamProto::SteamToMirandaStatus(PersonaState state) return ID_STATUS_AWAY;
case PersonaState::Snooze:
return ID_STATUS_NA;
-
- case PersonaState::LookingToTrade:
case PersonaState::LookingToPlay:
+ return ID_STATUS_FREECHAT;
+ case PersonaState::LookingToTrade:
default:
return ID_STATUS_ONLINE;
}
@@ -34,6 +34,8 @@ PersonaState CSteamProto::MirandaToSteamState(int status) return PersonaState::Away;
case ID_STATUS_NA:
return PersonaState::Snooze;
+ case ID_STATUS_FREECHAT:
+ return PersonaState::LookingToPlay;
default:
return PersonaState::Online;
}
diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp index 6caff2c40b..d39deee198 100644 --- a/protocols/Tox/src/tox_utils.cpp +++ b/protocols/Tox/src/tox_utils.cpp @@ -3,6 +3,10 @@ int CToxProto::MapStatus(int status)
{
switch (status) {
+ case ID_STATUS_FREECHAT:
+ status = ID_STATUS_ONLINE;
+ break;
+
case ID_STATUS_NA:
status = ID_STATUS_AWAY;
break;
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index 0496409e9b..e7d1e8806f 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -169,8 +169,8 @@ int TwitterProto::SetStatus(int new_status) return 0;
m_iDesiredStatus = new_status;
- // 40072 - 40077 are the "online" statuses, basically every status except offline. see statusmodes.h
- if (new_status >= 40072 && new_status <= 40077) {
+ // 40072 - 40078 are the "online" statuses, basically every status except offline. see statusmodes.h
+ if (new_status >= 40072 && new_status <= 40078) {
m_iDesiredStatus = ID_STATUS_ONLINE; //i think i have to set this so it forces the twitter proto to be online (and not away, DND, etc)
@@ -179,7 +179,7 @@ int TwitterProto::SetStatus(int new_status) return 0;
// if we're already connected, and we change to another connected status, don't try and reconnect!
- if (old_status >= 40072 && old_status <= 40077)
+ if (old_status >= 40072 && old_status <= 40078)
return 0;
// i think here we tell the proto interface struct that we're connecting, just so it knows
diff --git a/protocols/Weather/src/stdafx.h b/protocols/Weather/src/stdafx.h index b2c3e5db15..7a8156af5e 100644 --- a/protocols/Weather/src/stdafx.h +++ b/protocols/Weather/src/stdafx.h @@ -76,7 +76,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define CLOUDY ID_STATUS_NA #define RAIN ID_STATUS_OCCUPIED #define FOG ID_STATUS_DND -#define SNOW ID_STATUS_INVISIBLE +#define SNOW ID_STATUS_FREECHAT +#define LIGHT ID_STATUS_INVISIBLE +#define THUNDER ID_STATUS_INVISIBLE #define UNAVAIL 40081 // status diff --git a/protocols/Weather/src/weather_conv.cpp b/protocols/Weather/src/weather_conv.cpp index 584cb4f1bd..9ce8a16ad3 100644 --- a/protocols/Weather/src/weather_conv.cpp +++ b/protocols/Weather/src/weather_conv.cpp @@ -316,8 +316,8 @@ void GetElev(wchar_t *tempchar, wchar_t *unit, wchar_t *str) // cond = the string for weather condition // return value = status for the icon (ONLINE, OFFLINE, etc) -static const wchar_t *statusStr[10] = { L"Fog", L"Snow", L"Rain", L"Partly Cloudy", L"Cloudy", L"Sunny", L"N/A" }; -static const WORD statusValue[10] = { FOG, SNOW, RAIN, PCLOUDY, CLOUDY, SUNNY, NA }; +static const wchar_t *statusStr[10] = { L"Lightning", L"Fog", L"Snow", L"Rain", L"Partly Cloudy", L"Cloudy", L"Sunny", L"N/A" }; +static const WORD statusValue[10] = { LIGHT, FOG, SNOW, RAIN, PCLOUDY, CLOUDY, SUNNY, NA }; WORD GetIcon(const wchar_t* cond, WIDATA *Data) { @@ -333,6 +333,9 @@ WORD GetIcon(const wchar_t* cond, WIDATA *Data) if (wcsstr(cond, L"sunny") || wcsstr(cond, L"clear") || wcsstr(cond, L"fair")) return SUNNY; + if (wcsstr(cond, L"thunder") || wcsstr(cond, L"t-storm")) + return LIGHT; + if (wcsstr(cond, L"cloud") || wcsstr(cond, L"overcast")) return CLOUDY; @@ -342,7 +345,7 @@ WORD GetIcon(const wchar_t* cond, WIDATA *Data) if (wcsstr(cond, L"snow") || wcsstr(cond, L"ice") || wcsstr(cond, L"freezing") || wcsstr(cond, L"wintry")) return SNOW; - if (wcsstr(cond, L"thunder") || wcsstr(cond, L"t-storm") || wcsstr(cond, L"drizzle") || wcsstr(cond, L"rain")) + if (wcsstr(cond, L"drizzle") || wcsstr(cond, L"rain")) return RAIN; // set the icon using langpack diff --git a/protocols/Weather/src/weather_svcs.cpp b/protocols/Weather/src/weather_svcs.cpp index ef021fb633..c3c9b4ab4b 100644 --- a/protocols/Weather/src/weather_svcs.cpp +++ b/protocols/Weather/src/weather_svcs.cpp @@ -62,7 +62,7 @@ INT_PTR WeatherGetCaps(WPARAM wParam, LPARAM) break; case PFLAGNUM_2: - ret = PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND; + ret = PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT; break; case PFLAGNUM_4: @@ -70,7 +70,7 @@ INT_PTR WeatherGetCaps(WPARAM wParam, LPARAM) break; case PFLAGNUM_5: /* this is PFLAGNUM_5 change when alpha SDK is released */ - ret = PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND; + ret = PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT; break; case PFLAG_UNIQUEIDTEXT: @@ -116,8 +116,8 @@ INT_PTR WeatherGetInfo(WPARAM, LPARAM lParam) } // avatars -static const wchar_t *statusStr[] = { L"Fog", L"Snow", L"Rain", L"PCloudy", L"Cloudy", L"Sunny", L"NA" }; -static const WORD statusValue[] = { FOG, SNOW, RAIN, PCLOUDY, CLOUDY, SUNNY, NA }; +static const wchar_t *statusStr[] = { L"Light", L"Fog", L"Snow", L"Rain", L"PCloudy", L"Cloudy", L"Sunny", L"NA" }; +static const WORD statusValue[] = { LIGHT, FOG, SNOW, RAIN, PCLOUDY, CLOUDY, SUNNY, NA }; INT_PTR WeatherGetAvatarInfo(WPARAM, LPARAM lParam) { diff --git a/protocols/WebView/src/webview_services.cpp b/protocols/WebView/src/webview_services.cpp index 898b4405ae..5371ff0780 100644 --- a/protocols/WebView/src/webview_services.cpp +++ b/protocols/WebView/src/webview_services.cpp @@ -207,7 +207,7 @@ INT_PTR GetCaps(WPARAM wParam, LPARAM) case PFLAGNUM_4: return PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON; case PFLAGNUM_5: - return PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND; + return PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT; case PFLAG_UNIQUEIDTEXT: return (INT_PTR)Translate("Site URL"); default: diff --git a/protocols/YAMN/res/YAMN.rc b/protocols/YAMN/res/YAMN.rc index a9edf2e7f5..75cd039e7d 100644 --- a/protocols/YAMN/res/YAMN.rc +++ b/protocols/YAMN/res/YAMN.rc @@ -238,7 +238,8 @@ BEGIN CONTROL "Not available",IDC_CHECKST3,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,15,83,70,9 CONTROL "Occupied",IDC_CHECKST4,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,15,104,70,9 CONTROL "Do not disturb",IDC_CHECKST5,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,134,19,70,9 - CONTROL "Invisible",IDC_CHECKST6,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,134,39,70,9 + CONTROL "Free for chat",IDC_CHECKST6,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,134,39,70,9 + CONTROL "Invisible",IDC_CHECKST7,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,134,62,70,9 END IDD_YAMNOPT DIALOGEX 0, 0, 312, 121 diff --git a/protocols/YAMN/src/proto/pop3/pop3opt.cpp b/protocols/YAMN/src/proto/pop3/pop3opt.cpp index e22e966c57..fc111ef7c7 100644 --- a/protocols/YAMN/src/proto/pop3/pop3opt.cpp +++ b/protocols/YAMN/src/proto/pop3/pop3opt.cpp @@ -8,7 +8,7 @@ //-------------------------------------------------------------------------------------------------- -static BOOL Check0, Check1, Check2, Check3, Check4, Check5, Check6; +static BOOL Check0, Check1, Check2, Check3, Check4, Check5, Check6, Check7; static char DlgInput[MAX_PATH]; void CheckMenuItems(); @@ -192,6 +192,7 @@ BOOL DlgEnableAccountStatus(HWND hDlg, WPARAM wParam, LPARAM) EnableWindow(GetDlgItem(hDlg, IDC_CHECKST4), (BOOL)wParam); EnableWindow(GetDlgItem(hDlg, IDC_CHECKST5), (BOOL)wParam); EnableWindow(GetDlgItem(hDlg, IDC_CHECKST6), (BOOL)wParam); + EnableWindow(GetDlgItem(hDlg, IDC_CHECKST7), (BOOL)wParam); return TRUE; } @@ -239,7 +240,7 @@ BOOL DlgEnableAccount(HWND hDlg, WPARAM wParam, LPARAM) EnableWindow(GetDlgItem(hDlg, IDC_CHECKFSND), (BOOL)wParam); EnableWindow(GetDlgItem(hDlg, IDC_CHECKFMSG), (BOOL)wParam); EnableWindow(GetDlgItem(hDlg, IDC_CHECKFICO), (BOOL)wParam); - + EnableWindow(GetDlgItem(hDlg, IDC_CHECKSTART), (BOOL)wParam); EnableWindow(GetDlgItem(hDlg, IDC_CHECKFORCE), (BOOL)wParam); EnableWindow(GetDlgItem(hDlg, IDC_COMBOCP), (BOOL)wParam); @@ -274,6 +275,7 @@ BOOL DlgShowAccountStatus(HWND hDlg, WPARAM wParam, LPARAM lParam) CheckDlgButton(hDlg, IDC_CHECKST4, ActualAccount->StatusFlags & YAMN_ACC_ST4 ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hDlg, IDC_CHECKST5, ActualAccount->StatusFlags & YAMN_ACC_ST5 ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hDlg, IDC_CHECKST6, ActualAccount->StatusFlags & YAMN_ACC_ST6 ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hDlg, IDC_CHECKST7, ActualAccount->StatusFlags & YAMN_ACC_ST7 ? BST_CHECKED : BST_UNCHECKED); ReadDone(ActualAccount); } else { @@ -284,6 +286,7 @@ BOOL DlgShowAccountStatus(HWND hDlg, WPARAM wParam, LPARAM lParam) CheckDlgButton(hDlg, IDC_CHECKST4, BST_UNCHECKED); CheckDlgButton(hDlg, IDC_CHECKST5, BST_UNCHECKED); CheckDlgButton(hDlg, IDC_CHECKST6, BST_UNCHECKED); + CheckDlgButton(hDlg, IDC_CHECKST7, BST_CHECKED); } return TRUE; } @@ -389,7 +392,7 @@ BOOL DlgShowAccount(HWND hDlg, WPARAM wParam, LPARAM lParam) CheckDlgButton(hDlg, IDC_CHECKNOTLS, ActualAccount->Flags & YAMN_ACC_NOTLS ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hDlg, IDC_CHECKAPOP, ActualAccount->Flags & YAMN_ACC_APOP ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hDlg, IDC_AUTOBODY, ActualAccount->Flags & YAMN_ACC_BODY ? BST_CHECKED : BST_UNCHECKED); - + Check0 = ActualAccount->StatusFlags & YAMN_ACC_ST0; Check1 = ActualAccount->StatusFlags & YAMN_ACC_ST1; Check2 = ActualAccount->StatusFlags & YAMN_ACC_ST2; @@ -397,6 +400,7 @@ BOOL DlgShowAccount(HWND hDlg, WPARAM wParam, LPARAM lParam) Check4 = ActualAccount->StatusFlags & YAMN_ACC_ST4; Check5 = ActualAccount->StatusFlags & YAMN_ACC_ST5; Check6 = ActualAccount->StatusFlags & YAMN_ACC_ST6; + Check7 = ActualAccount->StatusFlags & YAMN_ACC_ST7; CheckDlgButton(hDlg, IDC_CHECKSTART, ActualAccount->StatusFlags & YAMN_ACC_STARTS ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hDlg, IDC_CHECKFORCE, ActualAccount->StatusFlags & YAMN_ACC_FORCE ? BST_CHECKED : BST_UNCHECKED); @@ -531,6 +535,7 @@ INT_PTR CALLBACK DlgProcPOP3AccStatusOpt(HWND hDlg, UINT msg, WPARAM wParam, LPA CheckDlgButton(hDlg, IDC_CHECKST4, BST_CHECKED); CheckDlgButton(hDlg, IDC_CHECKST5, BST_CHECKED); CheckDlgButton(hDlg, IDC_CHECKST6, BST_CHECKED); + CheckDlgButton(hDlg, IDC_CHECKST7, BST_CHECKED); } TranslateDialogDefault(hDlg); SendMessage(GetParent(hDlg), PSM_UNCHANGED, (WPARAM)hDlg, 0); @@ -546,6 +551,7 @@ INT_PTR CALLBACK DlgProcPOP3AccStatusOpt(HWND hDlg, UINT msg, WPARAM wParam, LPA Check4 = (IsDlgButtonChecked(hDlg, IDC_CHECKST4) == BST_CHECKED); Check5 = (IsDlgButtonChecked(hDlg, IDC_CHECKST5) == BST_CHECKED); Check6 = (IsDlgButtonChecked(hDlg, IDC_CHECKST6) == BST_CHECKED); + Check7 = (IsDlgButtonChecked(hDlg, IDC_CHECKST7) == BST_CHECKED); WindowList_BroadcastAsync(YAMNVar.MessageWnds, WM_YAMN_CHANGESTATUSOPTION, 0, 0); EndDialog(hDlg, 0); DestroyWindow(hDlg); @@ -708,6 +714,7 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP case IDC_CHECKST4: case IDC_CHECKST5: case IDC_CHECKST6: + case IDC_CHECKST7: case IDC_CHECKSTART: case IDC_CHECKFORCE: case IDC_EDITAPPPARAM: @@ -1012,6 +1019,7 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP (Check4 ? YAMN_ACC_ST4 : 0) | (Check5 ? YAMN_ACC_ST5 : 0) | (Check6 ? YAMN_ACC_ST6 : 0) | + (Check7 ? YAMN_ACC_ST7 : 0) | (CheckStart ? YAMN_ACC_STARTS : 0) | (CheckForce ? YAMN_ACC_FORCE : 0); diff --git a/protocols/YAMN/src/resource.h b/protocols/YAMN/src/resource.h index cac621bb44..096cc42f60 100644 --- a/protocols/YAMN/src/resource.h +++ b/protocols/YAMN/src/resource.h @@ -43,6 +43,7 @@ #define IDC_CHECKST4 1023 #define IDC_CHECKST5 1024 #define IDC_CHECKST6 1025 +#define IDC_CHECKST7 1026 #define IDC_EDITAPP 1027 #define IDC_CHECKCONTACT 1030 #define IDC_CHECKCONTACTNICK 1031 diff --git a/protocols/YAMN/src/yamn.cpp b/protocols/YAMN/src/yamn.cpp index 1b4b9e4f01..d355ed3b13 100644 --- a/protocols/YAMN/src/yamn.cpp +++ b/protocols/YAMN/src/yamn.cpp @@ -160,6 +160,9 @@ void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD) case ID_STATUS_OCCUPIED: DebugLog(SynchroFile, "TimerProc:ActualAccountSO-read enter status occupied\n"); break; + case ID_STATUS_FREECHAT: + DebugLog(SynchroFile, "TimerProc:ActualAccountSO-read enter status freechat\n"); + break; case ID_STATUS_INVISIBLE: DebugLog(SynchroFile, "TimerProc:ActualAccountSO-read enter status invisible\n"); break; @@ -177,7 +180,8 @@ void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD) ((ActualAccount->StatusFlags & YAMN_ACC_ST3) && (Status==ID_STATUS_DND)) || ((ActualAccount->StatusFlags & YAMN_ACC_ST4) && (Status==ID_STATUS_NA)) || ((ActualAccount->StatusFlags & YAMN_ACC_ST5) && (Status==ID_STATUS_OCCUPIED)) || - ((ActualAccount->StatusFlags & YAMN_ACC_ST6) && (Status==ID_STATUS_INVISIBLE)))) + ((ActualAccount->StatusFlags & YAMN_ACC_ST6) && (Status==ID_STATUS_FREECHAT)) || + ((ActualAccount->StatusFlags & YAMN_ACC_ST7) && (Status==ID_STATUS_INVISIBLE)))) { if ((!ActualAccount->Interval && !ActualAccount->TimeLeft) || ActualAccount->Plugin->Fcn->TimeoutFcnPtr==nullptr) |