mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 04:13:32 +02:00
/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
This commit is contained in:
parent
d4558de232
commit
f71afe835a
4 changed files with 39 additions and 5 deletions
|
|
@ -131,14 +131,31 @@ static void cmd_wjoin_pre(const char *data)
|
|||
|
||||
static void cmd_join(const char *data, SERVER_REC *server)
|
||||
{
|
||||
WINDOW_REC *window;
|
||||
CHANNEL_REC *channel;
|
||||
|
||||
if (strchr(data, ' ') != NULL || strchr(data, ',') != NULL)
|
||||
return;
|
||||
|
||||
channel = channel_find(server, data);
|
||||
if (channel != NULL)
|
||||
window_item_set_active(active_win, (WI_ITEM_REC *) channel);
|
||||
if (channel == NULL)
|
||||
return;
|
||||
|
||||
window = window_item_window(channel);
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
static void cmd_wjoin_post(const char *data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue