aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-06-14 19:38:35 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-06-14 19:38:35 +0200
commit241acd1ac7040820983596c3d9417ce91649eaaf (patch)
tree56508b230a0724f00ad0e148e910616ca65d39f9
parente43ffb538e8c1a88e87c166729bacb5a1e81f4e9 (diff)
downloadxK-241acd1ac7040820983596c3d9417ce91649eaaf.tar.gz
xK-241acd1ac7040820983596c3d9417ce91649eaaf.tar.xz
xK-241acd1ac7040820983596c3d9417ce91649eaaf.zip
kike: fix CAP with weechat
It requires a message prefix (IMO terribly implemented).
-rw-r--r--kike.c13
1 files 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