aboutsummaryrefslogtreecommitdiffstats
path: root/storage.c
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2016-11-21 03:40:54 -0300
committerdequis <dx@dxzone.com.ar>2016-11-21 03:58:47 -0300
commit5a8afc3f24a5308799d3960cab5726228345022d (patch)
treedc4569f0190238e20b3ae2c7ddb7feb2db27380d /storage.c
parent11d4123fe9a4d88d475bee6c623fb80af8fdbb0b (diff)
Manual merge with wilmer's approach to handling missing protocols
Turns out he already implemented pretty much the same thing in the parson branch... last year. The differences between the two approaches are subtle (there aren't too many ways to do this, some lines are the exact same thing) but I decided I like his version better, so this mostly reverts a handful of my changes while keeping others. The main advantage of his approach is that no fake protocols are registered, no actual prpl functions are called, and the missing prpl is a singleton constant. New things compared to the implementation in the other branch: - The explain_unknown_protocol() function. - Fixed named chatrooms throwing a warning and losing the "account" setting when saving. See changes in irc_im.c - Fixed the "server" setting dropping when saving. See account.c Differences with my previous implementation: - Accounts with missing protocols don't autoconnect - 'account list' marks them as "(missing!)"
Diffstat (limited to 'storage.c')
-rw-r--r--storage.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/storage.c b/storage.c
index 7b684ac7..ab7ba44b 100644
--- a/storage.c
+++ b/storage.c
@@ -32,6 +32,10 @@ extern storage_t storage_xml;
static GList *storage_backends = NULL;
+const struct prpl protocol_missing = {
+ .name = "_unknown",
+};
+
void register_storage_backend(storage_t *backend)
{
storage_backends = g_list_append(storage_backends, backend);