aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/purple/purple.c
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/purple/purple.c')
-rw-r--r--protocols/purple/purple.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/protocols/purple/purple.c b/protocols/purple/purple.c
index 1a48b31c..edd1e9c3 100644
--- a/protocols/purple/purple.c
+++ b/protocols/purple/purple.c
@@ -42,6 +42,8 @@ static char *set_eval_display_name(set_t *set, char *value);
void purple_request_input_callback(guint id, struct im_connection *ic,
const char *message, const char *who);
+void purple_transfer_cancel_all(struct im_connection *ic);
+
/* purple_request_input specific stuff */
typedef void (*ri_callback_t)(gpointer, const gchar *);
@@ -398,6 +400,10 @@ static void purple_logout(struct im_connection *ic)
purple_save_password(ic->acc, pd->account);
+ if (pd->filetransfers) {
+ purple_transfer_cancel_all(ic);
+ }
+
purple_account_set_enabled(pd->account, "BitlBee", FALSE);
purple_connections = g_slist_remove(purple_connections, ic);
purple_accounts_remove(pd->account);
@@ -1732,6 +1738,7 @@ void purple_initmodule()
supported by this libpurple instance. */
for (prots = purple_plugins_get_protocols(); prots; prots = prots->next) {
PurplePlugin *prot = prots->data;
+ PurplePluginProtocolInfo *pi = prot->info->extra_info;
struct prpl *ret;
/* If we already have this one (as a native module), don't
@@ -1745,6 +1752,15 @@ void purple_initmodule()
if (strncmp(ret->name, "prpl-", 5) != 0) {
ret->name = g_strdup_printf("prpl-%s", ret->name);
}
+
+ if (pi->options & OPT_PROTO_NO_PASSWORD) {
+ ret->options |= PRPL_OPT_NO_PASSWORD;
+ }
+
+ if (pi->options & OPT_PROTO_PASSWORD_OPTIONAL) {
+ ret->options |= PRPL_OPT_PASSWORD_OPTIONAL;
+ }
+
register_protocol(ret);
g_string_append_printf(help, "\n* %s (%s)", ret->name, prot->info->name);