Revert recode changes r4483 and r4715.

git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4867 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Emanuele Giaquinta 2008-08-02 13:15:38 +00:00 committed by exg
commit 9fa8cbe7a2
10 changed files with 201 additions and 103 deletions

View file

@ -23,6 +23,7 @@
#include "misc.h"
#include "channels-setup.h"
#include "settings.h"
#include "recode.h"
#include "irc-servers.h"
#include "irc-channels.h"
@ -121,13 +122,18 @@ static void channel_change_topic(IRC_SERVER_REC *server, const char *channel,
time_t settime)
{
CHANNEL_REC *chanrec;
char *recoded = NULL;
chanrec = channel_find(SERVER(server), channel);
if (chanrec == NULL) return;
/* the topic may be send out encoded, so we need to
recode it back or /topic <tab> will not work properly */
recoded = recode_in(SERVER(server), topic, channel);
if (topic != NULL) {
g_free_not_null(chanrec->topic);
chanrec->topic = g_strdup(topic);
chanrec->topic = recoded == NULL ? NULL : g_strdup(recoded);
}
g_free(recoded);
g_free_not_null(chanrec->topic_by);
chanrec->topic_by = g_strdup(setby);