Mercurial > pidgin
diff src/protocols/msn/msn.c @ 3572:bdd0bebd2d04
[gaim-migrate @ 3670]
Phase II. No longer do you have to worry about protocol plugins. When
Gaim probes plugins on load, it will detect protocol plugins and add them
to the list of available protocols. When you try to log an account on with
one of them, Gaim will automatically load the plugin--when no more accounts
need the protocol--Gaim will automatically unload it. Protocol plugins are
no longer available in the plugins ui, and no protocols are compiled statically
by default.
committer: Tailor Script <tailor@pidgin.im>
| author | Sean Egan <seanegan@gmail.com> |
|---|---|
| date | Mon, 30 Sep 2002 01:05:18 +0000 |
| parents | 9431b31f8f62 |
| children | 15a0e82a0936 |
line wrap: on
line diff
--- a/src/protocols/msn/msn.c Sun Sep 29 17:00:14 2002 +0000 +++ b/src/protocols/msn/msn.c Mon Sep 30 01:05:18 2002 +0000 @@ -153,10 +153,6 @@ while (*(tmp) && isspace(*(tmp))) \ (tmp)++; -static char *msn_name() -{ - return "MSN"; -} static char *msn_normalize(const char *s) { @@ -2404,26 +2400,6 @@ g_free(b->proto_data); } -static GList *msn_user_opts() -{ - GList *m = NULL; - struct proto_user_opt *puo; - - puo = g_new0(struct proto_user_opt, 1); - puo->label = "Server:"; - puo->def = MSN_SERVER; - puo->pos = USEROPT_MSNSERVER; - m = g_list_append(m, puo); - - puo = g_new0(struct proto_user_opt, 1); - puo->label = "Port:"; - puo->def = "1863"; - puo->pos = USEROPT_MSNPORT; - m = g_list_append(m, puo); - - return m; -} - GSList *msn_smiley_list() { GSList *smilies = NULL; @@ -2530,9 +2506,10 @@ void msn_init(struct prpl *ret) { + struct proto_user_opt *puo; ret->protocol = PROTO_MSN; ret->options = OPT_PROTO_MAIL_CHECK; - ret->name = msn_name; + ret->name = g_strdup("MSN"); ret->list_icon = msn_list_icon; ret->buddy_menu = msn_buddy_menu; ret->login = msn_login; @@ -2559,17 +2536,28 @@ ret->rem_deny = msn_rem_deny; ret->buddy_free = msn_buddy_free; ret->smiley_list = msn_smiley_list; - ret->user_opts = msn_user_opts; + + puo = g_new0(struct proto_user_opt, 1); + puo->label = g_strdup("Server:"); + puo->def = g_strdup(MSN_SERVER); + puo->pos = USEROPT_MSNSERVER; + ret->user_opts = g_list_append(ret->user_opts, puo); + + puo = g_new0(struct proto_user_opt, 1); + puo->label = g_strdup("Port:"); + puo->def = g_strdup("1863"); + puo->pos = USEROPT_MSNPORT; + ret->user_opts = g_list_append(ret->user_opts, puo); my_protocol = ret; } #ifndef STATIC -char *gaim_plugin_init(GModule *handle) +void *gaim_prpl_init(struct prpl *prpl) { - load_protocol(msn_init, sizeof(struct prpl)); - return NULL; + msn_init(prpl); + prpl->plug->desc.api_version = PLUGIN_API_VERSION; } void gaim_plugin_remove()
