pidgin/purple-plugin-pack

e486e04fac4c
Parents dcc9701af1ba
Children 3be4f65bc3c6
Use a timeout-based approach to getting the userlist from the conversation,
since the userlist is not yet known when "chat-joined" is emitted.
--- a/listlog/listlog.c Sat Jul 19 05:40:03 2008 -0400
+++ b/listlog/listlog.c Tue Jul 22 00:33:46 2008 -0400
@@ -34,12 +34,13 @@
/* Pidgin headers */
#include <gtkplugin.h>
-static void
-listlog_chat_joined_cb(PurpleConversation *conv)
+static gboolean
+listlog_timeout_cb(gpointer data)
{
GList *users = NULL;
GString *message = NULL;
PurpleConvChat *chat = NULL;
+ PurpleConversation *conv = data;
purple_debug_misc(PLUGIN_ID, "Conversation pointer: %p\n", conv);
@@ -61,6 +62,14 @@
purple_conversation_write(conv, NULL, message->str,
PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_NOTIFY, time(NULL));
+
+ return FALSE;
+}
+
+static void
+listlog_chat_joined_cb(PurpleConversation *conv)
+{
+ purple_timeout_add(0, listlog_timeout_cb, conv);
}
static gboolean