diff options
author | Jilles Tjoelker <jilles@irssi.org> | 2009-02-21 21:17:51 +0000 |
---|---|---|
committer | jilles <jilles@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2009-02-21 21:17:51 +0000 |
commit | cb1f07352af92688983563998f9251ab20cac821 (patch) | |
tree | 9b01c36bec2240c4ba98f24bd5ed6a5a6ec60bd2 /src/fe-common | |
parent | 946e7784b00c9051013b996bd09dcaf144cf250c (diff) | |
download | irssi-cb1f07352af92688983563998f9251ab20cac821.zip |
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
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/core/fe-core-commands.c | 2 | ||||
-rw-r--r-- | src/fe-common/core/fe-exec.c | 2 | ||||
-rw-r--r-- | src/fe-common/core/fe-log.c | 2 | ||||
-rw-r--r-- | src/fe-common/core/hilight-text.c | 2 | ||||
-rw-r--r-- | src/fe-common/core/windows-layout.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/src/fe-common/core/fe-core-commands.c b/src/fe-common/core/fe-core-commands.c index 86f62489..d991b1a7 100644 --- a/src/fe-common/core/fe-core-commands.c +++ b/src/fe-common/core/fe-core-commands.c @@ -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"); diff --git a/src/fe-common/core/fe-exec.c b/src/fe-common/core/fe-exec.c index 53656007..e8bde1ca 100644 --- a/src/fe-common/core/fe-exec.c +++ b/src/fe-common/core/fe-exec.c @@ -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, diff --git a/src/fe-common/core/fe-log.c b/src/fe-common/core/fe-log.c index e3496a63..32086435 100644 --- a/src/fe-common/core/fe-log.c +++ b/src/fe-common/core/fe-log.c @@ -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> */ diff --git a/src/fe-common/core/hilight-text.c b/src/fe-common/core/hilight-text.c index a043d60f..f501db93 100644 --- a/src/fe-common/core/hilight-text.c +++ b/src/fe-common/core/hilight-text.c @@ -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) { diff --git a/src/fe-common/core/windows-layout.c b/src/fe-common/core/windows-layout.c index 4db60431..d6a462cf 100644 --- a/src/fe-common/core/windows-layout.c +++ b/src/fe-common/core/windows-layout.c @@ -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)); |