mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 22:06:38 +02:00
irc: rename option irc.network.lag_disconnect to irc.network.lag_reconnect, value is now a number of seconds
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include "irc-server.h"
|
||||
#include "irc-buffer.h"
|
||||
#include "irc-channel.h"
|
||||
#include "irc-color.h"
|
||||
#include "irc-command.h"
|
||||
#include "irc-config.h"
|
||||
#include "irc-input.h"
|
||||
@@ -2821,14 +2822,17 @@ irc_server_timer_cb (void *data, int remaining_calls)
|
||||
weechat_bar_item_update ("lag");
|
||||
}
|
||||
/* lag timeout? => disconnect */
|
||||
if ((weechat_config_integer (irc_config_network_lag_disconnect) > 0)
|
||||
&& (ptr_server->lag / 1000 > weechat_config_integer (irc_config_network_lag_disconnect) * 60))
|
||||
if ((weechat_config_integer (irc_config_network_lag_reconnect) > 0)
|
||||
&& (ptr_server->lag / 1000 > weechat_config_integer (irc_config_network_lag_reconnect)))
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%s%s: lag is high, disconnecting "
|
||||
"from server..."),
|
||||
_("%s%s: lag is high, reconnecting to "
|
||||
"server %s%s%s"),
|
||||
weechat_prefix ("network"),
|
||||
IRC_PLUGIN_NAME);
|
||||
IRC_PLUGIN_NAME,
|
||||
IRC_COLOR_CHAT_SERVER,
|
||||
ptr_server->name,
|
||||
IRC_COLOR_RESET);
|
||||
irc_server_disconnect (ptr_server, 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user