pidgin/purple-plugin-pack

Strip quotes from group names in AIM .blt files. Fixes #533.
org.guifications.plugins
2008-09-28, rekkanoryo
3cff063ddeac
Parents 2f842b91d09d
Children 661775546ea1
Strip quotes from group names in AIM .blt files. Fixes #533.
--- a/listhandler/aim_blt_files.c Sun Sep 21 05:21:44 2008 -0400
+++ b/listhandler/aim_blt_files.c Sun Sep 28 23:03:19 2008 -0400
@@ -48,23 +48,9 @@
static gchar * /* remove '{' and leading and trailing spaces from string */
lh_aim_str_normalize(gchar *s)
{
- /* replace all instances of the { character with a space */
- gchar *ret = g_strdelimit(s, "{", ' ');
-
- /* strip leading and trailing whitespace */
- g_strstrip(ret);
-
- return ret;
-}
-
-static void
-lh_aim_sn_normalize(gchar *s)
-{
- gchar *ret = g_strdelimit(s, "\"", ' ');
-
- ret = lh_aim_str_normalize(ret);
-
- return;
+ /* replace all instances of the { and " characters with spaces, then
+ * strip whitespace */
+ return g_strstrip(g_strdelimit(g_strdelimit(s, "\"", ' '), "{", ' '));
}
static gchar * /* extract alias from string by stripping AliasString and "s */
@@ -167,7 +153,7 @@
purple_debug_info("listhandler: import", "Current group begins %d, ends %d\n",
current_group_begin, current_group_end);
- /* now strip { and whitespace from the group and keep an extra
+ /* now strip {, ", and whitespace from the group and keep an extra
* pointer to it around for easy access */
current_group = lh_aim_str_normalize(strings[current_group_begin]);
@@ -186,7 +172,7 @@
/* since the geniuses that designed the blt format decided
* that "M y S cr ee nn a m e" is acceptable in their blt files,
* I have to work around their incompetence */
- lh_aim_sn_normalize(current_buddy);
+ lh_aim_string_normalize(current_buddy);
purple_debug_info("listhandler: import", "current buddy is %s\n",
current_buddy);