aboutsummaryrefslogtreecommitdiffstats
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/bee.h3
-rw-r--r--protocols/nogaim.h2
-rw-r--r--protocols/purple/bpurple.h1
-rw-r--r--protocols/purple/purple.c18
4 files changed, 4 insertions, 20 deletions
diff --git a/protocols/bee.h b/protocols/bee.h
index 8e665ac8..5f47e464 100644
--- a/protocols/bee.h
+++ b/protocols/bee.h
@@ -86,9 +86,6 @@ typedef struct bee_user {
typedef struct bee_chat_info {
char *title;
char *topic;
-
- /* If less than zero, the user count is ignored when displaying */
- int userc;
} bee_chat_info_t;
/* This one's mostly used so save space and make it easier (cheaper) to
diff --git a/protocols/nogaim.h b/protocols/nogaim.h
index b2ae2cae..4cba2174 100644
--- a/protocols/nogaim.h
+++ b/protocols/nogaim.h
@@ -268,7 +268,7 @@ struct prpl {
* bee_chat_list_finish() function gets called at some point
* after the chat list is completely updated.
*/
- void (*chat_list) (struct im_connection *, const char *server);
+ void (* chat_list) (struct im_connection *, const char *server);
/* Some placeholders so eventually older plugins may cooperate with newer BitlBees. */
void *resv1;
diff --git a/protocols/purple/bpurple.h b/protocols/purple/bpurple.h
index c7b3a59c..ca7cf70e 100644
--- a/protocols/purple/bpurple.h
+++ b/protocols/purple/bpurple.h
@@ -18,7 +18,6 @@ struct purple_roomlist_data
{
GSList *chats;
gint topic;
- gint userc;
};
#endif /* !BPURPLE_H */
diff --git a/protocols/purple/purple.c b/protocols/purple/purple.c
index 114fec82..4f10c9e7 100644
--- a/protocols/purple/purple.c
+++ b/protocols/purple/purple.c
@@ -768,7 +768,9 @@ void purple_chat_list(struct im_connection *ic, const char *server)
list = purple_roomlist_get_list(pd->account->gc);
- if (list == NULL) {
+ if (list) {
+ purple_roomlist_ref(list);
+ } else {
imcb_log(ic, "Room listing unsupported by this purple plugin");
}
}
@@ -1314,7 +1316,6 @@ static void prplcb_roomlist_create(PurpleRoomlist *list)
list->ui_data = rld = g_new0(struct purple_roomlist_data, 1);
rld->topic = -1;
- rld->userc = -1;
}
static void prplcb_roomlist_set_fields(PurpleRoomlist *list, GList *fields)
@@ -1339,10 +1340,6 @@ static void prplcb_roomlist_set_fields(PurpleRoomlist *list, GList *fields)
if (field->type == PURPLE_ROOMLIST_FIELD_STRING) {
rld->topic = i;
}
- } else if (g_strcasecmp(field->name, "users") == 0) {
- if (field->type == PURPLE_ROOMLIST_FIELD_INT) {
- rld->userc = i;
- }
}
}
@@ -1357,7 +1354,6 @@ static void prplcb_roomlist_add_room(PurpleRoomlist *list, PurpleRoomlistRoom *r
const char *title;
const char *topic;
GList *fields;
- gpointer data;
struct purple_roomlist_data *rld = list->ui_data;
fields = purple_roomlist_room_get_fields(room);
@@ -1373,13 +1369,6 @@ static void prplcb_roomlist_add_room(PurpleRoomlist *list, PurpleRoomlistRoom *r
ci->title = g_strdup(title);
ci->topic = g_strdup(topic);
rld->chats = g_slist_prepend(rld->chats, ci);
-
- if (rld->userc >= 0) {
- data = g_list_nth_data(fields, rld->userc);
- ci->userc = GPOINTER_TO_INT(data);
- } else {
- ci->userc = -1;
- }
}
static void prplcb_roomlist_in_progress(PurpleRoomlist *list, gboolean in_progress)
@@ -1403,7 +1392,6 @@ static void prplcb_roomlist_in_progress(PurpleRoomlist *list, gboolean in_progre
static void prplcb_roomlist_destroy(PurpleRoomlist *list)
{
- /* bee_chat_list_finish() frees rld->chats */
g_free(list->ui_data);
list->ui_data = NULL;
}