diff options
Diffstat (limited to 'protocols/Tlen/src/tlen_thread.cpp')
-rw-r--r-- | protocols/Tlen/src/tlen_thread.cpp | 112 |
1 files changed, 2 insertions, 110 deletions
diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp index 563f328b32..081be0df02 100644 --- a/protocols/Tlen/src/tlen_thread.cpp +++ b/protocols/Tlen/src/tlen_thread.cpp @@ -873,15 +873,6 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info) // RECVED: <iq type='error'> ...
else if (!strcmp(type, "error")) {
TLEN_LIST_ITEM *item;
- // Check for multi-user chat errors
- char *from;
- if ((from=TlenXmlGetAttrValue(node, "from")) != NULL) {
- if (strstr(from, "@c") != NULL || !strcmp(from, "c")) {
- TlenMUCRecvError(info->proto, from, node);
- return;
- }
- }
-
// Check for file transfer deny by comparing idStr with ft->iqId
i = 0;
while ((i=TlenListFindNext(info->proto, LIST_FILE, i)) >= 0) {
@@ -894,65 +885,6 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info) i++;
}
}
- // RECVED: <iq type='1'>...
- else if (!strcmp(type, "1")) { // Chat groups list result
- char *from;
- if ((from=TlenXmlGetAttrValue(node, "from")) != NULL) {
- if (strcmp(from, "c") == 0) {
- TlenIqResultChatGroups(info->proto, node);
- }
- }
- }
- else if (!strcmp(type, "2")) { // Chat rooms list result
- char *from;
- if ((from=TlenXmlGetAttrValue(node, "from")) != NULL) {
- if (strcmp(from, "c") == 0) {
- TlenIqResultChatRooms(info->proto, node);
- }
- }
- } else if (!strcmp(type, "3")) { // room search result - result to iq type 3 query
- char *from;
- if ((from=TlenXmlGetAttrValue(node, "from")) != NULL) {
- if (strcmp(from, "c") == 0) {
- TlenIqResultRoomSearch(info->proto, node);
- }
- }
- } else if (!strcmp(type, "4")) { // chat room users list
- char *from;
- if ((from=TlenXmlGetAttrValue(node, "from")) != NULL) {
- if (strstr(from, "@c") != NULL) {
- TlenIqResultChatRoomUsers(info->proto, node);
- }
- }
- } else if (!strcmp(type, "5")) { // room name & group & flags info - sent on joining the room
- char *from;
- if ((from=TlenXmlGetAttrValue(node, "from")) != NULL) {
- if (strstr(from, "@c") != NULL) {
- TlenIqResultRoomInfo(info->proto, node);
- }
- }
- } else if (!strcmp(type, "6")) { // new nick registered
- char *from;
- if ((from=TlenXmlGetAttrValue(node, "from")) != NULL) {
- if (strcmp(from, "c") == 0) {
- TlenIqResultUserNicks(info->proto, node);
- }
- }
- } else if (!strcmp(type, "7")) { // user nicknames list
- char *from;
- if ((from=TlenXmlGetAttrValue(node, "from")) != NULL) {
- if (strcmp(from, "c") == 0) {
- TlenIqResultUserNicks(info->proto, node);
- }
- }
- } else if (!strcmp(type, "8")) { // user chat rooms list
- char *from;
- if ((from=TlenXmlGetAttrValue(node, "from")) != NULL) {
- if (strcmp(from, "c") == 0) {
- TlenIqResultUserRooms(info->proto, node);
- }
- }
- }
}
/*
@@ -1012,7 +944,7 @@ static void TlenProcessM(XmlNode *node, ThreadData *info) char *tp;//typing start/stop
char *p, *n, *r, *s, *str, *localMessage;
int i;
- XmlNode *xNode, *invNode, *bNode, *subjectNode;
+ XmlNode *xNode, *invNode, *bNode;
if (!node->name || strcmp(node->name, "m")) return;
@@ -1082,25 +1014,9 @@ static void TlenProcessM(XmlNode *node, ThreadData *info) recv.szMessage = localMessage;
ProtoChainRecvMsg(hContact, &recv);
mir_free(localMessage);
- } else {
- /* MUC message */
- TlenMUCRecvMessage(info->proto, f, timestamp, bNode);
}
}
mir_free(f);
- } else { // message from chat room (system)
- subjectNode = TlenXmlGetChild(node, "subject");
- if (subjectNode != NULL) {
- f = TlenTextDecode(f);
- localMessage = "";
- if (subjectNode->text != NULL) {
- localMessage = subjectNode->text;
- }
- localMessage = TlenTextDecode(localMessage);
- TlenMUCRecvTopic(info->proto, f, localMessage);
- mir_free(localMessage);
- mir_free(f);
- }
}
}
i=1;
@@ -1189,8 +1105,7 @@ static void TlenProcessN(XmlNode *node, ThreadData *info) */
static void TlenProcessP(XmlNode *node, ThreadData *info)
{
- char jid[512];
- char *f, *id, *tp, *a, *n, *k;
+ char *f, *a, *k;
XmlNode *sNode, *xNode, *iNode, *kNode;
int status, flags;
@@ -1256,29 +1171,6 @@ static void TlenProcessP(XmlNode *node, ThreadData *info) }
k = TlenTextDecode(k);
}
- tp = TlenXmlGetAttrValue(node, "tp");
- if (tp != NULL && !strcmp(tp, "c")) { // new chat room has just been created
- id = TlenXmlGetAttrValue(node, "id");
- if (id != NULL) {
- n = TlenXmlGetAttrValue(node, "n");
- if (n != NULL) {
- n = TlenTextDecode(n);
- } else {
- n = mir_strdup(Translate("Private conference"));// TlenNickFromJID(f);
- }
- mir_snprintf(jid, SIZEOF(jid), "%s/%s", f, info->username);
-// if (!db_get(NULL, info->proto->m_szModuleName, "LoginName", &dbv)) {
- // always real username
-// sprintf(jid, "%s/%s", f, dbv.pszVal);
- TlenMUCCreateWindow(info->proto, f, n, 0, NULL, id);
- TlenMUCRecvPresence(info->proto, jid, ID_STATUS_ONLINE, flags, k);
-// db_free(&dbv);
-// }
- mir_free(n);
- }
- } else {
- TlenMUCRecvPresence(info->proto, f, status, flags, k); // user presence
- }
if (k != NULL) {
mir_free(k);
}
|