From 241acd1ac7040820983596c3d9417ce91649eaaf Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Sun, 14 Jun 2015 19:38:35 +0200 Subject: kike: fix CAP with weechat It requires a message prefix (IMO terribly implemented). --- kike.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/kike.c b/kike.c index 9d3878b..8db90ab 100644 --- a/kike.c +++ b/kike.c @@ -1234,8 +1234,8 @@ irc_handle_cap_ls (struct client *c, struct irc_cap_args *a) a->subcommand, "Ignoring invalid protocol version number"); c->cap_negotiating = true; - client_send (c, "CAP %s LS :multi-prefix invite-notify echo-message" - " userhost-in-names", a->target); + client_send (c, ":%s CAP %s LS :multi-prefix invite-notify echo-message" + " userhost-in-names", c->ctx->server_name, a->target); } static void @@ -1250,7 +1250,8 @@ irc_handle_cap_list (struct client *c, struct irc_cap_args *a) char *caps_str = join_str_vector (&caps, ' '); str_vector_free (&caps); - client_send (c, "CAP %s LIST :%s", a->target, caps_str); + client_send (c, ":%s CAP %s LIST :%s", + c->ctx->server_name, a->target, caps_str); free (caps_str); } @@ -1292,10 +1293,12 @@ irc_handle_cap_req (struct client *c, struct irc_cap_args *a) if (success) { c->caps_enabled = new_caps; - client_send (c, "CAP %s ACK :%s", a->target, a->full_params); + client_send (c, ":%s CAP %s ACK :%s", + c->ctx->server_name, a->target, a->full_params); } else - client_send (c, "CAP %s NAK :%s", a->target, a->full_params); + client_send (c, ":%s CAP %s NAK :%s", + c->ctx->server_name, a->target, a->full_params); } static void -- cgit v1.2.3-70-g09d2