Mon, 09 Jan 2006 05:48:50 +0000
[gaim-migrate @ 15123]
Special-casing IRC by name is ugly. Let's check for a set_idle prpl function instead.
| plugins/idle.c | file | annotate | diff | comparison | revisions |
--- a/plugins/idle.c Mon Jan 09 04:54:16 2006 +0000 +++ b/plugins/idle.c Mon Jan 09 05:48:50 2006 +0000 @@ -48,14 +48,14 @@ } static gboolean -idleable_filter(GaimAccount *acct) +idleable_filter(GaimAccount *account) { - /* LSchiere says we can't control idle time on IRC, so I think we should - * ignore it to avoid some bug reports :) - rekkanoryo */ - if(!strcmp(gaim_account_get_protocol_id(acct), "prpl-irc")) - return FALSE; + GaimPlugin *prpl; - return TRUE; + prpl = gaim_find_prpl(gaim_account_get_protocol_id(account)); + g_return_val_if_fail(prpl != NULL, FALSE); + + return (GAIM_PLUGIN_PROTOCOL_INFO(prpl)->set_idle != NULL); } static void