comparison 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
comparison
equal deleted inserted replaced
1978:986e514bec97 1979:6febc7d1f760
51 51
52 char *strautowhois[] = { /* Should match enum in roster.h */ 52 char *strautowhois[] = { /* Should match enum in roster.h */
53 "default", 53 "default",
54 "off", 54 "off",
55 "on", 55 "on",
56 };
57
58 char *strflagjoins[] = { /* Should match enum in roster.h */
59 "default",
60 "none",
61 "joins",
62 "all"
56 }; 63 };
57 64
58 /* Resource structure */ 65 /* Resource structure */
59 66
60 typedef struct { 67 typedef struct {
92 gchar *nickname; 99 gchar *nickname;
93 gchar *topic; 100 gchar *topic;
94 guint inside_room; 101 guint inside_room;
95 guint print_status; 102 guint print_status;
96 guint auto_whois; 103 guint auto_whois;
104 guint flag_joins;
97 105
98 /* on_server is TRUE if the item is present on the server roster */ 106 /* on_server is TRUE if the item is present on the server roster */
99 guint on_server; 107 guint on_server;
100 108
101 /* To keep track of last status message */ 109 /* To keep track of last status message */
1199 { 1207 {
1200 roster *roster_usr = rosterdata; 1208 roster *roster_usr = rosterdata;
1201 return roster_usr->auto_whois; 1209 return roster_usr->auto_whois;
1202 } 1210 }
1203 1211
1212 void buddy_setflagjoins(gpointer rosterdata, enum room_flagjoins fjoins)
1213 {
1214 roster *roster_usr = rosterdata;
1215 roster_usr->flag_joins = fjoins;
1216 }
1217
1218 enum room_flagjoins buddy_getflagjoins(gpointer rosterdata)
1219 {
1220 roster *roster_usr = rosterdata;
1221 return roster_usr->flag_joins;
1222 }
1223
1204 // buddy_getgroupname() 1224 // buddy_getgroupname()
1205 // Returns a pointer on buddy's group name. 1225 // Returns a pointer on buddy's group name.
1206 const char *buddy_getgroupname(gpointer rosterdata) 1226 const char *buddy_getgroupname(gpointer rosterdata)
1207 { 1227 {
1208 roster *roster_usr = rosterdata; 1228 roster *roster_usr = rosterdata;