summaryrefslogtreecommitdiff
path: root/src/fe-common/core/fe-channels.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-04-09 19:05:44 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-04-09 19:05:44 +0000
commitb1a385b2b45b9cd21bc896393b00fceba40f91af (patch)
treecbcf9944e8a5c28211b4411f8cd1961468f2e1ab /src/fe-common/core/fe-channels.c
parent5a0d676864b06cb7fb56dcc2779d3f5005dd7b00 (diff)
downloadirssi-b1a385b2b45b9cd21bc896393b00fceba40f91af.zip
/JOIN #existing_channel jumps to the window where it's joined.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2660 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core/fe-channels.c')
-rw-r--r--src/fe-common/core/fe-channels.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/fe-common/core/fe-channels.c b/src/fe-common/core/fe-channels.c
index 712ae1c4..27ad4365 100644
--- a/src/fe-common/core/fe-channels.c
+++ b/src/fe-common/core/fe-channels.c
@@ -132,21 +132,12 @@ static void cmd_join(const char *data, SERVER_REC *server)
if (channel == NULL)
return;
+ /* already joined to channel, set it active */
window = window_item_window(channel);
+ if (window != active_win)
+ window_set_active(window);
- if (window == active_win) {
- /* channel is in active window, set it active */
- window_item_set_active(active_win,
- (WI_ITEM_REC *) channel);
- } else {
- /* notify user how to move the channel 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_CHANNEL_MOVE_NOTIFY, channel->name,
- window->refnum);
- }
+ window_item_set_active(active_win, (WI_ITEM_REC *) channel);
}
static void cmd_wjoin_post(const char *data)