Mercurial > pidgin.yaz
changeset 9743:bce36da0069a
[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 <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 12 Aug 2004 01:11:54 +0000 |
parents | d549d27388b2 |
children | 9a17c90ba190 |
files | src/protocols/jabber/presence.c |
diffstat | 1 files changed, 6 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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);