summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-11-26 05:08:11 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-11-26 05:08:11 +0000
commit7fbc91551653b4959398d71aed9c5255554c7c9b (patch)
treef7f2b0e098ec351e35e71f07b434400ec9c5b9fa /src
parent8c02aa15b483d3769aa9cd9814b65ca756da5f1b (diff)
downloadirssi-7fbc91551653b4959398d71aed9c5255554c7c9b.zip
theme fixes
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@880 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/fe-common/core/themes.c14
-rw-r--r--src/fe-common/irc/module-formats.c2
2 files changed, 15 insertions, 1 deletions
diff --git a/src/fe-common/core/themes.c b/src/fe-common/core/themes.c
index a8e7c3b0..66c023c9 100644
--- a/src/fe-common/core/themes.c
+++ b/src/fe-common/core/themes.c
@@ -274,6 +274,20 @@ static char *theme_format_expand_abstract(THEME_REC *theme,
data = theme_format_expand_data(theme, formatp, default_color,
NULL, 0);
+ len = strlen(data);
+ if (len > 1 && isdigit(data[len-1]) && data[len-2] == '$') {
+ /* ends with $<digit> .. this breaks things if next
+ character is digit or '-' */
+ char digit, *tmp;
+
+ tmp = data;
+ digit = tmp[len-1];
+ tmp[len-1] = '\0';
+
+ data = g_strdup_printf("%s{%c}", tmp, digit);
+ g_free(tmp);
+ }
+
ret = parse_special_string(abstract, NULL, NULL, data, NULL);
g_free(abstract);
g_free(data);
diff --git a/src/fe-common/irc/module-formats.c b/src/fe-common/irc/module-formats.c
index 578cea16..d0f1a3a5 100644
--- a/src/fe-common/irc/module-formats.c
+++ b/src/fe-common/irc/module-formats.c
@@ -118,7 +118,7 @@ FORMAT_REC fecommon_irc_formats[] = {
{ "own_notice", "{ownnotice notice{ownnotice_target $0}}$1", 2, { 0, 0 } },
{ "own_action", "{ownaction $0}$1", 2, { 0, 0 } },
{ "own_ctcp", "{ownctcp ctcp{ownctcp_target $0}}$1 $2", 3, { 0, 0, 0 } },
- { "own_wall", "{ownwall Wall{ownwall_channel}}$1", 2, { 0, 0 } },
+ { "own_wall", "{ownwall Wall{ownwall_channel $0}}$1", 2, { 0, 0 } },
/* ---- */
{ NULL, "Received messages", 0 },