# HG changeset patch # User Elliott Sales de Andrade # Date 1213517986 0 # Node ID ad565744246e0decf4631a1f6ec174bc8170f979 # Parent 31b5a1334e7e04bd2ae88fe57199879251500941 Add support for emblems in MSN protocol. Emblems include bots, mobile users (not sure how this is different from current mobile designation yet), web clients, and Yahoo buddies. References #3385. diff -r 31b5a1334e7e -r ad565744246e libpurple/protocols/msn/msn.c --- a/libpurple/protocols/msn/msn.c Sun Jun 15 08:08:22 2008 +0000 +++ b/libpurple/protocols/msn/msn.c Sun Jun 15 08:19:46 2008 +0000 @@ -591,6 +591,30 @@ return "msn"; } +static const char * +msn_list_emblems(PurpleBuddy *b) +{ + MsnUser *user = b->proto_data; + + if (user != NULL) { + if (user->clientid & MSN_CLIENT_CAP_BOT) + return "bot"; + if (user->clientid & MSN_CLIENT_CAP_WIN_MOBILE) + return "hiptop"; /* XXX: Rename to Mobile / Use different icon? */ +#if 0 + /* XXX: Since we don't support this, there's no point in showing it just yet */ + if (user->clientid & MSN_CLIENT_CAP_SCHANNEL) + return "secure"; +#endif + if (user->clientid & MSN_CLIENT_CAP_WEBMSGR) + return "web"; + if (user->networkid == MSN_NETWORK_YAHOO) + return "yahoo"; + } + + return NULL; +} + /* * Set the User status text */ @@ -2419,7 +2443,7 @@ NULL, /* protocol_options */ {"png", 0, 0, 96, 96, 0, PURPLE_ICON_SCALE_SEND}, /* icon_spec */ msn_list_icon, /* list_icon */ - NULL, /* list_emblems */ + msn_list_emblems, /* list_emblems */ msn_status_text, /* status_text */ msn_tooltip_text, /* tooltip_text */ msn_status_types, /* away_states */