diff options
Diffstat (limited to 'protocols')
45 files changed, 61 insertions, 268 deletions
diff --git a/protocols/Dummy/src/dummy_proto.cpp b/protocols/Dummy/src/dummy_proto.cpp index e92e86dc42..b17c86f3a5 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 | PF2_FREECHAT | PF2_OUTTOLUNCH | PF2_ONTHEPHONE; + return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND; 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 | PF2_FREECHAT | PF2_OUTTOLUNCH | PF2_ONTHEPHONE; + return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND; case PFLAG_MAXLENOFMESSAGE: return 0; diff --git a/protocols/EmLanProto/src/amdproto.cpp b/protocols/EmLanProto/src/amdproto.cpp index fc620b8cae..31609cec3e 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 | PF2_FREECHAT;
+ return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND;
case PFLAGNUM_3:
- return PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT;
+ return PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND;
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 6ad76e2f95..6c2b9e13b2 100644 --- a/protocols/EmLanProto/src/mlan.cpp +++ b/protocols/EmLanProto/src/mlan.cpp @@ -41,7 +41,6 @@ CMLan::CMLan() m_amesNa = nullptr; m_amesOccupied = nullptr; m_amesDnd = nullptr; - m_amesFfc = nullptr; m_pFileConnectionList = nullptr; @@ -62,7 +61,6 @@ CMLan::~CMLan() delete[] m_amesNa; delete[] m_amesOccupied; delete[] m_amesDnd; - delete[] m_amesFfc; } void CMLan::DeleteCache() @@ -323,7 +321,6 @@ 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) { @@ -511,9 +508,6 @@ 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 74d2f41fe8..df3793a3a1 100644 --- a/protocols/EmLanProto/src/mlan.h +++ b/protocols/EmLanProto/src/mlan.h @@ -141,8 +141,6 @@ 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 9a5436e204..b774fde6ee 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -1064,7 +1064,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_FREECHAT; // FREECHAT to easily spot some problem, as we expect it will always be p==0 or p==2 below + int status = ID_STATUS_INVISIBLE; // 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 d2221ae899..e99dc8b895 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -133,17 +133,19 @@ INT_PTR FacebookProto::GetCaps(int type, MCONTACT) else return flags |= PF1_MODEMSGRECV; } + case PFLAGNUM_2: - return PF2_ONLINE | PF2_SHORTAWAY | PF2_INVISIBLE | PF2_ONTHEPHONE | PF2_IDLE; + return PF2_ONLINE | PF2_SHORTAWAY | PF2_INVISIBLE | PF2_IDLE; + case PFLAGNUM_3: if (getByte(FACEBOOK_KEY_SET_MIRANDA_STATUS)) return PF2_ONLINE; // | PF2_SHORTAWAY; else return 0; + case PFLAGNUM_4: return PF4_NOCUSTOMAUTH | PF4_AVATARS | PF4_SUPPORTTYPING | PF4_NOAUTHDENYREASON | PF4_IMSENDOFFLINE | PF4_READNOTIFY; - case PFLAGNUM_5: - return PF2_ONTHEPHONE; + case PFLAG_MAXLENOFMESSAGE: return FACEBOOK_MESSAGE_LIMIT; case PFLAG_UNIQUEIDTEXT: @@ -174,9 +176,6 @@ 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/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index 7653d48e17..ba9d0597b2 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -98,17 +98,6 @@ 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);
@@ -1547,7 +1536,6 @@ 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;
}
@@ -1558,7 +1546,6 @@ 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;
}
@@ -1582,6 +1569,8 @@ 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:
@@ -1592,10 +1581,6 @@ int GaduProto::status_gg2m(int status) 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:
return ID_STATUS_INVISIBLE;
diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp index 4302ba3cbd..a9d5bb73c9 100644 --- a/protocols/Gadu-Gadu/src/dialogs.cpp +++ b/protocols/Gadu-Gadu/src/dialogs.cpp @@ -263,7 +263,6 @@ 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)) { @@ -276,9 +275,6 @@ 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; @@ -468,9 +464,6 @@ 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 186a283c06..53aa06b23f 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -146,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_FREECHAT | PF2_INVISIBLE |
+ return PF2_ONLINE | PF2_SHORTAWAY | PF2_HEAVYDND | PF2_INVISIBLE |
PF2_LONGAWAY;
case PFLAGNUM_3:
- return PF2_ONLINE | PF2_SHORTAWAY | PF2_HEAVYDND | PF2_FREECHAT | PF2_INVISIBLE;
+ return PF2_ONLINE | PF2_SHORTAWAY | PF2_HEAVYDND | PF2_INVISIBLE;
case PFLAGNUM_4:
return PF4_NOCUSTOMAUTH | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_IMSENDOFFLINE;
case PFLAGNUM_5:
@@ -632,9 +632,6 @@ 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/services.cpp b/protocols/Gadu-Gadu/src/services.cpp index 9c5b3ac64f..eac7fcbd63 100644 --- a/protocols/Gadu-Gadu/src/services.cpp +++ b/protocols/Gadu-Gadu/src/services.cpp @@ -32,12 +32,9 @@ 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;
- case ID_STATUS_ONTHEPHONE: prefix = "Otp"; break;
- case ID_STATUS_OUTTOLUNCH: prefix = "Otl"; break;
default: return nullptr;
}
@@ -59,9 +56,6 @@ 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;
@@ -134,7 +128,6 @@ 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/src/options.cpp b/protocols/ICQ-WIM/src/options.cpp index 545b5e353b..18bb8531cc 100644 --- a/protocols/ICQ-WIM/src/options.cpp +++ b/protocols/ICQ-WIM/src/options.cpp @@ -248,7 +248,7 @@ public: bool OnInitDialog() override { if (cmbStatus1.GetHwnd()) { - for (DWORD iStatus = ID_STATUS_OFFLINE; iStatus <= ID_STATUS_OUTTOLUNCH; iStatus++) { + for (DWORD iStatus = ID_STATUS_OFFLINE; iStatus <= ID_STATUS_MAX; iStatus++) { int idx = cmbStatus1.AddString(Clist_GetStatusModeDescription(iStatus, 0)); cmbStatus1.SetItemData(idx, iStatus); if (iStatus == m_proto->m_iStatus1) diff --git a/protocols/ICQCorp/src/protocol.cpp b/protocols/ICQCorp/src/protocol.cpp index c43c3b6fad..7cffa8094a 100644 --- a/protocols/ICQCorp/src/protocol.cpp +++ b/protocols/ICQCorp/src/protocol.cpp @@ -32,7 +32,6 @@ 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;
@@ -49,7 +48,6 @@ 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;
@@ -1403,7 +1401,6 @@ 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;
@@ -1529,7 +1526,6 @@ 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;
}
@@ -1570,7 +1566,6 @@ 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;
@@ -1617,7 +1612,6 @@ 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;
@@ -1662,7 +1656,6 @@ 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;
@@ -1928,7 +1921,6 @@ 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/services.cpp b/protocols/ICQCorp/src/services.cpp index 0781c67d5c..f632f67c64 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 | PF2_FREECHAT;
+ return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND;
case PFLAGNUM_3:
- return PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT;
+ return PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND;
case PFLAG_UNIQUEIDTEXT:
return (INT_PTR)Translate("ICQ number");
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 67a6092e90..9f3e6cd526 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -339,12 +339,6 @@ bool CIrcProto::OnIrc_SETAWAY(const CIrcMessage *pmsg) case ID_STATUS_OCCUPIED:
DoPerform("Event: Occupied");
break;
- case ID_STATUS_OUTTOLUNCH:
- DoPerform("Event: Out for lunch");
- break;
- case ID_STATUS_ONTHEPHONE:
- DoPerform("Event: On the phone");
- break;
default:
m_iStatus = ID_STATUS_AWAY;
DoPerform("Event: Away");
@@ -2355,7 +2349,6 @@ 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 d05c5a5027..4e70654649 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 || iNewStatus == ID_STATUS_FREECHAT) && !IsConnected()) //go from offline to online
+ if ((iNewStatus == ID_STATUS_ONLINE || iNewStatus == ID_STATUS_AWAY) && !IsConnected()) //go from offline to online
{
if (!m_bConnectThreadRunning)
ConnectToServer();
}
- else if ((iNewStatus == ID_STATUS_ONLINE || iNewStatus == ID_STATUS_FREECHAT) && IsConnected() && m_iStatus == ID_STATUS_AWAY) //go to online while connected
+ else if (iNewStatus == ID_STATUS_ONLINE && 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_FREECHAT:
+ case ID_STATUS_ONLINE: case ID_STATUS_INVISIBLE:
case ID_STATUS_CONNECTING: case ID_STATUS_OFFLINE:
break;
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 9b4dc70a54..99556d85b7 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -49,8 +49,7 @@ 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_FREE4CHAT = ID_STATUS_FREECHAT,
+ IDM_PRESENCE_DND = ID_STATUS_DND
};
struct TRoleOrAffiliationInfo
@@ -426,7 +425,6 @@ 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 }
};
@@ -1296,7 +1294,6 @@ 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 7e18ceae1b..67b3d17568 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -844,7 +844,6 @@ 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 b5e8cfe16e..6143bfc146 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -262,7 +262,7 @@ int CJabberProto::LoadAdvancedIcons(int iID) hAdvancedStatusIcon = Clist_GetImageList();
mir_cslock lck(m_csModeMsgMutex);
- for (int i = 0; i < ID_STATUS_ONTHEPHONE - ID_STATUS_OFFLINE; i++) {
+ for (int i = 0; i < ID_STATUS_MAX - ID_STATUS_OFFLINE; i++) {
BOOL needFree;
int n = skinStatusToJabberStatus[i];
wchar_t *descr = Clist_GetStatusModeDescription(n + ID_STATUS_OFFLINE, 0);
diff --git a/protocols/JabberG/src/jabber_list.cpp b/protocols/JabberG/src/jabber_list.cpp index 08e7eb0cff..8582963ebe 100644 --- a/protocols/JabberG/src/jabber_list.cpp +++ b/protocols/JabberG/src/jabber_list.cpp @@ -394,23 +394,19 @@ char* CJabberProto::ListGetBestClientResourceNamePtr(const char *jid) for (auto &it : LI->arResources) {
bool foundBetter = false;
switch (it->m_iStatus) {
- case ID_STATUS_FREECHAT:
- foundBetter = true;
- break;
case ID_STATUS_ONLINE:
- if (status != ID_STATUS_FREECHAT)
- foundBetter = true;
+ foundBetter = true;
break;
case ID_STATUS_DND:
- if (status != ID_STATUS_FREECHAT && status != ID_STATUS_ONLINE)
+ if (status != ID_STATUS_ONLINE)
foundBetter = true;
break;
case ID_STATUS_AWAY:
- if (status != ID_STATUS_FREECHAT && status != ID_STATUS_ONLINE && status != ID_STATUS_DND)
+ if (status != ID_STATUS_ONLINE && status != ID_STATUS_DND)
foundBetter = true;
break;
case ID_STATUS_NA:
- if (status != ID_STATUS_FREECHAT && status != ID_STATUS_ONLINE && status != ID_STATUS_DND && status != ID_STATUS_AWAY)
+ if (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 d0ec3b9dae..bfb1250cd9 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -61,7 +61,6 @@ 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 434394c7da..ec2f534740 100755 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -215,13 +215,10 @@ 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;
case ID_STATUS_AWAY:
- case ID_STATUS_ONTHEPHONE:
- case ID_STATUS_OUTTOLUNCH:
m_iStatus = ID_STATUS_AWAY;
break;
case ID_STATUS_DND:
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index ec65a52654..d881a839b6 100755 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -240,7 +240,6 @@ 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);
@@ -580,9 +579,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 | PF2_FREECHAT;
+ return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_HEAVYDND;
case PFLAGNUM_3:
- return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_HEAVYDND | PF2_FREECHAT;
+ return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_HEAVYDND;
case PFLAGNUM_4:
return PF4_FORCEAUTH | PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON | PF4_SUPPORTTYPING | PF4_AVATARS;
case PFLAG_UNIQUEIDTEXT:
@@ -1186,8 +1185,6 @@ int CJabberProto::SetAwayMsg(int status, const wchar_t *msg) break;
case ID_STATUS_AWAY:
- case ID_STATUS_ONTHEPHONE:
- case ID_STATUS_OUTTOLUNCH:
szMsg = &m_modeMsgs.szAway;
status = ID_STATUS_AWAY;
break;
@@ -1202,10 +1199,6 @@ int CJabberProto::SetAwayMsg(int status, const wchar_t *msg) 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 1ea31f39a0..e880fb9f60 100644 --- a/protocols/JabberG/src/jabber_rc.cpp +++ b/protocols/JabberG/src/jabber_rc.cpp @@ -238,12 +238,9 @@ 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;
- case ID_STATUS_ONTHEPHONE: prefix = "Otp"; break;
- case ID_STATUS_OUTTOLUNCH: prefix = "Otl"; break;
case ID_STATUS_IDLE: prefix = "Idl"; break;
default: return nullptr;
}
@@ -280,8 +277,6 @@ int CJabberProto::AdhocSetStatusHandler(const TiXmlElement*, CJabberIqInfo *pInf fieldNode << XCHILD("value", "invisible");
break;
case ID_STATUS_AWAY:
- case ID_STATUS_ONTHEPHONE:
- case ID_STATUS_OUTTOLUNCH:
fieldNode << XCHILD("value", "away");
break;
case ID_STATUS_NA:
@@ -291,9 +286,6 @@ 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");
@@ -350,7 +342,6 @@ 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 15061de69d..83d7a0c600 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -45,8 +45,6 @@ INT_PTR __cdecl CJabberProto::GetMyAwayMsg(WPARAM wParam, LPARAM lParam) szStatus = m_modeMsgs.szOnline;
break;
case ID_STATUS_AWAY:
- case ID_STATUS_ONTHEPHONE:
- case ID_STATUS_OUTTOLUNCH:
szStatus = m_modeMsgs.szAway;
break;
case ID_STATUS_NA:
@@ -56,9 +54,6 @@ 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 880e6eb0f9..3cb112f60d 100755 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -1614,7 +1614,6 @@ 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 b1169e26ab..2def1c9bc5 100755 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -205,8 +205,6 @@ 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)
@@ -466,8 +464,6 @@ void CJabberProto::SendPresenceTo(int status, const char *to, const TiXmlElement p << XATTR("type", "invisible");
break;
case ID_STATUS_AWAY:
- case ID_STATUS_ONTHEPHONE:
- case ID_STATUS_OUTTOLUNCH:
p << XCHILD("show", "away");
if (!msg) msg = m_modeMsgs.szAway;
break;
@@ -480,10 +476,6 @@ 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 d7710f32a6..71067a498c 100755 --- a/protocols/JabberG/src/stdafx.h +++ b/protocols/JabberG/src/stdafx.h @@ -401,7 +401,6 @@ 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_contact.cpp b/protocols/MSN/src/msn_contact.cpp index c0d655c147..39bdbd1ac2 100644 --- a/protocols/MSN/src/msn_contact.cpp +++ b/protocols/MSN/src/msn_contact.cpp @@ -91,7 +91,7 @@ void CMsnProto::MSN_SetContactDb(MCONTACT hContact, const char *szEmail) }
if (cont->netId == NETID_MOB) {
- setWord(hContact, "Status", ID_STATUS_ONTHEPHONE);
+ setWord(hContact, "Status", ID_STATUS_ONLINE);
setString(hContact, "MirVer", "SMS");
}
}
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index 03f595147f..fc9073d73d 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -30,8 +30,6 @@ const char* CMsnProto::MirandaStatusToMSN(int status) {
switch (status) {
case ID_STATUS_OFFLINE: return "FLN";
- case ID_STATUS_ONTHEPHONE: return "PHN";
- case ID_STATUS_OUTTOLUNCH: return "LUN";
case ID_STATUS_NA:
case ID_STATUS_AWAY: return "AWY";
case ID_STATUS_DND:
@@ -47,8 +45,6 @@ WORD CMsnProto::MSNStatusToMiranda(const char *status) switch ((*(PDWORD)status & 0x00FFFFFF) | 0x20000000) {
case ' LDI': return ID_STATUS_IDLE;
case ' NLN': return ID_STATUS_ONLINE;
- case ' NHP': return ID_STATUS_ONTHEPHONE;
- case ' NUL': return ID_STATUS_OUTTOLUNCH;
case ' BRB':
case ' YWA': return ID_STATUS_AWAY;
case ' YSB': return ID_STATUS_OCCUPIED;
@@ -66,10 +62,7 @@ char** CMsnProto::GetStatusMsgLoc(int status) ID_STATUS_DND,
ID_STATUS_NA,
ID_STATUS_OCCUPIED,
- ID_STATUS_FREECHAT,
ID_STATUS_INVISIBLE,
- ID_STATUS_ONTHEPHONE,
- ID_STATUS_OUTTOLUNCH,
};
for (int i = 0; i < MSN_NUM_MODES; i++)
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index bd26e678a3..655a0c048e 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -632,7 +632,7 @@ INT_PTR CMsnProto::GetCaps(int type, MCONTACT) PF1_FILERECV | PF1_VISLIST | PF1_MODEMSG;
case PFLAGNUM_2:
- return PF2_ONLINE | PF2_SHORTAWAY | PF2_LIGHTDND | PF2_INVISIBLE | PF2_ONTHEPHONE | PF2_IDLE;
+ return PF2_ONLINE | PF2_SHORTAWAY | PF2_LIGHTDND | PF2_INVISIBLE | PF2_IDLE;
case PFLAGNUM_3:
return PF2_ONLINE | PF2_SHORTAWAY | PF2_LIGHTDND;
@@ -640,9 +640,6 @@ INT_PTR CMsnProto::GetCaps(int type, MCONTACT) case PFLAGNUM_4:
return PF4_FORCEAUTH | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_SUPPORTIDLE | PF4_IMSENDOFFLINE | PF4_NOAUTHDENYREASON;
- case PFLAGNUM_5:
- return PF2_ONTHEPHONE;
-
case PFLAG_UNIQUEIDTEXT:
return (INT_PTR)Translate("Live ID");
diff --git a/protocols/Non-IM Contact/src/contactinfo.cpp b/protocols/Non-IM Contact/src/contactinfo.cpp index 3bf022857e..cd5faa64a8 100644 --- a/protocols/Non-IM Contact/src/contactinfo.cpp +++ b/protocols/Non-IM Contact/src/contactinfo.cpp @@ -144,7 +144,7 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP CheckRadioButton(hwnd, 40072, 40080, 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_OUTTOLUNCH; i++) { + for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_MAX; i++) { SetWindowLongPtr(GetDlgItem(hwnd, i), GWLP_USERDATA, (LONG_PTR)Skin_LoadProtoIcon(MODNAME, i)); SetWindowLongPtr(GetDlgItem(hwnd, i), GWLP_WNDPROC, (LONG_PTR)ButtWndProc); } @@ -241,7 +241,7 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP } else db_unset(hContact, "CList", "Group"); - for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) + for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_MAX; i++) if (IsDlgButtonChecked(hwnd, i)) g_plugin.setWord(hContact, "Icon", (WORD)i); @@ -600,14 +600,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 if (icon == ID_STATUS_ONTHEPHONE) - mir_snprintf(tmp, "Icon: On the phone\r\n"); - else if (icon == ID_STATUS_OUTTOLUNCH) - mir_snprintf(tmp, "Icon: Out to lunch\r\n"); else { free(msg); continue; diff --git a/protocols/Non-IM Contact/src/services.cpp b/protocols/Non-IM Contact/src/services.cpp index e1b3278b84..72ef8ec790 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_FREECHAT | PF2_INVISIBLE | PF2_OUTTOLUNCH | PF2_ONTHEPHONE; // add the possible statuses here. + return PF2_ONLINE | PF2_LONGAWAY | PF2_SHORTAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_INVISIBLE; // add the possible statuses here. if (wParam == PFLAGNUM_3) return 0; return 0; @@ -104,7 +104,7 @@ int SetLCStatus(WPARAM wParam, LPARAM) // INT_PTR GetLCStatus(WPARAM, LPARAM) { - if ((LCStatus >= ID_STATUS_ONLINE) && (LCStatus <= ID_STATUS_OUTTOLUNCH)) + if (LCStatus >= ID_STATUS_ONLINE && LCStatus <= ID_STATUS_MAX) return LCStatus; else return ID_STATUS_OFFLINE; diff --git a/protocols/Sametime/src/sametime_session.cpp b/protocols/Sametime/src/sametime_session.cpp index 79dfa47224..4b01d29174 100644 --- a/protocols/Sametime/src/sametime_session.cpp +++ b/protocols/Sametime/src/sametime_session.cpp @@ -249,14 +249,11 @@ 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;
case ID_STATUS_NA:
case ID_STATUS_INVISIBLE:
- case ID_STATUS_ONTHEPHONE:
- case ID_STATUS_OUTTOLUNCH:
case ID_STATUS_AWAY:
us.desc = AwayMessages.szAway; us.status = mwStatus_AWAY;
break;
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index d83f0fc133..ae1b3b104b 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -240,13 +240,7 @@ int CSkypeProto::SetStatus(int iNewStatus) return 0; switch (iNewStatus) { - case ID_STATUS_FREECHAT: - case ID_STATUS_ONTHEPHONE: - iNewStatus = ID_STATUS_ONLINE; - break; - case ID_STATUS_NA: - case ID_STATUS_OUTTOLUNCH: iNewStatus = ID_STATUS_AWAY; break; diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index e05a3f83a4..f9264b7b7b 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -18,18 +18,7 @@ void CSteamProto::SetContactStatus(MCONTACT hContact, WORD status) setWord(hContact, "Status", 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_OUTTOLUNCH: - // Contact is looking to trade, save it to as status message - db_set_ws(hContact, "CList", "StatusMsg", TranslateT("Looking to trade")); - break; - + switch (status) { case ID_STATUS_OFFLINE: // if contact is offline, remove played game info delSetting(hContact, "GameID"); @@ -180,7 +169,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 || status == ID_STATUS_OUTTOLUNCH || status == ID_STATUS_FREECHAT) + if (status == ID_STATUS_ONLINE) 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 cda3349382..f45385e486 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -190,11 +190,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 | PF2_OUTTOLUNCH | PF2_FREECHAT; + return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_HEAVYDND; case PFLAGNUM_4: return PF4_AVATARS | PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON | PF4_FORCEAUTH | PF4_SUPPORTIDLE | PF4_SUPPORTTYPING;// | PF4_IMSENDOFFLINE; case PFLAGNUM_5: - return PF2_HEAVYDND | PF2_OUTTOLUNCH | PF2_FREECHAT; + return PF2_HEAVYDND; case PFLAG_UNIQUEIDTEXT: return (INT_PTR)Translate("SteamID"); default: @@ -259,8 +259,6 @@ int CSteamProto::SetStatus(int new_status) case ID_STATUS_DND: case ID_STATUS_OCCUPIED: - case ID_STATUS_ONTHEPHONE: - case ID_STATUS_OUTTOLUNCH: new_status = ID_STATUS_NA; break; diff --git a/protocols/Steam/src/steam_utils.cpp b/protocols/Steam/src/steam_utils.cpp index 47cd289725..cf00c1653e 100644 --- a/protocols/Steam/src/steam_utils.cpp +++ b/protocols/Steam/src/steam_utils.cpp @@ -14,10 +14,9 @@ WORD CSteamProto::SteamToMirandaStatus(PersonaState state) return ID_STATUS_AWAY;
case PersonaState::Snooze:
return ID_STATUS_NA;
+
case PersonaState::LookingToTrade:
- return ID_STATUS_OUTTOLUNCH;
case PersonaState::LookingToPlay:
- return ID_STATUS_FREECHAT;
default:
return ID_STATUS_ONLINE;
}
@@ -37,10 +36,6 @@ PersonaState CSteamProto::MirandaToSteamState(int status) return PersonaState::Away;
case ID_STATUS_NA:
return PersonaState::Snooze;
- case ID_STATUS_OUTTOLUNCH:
- return PersonaState::LookingToTrade;
- 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 8019ddc741..6caff2c40b 100644 --- a/protocols/Tox/src/tox_utils.cpp +++ b/protocols/Tox/src/tox_utils.cpp @@ -3,13 +3,7 @@ int CToxProto::MapStatus(int status)
{
switch (status) {
- case ID_STATUS_FREECHAT:
- case ID_STATUS_ONTHEPHONE:
- status = ID_STATUS_ONLINE;
- break;
-
case ID_STATUS_NA:
- case ID_STATUS_OUTTOLUNCH:
status = ID_STATUS_AWAY;
break;
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 8faabfcd1e..8ac67016d7 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -484,7 +484,7 @@ INT_PTR CVkProto::GetCaps(int type, MCONTACT) | PF1_SEARCHBYNAME | PF1_SEARCHBYEMAIL | PF1_MODEMSG | PF1_FILESEND | PF1_FILERESUME;
case PFLAGNUM_2:
- return PF2_ONLINE | PF2_INVISIBLE | PF2_ONTHEPHONE | PF2_IDLE;
+ return PF2_ONLINE | PF2_INVISIBLE | PF2_IDLE;
case PFLAGNUM_3:
return PF2_ONLINE;
@@ -493,9 +493,6 @@ INT_PTR CVkProto::GetCaps(int type, MCONTACT) return PF4_AVATARS | PF4_SUPPORTTYPING | PF4_NOAUTHDENYREASON | PF4_IMSENDOFFLINE
| PF4_OFFLINEFILES | PF4_READNOTIFY | PF4_GROUPCHATFILES | PF4_SERVERMSGID;
- case PFLAGNUM_5:
- return PF2_ONTHEPHONE;
-
case PFLAG_MAXLENOFMESSAGE:
return 4096;
diff --git a/protocols/Weather/src/stdafx.h b/protocols/Weather/src/stdafx.h index 9affd13abb..b2c3e5db15 100644 --- a/protocols/Weather/src/stdafx.h +++ b/protocols/Weather/src/stdafx.h @@ -75,12 +75,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define PCLOUDY ID_STATUS_AWAY #define CLOUDY ID_STATUS_NA #define RAIN ID_STATUS_OCCUPIED -#define RSHOWER ID_STATUS_DND -#define SNOW ID_STATUS_FREECHAT -#define LIGHT ID_STATUS_INVISIBLE -#define THUNDER ID_STATUS_INVISIBLE -#define SSHOWER ID_STATUS_ONTHEPHONE -#define FOG ID_STATUS_OUTTOLUNCH +#define FOG ID_STATUS_DND +#define SNOW ID_STATUS_INVISIBLE #define UNAVAIL 40081 // status diff --git a/protocols/Weather/src/weather_conv.cpp b/protocols/Weather/src/weather_conv.cpp index c46b079531..584cb4f1bd 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"Lightning", L"Fog", L"Snow Shower", L"Snow", L"Rain Shower", L"Rain", L"Partly Cloudy", L"Cloudy", L"Sunny", L"N/A" }; -static const WORD statusValue[10] = { LIGHT, FOG, SSHOWER, SNOW, RSHOWER, RAIN, PCLOUDY, CLOUDY, SUNNY, NA }; +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 }; WORD GetIcon(const wchar_t* cond, WIDATA *Data) { @@ -327,61 +327,23 @@ WORD GetIcon(const wchar_t* cond, WIDATA *Data) return statusValue[i]; // internal detection - if ( - wcsstr(cond, L"mainy sunny") != nullptr || - wcsstr(cond, L"mainy clear") != nullptr || - wcsstr(cond, L"partly cloudy") != nullptr || - wcsstr(cond, L"mostly") != nullptr || - wcsstr(cond, L"clouds") != nullptr) { + if (wcsstr(cond, L"mainy sunny") || wcsstr(cond, L"mainy clear") || wcsstr(cond, L"partly cloudy") || wcsstr(cond, L"mostly") || wcsstr(cond, L"clouds")) return PCLOUDY; - } - else if ( - wcsstr(cond, L"sunny") != nullptr || - wcsstr(cond, L"clear") != nullptr || - wcsstr(cond, L"fair") != nullptr) { + + if (wcsstr(cond, L"sunny") || wcsstr(cond, L"clear") || wcsstr(cond, L"fair")) return SUNNY; - } - else if ( - wcsstr(cond, L"thunder") != nullptr || - wcsstr(cond, L"t-storm") != nullptr) { - return LIGHT; - } - else if ( - wcsstr(cond, L"cloud") != nullptr || - wcsstr(cond, L"overcast") != nullptr) { + + if (wcsstr(cond, L"cloud") || wcsstr(cond, L"overcast")) return CLOUDY; - } - else if ( - wcsstr(cond, L"fog") != nullptr || - wcsstr(cond, L"mist") != nullptr || - wcsstr(cond, L"smoke") != nullptr || - wcsstr(cond, L"sand") != nullptr || - wcsstr(cond, L"dust") != nullptr || - wcsstr(cond, L"haze") != nullptr) { + + if (wcsstr(cond, L"fog") || wcsstr(cond, L"mist") || wcsstr(cond, L"smoke") || wcsstr(cond, L"sand") || wcsstr(cond, L"dust") || wcsstr(cond, L"haze")) return FOG; - } - else if ( - (wcsstr(cond, L"shower") != nullptr && wcsstr(cond, L"snow") != nullptr) || - wcsstr(cond, L"flurries") != nullptr) { - return SSHOWER; - } - else if ( - wcsstr(cond, L"rain shower") != nullptr || - wcsstr(cond, L"shower") != nullptr) { - return RSHOWER; - } - else if ( - wcsstr(cond, L"snow") != nullptr || - wcsstr(cond, L"ice") != nullptr || - wcsstr(cond, L"freezing") != nullptr || - wcsstr(cond, L"wintry") != nullptr) { + + if (wcsstr(cond, L"snow") || wcsstr(cond, L"ice") || wcsstr(cond, L"freezing") || wcsstr(cond, L"wintry")) return SNOW; - } - else if ( - wcsstr(cond, L"drizzle") != nullptr || - wcsstr(cond, L"rain") != nullptr) { + + if (wcsstr(cond, L"thunder") || wcsstr(cond, L"t-storm") || wcsstr(cond, L"drizzle") || wcsstr(cond, L"rain")) return RAIN; - } // set the icon using langpack for (int i = 0; i < 9; i++) { diff --git a/protocols/Weather/src/weather_svcs.cpp b/protocols/Weather/src/weather_svcs.cpp index 2ef10fffa9..ef021fb633 100644 --- a/protocols/Weather/src/weather_svcs.cpp +++ b/protocols/Weather/src/weather_svcs.cpp @@ -62,8 +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 | PF2_FREECHAT | PF2_OUTTOLUNCH | PF2_ONTHEPHONE; + ret = PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND; break; case PFLAGNUM_4: @@ -71,8 +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 | - PF2_FREECHAT | PF2_OUTTOLUNCH | PF2_ONTHEPHONE; + ret = PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND; break; case PFLAG_UNIQUEIDTEXT: @@ -118,8 +116,8 @@ INT_PTR WeatherGetInfo(WPARAM, LPARAM lParam) } // avatars -static const wchar_t *statusStr[] = { L"Light", L"Fog", L"SShower", L"Snow", L"RShower", L"Rain", L"PCloudy", L"Cloudy", L"Sunny", L"NA" }; -static const WORD statusValue[] = { LIGHT, FOG, SSHOWER, SNOW, RSHOWER, RAIN, PCLOUDY, CLOUDY, SUNNY, NA }; +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 }; INT_PTR WeatherGetAvatarInfo(WPARAM, LPARAM lParam) { diff --git a/protocols/WebView/src/webview_services.cpp b/protocols/WebView/src/webview_services.cpp index 4957120181..898b4405ae 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 | PF2_FREECHAT | PF2_OUTTOLUNCH | PF2_ONTHEPHONE; + return PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND; case PFLAG_UNIQUEIDTEXT: return (INT_PTR)Translate("Site URL"); default: diff --git a/protocols/YAMN/src/proto/pop3/pop3opt.cpp b/protocols/YAMN/src/proto/pop3/pop3opt.cpp index 4d4993de70..088a06d8f6 100644 --- a/protocols/YAMN/src/proto/pop3/pop3opt.cpp +++ b/protocols/YAMN/src/proto/pop3/pop3opt.cpp @@ -288,9 +288,6 @@ 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); - CheckDlgButton(hDlg, IDC_CHECKST8, ActualAccount->StatusFlags & YAMN_ACC_ST8 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hDlg, IDC_CHECKST9, ActualAccount->StatusFlags & YAMN_ACC_ST9 ? BST_CHECKED : BST_UNCHECKED); ReadDone(ActualAccount); } else { @@ -426,9 +423,6 @@ 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; - Check8 = ActualAccount->StatusFlags & YAMN_ACC_ST8; - Check9 = ActualAccount->StatusFlags & YAMN_ACC_ST9; 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); CheckDlgButton(hDlg, IDC_CHECKCONTACT, ActualAccount->NewMailN.Flags & YAMN_ACC_CONT ? BST_CHECKED : BST_UNCHECKED); @@ -1062,9 +1056,6 @@ 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) | - (Check8 ? YAMN_ACC_ST8 : 0) | - (Check9 ? YAMN_ACC_ST9 : 0) | (CheckStart ? YAMN_ACC_STARTS : 0) | (CheckForce ? YAMN_ACC_FORCE : 0); diff --git a/protocols/YAMN/src/yamn.cpp b/protocols/YAMN/src/yamn.cpp index 982c1abb5c..3abeea3e12 100644 --- a/protocols/YAMN/src/yamn.cpp +++ b/protocols/YAMN/src/yamn.cpp @@ -186,10 +186,7 @@ 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_FREECHAT)) || - ((ActualAccount->StatusFlags & YAMN_ACC_ST7) && (Status==ID_STATUS_INVISIBLE)) || - ((ActualAccount->StatusFlags & YAMN_ACC_ST8) && (Status==ID_STATUS_ONTHEPHONE)) || - ((ActualAccount->StatusFlags & YAMN_ACC_ST9) && (Status==ID_STATUS_OUTTOLUNCH)))) + ((ActualAccount->StatusFlags & YAMN_ACC_ST6) && (Status==ID_STATUS_INVISIBLE)))) { if ((!ActualAccount->Interval && !ActualAccount->TimeLeft) || ActualAccount->Plugin->Fcn->TimeoutFcnPtr==nullptr) |