Mercurial > pidgin.yaz
diff src/protocols/irc/msgs.c @ 6357:1fa4410d2e13
[gaim-migrate @ 6856]
Not much--I changed the code to show idle time for irc so it uses the core
sec_to_text function or whatever it's called. THEN I fixed a compile
error, AND THEN I fixed a compile warning, AND NOW I'm commiting. AND THEN
the storm released its fury upon the soil
...they should have known because he told them so...
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 02 Aug 2003 15:27:00 +0000 |
parents | ffb1b5003772 |
children | ba0b99a72be2 |
line wrap: on
line diff
--- a/src/protocols/irc/msgs.c Sat Aug 02 09:02:22 2003 +0000 +++ b/src/protocols/irc/msgs.c Sat Aug 02 15:27:00 2003 +0000 @@ -171,7 +171,6 @@ GaimConnection *gc; GString *info; char *str; - int idle_days, idle_hours, idle_minutes, idle_seconds; if (!irc->whois.nick) { gaim_debug(GAIM_DEBUG_WARNING, "irc", "Unexpected End of WHOIS for %s\n", args[1]); @@ -206,15 +205,9 @@ g_free(irc->whois.channels); } if (irc->whois.idle) { - idle_days=irc->whois.idle / 86400; - idle_hours=(irc->whois.idle % 86400) / 3600; - idle_minutes=(irc->whois.idle % 3600) / 60; - idle_seconds=irc->whois.idle % 60; - g_string_append_printf(info, ngettext( - "<b>Idle for:</b> %d day, %02d:%02d:%02d<br>", - "<b>Idle for:</b> %d days, %02d:%02d:%02d<br>", - idle_days), - idle_days, idle_hours, idle_minutes, idle_seconds); + gchar *timex = sec_to_text(irc->whois.idle); + g_string_append_printf(info, _("<b>Idle for:</b> %s<br>"), timex); + g_free(timex); g_string_append_printf(info, "<b>%s:</b> %s", _("Online since"), ctime(&irc->whois.signon)); } if (!strcmp(irc->whois.nick, "Paco-Paco")) {