summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--src/plugins/charset/weechat-charset.c17
-rw-r--r--weechat/ChangeLog3
-rw-r--r--weechat/src/plugins/charset/weechat-charset.c17
4 files changed, 36 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 16295e276..876e88472 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,11 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
-ChangeLog - 2007-03-23
+ChangeLog - 2007-03-25
Version 0.2.4 (under dev!):
+ * fixed topic charset, now using channel charset if defined (bug #19386)
* renamed log file for DCC chat (now <server>.dcc.<nick>.weechatlog)
* fixed crash when closing a pv if a DCC chat is open on same nick
(bug #19147)
diff --git a/src/plugins/charset/weechat-charset.c b/src/plugins/charset/weechat-charset.c
index ed85e3175..0941d6ecd 100644
--- a/src/plugins/charset/weechat-charset.c
+++ b/src/plugins/charset/weechat-charset.c
@@ -192,7 +192,7 @@ void
weechat_charset_parse_irc_msg (char *message, char **nick, char **command,
char **channel, char **pos_args)
{
- char *pos, *pos2, *pos3, *pos_tmp;
+ char *pos, *pos2, *pos3, *pos4, *pos_tmp;
*nick = NULL;
*command = NULL;
@@ -258,6 +258,21 @@ weechat_charset_parse_irc_msg (char *message, char **nick, char **command,
else
*nick = strdup (pos2);
}
+ if (pos3)
+ {
+ pos3++;
+ while (pos3[0] == ' ')
+ pos3++;
+ if ((pos3[0] == '#') || (pos3[0] == '&')
+ || (pos3[0] == '+') || (pos3[0] == '!'))
+ {
+ pos4 = strchr (pos3, ' ');
+ if (pos4)
+ *channel = weechat_charset_strndup (pos3, pos4 - pos3);
+ else
+ *channel = strdup (pos3);
+ }
+ }
}
}
}
diff --git a/weechat/ChangeLog b/weechat/ChangeLog
index 16295e276..876e88472 100644
--- a/weechat/ChangeLog
+++ b/weechat/ChangeLog
@@ -1,10 +1,11 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
-ChangeLog - 2007-03-23
+ChangeLog - 2007-03-25
Version 0.2.4 (under dev!):
+ * fixed topic charset, now using channel charset if defined (bug #19386)
* renamed log file for DCC chat (now <server>.dcc.<nick>.weechatlog)
* fixed crash when closing a pv if a DCC chat is open on same nick
(bug #19147)
diff --git a/weechat/src/plugins/charset/weechat-charset.c b/weechat/src/plugins/charset/weechat-charset.c
index ed85e3175..0941d6ecd 100644
--- a/weechat/src/plugins/charset/weechat-charset.c
+++ b/weechat/src/plugins/charset/weechat-charset.c
@@ -192,7 +192,7 @@ void
weechat_charset_parse_irc_msg (char *message, char **nick, char **command,
char **channel, char **pos_args)
{
- char *pos, *pos2, *pos3, *pos_tmp;
+ char *pos, *pos2, *pos3, *pos4, *pos_tmp;
*nick = NULL;
*command = NULL;
@@ -258,6 +258,21 @@ weechat_charset_parse_irc_msg (char *message, char **nick, char **command,
else
*nick = strdup (pos2);
}
+ if (pos3)
+ {
+ pos3++;
+ while (pos3[0] == ' ')
+ pos3++;
+ if ((pos3[0] == '#') || (pos3[0] == '&')
+ || (pos3[0] == '+') || (pos3[0] == '!'))
+ {
+ pos4 = strchr (pos3, ' ');
+ if (pos4)
+ *channel = weechat_charset_strndup (pos3, pos4 - pos3);
+ else
+ *channel = strdup (pos3);
+ }
+ }
}
}
}