diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2006-08-20 22:28:31 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2006-08-20 22:28:31 +0000 |
commit | 1f801ff07964a9c2d605a97715b5fea0aafd078c (patch) | |
tree | c09618afaca5bb6f8de939baf1d2383afc8360af /src/gui/gui-buffer.c | |
parent | 0d2afafbd02c3a8a847f584b793b84b612684011 (diff) | |
download | weechat-1f801ff07964a9c2d605a97715b5fea0aafd078c.zip |
Added hotlist in session file when using /upgrade command (task #5449)
Diffstat (limited to 'src/gui/gui-buffer.c')
-rw-r--r-- | src/gui/gui-buffer.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index e53379a04..034a221be 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -290,6 +290,26 @@ gui_buffer_search (char *server, char *channel) } /* + * gui_buffer_search_by_number: search a buffer by number + */ + +t_gui_buffer * +gui_buffer_search_by_number (int number) +{ + t_gui_buffer *ptr_buffer; + + for (ptr_buffer = gui_buffers; ptr_buffer; + ptr_buffer = ptr_buffer->next_buffer) + { + if (ptr_buffer->number == number) + return ptr_buffer; + } + + /* buffer not found */ + return NULL; +} + +/* * gui_buffer_find_window: find a window displaying buffer */ |