Support multi-prefix
See http://ircv3.net/specs/extensions/multi-prefix-3.1.html ref #3103
This commit is contained in:
+9
-1
@@ -8,7 +8,6 @@
|
||||
TEST_CASE("Irc user parsing")
|
||||
{
|
||||
const std::map<char, char> prefixes{{'!', 'a'}, {'@', 'o'}};
|
||||
|
||||
IrcUser user1("!nick!~some@host.bla", prefixes);
|
||||
CHECK(user1.nick == "nick");
|
||||
CHECK(user1.host == "~some@host.bla");
|
||||
@@ -22,6 +21,15 @@ TEST_CASE("Irc user parsing")
|
||||
CHECK(user2.modes.find('a') == user2.modes.end());
|
||||
}
|
||||
|
||||
TEST_CASE("multi-prefix")
|
||||
{
|
||||
const std::map<char, char> prefixes{{'!', 'a'}, {'@', 'o'}, {'~', 'f'}};
|
||||
IrcUser user("!@~nick", prefixes);
|
||||
CHECK(user.nick == "nick");
|
||||
CHECK(user.modes.size() == 3);
|
||||
CHECK(user.modes.find('f') != user.modes.end());
|
||||
}
|
||||
|
||||
/**
|
||||
* Let Catch know how to display Iid objects
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user