about summary refs log tree commit diff stats
path: root/src/plugins/plugins.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/plugins.c')
-rw-r--r--src/plugins/plugins.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/plugins.c b/src/plugins/plugins.c
index dfe19eb8..cb222a32 100644
--- a/src/plugins/plugins.c
+++ b/src/plugins/plugins.c
@@ -114,7 +114,7 @@ plugins_init(void)
         GSList *curr = plugins;
         while (curr) {
             ProfPlugin *plugin = curr->data;
-            plugin->init_func(plugin, PACKAGE_VERSION, PACKAGE_STATUS);
+            plugin->init_func(plugin, PACKAGE_VERSION, PACKAGE_STATUS, NULL, NULL);
             curr = g_slist_next(curr);
         }
     }
@@ -155,7 +155,13 @@ plugins_load(const char *const name)
 #endif
     if (plugin) {
         plugins = g_slist_append(plugins, plugin);
-        plugin->init_func(plugin, PACKAGE_VERSION, PACKAGE_STATUS);
+        if (jabber_get_connection_status() == JABBER_CONNECTED) {
+            const char *account_name = jabber_get_account_name();
+            const char *fulljid = jabber_get_fulljid();
+            plugin->init_func(plugin, PACKAGE_VERSION, PACKAGE_STATUS, account_name, fulljid);
+        } else {
+            plugin->init_func(plugin, PACKAGE_VERSION, PACKAGE_STATUS, NULL, NULL);
+        }
         log_info("Loaded plugin: %s", name);
         return TRUE;
     } else {