Mercurial > pidgin
diff src/gaimrc.c @ 1236:dcf9242241ee
[gaim-migrate @ 1246]
fixing some plugin stuff
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 12 Dec 2000 11:31:58 +0000 |
parents | a9cf2f61a7b1 |
children | b5783215b245 |
line wrap: on
line diff
--- a/src/gaimrc.c Tue Dec 12 09:09:24 2000 +0000 +++ b/src/gaimrc.c Tue Dec 12 11:31:58 2000 +0000 @@ -423,23 +423,32 @@ { struct parse *p; char buf[4096]; + GSList *load = NULL; buf[0] = 0; while (buf[0] != '}') { if (!fgets(buf, sizeof(buf), f)) - return; + break; if (buf[0] == '}') - return; + break; p = parse_line(buf); if (!strcmp(p->option, "plugin")) { - load_plugin(p->value[0]); + load = g_slist_append(load, g_strdup(p->value[0])); } } + /* this is such a fucked up hack. the reason we do this is because after + * we load a plugin the gaimrc file gets rewrit. so we have to remember + * which ones to load before loading them. */ + while (load) { + load_plugin(load->data); + g_free(load->data); + load = g_slist_remove(load, load->data); + } } #endif /* GAIM_PLUGINS */