mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 00:03:12 +02:00
core: split WeeChat home in 4 directories, use XDG directories by default (issue #1285)
The 4 directories (which can be the same): - config: configuration files, certificates - data: log/upgrade files, local plugins, scripts, xfer files - cache: script repository, scripts downloaded (temporary location) - runtime: FIFO pipe, relay UNIX sockets
This commit is contained in:
@@ -6570,7 +6570,8 @@ irc_command_init ()
|
||||
" /dcc send toto /home/foo/bar.txt"),
|
||||
"chat %(nicks)"
|
||||
" || send %(nicks) "
|
||||
"%(filename:${modifier:eval_path_home,,${xfer.file.upload_path}})",
|
||||
"%(filename:${modifier:eval_path_home,directory=data,"
|
||||
"${xfer.file.upload_path}})",
|
||||
&irc_command_dcc, NULL, NULL);
|
||||
weechat_hook_command (
|
||||
"dehalfop",
|
||||
|
||||
@@ -95,13 +95,23 @@ char *
|
||||
irc_sasl_get_key_content (struct t_irc_server *server, const char *sasl_key)
|
||||
{
|
||||
char *key_path, *content;
|
||||
struct t_hashtable *options;
|
||||
|
||||
if (!sasl_key)
|
||||
return NULL;
|
||||
|
||||
content = NULL;
|
||||
|
||||
key_path = weechat_string_eval_path_home (sasl_key, NULL, NULL, NULL);
|
||||
options = weechat_hashtable_new (
|
||||
32,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL, NULL);
|
||||
if (options)
|
||||
weechat_hashtable_set (options, "directory", "config");
|
||||
key_path = weechat_string_eval_path_home (sasl_key, NULL, NULL, options);
|
||||
if (options)
|
||||
weechat_hashtable_free (options);
|
||||
|
||||
if (key_path)
|
||||
content = weechat_file_get_content (key_path);
|
||||
|
||||
@@ -4481,6 +4481,7 @@ irc_server_gnutls_callback (const void *pointer, void *data,
|
||||
char *ssl_password;
|
||||
const char *ptr_cert_path, *ptr_fingerprint;
|
||||
int rc, ret, fingerprint_match, hostname_match, cert_temp_init;
|
||||
struct t_hashtable *options;
|
||||
#if LIBGNUTLS_VERSION_NUMBER >= 0x010706 /* 1.7.6 */
|
||||
gnutls_datum_t cinfo;
|
||||
int rinfo;
|
||||
@@ -4724,8 +4725,17 @@ irc_server_gnutls_callback (const void *pointer, void *data,
|
||||
IRC_SERVER_OPTION_SSL_CERT);
|
||||
if (ptr_cert_path && ptr_cert_path[0])
|
||||
{
|
||||
options = weechat_hashtable_new (
|
||||
32,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL, NULL);
|
||||
if (options)
|
||||
weechat_hashtable_set (options, "directory", "config");
|
||||
cert_path = weechat_string_eval_path_home (ptr_cert_path,
|
||||
NULL, NULL, NULL);
|
||||
NULL, NULL, options);
|
||||
if (options)
|
||||
weechat_hashtable_free (options);
|
||||
if (cert_path)
|
||||
{
|
||||
cert_str = weechat_file_get_content (cert_path);
|
||||
|
||||
Reference in New Issue
Block a user