diff options
| author | Matt Sparks <root@f0rked.com> | 2005-12-04 06:58:41 -0600 | 
|---|---|---|
| committer | Matt Sparks <root@f0rked.com> | 2005-12-04 06:58:41 -0600 | 
| commit | e7f46c56ffa29c6f8f4917c5f367a61706758e2a (patch) | |
| tree | 1f79bfa4c2d28eb829e222b5ac2c1cb685424e8d /protocols/nogaim.c | |
| parent | 25d1be7fbfe217b756861b4306ff7a5ae77becb1 (diff) | |
Implements solution to typing notifications in ticket #45
Diffstat (limited to 'protocols/nogaim.c')
| -rw-r--r-- | protocols/nogaim.c | 16 | 
1 files changed, 13 insertions, 3 deletions
diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 5fbe00ab..34dfb2c3 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -696,15 +696,25 @@ void serv_got_im( struct gaim_connection *gc, char *handle, char *msg, guint32 f  	irc_msgfrom( irc, u->nick, msg );  } -void serv_got_typing( struct gaim_connection *gc, char *handle, int timeout ) +void serv_got_typing( struct gaim_connection *gc, char *handle, int timeout, int type )  {  	user_t *u;  	if( !set_getint( gc->irc, "typing_notice" ) )  		return; -	if( ( u = user_findhandle( gc, handle ) ) ) -		irc_privmsg( gc->irc, u, "PRIVMSG", gc->irc->nick, NULL, "\1TYPING \1" ); +	if( ( u = user_findhandle( gc, handle ) ) ) { +		/* If type is: +		 * 0: user has stopped typing +		 * 1: user is actively typing +		 * 2: user has entered text, but is not actively typing +		 */ +		if (type == 0 || type == 1 || type == 2) { +			char buf[256];  +			g_snprintf(buf, 256, "\1TYPING %d\1", type);  +			irc_privmsg( gc->irc, u, "PRIVMSG", gc->irc->nick, NULL, buf ); +		} +	}  }  void serv_got_chat_left( struct gaim_connection *gc, int id )  | 
