mirror of
https://github.com/weechat/weechat.git
synced 2026-07-10 11:43:13 +02:00
- added dcc_own_ip and dcc_port_range settings, patch by Jim Ramsay
- fixed bug when exiting DCC buffer (wrong input buffer)
This commit is contained in:
+14
-1
@@ -136,8 +136,11 @@ t_weechat_command weechat_commands[] =
|
||||
"Without argument, /unignore command lists all defined ignore."),
|
||||
0, 4, weechat_cmd_unignore, NULL },
|
||||
{ "window", N_("manage windows"),
|
||||
N_("[list | splith | splitv | [merge [down | up | left | right | all]]]"),
|
||||
N_("[list | -1 | +1 | b# | splith | splitv | [merge [down | up | left | right | all]]]"),
|
||||
N_("list: list opened windows (no parameter implies this list)\n"
|
||||
"-1: jump to previous window\n"
|
||||
"+1: jump to next window\n"
|
||||
"b#: jump to next window displaying buffer number #\n"
|
||||
"splith: split current window horizontally\n"
|
||||
"splitv: split current window vertically\n"
|
||||
"merge: merge window with another"),
|
||||
@@ -2511,6 +2514,8 @@ weechat_cmd_window (int argc, char **argv)
|
||||
{
|
||||
t_gui_window *ptr_win;
|
||||
int i;
|
||||
char *error;
|
||||
long number;
|
||||
|
||||
if ((argc == 0) || ((argc == 1) && (ascii_strcasecmp (argv[0], "list") == 0)))
|
||||
{
|
||||
@@ -2577,6 +2582,14 @@ weechat_cmd_window (int argc, char **argv)
|
||||
else
|
||||
gui_window_merge_auto (gui_current_window);
|
||||
}
|
||||
else if (ascii_strncasecmp (argv[0], "b", 1) == 0)
|
||||
{
|
||||
/* jump to window by buffer number */
|
||||
error = NULL;
|
||||
number = strtol (argv[0] + 1, &error, 10);
|
||||
if ((error) && (error[0] == '\0'))
|
||||
gui_switch_to_window_by_buffer (gui_current_window, number);
|
||||
}
|
||||
else if (ascii_strcasecmp (argv[0], "-1") == 0)
|
||||
gui_switch_to_previous_window (gui_current_window);
|
||||
else if (ascii_strcasecmp (argv[0], "+1") == 0)
|
||||
|
||||
+14
-1
@@ -420,7 +420,7 @@ t_config_option weechat_options_colors[] =
|
||||
{ "col_input_delimiters", N_("color for input text (delimiters)"),
|
||||
N_("color for input text (delimiters)"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"lightgreen", NULL, &cfg_col_input_delimiters, NULL, &config_change_color },
|
||||
"white", NULL, &cfg_col_input_delimiters, NULL, &config_change_color },
|
||||
{ "col_input_bg", N_("background for input window"),
|
||||
N_("background for input window"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
@@ -677,6 +677,8 @@ int cfg_dcc_auto_accept_files;
|
||||
int cfg_dcc_auto_accept_chats;
|
||||
int cfg_dcc_timeout;
|
||||
int cfg_dcc_blocksize;
|
||||
char *cfg_dcc_port_range;
|
||||
char *cfg_dcc_own_ip;
|
||||
char *cfg_dcc_download_path;
|
||||
char *cfg_dcc_upload_path;
|
||||
int cfg_dcc_convert_spaces;
|
||||
@@ -700,6 +702,17 @@ t_config_option weechat_options_dcc[] =
|
||||
N_("block size for dcc packets in bytes (default: 65536)"),
|
||||
OPTION_TYPE_INT, 1024, 102400, 65536,
|
||||
NULL, NULL, &cfg_dcc_blocksize, NULL, &config_change_noop },
|
||||
{ "dcc_port_range", N_("allowed ports for outgoing dcc"),
|
||||
N_("restricts outgoing dcc to use only ports in the given range "
|
||||
"(useful for NAT) (syntax: a single port, ie. 5000 or a port "
|
||||
"range, ie. 5000-5015, empty value means any port)"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0, "",
|
||||
NULL, NULL, &cfg_dcc_port_range, &config_change_noop },
|
||||
{ "dcc_own_ip", N_("IP address for outgoing dcc"),
|
||||
N_("IP or DNS address used for outgoing dcc "
|
||||
"(if empty, local interface IP is used)"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0, "",
|
||||
NULL, NULL, &cfg_dcc_own_ip, &config_change_noop },
|
||||
{ "dcc_download_path", N_("path for incoming files with dcc"),
|
||||
N_("path for writing incoming files with dcc (default: user home)"),
|
||||
OPTION_TYPE_STRING, 0, 0, 0,
|
||||
|
||||
@@ -191,6 +191,8 @@ extern int cfg_dcc_auto_accept_files;
|
||||
extern int cfg_dcc_auto_accept_chats;
|
||||
extern int cfg_dcc_timeout;
|
||||
extern int cfg_dcc_blocksize;
|
||||
extern char *cfg_dcc_port_range;
|
||||
extern char *cfg_dcc_own_ip;
|
||||
extern char *cfg_dcc_download_path;
|
||||
extern char *cfg_dcc_upload_path;
|
||||
extern int cfg_dcc_convert_spaces;
|
||||
|
||||
Reference in New Issue
Block a user