From d3ee1bcfe08a5d4163bb1e8d15e25fa0199ae772 Mon Sep 17 00:00:00 2001 From: Shawn Smith Date: Sat, 8 Mar 2014 18:47:18 -0500 Subject: [PATCH] irc: display output of CAP LIST in server buffer (closes #10) --- AUTHORS.asciidoc | 1 + src/plugins/irc/irc-protocol.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/AUTHORS.asciidoc b/AUTHORS.asciidoc index 1cce2f5bd..8c27cd4fc 100644 --- a/AUTHORS.asciidoc +++ b/AUTHORS.asciidoc @@ -72,6 +72,7 @@ Alphabetically: * Rudolf Polzer (divVerent) * Ryuunosuke Ayanokouzi * Sergio Durigan Junior +* Shawn Smith * Simon Arlott * Simon Kuhnle * Stefano Pigozzi diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index bafd26c86..69dfcb9f8 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -3,6 +3,7 @@ * * Copyright (C) 2003-2014 Sébastien Helleu * Copyright (C) 2006 Emmanuel Bouthenot + * Copyright (C) 2014 Shawn Smith * * This file is part of WeeChat, the extensible chat client. * @@ -314,6 +315,18 @@ IRC_PROTOCOL_CALLBACK(cap) } } } + else if (strcmp (argv[3], "LIST") == 0) + { + if (argc > 4) + { + ptr_caps = (argv_eol[4][0] == ':') ? argv_eol[4] + 1 : argv_eol[4]; + weechat_printf_date_tags (server->buffer, date, NULL, + _("%s%s: client capability, enabled for current session: %s"), + weechat_prefix("network"), + IRC_PLUGIN_NAME, + ptr_caps); + } + } else if (strcmp (argv[3], "ACK") == 0) { if (argc > 4)