Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/xmpp_iqrequest.c @ 2104:c7e9950fa741
Added option to enable carbons (set carbons = 1 in mcabberrc)
If the server supports carbons and the user has carbons enabled we enable them.
Now we need to handle XEP-0297 (Stanza Forwarding) stanzas to make sure the
messages end up at the correct place.
author | Roeland Jago Douma <roeland@famdouma.nl> |
---|---|
date | Sat, 02 Mar 2013 18:22:10 +0100 |
parents | 1210a22726d3 |
children | 9023a6f2bf6c |
comparison
equal
deleted
inserted
replaced
2103:1210a22726d3 | 2104:c7e9950fa741 |
---|---|
29 #include "screen.h" | 29 #include "screen.h" |
30 #include "utils.h" | 30 #include "utils.h" |
31 #include "settings.h" | 31 #include "settings.h" |
32 #include "hooks.h" | 32 #include "hooks.h" |
33 #include "hbuf.h" | 33 #include "hbuf.h" |
34 #include "carbons.h" | |
34 | 35 |
35 extern LmMessageNode *bookmarks; | 36 extern LmMessageNode *bookmarks; |
36 extern LmMessageNode *rosternotes; | 37 extern LmMessageNode *rosternotes; |
37 | 38 |
38 static LmHandlerResult cb_roster(LmMessageHandler *h, LmConnection *c, | 39 static LmHandlerResult cb_roster(LmMessageHandler *h, LmConnection *c, |
90 feature = lm_message_node_get_child(ansqry, "feature"); | 91 feature = lm_message_node_get_child(ansqry, "feature"); |
91 for(;feature;feature = feature->next) { | 92 for(;feature;feature = feature->next) { |
92 const char *v = lm_message_node_get_attribute(feature, "var"); | 93 const char *v = lm_message_node_get_attribute(feature, "var"); |
93 | 94 |
94 if (!g_strcmp0(v, NS_CARBONS_2)) { | 95 if (!g_strcmp0(v, NS_CARBONS_2)) { |
95 scr_LogPrint(LPRINT_NORMAL|LPRINT_DEBUG, "We have carbons!"); | 96 carbons_available(); |
96 } | 97 } |
97 } | 98 } |
98 | 99 |
99 return LM_HANDLER_RESULT_REMOVE_MESSAGE; | 100 return LM_HANDLER_RESULT_REMOVE_MESSAGE; |
100 } | 101 } |