Mercurial > ~mikael > mcabber > hg
diff mcabber/mcabber/roster.c @ 1979:6febc7d1f760
Add /room setopt flag_joins (Hermitifier)
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 26 Mar 2011 14:45:19 +0100 |
parents | 986e514bec97 |
children | 7837d5a3f509 |
line wrap: on
line diff
--- a/mcabber/mcabber/roster.c Sat Mar 26 13:56:41 2011 +0100 +++ b/mcabber/mcabber/roster.c Sat Mar 26 14:45:19 2011 +0100 @@ -55,6 +55,13 @@ "on", }; +char *strflagjoins[] = { /* Should match enum in roster.h */ + "default", + "none", + "joins", + "all" +}; + /* Resource structure */ typedef struct { @@ -94,6 +101,7 @@ guint inside_room; guint print_status; guint auto_whois; + guint flag_joins; /* on_server is TRUE if the item is present on the server roster */ guint on_server; @@ -1201,6 +1209,18 @@ return roster_usr->auto_whois; } +void buddy_setflagjoins(gpointer rosterdata, enum room_flagjoins fjoins) +{ + roster *roster_usr = rosterdata; + roster_usr->flag_joins = fjoins; +} + +enum room_flagjoins buddy_getflagjoins(gpointer rosterdata) +{ + roster *roster_usr = rosterdata; + return roster_usr->flag_joins; +} + // buddy_getgroupname() // Returns a pointer on buddy's group name. const char *buddy_getgroupname(gpointer rosterdata)