diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2005-02-12 21:21:54 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2005-02-12 21:21:54 +0000 |
commit | 0473d2c8db2875bfd7049a94f662984a8e8f815b (patch) | |
tree | 17535cee7496da80bd6022bcaae3eaf94aeba707 /src/gui/curses | |
parent | 34ce958df991fcbfed772c591bcf2dc3c8e86b7a (diff) | |
download | weechat-0473d2c8db2875bfd7049a94f662984a8e8f815b.zip |
Plugins messages are logged with new config option (log_plugin_msg); on server buffer, only server messages are logged
Diffstat (limited to 'src/gui/curses')
-rw-r--r-- | src/gui/curses/gui-display.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/curses/gui-display.c b/src/gui/curses/gui-display.c index 29a145d30..1fa32908e 100644 --- a/src/gui/curses/gui-display.c +++ b/src/gui/curses/gui-display.c @@ -2222,6 +2222,8 @@ gui_add_message (t_gui_buffer *buffer, int type, int color, char *message) buffer->last_line->line_with_highlight = 1; if ((type & MSG_TYPE_TIME) || (type & MSG_TYPE_NICK)) buffer->last_line->length_align += length; + if (type & MSG_TYPE_NOLOG) + buffer->last_line->log_write = 0; if (pos) { pos[0] = '\n'; @@ -2247,6 +2249,8 @@ gui_add_message (t_gui_buffer *buffer, int type, int color, char *message) } } } + if (buffer->line_complete && buffer->log_file && buffer->last_line->log_write) + log_write_line (buffer, buffer->last_line); } /* @@ -2271,6 +2275,7 @@ gui_printf_color_type (t_gui_buffer *buffer, int type, int color, char *message, if (buffer == NULL) { + type |= MSG_TYPE_NOLOG; if (SERVER(gui_current_window->buffer)) buffer = SERVER(gui_current_window->buffer)->buffer; else @@ -2342,12 +2347,8 @@ gui_printf_color_type (t_gui_buffer *buffer, int type, int color, char *message, snprintf (timestamp, 16, "%02d", date_tmp->tm_sec); gui_add_message (buffer, MSG_TYPE_TIME, COLOR_WIN_CHAT_TIME, timestamp); gui_add_message (buffer, MSG_TYPE_TIME, COLOR_WIN_CHAT_DARK, "] "); - if (buffer->log_file) - log_write_date (buffer); } gui_add_message (buffer, type, color, pos + 1); - if (buffer->log_file) - log_write (buffer, pos + 1); pos = strchr (pos + 1, '\n'); if (pos && !pos[1]) pos = NULL; |