mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 20:00:23 +02:00
Reject invalid level specifications in /set.
Most of these have names that end in "_level". git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5021 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
946e7784b0
commit
cb1f07352a
12 changed files with 26 additions and 12 deletions
|
|
@ -81,7 +81,7 @@ static void cmd_echo(const char *data, void *server, WI_ITEM_REC *item)
|
|||
|
||||
levelstr = g_hash_table_lookup(optlist, "level");
|
||||
level = levelstr == NULL ? 0 :
|
||||
level2bits(g_hash_table_lookup(optlist, "level"));
|
||||
level2bits(g_hash_table_lookup(optlist, "level"), NULL);
|
||||
if (level == 0) level = MSGLEVEL_CRAP;
|
||||
|
||||
winname = g_hash_table_lookup(optlist, "window");
|
||||
|
|
|
|||
|
|
@ -513,7 +513,7 @@ static void handle_exec(const char *args, GHashTable *optlist,
|
|||
rec->name = g_strdup(g_hash_table_lookup(optlist, "name"));
|
||||
|
||||
level = g_hash_table_lookup(optlist, "level");
|
||||
rec->level = level == NULL ? MSGLEVEL_CLIENTCRAP : level2bits(level);
|
||||
rec->level = level == NULL ? MSGLEVEL_CLIENTCRAP : level2bits(level, NULL);
|
||||
|
||||
rec->read_tag = g_input_add(rec->in, G_INPUT_READ,
|
||||
(GInputFunction) sig_exec_input_reader,
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ static void cmd_log_open(const char *data)
|
|||
return;
|
||||
if (*fname == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
|
||||
|
||||
level = level2bits(levels);
|
||||
level = level2bits(levels, NULL);
|
||||
log = log_create_rec(fname, level != 0 ? level : MSGLEVEL_ALL);
|
||||
|
||||
/* -<server tag> */
|
||||
|
|
|
|||
|
|
@ -576,7 +576,7 @@ static void cmd_hilight(const char *data)
|
|||
}
|
||||
|
||||
rec->level = (levelarg == NULL || *levelarg == '\0') ? 0 :
|
||||
level2bits(replace_chars(levelarg, ',', ' '));
|
||||
level2bits(replace_chars(levelarg, ',', ' '), NULL);
|
||||
rec->priority = priorityarg == NULL ? 0 : atoi(priorityarg);
|
||||
|
||||
if (g_hash_table_lookup(optlist, "line") != NULL) {
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ static void sig_layout_restore(void)
|
|||
window->immortal = config_node_get_bool(node, "immortal", FALSE);
|
||||
window_set_name(window, config_node_get_str(node, "name", NULL));
|
||||
window_set_history(window, config_node_get_str(node, "history_name", NULL));
|
||||
window_set_level(window, level2bits(config_node_get_str(node, "level", "")));
|
||||
window_set_level(window, level2bits(config_node_get_str(node, "level", ""), NULL));
|
||||
|
||||
window->servertag = g_strdup(config_node_get_str(node, "servertag", NULL));
|
||||
window->theme_name = g_strdup(config_node_get_str(node, "theme", NULL));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue