diff mcabber/src/roster.c @ 819:c2d7d9dd4193

New option 'block_unsubscribed'
author Mikael Berthe <mikael@lilotux.net>
date Sat, 22 Apr 2006 10:50:54 +0200
parents 89ad7b530b3c
children 915a7f17474a
line wrap: on
line diff
--- a/mcabber/src/roster.c	Fri Apr 21 19:08:04 2006 +0200
+++ b/mcabber/src/roster.c	Sat Apr 22 10:50:54 2006 +0200
@@ -630,6 +630,18 @@
   return roster_usr->type;
 }
 
+guint roster_getsubscription(const char *jid)
+{
+  GSList *sl_user;
+  roster *roster_usr;
+
+  if ((sl_user = roster_find(jid, jidsearch, 0)) == NULL)
+    return 0;
+
+  roster_usr = (roster*)sl_user->data;
+  return roster_usr->subscription;
+}
+
 //  roster_unsubscribed()
 // We have lost buddy's presence updates; this function clears the status
 // message, sets the buddy offline and frees the resources