From e7f46c56ffa29c6f8f4917c5f367a61706758e2a Mon Sep 17 00:00:00 2001 From: Matt Sparks Date: Sun, 4 Dec 2005 06:58:41 -0600 Subject: Implements solution to typing notifications in ticket #45 --- protocols/oscar/oscar.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'protocols/oscar') diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c index 76d61b13..76599d8c 100644 --- a/protocols/oscar/oscar.c +++ b/protocols/oscar/oscar.c @@ -2442,10 +2442,20 @@ int gaim_parsemtn(aim_session_t *sess, aim_frame_t *fr, ...) sn = va_arg(ap, char*); type2 = va_arg(ap, int); va_end(ap); - - if(type2 == 0x0001 || type2 == 0x0002) - serv_got_typing(gc, sn, 0); - + + if(type2 == 0x0002) { + /* User is typing */ + serv_got_typing(gc, sn, 0, 1); + } + else if (type2 == 0x0001) { + /* User has typed something, but is not actively typing (stale) */ + serv_got_typing(gc, sn, 0, 2); + } + else { + /* User has stopped typing */ + serv_got_typing(gc, sn, 0, 0); + } + return 1; } -- cgit v1.2.3