summaryrefslogtreecommitdiff
path: root/src/fe-common/core/fe-queries.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-03-03 21:51:57 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-03-03 21:51:57 +0000
commitf71afe835a36d53644fff6ad4673059f1282cee5 (patch)
tree7fb6a75cb08f0fc2fe895e90ffc7ca709cf77e4c /src/fe-common/core/fe-queries.c
parentd4558de2327ab5b38720bfad6d079e5878c94d72 (diff)
downloadirssi-f71afe835a36d53644fff6ad4673059f1282cee5.zip
/JOIN #channel and /QUERY nick won't anymore automatically move
channel/query to active window but send a notice to user how to move it. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1325 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core/fe-queries.c')
-rw-r--r--src/fe-common/core/fe-queries.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/fe-common/core/fe-queries.c b/src/fe-common/core/fe-queries.c
index ce11dd31..e7b0eb7e 100644
--- a/src/fe-common/core/fe-queries.c
+++ b/src/fe-common/core/fe-queries.c
@@ -228,9 +228,22 @@ static void cmd_query(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
if (query == NULL)
CHAT_PROTOCOL(server)->query_create(server->tag, nick, FALSE);
else {
- /* query already existed - set query active / move it to this
- window */
- window_item_set_active(active_win, (WI_ITEM_REC *) query);
+ /* query already exists */
+ WINDOW_REC *window = window_item_window(query);
+
+ if (window == active_win) {
+ /* query is in active window, set it active */
+ window_item_set_active(active_win,
+ (WI_ITEM_REC *) query);
+ } else {
+ /* notify user how to move the query to active
+ window. this was used to be done automatically
+ but it just confused everyone who did it
+ accidentally */
+ printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
+ TXT_QUERY_MOVE_NOTIFY, query->name,
+ window->refnum);
+ }
}
if (g_hash_table_lookup(optlist, "window") != NULL) {