ctcpMessage

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

  1. auto ctcpMessage(in char[] tag, in char[] data)
  2. auto ctcpMessage(in char[] contents)
    ctcpMessage
    (
    in char[] contents
    )

Return Value

Type: auto

Input range for producing the message

Examples

1 char[] msg;
2 
3 msg = ctcpMessage("ACTION", "test \n123").array();
4 assert(msg == "\x01ACTION test \x10n123\x01");
5 
6 msg = ctcpMessage("FINGER").array();
7 assert(msg == "\x01FINGER\x01");
8 
9 msg = ctcpMessage("TEST", "\\test \x01 \r\n\0\x10").array();
10 assert(msg == "\x01TEST \\\\test \\a \x10r\x10n\x100\x10\x10\x01");

Meta