diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-05-03 09:53:38 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-05-03 09:53:38 +0000 |
commit | 76834329c0979881a0df500acf4c7956fb57bc79 (patch) | |
tree | 887e34fdf156238db1edc442caa5672d85962e03 /protocols/JabberG/src | |
parent | 0e43801b96fb8d702294d8b0dce1b6eff37caeff (diff) |
Jabber:
Changed Links menu in groupchats to support https links
git-svn-id: http://svn.miranda-ng.org/main/trunk@13392 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src')
-rw-r--r-- | protocols/JabberG/src/jabber_chat.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index e8ab75ca54..c1c2151267 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -535,16 +535,19 @@ int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam) TCHAR *ptszStatusMsg = item->getTemp()->m_tszStatusMessage;
if (ptszStatusMsg && *ptszStatusMsg) {
TCHAR *bufPtr = url_buf;
- for (TCHAR *p = _tcsstr(ptszStatusMsg, _T("http://")); p && *p; p = _tcsstr(p+1, _T("http://"))) {
- mir_tstrncpy(bufPtr, p, SIZEOF(url_buf) - (bufPtr - url_buf));
- gc_item *pItem = sttFindGcMenuItem(gcmi, idx);
- pItem->pszDesc = bufPtr;
- pItem->uType = MENU_POPUPITEM;
- for (; *bufPtr && !_istspace(*bufPtr); ++bufPtr) ;
- *bufPtr++ = 0;
+ for (TCHAR *p = _tcsstr(ptszStatusMsg, _T("http")); p && *p; p = _tcsstr(p+1, _T("http"))) {
+ if (!_tcsncmp(p,_T("http://"),7) || !_tcsncmp(p,_T("https://"),8))
+ {
+ mir_tstrncpy(bufPtr, p, SIZEOF(url_buf) - (bufPtr - url_buf));
+ gc_item *pItem = sttFindGcMenuItem(gcmi, idx);
+ pItem->pszDesc = bufPtr;
+ pItem->uType = MENU_POPUPITEM;
+ for (; *bufPtr && !_istspace(*bufPtr); ++bufPtr) ;
+ *bufPtr++ = 0;
- if (++idx > IDM_LINK9)
- break;
+ if (++idx > IDM_LINK9)
+ break;
+ }
}
}
for (; idx <= IDM_LINK9; ++idx)
|