diff options
Diffstat (limited to 'protocols/JabberG/src')
-rw-r--r-- | protocols/JabberG/src/jabber_chat.cpp | 5 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_groupchat.cpp | 1 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_icolib.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_list.cpp | 12 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_menu.cpp | 1 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_misc.cpp | 3 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_proto.cpp | 11 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_rc.cpp | 9 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_svc.cpp | 5 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_thread.cpp | 1 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_util.cpp | 8 | ||||
-rwxr-xr-x | protocols/JabberG/src/stdafx.h | 1 |
12 files changed, 8 insertions, 51 deletions
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;
|