From: Mark D. <the...@us...> - 2004-08-24 04:13:05
|
Update of /cvsroot/gaim/gaim/src/protocols/jabber In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5976/src/protocols/jabber Modified Files: presence.c Log Message: A patch from Nathan Fredrickson that should make Gaim not play sounds for people joining chats when you join chat. Um, his explanation is better: http://sourceforge.net/tracker/index.php?func=detail&aid=1008904&group_id=235&atid=300235 Index: presence.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/jabber/presence.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -p -r1.52 -r1.53 --- presence.c 12 Aug 2004 04:46:36 -0000 1.52 +++ presence.c 24 Aug 2004 04:12:19 -0000 1.53 @@ -207,6 +207,7 @@ void jabber_presence_parse(JabberStream JabberBuddy *jb; JabberBuddyResource *jbr = NULL; GaimConvChatBuddyFlags flags = GAIM_CBFLAGS_NONE; + gboolean delayed = FALSE; GaimBuddy *b; char *buddy_name; int state = 0; @@ -272,7 +273,9 @@ 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")) { + if(xmlns && !strcmp(xmlns, "jabber:x:delay")) { + delayed = TRUE; + } else if(xmlns && !strcmp(xmlns, "http://jabber.org/protocol/muc#user")) { xmlnode *z; muc = TRUE; @@ -413,7 +416,7 @@ void jabber_presence_parse(JabberStream if(!jabber_chat_find_buddy(chat->conv, jid->resource)) gaim_conv_chat_add_user(GAIM_CONV_CHAT(chat->conv), jid->resource, - real_jid, flags); + real_jid, flags, !delayed); else gaim_conv_chat_user_set_flags(GAIM_CONV_CHAT(chat->conv), jid->resource, flags); |