From bde0e7c3eb50786fb182894bec0ab4d074b1399b Mon Sep 17 00:00:00 2001 From: HanzZ Date: Tue, 3 Apr 2012 20:17:04 +0200 Subject: [PATCH] Fetch gadu-gadu buddies. Fixes #252 --- backends/libpurple/main.cpp | 20 ++++++++++++++++++++ spectrum/src/sample.cfg | 6 +++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/backends/libpurple/main.cpp b/backends/libpurple/main.cpp index c971f273..dcd5f63a 100644 --- a/backends/libpurple/main.cpp +++ b/backends/libpurple/main.cpp @@ -1447,6 +1447,26 @@ static void signed_on(PurpleConnection *gc, gpointer unused) { // force returning of memory chunks allocated by libxml2 to kernel malloc_trim(0); #endif + + PurplePlugin *plugin = gc && PURPLE_CONNECTION_IS_CONNECTED(gc) ? gc->prpl : NULL; + if (plugin && PURPLE_PLUGIN_HAS_ACTIONS(plugin)) { + PurplePluginAction *action = NULL; + GList *actions, *l; + + actions = PURPLE_PLUGIN_ACTIONS(plugin, gc); + + for (l = actions; l != NULL; l = l->next) { + if (l->data) { + action = (PurplePluginAction *) l->data; + action->plugin = plugin; + action->context = gc; + if ((std::string) action->label == "Download buddylist from Server") { + action->callback(action); + } + purple_plugin_action_free(action); + } + } + } } static void printDebug(PurpleDebugLevel level, const char *category, const char *arg_s) { diff --git a/spectrum/src/sample.cfg b/spectrum/src/sample.cfg index 88ec12c8..5309a754 100644 --- a/spectrum/src/sample.cfg +++ b/spectrum/src/sample.cfg @@ -13,9 +13,9 @@ admin_password=test #cert=server.pfx #patch to PKCS#12 certificate #cert_password=test #password to that certificate if any users_per_backend=10 -#backend=../..//backends/libpurple/spectrum2_libpurple_backend -backend=../../backends/template/spectrum2_template_backend -protocol=prpl-xmpp +backend=../..//backends/libpurple/spectrum2_libpurple_backend +#backend=../../backends/template/spectrum2_template_backend +protocol=prpl-gg #protocol=prpl-msn #protocol=any #protocol=prpl-icq