diff options
author | Timo Sirainen <cras@irssi.org> | 2000-09-06 21:30:56 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-09-06 21:30:56 +0000 |
commit | 2d1ac3059a0d9df1ef2420080d642d04fac8934d (patch) | |
tree | 5c66799e1d332349b978970c419e570b07d45e40 /src/fe-common/core/fe-queries.c | |
parent | 008ec45db2af71143951785285d7127ccf94f241 (diff) | |
download | irssi-2d1ac3059a0d9df1ef2420080d642d04fac8934d.zip |
/set autocreate_query -> /set autocreate_query_level
fixes to /ircnet, /server and /channel commands
other updates and fixes
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@649 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core/fe-queries.c')
-rw-r--r-- | src/fe-common/core/fe-queries.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/fe-common/core/fe-queries.c b/src/fe-common/core/fe-queries.c index ffb83eb8..230f7dbb 100644 --- a/src/fe-common/core/fe-queries.c +++ b/src/fe-common/core/fe-queries.c @@ -31,10 +31,11 @@ #include "windows.h" #include "window-items.h" -static int queryclose_tag, query_auto_close; +static int queryclose_tag, query_auto_close, querycreate_level; /* Return query where to put the private message. */ -QUERY_REC *privmsg_get_query(SERVER_REC *server, const char *nick, int own) +QUERY_REC *privmsg_get_query(SERVER_REC *server, const char *nick, + int own, int level) { QUERY_REC *query; @@ -42,7 +43,7 @@ QUERY_REC *privmsg_get_query(SERVER_REC *server, const char *nick, int own) g_return_val_if_fail(nick != NULL, NULL); query = query_find(server, nick); - if (query == NULL && settings_get_bool("autocreate_query") && + if (query == NULL && (querycreate_level & level) != 0 && (!own || settings_get_bool("autocreate_own_query"))) query = query_create(server->chat_type, server, nick, TRUE); @@ -263,6 +264,7 @@ static int sig_query_autoclose(void) static void read_settings(void) { + querycreate_level = level2bits(settings_get_str("autocreate_query_level")); query_auto_close = settings_get_int("autoclose_query"); if (query_auto_close > 0 && queryclose_tag == -1) queryclose_tag = g_timeout_add(5000, (GSourceFunc) sig_query_autoclose, NULL); @@ -274,7 +276,7 @@ static void read_settings(void) void fe_queries_init(void) { - settings_add_bool("lookandfeel", "autocreate_query", TRUE); + settings_add_str("lookandfeel", "autocreate_query_level", "MSGS"); settings_add_bool("lookandfeel", "autocreate_own_query", TRUE); settings_add_int("lookandfeel", "autoclose_query", 0); |