From df61847525ba9e8d6d42c4295d034175fd2d0445 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 20 Nov 2005 22:02:18 +0100 Subject: Incoming typing notices are now sent as a CTCP. Better consistency. Don't forget to upgrade your typing notice script. --- protocols/nogaim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'protocols/nogaim.c') diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 22240d8a..41361e07 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -682,7 +682,7 @@ void serv_got_typing( struct gaim_connection *gc, char *handle, int timeout ) return; if( ( u = user_findhandle( gc, handle ) ) ) - irc_noticefrom( gc->irc, u->nick, "* Typing a message *" ); + irc_msgfrom( gc->irc, u->nick, "\1TYPING 1\1" ); } void serv_got_chat_left( struct gaim_connection *gc, int id ) -- cgit v1.2.3 From 30f248a785685491a7e55c804e9221c04c8bdce4 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 26 Nov 2005 03:02:38 +0100 Subject: Lowered the line splitting limit a bit (and made it a bit prettier by trying to split on spaces, if possible). Should close #29. --- protocols/nogaim.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'protocols/nogaim.c') diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 41361e07..2a696992 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -644,31 +644,34 @@ void serv_got_im( struct gaim_connection *gc, char *handle, char *msg, guint32 f do_iconv( "UTF-8", set_getstr( irc, "charset" ), msg, buf, 0, 8192 ) != -1 ) msg = buf; - while( strlen( msg ) > 450 ) + while( strlen( msg ) > 425 ) { char tmp, *nl; - tmp = msg[450]; - msg[450] = 0; + tmp = msg[425]; + msg[425] = 0; - /* If there's a newline in this string, split up there so we're not - going to split up lines. If there isn't a newline, well, too bad. */ - if( ( nl = strrchr( msg, '\n' ) ) ) + /* If there's a newline/space in this string, split up there, + looks a bit prettier. */ + if( ( nl = strrchr( msg, '\n' ) ) || ( nl = strchr( msg, ' ' ) ) ) + { + msg[425] = tmp; + tmp = *nl; *nl = 0; + } irc_msgfrom( irc, u->nick, msg ); - msg[450] = tmp; - /* Move on. */ if( nl ) { - *nl = '\n'; + *nl = tmp; msg = nl + 1; } else { - msg += 450; + msg[425] = tmp; + msg += 425; } } irc_msgfrom( irc, u->nick, msg ); -- cgit v1.2.3 From dfde8e08f71cfd24c9c247962bb4ddbed0b089fa Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 26 Nov 2005 03:24:38 +0100 Subject: Messages specific to a connection only mention the handle now if necessary (i.e. if there is more than one connection to that IM-network). Should close #26. --- protocols/nogaim.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'protocols/nogaim.c') diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 2a696992..101cbb14 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -233,8 +233,9 @@ void hide_login_progress_error( struct gaim_connection *gc, char *msg ) void serv_got_crap( struct gaim_connection *gc, char *format, ... ) { va_list params; - char text[1024], buf[1024]; + char text[1024], buf[1024], acc_id[33]; char *msg; + account_t *a; va_start( params, format ); g_vsnprintf( text, sizeof( text ), format, params ); @@ -250,7 +251,18 @@ void serv_got_crap( struct gaim_connection *gc, char *format, ... ) ( ( gc->flags & OPT_CONN_HTML ) && set_getint( gc->irc, "strip_html" ) ) ) strip_html( msg ); - irc_usermsg( gc->irc, "%s(%s) - %s", proto_name[gc->protocol], gc->username, msg ); + /* Try to find a different connection on the same protocol. */ + for( a = gc->irc->accounts; a; a = a->next ) + if( proto_prpl[a->protocol] == gc->prpl && a->gc != gc ) + break; + + /* If we found one, add the screenname to the acc_id. */ + if( a ) + g_snprintf( acc_id, 32, "%s(%s)", proto_name[gc->protocol], gc->username ); + else + g_snprintf( acc_id, 32, "%s", proto_name[gc->protocol] ); + + irc_usermsg( gc->irc, "%s - %s", acc_id, msg ); } static gboolean send_keepalive( gpointer d ) -- cgit v1.2.3