# HG changeset patch # User Yoshiki Yazawa # Date 1219431584 -32400 # Node ID d512d1d8712fd66f59f077647b614c9b86e67609 # Parent 5d1b8528e14483e94ec47a56d969d488371ef9c1 improved parrot blocker slightly. diff -r 5d1b8528e144 -r d512d1d8712f pidgin-twitter.c --- a/pidgin-twitter.c Fri Aug 22 22:35:03 2008 +0900 +++ b/pidgin-twitter.c Sat Aug 23 03:59:44 2008 +0900 @@ -787,13 +787,13 @@ if(wassr_ac) { /* store sending message to address parrot problem */ - g_strlcpy(wassr_post, plain, WASSR_POST_LEN); - twitter_debug("wassr parrot pushed:%s\n", *buffer); + g_utf8_strncpy(wassr_post, plain, WASSR_POST_LEN); + twitter_debug("wassr parrot pushed:%s\n", plain); } else if(identica_ac) { /* store sending message to address parrot problem */ - g_strlcpy(identica_post, plain, IDENTICA_POST_LEN); - twitter_debug("identica parrot pushed:%s\n", *buffer); + g_utf8_strncpy(identica_post, plain, IDENTICA_POST_LEN); + twitter_debug("identica parrot pushed:%s\n", plain); } g_free(*buffer); @@ -2417,10 +2417,10 @@ } /* allocate wassr_post */ - wassr_post = g_new0(gchar, WASSR_POST_LEN + 1); + wassr_post = g_new0(gchar, 4 * WASSR_POST_LEN + 1); /* allocate identica_post */ - identica_post = g_new0(gchar, IDENTICA_POST_LEN + 1); + identica_post = g_new0(gchar, 4 * IDENTICA_POST_LEN + 1); return TRUE; } diff -r 5d1b8528e144 -r d512d1d8712f pidgin-twitter.h --- a/pidgin-twitter.h Fri Aug 22 22:35:03 2008 +0900 +++ b/pidgin-twitter.h Sat Aug 23 03:59:44 2008 +0900 @@ -168,7 +168,7 @@ #define TWITTER_DEFAULT_ICON_URL "http://static.twitter.com/images/default_profile_bigger.png" /* wassr specific macros */ -#define WASSR_POST_LEN (255 * 4) +#define WASSR_POST_LEN (255) #define IDENTICA_POST_LEN (140) /* misc macros */