1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 06:46:38 +02:00

Fix missing self nick display with /msg command

This commit is contained in:
Sebastien Helleu
2008-08-21 10:53:12 +02:00
parent 2c01447358
commit 9de580a85b
2 changed files with 28 additions and 48 deletions
+10 -26
View File
@@ -48,33 +48,17 @@ irc_input_user_message_display (struct t_gui_buffer *buffer, const char *text)
if (ptr_channel)
{
if (ptr_channel->type == IRC_CHANNEL_TYPE_PRIVATE)
{
weechat_printf (buffer,
"%s%s",
irc_nick_as_prefix (NULL, ptr_server->nick,
IRC_COLOR_CHAT_NICK_SELF),
(text_decoded) ? text_decoded : text);
}
else
{
if (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL)
ptr_nick = irc_nick_search (ptr_channel, ptr_server->nick);
if (ptr_nick)
{
weechat_printf (buffer,
"%s%s",
irc_nick_as_prefix (ptr_nick, NULL,
IRC_COLOR_CHAT_NICK_SELF),
(text_decoded) ? text_decoded : text);
}
else
{
weechat_printf (ptr_server->buffer,
_("%s%s: cannot find nick for sending "
"message"),
weechat_prefix ("error"), "irc");
}
}
else
ptr_nick = NULL;
weechat_printf (buffer,
"%s%s",
irc_nick_as_prefix ((ptr_nick) ? ptr_nick : NULL,
(ptr_nick) ? NULL : ptr_server->nick,
IRC_COLOR_CHAT_NICK_SELF),
(text_decoded) ? text_decoded : text);
}
if (text_decoded)