diff options
author | George Hazan <george.hazan@gmail.com> | 2013-01-10 20:23:54 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-01-10 20:23:54 +0000 |
commit | 2fc79125a87a719f40977dd3f7830d81628f030f (patch) | |
tree | 89fdf148e34fc12ac24e79206c6a408118758c9d /protocols/JabberG/src/jabber_groupchat.cpp | |
parent | e1a9895ffcc730f80fd776b864842215e2e4a561 (diff) |
simplier version of the previous patch
git-svn-id: http://svn.miranda-ng.org/main/trunk@3039 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_groupchat.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_groupchat.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index c6b2481a1b..1ecf1db98b 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -1236,13 +1236,11 @@ void CJabberProto::GroupchatProcessMessage(HXML node) GcLogCreate(item);
time_t msgTime = 0;
- for (int i = 1; (xNode = xmlGetNthChild(node, _T("x"), i)) != NULL; i++)
- if ((p = xmlGetAttrValue(xNode, _T("xmlns"))) != NULL)
- if (!_tcscmp(p, _T("jabber:x:delay")) && !msgTime)
- if ((p = xmlGetAttrValue(xNode, _T("stamp"))) != NULL)
- msgTime = JabberIsoToUnixTime(p);
- if (!msgTime)
- JabberReadXep203delay(xNode, msgTime);
+ if ( !JabberReadXep203delay(node, msgTime)) {
+ HXML xDelay = xmlGetChildByTag(node, "x", "xmlns", _T("jabber:x:delay"));
+ if (xDelay && (p = xmlGetAttrValue(xDelay, _T("stamp"))) != NULL)
+ msgTime = JabberIsoToUnixTime(p);
+ }
time_t now = time(NULL);
if (!msgTime || msgTime > now)
|