Mercurial > pidgin
diff src/protocols/jabber/disco.c @ 11675:828802f2251b
[gaim-migrate @ 13961]
Jabber User Directory searching...
This works when the stars are aligned, and breaks otherwise. It hasn't been tested on any "x:data" supporting servers (because I don't know of any yet). It doesn't let you know if there was an error. Really, it doesn't do a lot of things. But you can search. You do get results.
The results themselves, however, are a tad off. users.jabber.org is sending back results along the lines of:
<nick>faceprint@faceprint.com</nick><email>faceprint</email>
which is obviously switched. I'll ping the appropriate people to figure that out.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Mon, 17 Oct 2005 01:43:09 +0000 |
parents | ba12d8b12ab0 |
children | a580ffe73314 |
line wrap: on
line diff
--- a/src/protocols/jabber/disco.c Sun Oct 16 18:26:32 2005 +0000 +++ b/src/protocols/jabber/disco.c Mon Oct 17 01:43:09 2005 +0000 @@ -106,10 +106,14 @@ if(!category || !type) continue; - /* we found a groupchat or MUC server, add it to the list */ - /* XXX: actually check for protocol/muc or gc-1.0 support */ - if(!strcmp(category, "conference") && !strcmp(type, "text")) + if(!strcmp(category, "conference") && !strcmp(type, "text")) { + /* we found a groupchat or MUC server, add it to the list */ + /* XXX: actually check for protocol/muc or gc-1.0 support */ js->chat_servers = g_list_append(js->chat_servers, g_strdup(from)); + } else if(!strcmp(category, "directory") && !strcmp(type, "user")) { + /* we found a JUD */ + js->user_directories = g_list_append(js->user_directories, g_strdup(from)); + } } else if(!strcmp(child->name, "feature")) { const char *var = xmlnode_get_attrib(child, "var"); @@ -122,6 +126,10 @@ capabilities |= JABBER_CAP_SI_FILE_XFER; else if(!strcmp(var, "http://jabber.org/protocol/bytestreams")) capabilities |= JABBER_CAP_BYTESTREAMS; + else if(!strcmp(var, "jabber:iq:search")) + capabilities |= JABBER_CAP_IQ_SEARCH; + else if(!strcmp(var, "jabber:iq:register")) + capabilities |= JABBER_CAP_IQ_REGISTER; } }