Dirk

Implements the Client-To-Client Protocol (CTCP).

Specification:
http://www.irchelp.org/irchelp/rfc/ctcpspec.html

auto  ctcpMessage(in char[] tag, in char[] data);
auto  ctcpMessage(in char[] contents);

Create a CTCP message with the given tag and data, or with the tag and data provided pre-combined.

Returns
Input range for producing the message
Examples
char[] msg;

msg = ctcpMessage("ACTION", "test \n123").array();
assert(msg == "\x01ACTION test \x10n123\x01");

msg = ctcpMessage("FINGER").array();
assert(msg == "\x01FINGER\x01");

msg = ctcpMessage("TEST", "\\test \x01 \r\n\0\x10").array();
assert(msg == "\x01TEST \\\\test \\a \x10r\x10n\x100\x10\x10\x01");

auto  ctcpExtract(in char[] message);

Extract CTCP messages from an IRC message.

Returns
Range of CTCP messages, where each element is a range for producing the message.