diff mcabber/src/roster.c @ 318:45076d02eeef

The /status command can specify a status message We can now use: "/status dnd On the phone..." Related change: Display the buddy status message when a buddy connects/changes his/her status.
author Mikael Berthe <mikael@lilotux.net>
date Fri, 15 Jul 2005 18:45:41 +0100
parents efcbd3c1ad15
children a9013124ede6
line wrap: on
line diff
--- a/mcabber/src/roster.c	Fri Jul 15 13:55:47 2005 +0100
+++ b/mcabber/src/roster.c	Fri Jul 15 18:45:41 2005 +0100
@@ -359,6 +359,19 @@
   return roster_usr->status;
 }
 
+const char *roster_getstatusmsg(const char *jid)
+{
+  GSList *sl_user;
+  roster *roster_usr;
+
+  sl_user = roster_find(jid, jidsearch, ROSTER_TYPE_USER|ROSTER_TYPE_AGENT);
+  if (sl_user == NULL)
+    return offline; // Not in the roster, anyway...
+
+  roster_usr = (roster*)sl_user->data;
+  return roster_usr->status_msg;
+}
+
 guint roster_gettype(const char *jid)
 {
   GSList *sl_user;