summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-04-27 18:50:35 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-04-27 18:50:35 +0000
commited66ac7da13f746d05ed832cf1d6d84cecb18b22 (patch)
tree2d0914cdbc619be538a09503533f08347b43f6b7 /protocols/JabberG/src
parent8b48b41245884894fdfe102287dcdeacb0ace9b5 (diff)
unused method removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@16783 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src')
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp23
-rw-r--r--protocols/JabberG/src/jabber_groupchat.cpp4
-rw-r--r--protocols/JabberG/src/jabber_proto.h1
3 files changed, 11 insertions, 17 deletions
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index 6dd014257d..82f7b86477 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -117,11 +117,14 @@ int JabberGcGetStatus(JABBER_RESOURCE_STATUS *r)
int CJabberProto::GcInit(JABBER_LIST_ITEM *item)
{
- int i;
+ if (item->bChatActive)
+ return 1;
// translate string for menus (this can't be done in initializer)
- for (i = 0; i < _countof(sttAffiliationItems); i++) sttAffiliationItems[i].translate();
- for (i = 0; i < _countof(sttRoleItems); i++) sttRoleItems[i].translate();
+ for (int i = 0; i < _countof(sttAffiliationItems); i++)
+ sttAffiliationItems[i].translate();
+ for (int i = 0; i < _countof(sttRoleItems); i++)
+ sttRoleItems[i].translate();
ptrT szNick(JabberNickFromJID(item->jid));
@@ -162,11 +165,11 @@ int CJabberProto::GcInit(JABBER_LIST_ITEM *item)
}
}
- item->bChatActive = TRUE;
+ item->bChatActive = true;
GCDEST gcd = { m_szModuleName, item->jid, GC_EVENT_ADDGROUP };
GCEVENT gce = { sizeof(gce), &gcd };
- for (i = _countof(sttStatuses) - 1; i >= 0; i--) {
+ for (int i = _countof(sttStatuses) - 1; i >= 0; i--) {
gce.ptszStatus = TranslateTS(sttStatuses[i]);
CallServiceSync(MS_GC_EVENT, NULL, (LPARAM)&gce);
}
@@ -177,14 +180,6 @@ int CJabberProto::GcInit(JABBER_LIST_ITEM *item)
return 0;
}
-void CJabberProto::GcLogCreate(JABBER_LIST_ITEM *item)
-{
- if (item->bChatActive)
- return;
-
- GcInit(item);
-}
-
void CJabberProto::GcLogShowInformation(JABBER_LIST_ITEM *item, pResourceStatus &user, TJabberGcLogInfoType type)
{
if (!item || !user || (item->bChatActive != 2)) return;
@@ -354,7 +349,7 @@ void CJabberProto::GcQuit(JABBER_LIST_ITEM *item, int code, HXML reason)
CallServiceSync(MS_GC_EVENT, (code == 200) ? SESSION_TERMINATE : SESSION_OFFLINE, (LPARAM)&gce);
db_unset(item->hContact, "CList", "Hidden");
- item->bChatActive = FALSE;
+ item->bChatActive = false;
if (m_bJabberOnline) {
TCHAR szPresenceTo[JABBER_MAX_JID_LEN];
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp
index 4519a679b0..961776b08a 100644
--- a/protocols/JabberG/src/jabber_groupchat.cpp
+++ b/protocols/JabberG/src/jabber_groupchat.cpp
@@ -846,7 +846,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node)
if (ptrT(JabberNickFromJID(from)) == NULL)
return;
- GcLogCreate(item);
+ GcInit(item);
item->iChatState = 0;
// Update status of room participant
@@ -1086,7 +1086,7 @@ void CJabberProto::GroupchatProcessMessage(HXML node)
else gcd.iType = GC_EVENT_MESSAGE;
}
- GcLogCreate(item);
+ GcInit(item);
time_t msgTime = 0;
if (!JabberReadXep203delay(node, msgTime)) {
diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h
index 302205bbbc..8b0b35cad5 100644
--- a/protocols/JabberG/src/jabber_proto.h
+++ b/protocols/JabberG/src/jabber_proto.h
@@ -329,7 +329,6 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface
//---- jabber_chat.cpp ---------------------------------------------------------------
int GcInit(JABBER_LIST_ITEM *item);
- void GcLogCreate(JABBER_LIST_ITEM *item);
void GcLogUpdateMemberStatus(JABBER_LIST_ITEM *item, const TCHAR *resource, const TCHAR *nick, const TCHAR *jid, int action, HXML reason, int nStatusCode = -1);
void GcLogShowInformation(JABBER_LIST_ITEM *item, pResourceStatus &user, TJabberGcLogInfoType type);
void GcQuit(JABBER_LIST_ITEM* jid, int code, HXML reason);