Skip to content

Commit

Permalink
Advertize standard-replies capability
Browse files Browse the repository at this point in the history
Not much point as we send standard replies unconditionally, but there's no
harm in advertizing it anyway
  • Loading branch information
progval committed Feb 19, 2023
1 parent 9838997 commit 477df0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions lib/irc/handler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions test/irc/handler_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 477df0c

Please sign in to comment.