aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/oscar/oscar.c
diff options
context:
space:
mode:
authorMatt Sparks <root@f0rked.com>2005-12-04 06:58:41 -0600
committerMatt Sparks <root@f0rked.com>2005-12-04 06:58:41 -0600
commite7f46c56ffa29c6f8f4917c5f367a61706758e2a (patch)
tree1f79bfa4c2d28eb829e222b5ac2c1cb685424e8d /protocols/oscar/oscar.c
parent25d1be7fbfe217b756861b4306ff7a5ae77becb1 (diff)
Implements solution to typing notifications in ticket #45
Diffstat (limited to 'protocols/oscar/oscar.c')
-rw-r--r--protocols/oscar/oscar.c18
1 files changed, 14 insertions, 4 deletions
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;
}