diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-07-06 20:03:19 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-07-06 20:03:19 +0200 |
commit | 87e9c6476bb11f882d25aca718c7011599dd2237 (patch) | |
tree | 45349285ac7f0d8e369de79f68bdfb2134b45dfc | |
parent | 00ca4f0d36d482b2814f3829f572b9872ab63b34 (diff) | |
download | weechat-87e9c6476bb11f882d25aca718c7011599dd2237.zip |
Open channel/pv near server when no channel/pv is opened (with option irc.look.open_*_near_server)
-rw-r--r-- | src/plugins/irc/irc-channel.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index 33744d95f..8dc9c06ca 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -116,14 +116,22 @@ irc_channel_move_near_server (struct t_irc_server *server, int channel_type, number_found = number_last_channel + 1; break; } - - /* switch to number found */ - if ((number_found >= 1) && (number_found != number)) + } + else + { + if (weechat_config_integer (irc_config_look_server_buffer) == + IRC_CONFIG_LOOK_SERVER_BUFFER_INDEPENDENT) { - snprintf (str_number, sizeof (str_number), "%d", number_found); - weechat_buffer_set (buffer, "number", str_number); + number_found = weechat_buffer_get_integer (server->buffer, "number") + 1; } } + + /* switch to number found */ + if ((number_found >= 1) && (number_found != number)) + { + snprintf (str_number, sizeof (str_number), "%d", number_found); + weechat_buffer_set (buffer, "number", str_number); + } } /* |