diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/hotlist.c | 3 | ||||
-rw-r--r-- | src/common/weechat.h | 6 | ||||
-rw-r--r-- | src/common/weeconfig.c | 23 | ||||
-rw-r--r-- | src/common/weeconfig.h | 1 |
4 files changed, 16 insertions, 17 deletions
diff --git a/src/common/hotlist.c b/src/common/hotlist.c index e8be5659c..b784fda11 100644 --- a/src/common/hotlist.c +++ b/src/common/hotlist.c @@ -80,6 +80,9 @@ hotlist_add (int priority, t_gui_buffer *buffer) { t_weechat_hotlist *new_hotlist, *pos_hotlist; + if (!buffer) + return; + if ((pos_hotlist = hotlist_search (buffer))) { /* return if priority is greater or equal than the one to add */ diff --git a/src/common/weechat.h b/src/common/weechat.h index 51b0cf9e9..95c8a24ed 100644 --- a/src/common/weechat.h +++ b/src/common/weechat.h @@ -91,9 +91,11 @@ /* directory separator, depending on OS */ #ifdef _WIN32 - #define DIR_SEPARATOR "\\" + #define DIR_SEPARATOR "\\" + #define DIR_SEPARATOR_CHAR '\\' #else - #define DIR_SEPARATOR "/" + #define DIR_SEPARATOR "/" + #define DIR_SEPARATOR_CHAR '/' #endif /* global variables and functions */ diff --git a/src/common/weeconfig.c b/src/common/weeconfig.c index 4936443c8..98d889330 100644 --- a/src/common/weeconfig.c +++ b/src/common/weeconfig.c @@ -448,7 +448,6 @@ t_config_option weechat_options_log[] = /* config, dcc section */ int cfg_dcc_auto_accept_files; -int cfg_dcc_auto_accept_max_size; int cfg_dcc_auto_accept_chats; int cfg_dcc_timeout; int cfg_dcc_blocksize; @@ -460,40 +459,36 @@ int cfg_dcc_auto_resume; t_config_option weechat_options_dcc[] = { { "dcc_auto_accept_files", N_("automatically accept dcc files"), N_("automatically accept incoming dcc files"), - OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE, - NULL, NULL, &cfg_dcc_auto_accept_files, NULL, NULL }, - { "dcc_auto_accept_max_size", N_("max size when auto accepting file"), - N_("maximum size for incoming file when automatically accepted"), - OPTION_TYPE_INT, 0, INT_MAX, 0, - NULL, NULL, &cfg_dcc_auto_accept_max_size, NULL, NULL }, + OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE, + NULL, NULL, &cfg_dcc_auto_accept_files, NULL, config_change_noop }, { "dcc_auto_accept_chats", N_("automatically accept dcc chats"), N_("automatically accept dcc chats (use carefully!)"), OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE, - NULL, NULL, &cfg_dcc_auto_accept_chats, NULL, NULL }, + NULL, NULL, &cfg_dcc_auto_accept_chats, NULL, config_change_noop }, { "dcc_timeout", N_("timeout for dcc request"), N_("timeout for dcc request (in seconds)"), OPTION_TYPE_INT, 1, INT_MAX, 300, - NULL, NULL, &cfg_dcc_timeout, NULL, NULL }, + NULL, NULL, &cfg_dcc_timeout, NULL, config_change_noop }, { "dcc_blocksize", N_("block size for dcc packets"), N_("block size for dcc packets in bytes (default: 1024)"), OPTION_TYPE_INT, 1024, 102400, 1024, - NULL, NULL, &cfg_dcc_blocksize, NULL, NULL }, + NULL, NULL, &cfg_dcc_blocksize, NULL, 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, - "~", NULL, NULL, &cfg_dcc_download_path, NULL }, + "~", NULL, NULL, &cfg_dcc_download_path, config_change_noop }, { "dcc_upload_path", N_("default path for sending files with dcc"), N_("path for reading files when sending thru dcc (when no path is specified)"), OPTION_TYPE_STRING, 0, 0, 0, "~", - NULL, NULL, &cfg_dcc_upload_path, NULL }, + NULL, NULL, &cfg_dcc_upload_path, config_change_noop }, { "dcc_auto_rename", N_("automatically rename dcc files if already exists"), N_("rename incoming files if already exists (add '.1', '.2', ...)"), OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE, - NULL, NULL, &cfg_dcc_auto_rename, NULL, NULL }, + NULL, NULL, &cfg_dcc_auto_rename, NULL, config_change_noop }, { "dcc_auto_resume", N_("automatically resume aborted transfers"), N_("automatically resume dcc transfer if connection with remote host is loosed"), OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE, - NULL, NULL, &cfg_dcc_auto_resume, NULL, NULL }, + NULL, NULL, &cfg_dcc_auto_resume, NULL, config_change_noop }, { NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL } }; diff --git a/src/common/weeconfig.h b/src/common/weeconfig.h index 91ddcdf7a..a94c5bb65 100644 --- a/src/common/weeconfig.h +++ b/src/common/weeconfig.h @@ -146,7 +146,6 @@ extern char *cfg_log_start_string; extern char *cfg_log_end_string; extern int cfg_dcc_auto_accept_files; -extern int cfg_dcc_auto_accept_max_size; extern int cfg_dcc_auto_accept_chats; extern int cfg_dcc_timeout; extern int cfg_dcc_blocksize; |