diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2018-08-12 21:45:00 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2018-08-12 21:45:00 +0200 |
commit | 42be1a74a036bb0318201a40d91eadc7d9d6454f (patch) | |
tree | 0aab3de96b55a97e12aa051b839e4297dbf3f559 /src/gui/gui-buffer.c | |
parent | 12a6f74ec01d9daa2e23dce5ab15b1ee3ce09006 (diff) | |
download | weechat-42be1a74a036bb0318201a40d91eadc7d9d6454f.zip |
api: add function hook_line
Diffstat (limited to 'src/gui/gui-buffer.c')
-rw-r--r-- | src/gui/gui-buffer.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index 8c4751752..a108c8c14 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -79,6 +79,9 @@ char *gui_buffer_reserved_names[] = NULL }; +char *gui_buffer_type_string[GUI_BUFFER_NUM_TYPES] = +{ "formatted", "free" }; + char *gui_buffer_notify_string[GUI_BUFFER_NUM_NOTIFY] = { "none", "highlight", "message", "all" }; @@ -119,6 +122,26 @@ char *gui_buffer_properties_set[] = /* + * Searches for buffer type. + * + * Returns pointer to hotlist found, NULL if not found. + */ + +int +gui_buffer_search_type (const char *type) +{ + int i; + + for (i = 0; i < GUI_BUFFER_NUM_TYPES; i++) + { + if (string_strcasecmp (gui_buffer_type_string[i], type) == 0) + return i; + } + + return -1; +} + +/* * Gets plugin name of buffer. * * Note: during upgrade process (at startup after /upgrade), the name of plugin |