summaryrefslogtreecommitdiff
path: root/src/irc/irc-recv.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2004-07-04 15:39:49 +0000
committerSebastien Helleu <flashcode@flashtux.org>2004-07-04 15:39:49 +0000
commitf02ba717a03c2dee7528c4a6e54b827bdd4f8169 (patch)
tree9d75534fb2f32439636cf8494d52c1e018a7de67 /src/irc/irc-recv.c
parent9e6938bdf7505aae1c43090fb0de6cb858d53a8d (diff)
downloadweechat-f02ba717a03c2dee7528c4a6e54b827bdd4f8169.zip
Added /buffer command, jump to buffer by number (alt-digit), actions now ok in private buffers
Diffstat (limited to 'src/irc/irc-recv.c')
-rw-r--r--src/irc/irc-recv.c90
1 files changed, 61 insertions, 29 deletions
diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c
index ae4326a2a..45b9e5d2f 100644
--- a/src/irc/irc-recv.c
+++ b/src/irc/irc-recv.c
@@ -945,10 +945,11 @@ irc_cmd_recv_privmsg (t_irc_server *server, char *host, char *arguments)
if (strstr (pos, server->nick))
{
gui_printf_color_type (ptr_channel->buffer,
- MSG_TYPE_MSG,
+ MSG_TYPE_MSG | MSG_TYPE_HIGHLIGHT,
COLOR_WIN_CHAT_HIGHLIGHT,
"%s", host);
- if ( (cfg_look_infobar_delay_highlight > 0)
+ if ( (cfg_look_infobar)
+ && (cfg_look_infobar_delay_highlight > 0)
&& (ptr_channel->buffer != gui_current_window->buffer) )
gui_infobar_printf (cfg_look_infobar_delay_highlight,
COLOR_WIN_INFOBAR_HIGHLIGHT,
@@ -971,8 +972,10 @@ irc_cmd_recv_privmsg (t_irc_server *server, char *host, char *arguments)
if (strstr (pos, server->nick))
{
irc_display_nick (ptr_channel->buffer, ptr_nick,
- MSG_TYPE_NICK, 1, -1, 0);
- if ( (cfg_look_infobar_delay_highlight > 0)
+ MSG_TYPE_NICK | MSG_TYPE_HIGHLIGHT,
+ 1, -1, 0);
+ if ( (cfg_look_infobar)
+ && (cfg_look_infobar_delay_highlight > 0)
&& (ptr_channel->buffer != gui_current_window->buffer) )
gui_infobar_printf (cfg_look_infobar_delay_highlight,
COLOR_WIN_INFOBAR_HIGHLIGHT,
@@ -1157,38 +1160,67 @@ irc_cmd_recv_privmsg (t_irc_server *server, char *host, char *arguments)
}
}
if (!ptr_channel->topic)
- {
ptr_channel->topic = strdup (host2);
- gui_draw_buffer_title (ptr_channel->buffer, 1);
- }
- gui_printf_color_type (ptr_channel->buffer,
- MSG_TYPE_NICK,
- COLOR_WIN_CHAT_DARK, "<");
- if (strstr (pos, server->nick))
+ if (strncmp (pos, "\01ACTION ", 8) == 0)
{
- gui_printf_color_type (ptr_channel->buffer,
- MSG_TYPE_NICK,
- COLOR_WIN_CHAT_HIGHLIGHT,
- "%s", host);
- if ( (cfg_look_infobar_delay_highlight > 0)
- && (ptr_channel->buffer != gui_current_window->buffer) )
- gui_infobar_printf (cfg_look_infobar_delay_highlight,
- COLOR_WIN_INFOBAR_HIGHLIGHT,
- _("Private %s> %s"),
- host, pos);
+ pos += 8;
+ pos2 = strchr (pos, '\01');
+ if (pos2)
+ pos2[0] = '\0';
+ irc_display_prefix (ptr_channel->buffer, PREFIX_ACTION_ME);
+ if (strstr (pos, server->nick))
+ {
+ gui_printf_color_type (ptr_channel->buffer,
+ MSG_TYPE_MSG | MSG_TYPE_HIGHLIGHT,
+ COLOR_WIN_CHAT_HIGHLIGHT,
+ "%s", host);
+ if ( (cfg_look_infobar)
+ && (cfg_look_infobar_delay_highlight > 0)
+ && (ptr_channel->buffer != gui_current_window->buffer) )
+ gui_infobar_printf (cfg_look_infobar_delay_highlight,
+ COLOR_WIN_INFOBAR_HIGHLIGHT,
+ _("On %s: * %s %s"),
+ ptr_channel->name,
+ host, pos);
+ }
+ else
+ gui_printf_color_type (ptr_channel->buffer,
+ MSG_TYPE_MSG,
+ COLOR_WIN_CHAT_NICK, "%s", host);
+ gui_printf_color (ptr_channel->buffer,
+ COLOR_WIN_CHAT, " %s\n", pos);
}
else
+ {
+ gui_printf_color_type (ptr_channel->buffer,
+ MSG_TYPE_NICK,
+ COLOR_WIN_CHAT_DARK, "<");
+ if (strstr (pos, server->nick))
+ {
+ gui_printf_color_type (ptr_channel->buffer,
+ MSG_TYPE_NICK | MSG_TYPE_HIGHLIGHT,
+ COLOR_WIN_CHAT_HIGHLIGHT,
+ "%s", host);
+ if ( (cfg_look_infobar_delay_highlight > 0)
+ && (ptr_channel->buffer != gui_current_window->buffer) )
+ gui_infobar_printf (cfg_look_infobar_delay_highlight,
+ COLOR_WIN_INFOBAR_HIGHLIGHT,
+ _("Private %s> %s"),
+ host, pos);
+ }
+ else
+ gui_printf_color_type (ptr_channel->buffer,
+ MSG_TYPE_NICK,
+ COLOR_WIN_NICK_PRIVATE,
+ "%s", host);
gui_printf_color_type (ptr_channel->buffer,
MSG_TYPE_NICK,
- COLOR_WIN_NICK_PRIVATE,
- "%s", host);
- gui_printf_color_type (ptr_channel->buffer,
- MSG_TYPE_NICK,
- COLOR_WIN_CHAT_DARK, "> ");
- gui_printf_color_type (ptr_channel->buffer,
- MSG_TYPE_MSG,
- COLOR_WIN_CHAT, "%s\n", pos);
+ COLOR_WIN_CHAT_DARK, "> ");
+ gui_printf_color_type (ptr_channel->buffer,
+ MSG_TYPE_MSG,
+ COLOR_WIN_CHAT, "%s\n", pos);
+ }
}
else
{