mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-23 01:32:22 -05:00
focus the channel if it's already open (issue #406)
This commit is contained in:
parent
f16646f446
commit
6db9a86366
@ -2348,9 +2348,14 @@ static int
|
|||||||
cmd_join (struct session *sess, char *tbuf, char *word[], char *word_eol[])
|
cmd_join (struct session *sess, char *tbuf, char *word[], char *word_eol[])
|
||||||
{
|
{
|
||||||
char *chan = word[2];
|
char *chan = word[2];
|
||||||
|
session *sess_find;
|
||||||
if (*chan)
|
if (*chan)
|
||||||
{
|
{
|
||||||
char *po, *pass = word[3];
|
char *po, *pass = word[3];
|
||||||
|
|
||||||
|
sess_find = find_channel (sess->server, chan);
|
||||||
|
if (!sess_find)
|
||||||
|
{
|
||||||
sess->server->p_join (sess->server, chan, pass);
|
sess->server->p_join (sess->server, chan, pass);
|
||||||
if (sess->channel[0] == 0 && sess->waitchannel[0])
|
if (sess->channel[0] == 0 && sess->waitchannel[0])
|
||||||
{
|
{
|
||||||
@ -2359,6 +2364,10 @@ cmd_join (struct session *sess, char *tbuf, char *word[], char *word_eol[])
|
|||||||
*po = 0;
|
*po = 0;
|
||||||
safe_strcpy (sess->waitchannel, chan, CHANLEN);
|
safe_strcpy (sess->waitchannel, chan, CHANLEN);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
fe_ctrl_gui (sess_find, 2, 0); /* bring-to-front */
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Loading…
Reference in New Issue
Block a user