summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_util.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-04-21 12:46:33 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-04-21 12:46:33 +0000
commit6f03a0bf158226db5e50e099786a09ba4894a393 (patch)
tree9dce41ed0b7cb89859fc390d1595f28d5d628863 /protocols/JabberG/src/jabber_util.cpp
parent9fb06fd3a3c18d3e27f68be92c7eab599cea8a14 (diff)
- fix for a chat room processing in roster;
- fix for a default chat room's nick git-svn-id: http://svn.miranda-ng.org/main/trunk@16733 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_util.cpp')
-rw-r--r--protocols/JabberG/src/jabber_util.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp
index abef88e3f5..ccf4a8223b 100644
--- a/protocols/JabberG/src/jabber_util.cpp
+++ b/protocols/JabberG/src/jabber_util.cpp
@@ -71,10 +71,11 @@ TCHAR* __stdcall JabberNickFromJID(const TCHAR *jid)
if (jid == NULL)
return mir_tstrdup(_T(""));
- const TCHAR *p = _tcschr(jid, '@');
- if (p == NULL)
- p = _tcschr(jid, '/');
+ const TCHAR *p = _tcsrchr(jid, '/');
+ if (p != NULL)
+ return mir_tstrdup(p+1);
+ p = _tcschr(jid, '@');
return (p != NULL) ? mir_tstrndup(jid, p - jid) : mir_tstrdup(jid);
}