summaryrefslogtreecommitdiff
path: root/protocols/Tlen/src/tlen_thread.cpp
diff options
context:
space:
mode:
authorSzymon Tokarz <wsx22@o2.pl>2014-01-24 01:02:07 +0000
committerSzymon Tokarz <wsx22@o2.pl>2014-01-24 01:02:07 +0000
commit43f04f0fcb082fb2c7f69617101e6147c81cf0d3 (patch)
tree6ef3bfb716719e3fe7a0640dbad9f859619c9e7a /protocols/Tlen/src/tlen_thread.cpp
parent259bd5726faf89964ff6ee7ec0858d39ff6ac170 (diff)
Tlen protocol
- Support case when user account is added as contact (show status and status msg on clist) - try to improve fetching avatars and setting own avatar - minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@7846 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tlen/src/tlen_thread.cpp')
-rw-r--r--protocols/Tlen/src/tlen_thread.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp
index ca7bce7e61..75b65f78ca 100644
--- a/protocols/Tlen/src/tlen_thread.cpp
+++ b/protocols/Tlen/src/tlen_thread.cpp
@@ -415,6 +415,7 @@ static void TlenSendAuth(TlenProtocol *proto) {
mir_free(str);
}
+/* processing <s ... > tag sent from server on session opening */
static void TlenProcessStreamOpening(XmlNode *node, ThreadData *info)
{
char *sid, *s;
@@ -470,13 +471,20 @@ static void TlenProcessStreamOpening(XmlNode *node, ThreadData *info)
}
}
+/* processing </s> tag sent from server on session close */
static void TlenProcessStreamClosing(XmlNode *node, ThreadData *info)
{
Netlib_CloseHandle(info->proto);
- if (node->name && !strcmp(node->name, "stream:error") && node->text)
- MessageBoxA(NULL, Translate(node->text), Translate("Tlen Connection Error"), MB_OK|MB_ICONERROR|MB_SETFOREGROUND);
+ if (node->name && !strcmp(node->name, "stream:error") && node->text){
+ char buffer[1024];
+ mir_snprintf(buffer, SIZEOF(buffer), "%s\n%s", Translate("Tlen Connection Error"), Translate(node->text));
+ PUShowMessage(buffer, SM_WARNING);
+ } else if (!strcmp(node->name, "s")){
+ info->proto->debugLogA("Disconnected server message");
+ }
}
+/* processing session tags sent from server */
static void TlenProcessProtocol(XmlNode *node, ThreadData *info)
{
if (!strcmp(node->name, "message"))