From eacc08f2e1a8354e885f34b1105d87ec43bca9da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 12 May 2019 21:29:31 +0200 Subject: [PATCH] relay: fix section used when the unix relay does not start with "unix." --- src/plugins/relay/relay-command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/relay/relay-command.c b/src/plugins/relay/relay-command.c index 3f1a2bcfd..86db92456 100644 --- a/src/plugins/relay/relay-command.c +++ b/src/plugins/relay/relay-command.c @@ -225,8 +225,8 @@ relay_command_relay (const void *pointer, void *data, if (weechat_strcasecmp (argv[1], "add") == 0) { WEECHAT_COMMAND_MIN_ARGS(4, "add"); - /* check if we're expecting a path or a port */ - unix_socket = (strncmp (argv[2], "unix.", 5) == 0) ? 1 : 0; + relay_server_get_protocol_args (argv[2], NULL, NULL, NULL, + &unix_socket, NULL, NULL); rc = relay_config_create_option_port_path ( NULL, NULL, relay_config_file,