diff options
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/nogaim.c | 25 | ||||
| -rw-r--r-- | protocols/util.c | 2 | ||||
| -rw-r--r-- | protocols/yahoo/yahoo.c | 4 | 
3 files changed, 15 insertions, 16 deletions
| diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 123eb477..f4a2ecb3 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -246,8 +246,8 @@ void serv_got_crap( struct gaim_connection *gc, char *format, ... )  	else  		msg = text; -	/* if( g_strcasecmp( set_getstr(gc->irc, "html" ), "strip" ) == 0 ) */ -	if( gc->flags & OPT_CONN_HTML ) +	if( ( g_strcasecmp( set_getstr( gc->irc, "strip_html" ), "always" ) == 0 ) || +	    ( ( 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 ); @@ -636,8 +636,8 @@ void serv_got_im( struct gaim_connection *gc, char *handle, char *msg, guint32 f  		}  	} -	/* if( g_strcasecmp( set_getstr( irc, "html" ), "strip" ) == 0 ) */ -	if( gc->flags & OPT_CONN_HTML ) +	if( ( g_strcasecmp( set_getstr( gc->irc, "strip_html" ), "always" ) == 0 ) || +	    ( ( gc->flags & OPT_CONN_HTML ) && set_getint( gc->irc, "strip_html" ) ) )  		strip_html( msg );  	if( g_strncasecmp( set_getstr( irc, "charset" ), "none", 4 ) != 0 && @@ -736,8 +736,8 @@ void serv_got_chat_in( struct gaim_connection *gc, int id, char *who, int whispe  	u = user_findhandle( gc, who );  	for( c = gc->conversations; c && c->id != id; c = c->next ); -	/* if( g_strcasecmp( set_getstr( gc->irc, "html" ), "strip" ) == 0 ) */ -	if( gc->flags & OPT_CONN_HTML ) +	if( ( g_strcasecmp( set_getstr( gc->irc, "strip_html" ), "always" ) == 0 ) || +	    ( ( gc->flags & OPT_CONN_HTML ) && set_getint( gc->irc, "strip_html" ) ) )  		strip_html( msg );  	if( g_strncasecmp( set_getstr( gc->irc, "charset" ), "none", 4 ) != 0 && @@ -969,10 +969,15 @@ int serv_send_im( irc_t *irc, user_t *u, char *msg, int flags )  	    do_iconv( set_getstr( irc, "charset" ), "UTF-8", msg, buf, 0, 8192 ) != -1 )  		msg = buf; -	if( u->gc->flags & OPT_CONN_HTML) { -		char * html = escape_html(msg); -		strncpy(buf, html, 8192); -		g_free(html); +	if( ( u->gc->flags & OPT_CONN_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) ) +	{ +		char *html; +		 +		html = escape_html( msg ); +		strncpy( buf, html, 8192 ); +		g_free( html ); +		 +		msg = buf;  	}  	return( ((struct gaim_connection *)u->gc)->prpl->send_im( u->gc, u->handle, msg, strlen( msg ), flags ) ); diff --git a/protocols/util.c b/protocols/util.c index 073ee36d..6a2f2e46 100644 --- a/protocols/util.c +++ b/protocols/util.c @@ -376,8 +376,6 @@ char *escape_html( const char *html )  	if( html == NULL )  		return( NULL ); -	if( g_strncasecmp( html, "<html>", 6 ) == 0 ) -		return( g_strdup( html ) );  	ret = g_string_new( "" ); diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index 8344fbf2..d7f7d1dc 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -850,8 +850,6 @@ void ext_yahoo_conf_userjoin( int id, char *who, char *room )  	if( c )  		add_chat_buddy( c, who ); -	else if( set_getint( gc->irc, "debug" ) ) -		serv_got_crap( gc, "Got ext_yahoo_conf_userjoin() from %s for unknown conference %s", who, room );  }  void ext_yahoo_conf_userleave( int id, char *who, char *room ) @@ -863,8 +861,6 @@ void ext_yahoo_conf_userleave( int id, char *who, char *room )  	if( c )  		remove_chat_buddy( c, who, "" ); -	else if( set_getint( gc->irc, "debug" ) ) -		serv_got_crap( gc, "Got ext_yahoo_conf_userleave() from %s for unknown conference %s", who, room );  }  void ext_yahoo_conf_message( int id, char *who, char *room, char *msg, int utf8 ) | 
