+ /* Here are prototypes of some functions interesting to implement github feature request #3
+
+ LOCAL USER:
+ const char* purple_account_get_alias ( const PurpleAccount * account )
+ const gchar* purple_account_get_name_for_display ( const PurpleAccount * account )
+ REMOTE USER (Buddy):
+ const char * purple_contact_get_alias (PurpleContact *contact)
+ const char * purple_buddy_get_name (const PurpleBuddy *buddy)
+ const char * purple_buddy_get_alias_only (PurpleBuddy *buddy)
+ const char * purple_buddy_get_server_alias (PurpleBuddy *buddy)
+ const char * purple_buddy_get_contact_alias (PurpleBuddy *buddy)
+ const char * purple_buddy_get_local_alias (PurpleBuddy *buddy)
+ const char * purple_buddy_get_alias (PurpleBuddy *buddy)
+ PurpleGroup * purple_buddy_get_group (PurpleBuddy *buddy)
+ const char * purple_group_get_name (PurpleGroup *group)
+ */
+
+ //Get buddy group
+ const char *from_group = purple_group_get_name(purple_buddy_get_group(buddy));
+
+ //Get protocol ID
+ const char *protocol_id = purple_account_get_protocol_id(account);
+ if(!strncmp(protocol_id,PROTOCOL_PREFIX,strlen(PROTOCOL_PREFIX))) protocol_id += strlen(PROTOCOL_PREFIX); //trim out protocol prefix (eg.: "prpl-irc" => "irc")
+
+ //Get status
+ PurpleStatus *status = purple_account_get_active_status(account);
+ PurpleStatusType *type = purple_status_get_type(status);
+
+ //Get status id
+ const char *status_id = NULL;
+ status_id = purple_primitive_get_id_from_type(purple_status_type_get_primitive(type));
+
+ //Get status message
+ const char *status_msg = NULL;
+ if (purple_status_type_get_attr(type, "message") != NULL) {
+ status_msg = purple_status_get_attr_string(status, "message");
+ } else {
+ status_msg = (char *) purple_savedstatus_get_message(purple_savedstatus_get_current());
+ }