Index: src/protocols/jabber/presence.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/jabber/presence.c,v retrieving revision 1.49 diff -u -p -r1.49 presence.c --- src/protocols/jabber/presence.c 18 Jul 2004 20:32:51 -0000 1.49 +++ src/protocols/jabber/presence.c 10 Aug 2004 13:23:54 -0000 @@ -268,9 +268,6 @@ void jabber_presence_parse(JabberStream } else if(!strcmp(y->name, "x")) { const char *xmlns = xmlnode_get_attrib(y, "xmlns"); if(xmlns && !strcmp(xmlns, "http://jabber.org/protocol/muc#user")) { - /* this is where we'd normally get the "op" status of the - * user, but since we don't have a good way to show that yet - * we'll ignore it */ xmlnode *z; muc = TRUE; @@ -293,7 +290,12 @@ void jabber_presence_parse(JabberStream if((z = xmlnode_get_child(y, "item"))) { real_jid = xmlnode_get_attrib(z, "jid"); affiliation = xmlnode_get_attrib(z, "affiliation"); - role = xmlnode_get_attrib(z, "role"); + if((role = xmlnode_get_attrib(z, "role"))) { + if (!strcmp(role, "moderator")) + flags = GAIM_CBFLAGS_OP; + else if (!strcmp(role, "participant")) + flags = GAIM_CBFLAGS_VOICE; + } } } } @@ -403,11 +405,6 @@ void jabber_presence_parse(JabberStream jabber_chat_track_handle(chat, jid->resource, real_jid, affiliation, role); - if (!strcmp(role, "moderator")) - flags = GAIM_CBFLAGS_OP; - else if (!strcmp(role, "participant")) - flags = GAIM_CBFLAGS_VOICE; - if(!jabber_chat_find_buddy(chat->conv, jid->resource)) gaim_conv_chat_add_user(GAIM_CONV_CHAT(chat->conv), jid->resource, real_jid, flags);