parseNumeric

Parser for RPL_WHOISREGNICK

Format is 307 <client> <nick> :is a registered nick

Examples

import virc.common : User;
import std.range : only, takeNone;
{
	auto reply = parseNumeric!(Numeric.RPL_WHOISREGNICK)(only("someone", "whoisuser", "is a registered nick"));
	assert(reply.get.user == User("whoisuser"));
}
{
	immutable reply = parseNumeric!(Numeric.RPL_WHOISREGNICK)(only("someone", "whoisuser"));
	assert(reply.isNull);
}
{
	immutable reply = parseNumeric!(Numeric.RPL_WHOISREGNICK)(only("someone"));
	assert(reply.isNull);
}
{
	immutable reply = parseNumeric!(Numeric.RPL_WHOISREGNICK)(takeNone(only("")));
	assert(reply.isNull);
}

Meta