Mercurial > pidgin-twitter
diff pidgin-twitter.c @ 98:e460e1978ca3
- fixed a bug introduced in r97.
- trimmed unnecessary debug messages.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Thu, 10 Jul 2008 20:26:22 +0900 |
parents | 24ad534e438e |
children | f207cc8da6cd 86772af940ce |
line wrap: on
line diff
--- a/pidgin-twitter.c Thu Jul 10 19:41:26 2008 +0900 +++ b/pidgin-twitter.c Thu Jul 10 20:26:22 2008 +0900 @@ -557,12 +557,14 @@ g_free(match2); } else if(service == wassr_service && which == CHANNEL) { - gchar *match = g_match_info_fetch(match_info, 1); + gchar *match1 = g_match_info_fetch(match_info, 1); //before channel + gchar *match2 = g_match_info_fetch(match_info, 2); //channel const gchar *format = CHANNEL_FORMAT_WASSR; - snprintf(sub, 128, format, match, match); + snprintf(sub, 128, format, match1 ? match1: "", match2, match2); - g_free(match); + g_free(match1); + g_free(match2); } g_string_append(result, sub); @@ -665,7 +667,7 @@ } /* strip all markups */ - strip_markup(buffer); // this causes missing of strings surrounded by <> + strip_markup(buffer); // it causes missing of strings surrounded by <> /* playsound */ if(purple_prefs_get_bool(OPT_PLAYSOUND_SENDER)) { @@ -679,13 +681,13 @@ if(purple_prefs_get_bool(OPT_TRANSLATE_SENDER)) { translate(buffer, SENDER, service); } - if(purple_prefs_get_bool(OPT_TRANSLATE_RECIPIENT)) { - translate(buffer, RECIPIENT, service); - } if(service == wassr_service && purple_prefs_get_bool(OPT_TRANSLATE_CHANNEL)) { translate(buffer, CHANNEL, service); } + if(purple_prefs_get_bool(OPT_TRANSLATE_RECIPIENT)) { + translate(buffer, RECIPIENT, service); + } /* escape pseudo command (to show same result to sending message) */ if(is_twitter_conv(conv) && purple_prefs_get_bool(OPT_ESCAPE_PSEUDO)) { @@ -970,8 +972,6 @@ { const gchar *proto = purple_account_get_protocol_id(account); - twitter_debug("name = %s proto = %s\n", name, proto); - if(g_strstr_len(name, 19, "twitter@twitter.com") && g_strstr_len(proto, 11, "prpl-jabber")) { return TRUE; @@ -996,8 +996,6 @@ { const gchar *proto = purple_account_get_protocol_id(account); - twitter_debug("name = %s proto = %s\n", name, proto); - if(g_strstr_len(name, 18, "wassr-bot@wassr.jp") && g_strstr_len(proto, 11, "prpl-jabber")) { return TRUE; @@ -1022,8 +1020,6 @@ { const gchar *proto = purple_account_get_protocol_id(account); - twitter_debug("name = %s proto = %s\n", name, proto); - if(g_strstr_len(name, 16, "update@identi.ca") && g_strstr_len(proto, 11, "prpl-jabber")) { return TRUE;