Mercurial > pidgin
diff src/plugin.c @ 7956:1b8261f374ea
[gaim-migrate @ 8631]
This is the death of protocol numbers. There are probably now a few
functions that should now go away, but i'll let our crack team of crazy
patch writers figure out which ones they are.
out-of-tree and unofficial prpl-writers, rejoice!
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Mon, 29 Dec 2003 09:03:47 +0000 |
parents | 0d24c94e4fbc |
children | fa6395637e2c |
line wrap: on
line diff
--- a/src/plugin.c Mon Dec 29 08:59:22 2003 +0000 +++ b/src/plugin.c Mon Dec 29 09:03:47 2003 +0000 @@ -133,10 +133,17 @@ compare_prpl(GaimPlugin *a, GaimPlugin *b) { /* neg if a before b, 0 if equal, pos if a after b */ - return ((GAIM_IS_PROTOCOL_PLUGIN(a) - ? GAIM_PLUGIN_PROTOCOL_INFO(a)->protocol : -1) - - ((GAIM_IS_PROTOCOL_PLUGIN(b) - ? GAIM_PLUGIN_PROTOCOL_INFO(b)->protocol : -1))); + if(GAIM_IS_PROTOCOL_PLUGIN(a)) { + if(GAIM_IS_PROTOCOL_PLUGIN(b)) + return strcmp(a->info->name, b->info->name); + else + return -1; + } else { + if(GAIM_IS_PROTOCOL_PLUGIN(b)) + return 1; + else + return 0; + } } GaimPlugin * @@ -870,8 +877,7 @@ continue; } - if (GAIM_PLUGIN_PROTOCOL_INFO(plugin)->protocol == GAIM_PROTO_ICQ || - gaim_find_prpl(GAIM_PLUGIN_PROTOCOL_INFO(plugin)->protocol)) + if (gaim_find_prpl(plugin->info->id)) { /* Nothing to see here--move along, move along */ gaim_plugin_destroy(plugin);