From 7b15ffdb71958e48784c735ce277431ebd4593ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 20 May 2018 22:44:09 +0200 Subject: irc: add space before capability only if the string is not empty --- src/plugins/irc/irc-protocol.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 95e713a04..06419729d 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -350,7 +350,8 @@ irc_protocol_cap_print_cb (void *data, str_caps = (char **)data; - weechat_string_dyn_concat (str_caps, " "); + if (*str_caps[0]) + weechat_string_dyn_concat (str_caps, " "); weechat_string_dyn_concat (str_caps, key); if (value) { @@ -540,7 +541,7 @@ IRC_PROTOCOL_CALLBACK(cap) str_caps); weechat_printf_date_tags ( server->buffer, date, NULL, - _("%s%s: client capability, server supports:%s"), + _("%s%s: client capability, server supports: %s"), weechat_prefix ("network"), IRC_PLUGIN_NAME, *str_caps); @@ -616,7 +617,7 @@ IRC_PROTOCOL_CALLBACK(cap) str_caps); weechat_printf_date_tags ( server->buffer, date, NULL, - _("%s%s: client capability, currently enabled:%s"), + _("%s%s: client capability, currently enabled: %s"), weechat_prefix ("network"), IRC_PLUGIN_NAME, *str_caps); -- cgit v1.2.3