From 477df0c740e0d411a2e5ec32f18efb28b59f2952 Mon Sep 17 00:00:00 2001 From: Val Lorentz Date: Sun, 19 Feb 2023 14:21:53 +0100 Subject: [PATCH] Advertize standard-replies capability Not much point as we send standard replies unconditionally, but there's no harm in advertizing it anyway --- lib/irc/handler.ex | 3 +++ test/irc/handler_test.exs | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/irc/handler.ex b/lib/irc/handler.ex index 6fcad82..88c5807 100644 --- a/lib/irc/handler.ex +++ b/lib/irc/handler.ex @@ -78,6 +78,9 @@ defmodule M51.IrcConn.Handler do # https://ircv3.net/specs/extensions/server-time "server-time" => {:server_time, nil}, + # https://ircv3.net/specs/extensions/standard-replies + "standard-replies" => {:standard_replies, nil}, + # https://ircv3.net/specs/extensions/userhost-in-names # not really useful; but kiwiirc/irc-framework interprets "foo:example.org" # as {nick: '', user: '', hostname: 'foo:example.org'} without this, diff --git a/test/irc/handler_test.exs b/test/irc/handler_test.exs index 5ec1a30..a4087e5 100644 --- a/test/irc/handler_test.exs +++ b/test/irc/handler_test.exs @@ -18,8 +18,8 @@ defmodule M51.IrcConn.HandlerTest do use ExUnit.Case, async: false doctest M51.IrcConn.Handler - @cap_ls_302 ":server. CAP * LS :account-tag batch draft/account-registration=before-connect draft/channel-rename draft/chathistory draft/multiline=max-bytes=8192 echo-message extended-join labeled-response message-tags sasl=PLAIN server-time soju.im/account-required userhost-in-names\r\n" - @cap_ls ":server. CAP * LS :account-tag batch draft/account-registration draft/channel-rename draft/chathistory draft/multiline echo-message extended-join labeled-response message-tags sasl server-time soju.im/account-required userhost-in-names\r\n" + @cap_ls_302 ":server. CAP * LS :account-tag batch draft/account-registration=before-connect draft/channel-rename draft/chathistory draft/multiline=max-bytes=8192 echo-message extended-join labeled-response message-tags sasl=PLAIN server-time soju.im/account-required standard-replies userhost-in-names\r\n" + @cap_ls ":server. CAP * LS :account-tag batch draft/account-registration draft/channel-rename draft/chathistory draft/multiline echo-message extended-join labeled-response message-tags sasl server-time soju.im/account-required standard-replies userhost-in-names\r\n" @isupport "CASEMAPPING=rfc3454 CLIENTTAGDENY=*,-draft/react,-draft/reply CHANLIMIT= CHANTYPES=#! CHATHISTORY=1000 MAXTARGETS=1 MSGREFTYPES=msgid PREFIX= TARGMAX=JOIN:1,PART:1 UTF8ONLY :are supported by this server\r\n" setup do