Changeset b4f496e for protocols/nogaim.h


Ignore:
Timestamp:
2016-11-19T07:32:48Z (7 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
a7baf40
Parents:
9f03c47
Message:

Improve handling of unknown protocols / missing plugins

Instead of failing to load the config, a fake prpl is created to load
the account, keep its settings, and refuse to log in with a helpful
error message.

Also added a new explain_unknown_protocol() function which returns text
which attempts to explain why a protocol is missing, handling several
typical cases, including the future removal of several dead libpurple
plugins.

That message is shown when logging in to a loaded account with a missing
protocol and when adding a new one with 'account add', with the
difference that the latter doesn't leave a placeholder fake account.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.h

    r9f03c47 rb4f496e  
    159159        /* The protocol is not suitable for OTR, see OPT_NOOTR */
    160160        PRPL_OPT_NOOTR = 1 << 12,
     161
     162        /* This prpl is a placeholder for a missing protocol */
     163        PRPL_OPT_UNKNOWN_PROTOCOL = 1 << 13,
    161164} prpl_options_t;
    162165
     
    321324G_MODULE_EXPORT struct prpl *find_protocol(const char *name);
    322325G_MODULE_EXPORT gboolean is_protocol_disabled(const char *name);
     326G_MODULE_EXPORT struct prpl *make_unknown_protocol(const char *name);
     327G_MODULE_EXPORT char *explain_unknown_protocol(const char *name);
    323328/* When registering a new protocol, you should allocate space for a new prpl
    324329 * struct, initialize it (set the function pointers to point to your
Note: See TracChangeset for help on using the changeset viewer.