summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/relay/api/remote/relay-remote-network.c38
-rw-r--r--src/plugins/relay/relay-command.c48
-rw-r--r--src/plugins/relay/relay-config.c14
-rw-r--r--src/plugins/relay/relay-remote.c2
4 files changed, 55 insertions, 47 deletions
diff --git a/src/plugins/relay/api/remote/relay-remote-network.c b/src/plugins/relay/api/remote/relay-remote-network.c
index 1b4035bc3..7832c7b6c 100644
--- a/src/plugins/relay/api/remote/relay-remote-network.c
+++ b/src/plugins/relay/api/remote/relay-remote-network.c
@@ -146,7 +146,7 @@ relay_remote_network_check_auth (struct t_relay_remote *remote,
http_resp = relay_http_parse_response (buffer);
if (!http_resp)
{
- msg_error = _("invalid response from remote");
+ msg_error = _("invalid response from remote relay");
goto error;
}
@@ -165,9 +165,9 @@ relay_remote_network_check_auth (struct t_relay_remote *remote,
|| (weechat_strcasecmp (http_resp->message, "Switching Protocols") != 0))
{
if (http_resp->return_code == 401)
- msg_error = _("authentication failed with remote");
+ msg_error = _("authentication failed with remote relay");
else
- msg_error = _("invalid response from remote");
+ msg_error = _("invalid response from remote relay");
goto error;
}
@@ -915,8 +915,9 @@ relay_remote_network_url_handshake_cb (const void *pointer,
if (ptr_resp_code && ptr_resp_code[0] && (strcmp (ptr_resp_code, "200") != 0))
{
weechat_printf (NULL,
- _("%s%s: handshake failed with URL %s, response code: %s"),
- weechat_prefix ("error"), RELAY_PLUGIN_NAME,
+ _("%sremote[%s]: handshake failed with URL %s, response code: %s"),
+ weechat_prefix ("error"),
+ remote->name,
weechat_config_string (remote->options[RELAY_REMOTE_OPTION_URL]),
ptr_resp_code);
return WEECHAT_RC_OK;
@@ -926,8 +927,9 @@ relay_remote_network_url_handshake_cb (const void *pointer,
if (ptr_error && ptr_error[0])
{
weechat_printf (NULL,
- _("%s%s: handshake failed with URL %s, error: %s"),
- weechat_prefix ("error"), RELAY_PLUGIN_NAME,
+ _("%sremote[%s]: handshake failed with URL %s, error: %s"),
+ weechat_prefix ("error"),
+ remote->name,
weechat_config_string (remote->options[RELAY_REMOTE_OPTION_URL]),
ptr_error);
return WEECHAT_RC_OK;
@@ -960,8 +962,9 @@ relay_remote_network_url_handshake_cb (const void *pointer,
if (remote->password_hash_algo < 0)
{
weechat_printf (NULL,
- _("%s%s: handshake failed with URL %s, error: %s"),
- weechat_prefix ("error"), RELAY_PLUGIN_NAME,
+ _("%sremote[%s]: handshake failed with URL %s, error: %s"),
+ weechat_prefix ("error"),
+ remote->name,
weechat_config_string (remote->options[RELAY_REMOTE_OPTION_URL]),
_("hash algorithm not found"));
return WEECHAT_RC_OK;
@@ -970,8 +973,9 @@ relay_remote_network_url_handshake_cb (const void *pointer,
if (remote->password_hash_iterations < 0)
{
weechat_printf (NULL,
- _("%s%s: handshake failed with URL %s, error: %s"),
- weechat_prefix ("error"), RELAY_PLUGIN_NAME,
+ _("%sremote[%s]: handshake failed with URL %s, error: %s"),
+ weechat_prefix ("error"),
+ remote->name,
weechat_config_string (remote->options[RELAY_REMOTE_OPTION_URL]),
_("unknown number of hash iterations"));
return WEECHAT_RC_OK;
@@ -980,8 +984,9 @@ relay_remote_network_url_handshake_cb (const void *pointer,
if (remote->totp < 0)
{
weechat_printf (NULL,
- _("%s%s: handshake failed with URL %s, error: %s"),
- weechat_prefix ("error"), RELAY_PLUGIN_NAME,
+ _("%sremote[%s]: handshake failed with URL %s, error: %s"),
+ weechat_prefix ("error"),
+ remote->name,
weechat_config_string (remote->options[RELAY_REMOTE_OPTION_URL]),
_("unknown TOTP status"));
return WEECHAT_RC_OK;
@@ -990,9 +995,10 @@ relay_remote_network_url_handshake_cb (const void *pointer,
if (weechat_relay_plugin->debug >= 1)
{
weechat_printf (NULL,
- _("%s: successful handshake with URL %s: "
+ _("%sremote[%s]: successful handshake with URL %s: "
"hash_algo=%s, iterations=%d, totp=%d"),
RELAY_PLUGIN_NAME,
+ remote->name,
weechat_config_string (remote->options[RELAY_REMOTE_OPTION_URL]),
relay_auth_password_hash_algo_name[remote->password_hash_algo],
remote->password_hash_iterations,
@@ -1073,7 +1079,7 @@ relay_remote_network_connect (struct t_relay_remote *remote)
{
weechat_printf (
NULL,
- _("%s%s: already connected to remote \"%s\"!"),
+ _("%s%s: already connected to remote relay \"%s\"!"),
weechat_prefix ("error"), RELAY_PLUGIN_NAME, remote->name);
return 0;
}
@@ -1081,7 +1087,7 @@ relay_remote_network_connect (struct t_relay_remote *remote)
relay_remote_set_status (remote, RELAY_STATUS_CONNECTING);
weechat_printf (NULL,
- _("remote[%s]: connecting to remote %s/%d%s..."),
+ _("remote[%s]: connecting to remote relay %s/%d%s..."),
remote->name,
remote->address,
remote->port,
diff --git a/src/plugins/relay/relay-command.c b/src/plugins/relay/relay-command.c
index 843d3d00f..9b3721496 100644
--- a/src/plugins/relay/relay-command.c
+++ b/src/plugins/relay/relay-command.c
@@ -506,14 +506,14 @@ relay_command_remote (const void *pointer, void *data,
{
weechat_printf (
NULL,
- _("%s%s: remote \"%s\" already exists, can't add it!"),
+ _("%s%s: remote relay \"%s\" already exists, can't add it!"),
weechat_prefix ("error"), RELAY_PLUGIN_NAME, ptr_remote->name);
return WEECHAT_RC_OK;
}
if (!relay_remote_name_valid (argv[2]))
{
weechat_printf (NULL,
- _("%s%s: invalid remote name: \"%s\""),
+ _("%s%s: invalid remote relay name: \"%s\""),
weechat_prefix ("error"),
RELAY_PLUGIN_NAME,
argv[2]);
@@ -522,7 +522,7 @@ relay_command_remote (const void *pointer, void *data,
if (!relay_remote_url_valid (argv[3]))
{
weechat_printf (NULL,
- _("%s%s: invalid remote URL: \"%s\""),
+ _("%s%s: invalid remote relay URL: \"%s\""),
weechat_prefix ("error"),
RELAY_PLUGIN_NAME,
argv[3]);
@@ -548,7 +548,7 @@ relay_command_remote (const void *pointer, void *data,
else
{
weechat_printf (NULL,
- _("%s%s: invalid remote option: \"%s\""),
+ _("%s%s: invalid remote relay option: \"%s\""),
weechat_prefix ("error"),
RELAY_PLUGIN_NAME,
argv[i]);
@@ -559,13 +559,13 @@ relay_command_remote (const void *pointer, void *data,
ptr_password, ptr_totp_secret);
if (ptr_remote)
{
- weechat_printf (NULL, _("Remote \"%s\" created"), argv[2]);
+ weechat_printf (NULL, _("Remote relay \"%s\" created"), argv[2]);
}
else
{
weechat_printf (
NULL,
- _("%s%s: failed to create remote \"%s\""),
+ _("%s%s: failed to create remote relay \"%s\""),
weechat_prefix ("error"), RELAY_PLUGIN_NAME,
argv[2]);
}
@@ -580,7 +580,7 @@ relay_command_remote (const void *pointer, void *data,
{
weechat_printf (
NULL,
- _("%s%s: remote \"%s\" not found for \"%s\" command"),
+ _("%s%s: remote relay \"%s\" not found for \"%s\" command"),
weechat_prefix ("error"),
RELAY_PLUGIN_NAME,
argv[2],
@@ -599,7 +599,7 @@ relay_command_remote (const void *pointer, void *data,
{
weechat_printf (
NULL,
- _("%s%s: remote \"%s\" not found for \"%s\" command"),
+ _("%s%s: remote relay \"%s\" not found for \"%s\" command"),
weechat_prefix ("error"),
RELAY_PLUGIN_NAME,
argv[2],
@@ -610,7 +610,7 @@ relay_command_remote (const void *pointer, void *data,
{
weechat_printf (
NULL,
- _("%s%s: no connection to remote \"%s\""),
+ _("%s%s: no connection to remote relay \"%s\""),
weechat_prefix ("error"),
RELAY_PLUGIN_NAME,
argv[2]);
@@ -628,7 +628,7 @@ relay_command_remote (const void *pointer, void *data,
{
weechat_printf (
NULL,
- _("%s%s: remote \"%s\" not found for \"%s\" command"),
+ _("%s%s: remote relay \"%s\" not found for \"%s\" command"),
weechat_prefix ("error"),
RELAY_PLUGIN_NAME,
argv[2],
@@ -648,7 +648,7 @@ relay_command_remote (const void *pointer, void *data,
{
weechat_printf (
NULL,
- _("%s%s: remote \"%s\" not found for \"%s\" command"),
+ _("%s%s: remote relay \"%s\" not found for \"%s\" command"),
weechat_prefix ("error"),
RELAY_PLUGIN_NAME,
argv[2],
@@ -661,7 +661,7 @@ relay_command_remote (const void *pointer, void *data,
{
weechat_printf (
NULL,
- _("%s%s: remote \"%s\" already exists for \"%s\" command"),
+ _("%s%s: remote relay \"%s\" already exists for \"%s\" command"),
weechat_prefix ("error"),
RELAY_PLUGIN_NAME,
ptr_remote2->name,
@@ -673,7 +673,7 @@ relay_command_remote (const void *pointer, void *data,
{
weechat_printf (
NULL,
- _("%s: remote \"%s\" has been renamed to \"%s\""),
+ _("%s: remote relay \"%s\" has been renamed to \"%s\""),
RELAY_PLUGIN_NAME,
argv[2],
argv[3]);
@@ -691,7 +691,7 @@ relay_command_remote (const void *pointer, void *data,
{
weechat_printf (
NULL,
- _("%s%s: remote \"%s\" not found for \"%s\" command"),
+ _("%s%s: remote relay \"%s\" not found for \"%s\" command"),
weechat_prefix ("error"),
RELAY_PLUGIN_NAME,
argv[2],
@@ -702,7 +702,7 @@ relay_command_remote (const void *pointer, void *data,
{
weechat_printf (
NULL,
- _("%s%s: you can not delete remote \"%s\" because you are "
+ _("%s%s: you can not delete remote relay \"%s\" because you are "
"connected to. Try \"/remote disconnect %s\" before."),
weechat_prefix ("error"),
RELAY_PLUGIN_NAME,
@@ -714,7 +714,7 @@ relay_command_remote (const void *pointer, void *data,
relay_remote_free (ptr_remote);
weechat_printf (
NULL,
- _("%s: remote \"%s\" has been deleted"),
+ _("%s: remote relay \"%s\" has been deleted"),
RELAY_PLUGIN_NAME,
(remote_name) ? remote_name : "???");
if (remote_name)
@@ -818,24 +818,22 @@ relay_command_init ()
" || rename <name> <new_name>"
" || del <name>"),
WEECHAT_CMD_ARGS_DESC(
- N_("raw[list]: list remote relay servers"),
+ N_("raw[list]: list remote relay servers "
+ "(without argument, this list is displayed)"),
N_("raw[listfull]: list remote relay servers (verbose)"),
N_("raw[add]: add a remote relay server"),
N_("name: name of remote relay server, for internal and display use; "
- "this name is used to connect to the server and to set server "
- "options: relay.remote.name.xxx"),
- N_("url: URL of the remote, format is https://example.com:9000 "
+ "this name is used to connect to the remote relay and to set "
+ "remote relay options: relay.remote.name.xxx"),
+ N_("url: URL of the remote relay, format is https://example.com:9000 "
"or http://example.com:9000 (plain-text connection, not recommended)"),
- N_("option: set option for remote: proxy, password or totp_secret"),
+ N_("option: set option for remote relay: proxy, password or totp_secret"),
N_("raw[connect]: connect to a remote relay server"),
- N_("raw[send]: send JSON data to a remote"),
+ N_("raw[send]: send JSON data to a remote relay server"),
N_("raw[disconnect]: disconnect from a remote relay server"),
N_("raw[rename]: rename a remote relay server"),
N_("raw[del]: delete a remote relay server"),
"",
- N_("Without argument, this command opens buffer with list of relay "
- "clients."),
- "",
N_("Examples:"),
AI(" /remote add example https://localhost:9000 "
"-password=my_secret_password -totp_secret=secrettotp"),
diff --git a/src/plugins/relay/relay-config.c b/src/plugins/relay/relay-config.c
index e0f6aacae..51453a3cb 100644
--- a/src/plugins/relay/relay-config.c
+++ b/src/plugins/relay/relay-config.c
@@ -993,7 +993,9 @@ relay_config_create_remote_option (const char *remote_name, int index_option,
ptr_option = weechat_config_new_option (
relay_config_file, relay_config_section_remote,
option_name, "string",
- N_("remote URL"),
+ N_("remote relay URL with optional port (default is 9000), "
+ "examples: https://example.com:9000 or http://example.com:9000 "
+ "(plain-text connection, not recommended)"),
NULL, 0, 0, value, NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
break;
@@ -1001,8 +1003,8 @@ relay_config_create_remote_option (const char *remote_name, int index_option,
ptr_option = weechat_config_new_option (
relay_config_file, relay_config_section_remote,
option_name, "string",
- N_("name of proxy used for this remote (optional, proxy must "
- "be defined with command /proxy)"),
+ N_("name of proxy used for this remote relay (optional, proxy "
+ "must be defined with command /proxy)"),
NULL, 0, 0, value, NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
break;
@@ -1010,7 +1012,8 @@ relay_config_create_remote_option (const char *remote_name, int index_option,
ptr_option = weechat_config_new_option (
relay_config_file, relay_config_section_remote,
option_name, "string",
- N_("password"),
+ N_("password for remote relay "
+ "(note: content is evaluated, see /help eval)"),
NULL, 0, 0, value, NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
break;
@@ -1018,7 +1021,8 @@ relay_config_create_remote_option (const char *remote_name, int index_option,
ptr_option = weechat_config_new_option (
relay_config_file, relay_config_section_remote,
option_name, "string",
- N_("TOTP secret"),
+ N_("TOTP secret, encoded in base32 "
+ "(note: content is evaluated, see /help eval)"),
NULL, 0, 0, value, NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
break;
diff --git a/src/plugins/relay/relay-remote.c b/src/plugins/relay/relay-remote.c
index 080b99ce2..dcd98a728 100644
--- a/src/plugins/relay/relay-remote.c
+++ b/src/plugins/relay/relay-remote.c
@@ -599,7 +599,7 @@ relay_remote_connect (struct t_relay_remote *remote)
{
#ifndef HAVE_CJSON
weechat_printf (NULL,
- _("%s%s: error: unable to connect to remote relay via API "
+ _("%s%s: error: unable to connect to a remote relay via API "
"(cJSON support is not enabled)"),
weechat_prefix ("error"), RELAY_PLUGIN_NAME);
return 0;