diff options
-rw-r--r-- | irc.c | 2 | ||||
-rw-r--r-- | protocols/jabber/jabber.c | 10 | ||||
-rw-r--r-- | protocols/msn/msn.c | 2 | ||||
-rw-r--r-- | protocols/nogaim.h | 4 | ||||
-rw-r--r-- | protocols/oscar/oscar.c | 2 | ||||
-rw-r--r-- | protocols/yahoo/yahoo.c | 2 |
6 files changed, 11 insertions, 11 deletions
@@ -1001,7 +1001,7 @@ int irc_send( irc_t *irc, char *nick, char *s, int flags ) if( current_typing_notice - u->last_typing_notice >= 5 ) { - u->ic->acc->prpl->send_typing( u->ic, u->handle, s[8] == '1' ); + u->ic->acc->prpl->send_typing( u->ic, u->handle, ( s[8] - '0' ) << 8 ); u->last_typing_notice = current_typing_notice; } } diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c index c38be72e..edad5dbd 100644 --- a/protocols/jabber/jabber.c +++ b/protocols/jabber/jabber.c @@ -357,12 +357,12 @@ static int jabber_send_typing( struct im_connection *ic, char *who, int typing ) char *type; int st; - if( typing == 0 ) - type = "active"; - else if( typing == 2 ) - type = "paused"; - else /* if( typing == 1 ) */ + if( typing & OPT_TYPING ) type = "composing"; + else if( typing & OPT_THINKING ) + type = "paused"; + else + type = "active"; node = xt_new_node( type, NULL, NULL ); xt_add_attr( node, "xmlns", XMLNS_CHATSTATES ); diff --git a/protocols/msn/msn.c b/protocols/msn/msn.c index 6d774806..df04e30d 100644 --- a/protocols/msn/msn.c +++ b/protocols/msn/msn.c @@ -341,7 +341,7 @@ static void msn_rem_deny( struct im_connection *ic, char *who ) static int msn_send_typing( struct im_connection *ic, char *who, int typing ) { - if( typing ) + if( typing & OPT_TYPING ) return( msn_buddy_msg( ic, who, TYPING_NOTIFICATION_MESSAGE, 0 ) ); else return( 1 ); diff --git a/protocols/nogaim.h b/protocols/nogaim.h index bc91db3e..6be7b489 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -60,8 +60,8 @@ #define OPT_LOGGING_OUT 0x00000002 #define OPT_AWAY 0x00000004 #define OPT_DOES_HTML 0x00000010 -#define OPT_TYPING 0x00000100 -#define OPT_THINKING 0x00000200 +#define OPT_TYPING 0x00000100 /* Some pieces of code make assumptions */ +#define OPT_THINKING 0x00000200 /* about these values... Stupid me! */ /* ok. now the fun begins. first we create a connection structure */ struct im_connection diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c index a088624a..1ca932f3 100644 --- a/protocols/oscar/oscar.c +++ b/protocols/oscar/oscar.c @@ -2447,7 +2447,7 @@ int gaim_parsemtn(aim_session_t *sess, aim_frame_t *fr, ...) int oscar_send_typing(struct im_connection *ic, char * who, int typing) { struct oscar_data *od = ic->proto_data; - return( aim_im_sendmtn(od->sess, 1, who, typing ? 0x0002 : 0x0000) ); + return( aim_im_sendmtn(od->sess, 1, who, (typing & OPT_TYPING) ? 0x0002 : 0x0000) ); } void oscar_chat_msg(struct groupchat *c, char *message, int msgflags) diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index 0a49baac..69fc29bb 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -186,7 +186,7 @@ static int byahoo_send_typing( struct im_connection *ic, char *who, int typing ) { struct byahoo_data *yd = ic->proto_data; - yahoo_send_typing( yd->y2_id, NULL, who, typing ); + yahoo_send_typing( yd->y2_id, NULL, who, ( typing & OPT_TYPING ) != 0 ); return 1; } |