| 104 const char *category = xmlnode_get_attrib(child, "category"); |
104 const char *category = xmlnode_get_attrib(child, "category"); |
| 105 const char *type = xmlnode_get_attrib(child, "type"); |
105 const char *type = xmlnode_get_attrib(child, "type"); |
| 106 if(!category || !type) |
106 if(!category || !type) |
| 107 continue; |
107 continue; |
| 108 |
108 |
| 109 /* we found a groupchat or MUC server, add it to the list */ |
109 if(!strcmp(category, "conference") && !strcmp(type, "text")) { |
| 110 /* XXX: actually check for protocol/muc or gc-1.0 support */ |
110 /* we found a groupchat or MUC server, add it to the list */ |
| 111 if(!strcmp(category, "conference") && !strcmp(type, "text")) |
111 /* XXX: actually check for protocol/muc or gc-1.0 support */ |
| 112 js->chat_servers = g_list_append(js->chat_servers, g_strdup(from)); |
112 js->chat_servers = g_list_append(js->chat_servers, g_strdup(from)); |
| |
113 } else if(!strcmp(category, "directory") && !strcmp(type, "user")) { |
| |
114 /* we found a JUD */ |
| |
115 js->user_directories = g_list_append(js->user_directories, g_strdup(from)); |
| |
116 } |
| 113 |
117 |
| 114 } else if(!strcmp(child->name, "feature")) { |
118 } else if(!strcmp(child->name, "feature")) { |
| 115 const char *var = xmlnode_get_attrib(child, "var"); |
119 const char *var = xmlnode_get_attrib(child, "var"); |
| 116 if(!var) |
120 if(!var) |
| 117 continue; |
121 continue; |
| 120 capabilities |= JABBER_CAP_SI; |
124 capabilities |= JABBER_CAP_SI; |
| 121 else if(!strcmp(var, "http://jabber.org/protocol/si/profile/file-transfer")) |
125 else if(!strcmp(var, "http://jabber.org/protocol/si/profile/file-transfer")) |
| 122 capabilities |= JABBER_CAP_SI_FILE_XFER; |
126 capabilities |= JABBER_CAP_SI_FILE_XFER; |
| 123 else if(!strcmp(var, "http://jabber.org/protocol/bytestreams")) |
127 else if(!strcmp(var, "http://jabber.org/protocol/bytestreams")) |
| 124 capabilities |= JABBER_CAP_BYTESTREAMS; |
128 capabilities |= JABBER_CAP_BYTESTREAMS; |
| |
129 else if(!strcmp(var, "jabber:iq:search")) |
| |
130 capabilities |= JABBER_CAP_IQ_SEARCH; |
| |
131 else if(!strcmp(var, "jabber:iq:register")) |
| |
132 capabilities |= JABBER_CAP_IQ_REGISTER; |
| 125 } |
133 } |
| 126 } |
134 } |
| 127 |
135 |
| 128 capabilities |= JABBER_CAP_RETRIEVED; |
136 capabilities |= JABBER_CAP_RETRIEVED; |
| 129 |
137 |