# HG changeset patch # User Mark Doliner # Date 1092273114 0 # Node ID bce36da0069ad74d93c8204dd2efaba1955c44cd # Parent d549d27388b282d7ab40decf5fbb29918eae3744 [gaim-migrate @ 10608] Another patch from nosnilmot The Vigilant. I modified it some. And I didn't test it either. Dave West also gets credit for being cool. This should close the following sf bug 1006043 sf patch 1006259 redhat bug 129500 committer: Tailor Script diff -r d549d27388b2 -r bce36da0069a src/protocols/jabber/presence.c --- a/src/protocols/jabber/presence.c Thu Aug 12 01:08:47 2004 +0000 +++ b/src/protocols/jabber/presence.c Thu Aug 12 01:11:54 2004 +0000 @@ -268,9 +268,6 @@ } 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; @@ -294,6 +291,12 @@ real_jid = xmlnode_get_attrib(z, "jid"); affiliation = xmlnode_get_attrib(z, "affiliation"); role = xmlnode_get_attrib(z, "role"); + if (role != NULL) { + if (!strcmp(role, "moderator")) + flags = GAIM_CBFLAGS_OP; + else if (!strcmp(role, "participant")) + flags = GAIM_CBFLAGS_VOICE; + } } } } @@ -403,11 +406,6 @@ 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);