summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fe-common/core/fe-messages.c10
-rw-r--r--src/fe-common/irc/fe-events.c6
2 files changed, 9 insertions, 7 deletions
diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c
index c3f4ab48..73dd40fc 100644
--- a/src/fe-common/core/fe-messages.c
+++ b/src/fe-common/core/fe-messages.c
@@ -356,7 +356,7 @@ static void sig_message_quit(SERVER_REC *server, const char *nick,
WINDOW_REC *window;
GString *chans;
GSList *tmp, *windows;
- char *print_channel, *recoded;
+ char *print_channel;
int once, count;
if (ignore_check(server, nick, address, NULL, reason, MSGLEVEL_QUITS))
@@ -367,7 +367,6 @@ static void sig_message_quit(SERVER_REC *server, const char *nick,
count = 0; windows = NULL;
chans = g_string_new(NULL);
- recoded = recode_in(server, reason, nick);
for (tmp = server->channels; tmp != NULL; tmp = tmp->next) {
CHANNEL_REC *rec = tmp->data;
@@ -392,7 +391,7 @@ static void sig_message_quit(SERVER_REC *server, const char *nick,
windows = g_slist_append(windows, window);
printformat(server, rec->visible_name,
MSGLEVEL_QUITS,
- TXT_QUIT, nick, address, recoded,
+ TXT_QUIT, nick, address, reason,
rec->visible_name);
}
}
@@ -406,7 +405,7 @@ static void sig_message_quit(SERVER_REC *server, const char *nick,
QUERY_REC *query = query_find(server, nick);
if (query != NULL) {
printformat(server, nick, MSGLEVEL_QUITS,
- TXT_QUIT, nick, address, recoded, "");
+ TXT_QUIT, nick, address, reason, "");
}
}
@@ -415,10 +414,9 @@ static void sig_message_quit(SERVER_REC *server, const char *nick,
g_string_truncate(chans, chans->len-1);
printformat(server, print_channel, MSGLEVEL_QUITS,
count <= 1 ? TXT_QUIT : TXT_QUIT_ONCE,
- nick, address, recoded, chans->str);
+ nick, address, reason, chans->str);
}
g_string_free(chans, TRUE);
- g_free(recoded);
}
static void sig_message_kick(SERVER_REC *server, const char *channel,
diff --git a/src/fe-common/irc/fe-events.c b/src/fe-common/irc/fe-events.c
index f5d03cf5..f834f8af 100644
--- a/src/fe-common/irc/fe-events.c
+++ b/src/fe-common/irc/fe-events.c
@@ -140,10 +140,14 @@ static void event_part(IRC_SERVER_REC *server, const char *data,
static void event_quit(IRC_SERVER_REC *server, const char *data,
const char *nick, const char *addr)
{
+ char *recoded;
+
g_return_if_fail(data != NULL);
if (*data == ':') data++; /* quit message */
- signal_emit("message quit", 4, server, nick, addr, data);
+ recoded = recode_in(SERVER(server), data, nick);
+ signal_emit("message quit", 4, server, nick, addr, recoded);
+ g_free(recoded);
}
static void event_kick(IRC_SERVER_REC *server, const char *data,