diff options
author | dequis <dx@dxzone.com.ar> | 2016-11-13 21:37:14 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2016-11-13 21:37:14 -0300 |
commit | 9f03c472fef309878ff2f3bc720d51e6d03077f1 (patch) | |
tree | b49d1be8c2e870e39432a3a9fc5cc41086ade894 /protocols/purple/purple.c | |
parent | ea902752503fc5b356d6513911081ec932d804f2 (diff) |
Improve support for protocols which don't require a password
This adds a prpl_options_t enum with flags, which mostly just brings
OPT_PROTO_{NO_PASSWORD,PASSWORD_OPTIONAL} from libpurple as
PRPL_OPT_{NO_PASSWORD,PASSWORD_OPTIONAL}
Diffstat (limited to 'protocols/purple/purple.c')
-rw-r--r-- | protocols/purple/purple.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/protocols/purple/purple.c b/protocols/purple/purple.c index 4ee41d62..c7123798 100644 --- a/protocols/purple/purple.c +++ b/protocols/purple/purple.c @@ -1724,6 +1724,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 @@ -1737,6 +1738,15 @@ void purple_initmodule() if (strncmp(ret->name, "prpl-", 5) == 0) { ret->name += 5; } + + 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); |