Mercurial > pidgin
comparison libpurple/protocols/jabber/google.c @ 27486:834236111afc
We have a convenience function to do this. Also, plug a leak of the status
message on Google Talk when a buddy has a tune set.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 12 Jul 2009 22:25:44 +0000 |
parents | 739f57076303 |
children | a12574d982a1 |
comparison
equal
deleted
inserted
replaced
27485:3da1d149de25 | 27486:834236111afc |
---|---|
1288 | 1288 |
1289 void jabber_google_presence_incoming(JabberStream *js, const char *user, JabberBuddyResource *jbr) | 1289 void jabber_google_presence_incoming(JabberStream *js, const char *user, JabberBuddyResource *jbr) |
1290 { | 1290 { |
1291 if (!js->googletalk) | 1291 if (!js->googletalk) |
1292 return; | 1292 return; |
1293 if (jbr->status && !strncmp(jbr->status, "♫ ", strlen("♫ "))) { | 1293 if (jbr->status && purple_str_has_prefix(jbr->status, "♫ ")) { |
1294 purple_prpl_got_user_status(js->gc->account, user, "tune", | 1294 purple_prpl_got_user_status(js->gc->account, user, "tune", |
1295 PURPLE_TUNE_TITLE, jbr->status + strlen("♫ "), NULL); | 1295 PURPLE_TUNE_TITLE, jbr->status + strlen("♫ "), NULL); |
1296 g_free(jbr->status); | |
1296 jbr->status = NULL; | 1297 jbr->status = NULL; |
1297 } else { | 1298 } else { |
1298 purple_prpl_got_user_status_deactive(js->gc->account, user, "tune"); | 1299 purple_prpl_got_user_status_deactive(js->gc->account, user, "tune"); |
1299 } | 1300 } |
1300 } | 1301 } |