aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/purple/purple.c
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2016-11-14 08:19:00 +0100
committerMarius Halden <marius.h@lden.org>2016-11-14 08:19:00 +0100
commitaf800c35a3927638914bd9c2aed60ad04694b34e (patch)
tree8e25fba5a40871eb11bbda2d70cb48839ace0d9b /protocols/purple/purple.c
parent6967042e3559d1dc40532660a690deab159146c9 (diff)
parent9f03c472fef309878ff2f3bc720d51e6d03077f1 (diff)
Merge branch 'master' into patched-master
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);