Mercurial > ~mikael > mcabber > hg
diff mcabber/src/jabglue.c @ 991:ef10906691bb
Chatstates: add composing timeout
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Wed, 01 Nov 2006 11:56:58 +0100 |
parents | 35e7913affb7 |
children | b37348c2aa79 |
line wrap: on
line diff
--- a/mcabber/src/jabglue.c Wed Nov 01 00:57:56 2006 +0100 +++ b/mcabber/src/jabglue.c Wed Nov 01 11:56:58 2006 +0100 @@ -170,7 +170,7 @@ { time_t now; fd_set fds; - long autoaway_timeout; + long timeout; struct timeval tv; static time_t last_eviqs_check = 0; @@ -202,11 +202,20 @@ } } - autoaway_timeout = scr_GetAutoAwayTimeout(now); - if (tv.tv_sec > autoaway_timeout) { - tv.tv_sec = autoaway_timeout; + // Check auto-away timeout + timeout = scr_GetAutoAwayTimeout(now); + if (tv.tv_sec > timeout) { + tv.tv_sec = timeout; } +#if defined JEP0022 || defined JEP0085 + // Check composing timeout + timeout = scr_GetChatStatesTimeout(now); + if (tv.tv_sec > timeout) { + tv.tv_sec = timeout; + } +#endif + if (!tv.tv_sec) tv.tv_usec = 350000;