Support all allowed channel prefixes
RFC 2812 specifies in §1.3 that “Channels names are strings (beginning with a '&', '#', '+' or '!' character) of length up to fifty (50) characters.” We previously only allowed the first two prefix characters, or any other one if the server overrides the list with ISUPPORT.
This commit is contained in:
+2
-2
@@ -47,7 +47,7 @@ namespace Catch
|
||||
|
||||
TEST_CASE("Iid creation")
|
||||
{
|
||||
const std::set<char> chantypes {'#', '&'};
|
||||
const std::set<char> chantypes {'&', '#', '+', '!'};
|
||||
Iid iid1("foo%irc.example.org", chantypes);
|
||||
CHECK(std::to_string(iid1) == "foo%irc.example.org");
|
||||
CHECK(iid1.get_local() == "foo");
|
||||
@@ -95,7 +95,7 @@ TEST_CASE("Iid creation in fixed_server mode")
|
||||
{
|
||||
Config::set("fixed_irc_server", "fixed.example.com", false);
|
||||
|
||||
const std::set<char> chantypes {'#', '&'};
|
||||
const std::set<char> chantypes {'&', '#', '+', '!'};
|
||||
Iid iid1("foo%irc.example.org", chantypes);
|
||||
CHECK(std::to_string(iid1) == "foo%irc.example.org");
|
||||
CHECK(iid1.get_local() == "foo%irc.example.org");
|
||||
|
||||
Reference in New Issue
Block a user