IRCUser.this

Create a new IRCUser based on a *!*@* mask string.

  1. this(string userstring)
    struct IRCUser
    pure @safe
    this
    (
    string userstring
    )
  2. this(string nickname, string ident, string address)

Examples

{
    immutable user = IRCUser("nickname!~ident@address");
    assert((user.nickname == "nickname"), user.nickname);
    assert((user.ident == "~ident"), user.ident);
    assert((user.address == "address"), user.address);
}
{
    immutable user = IRCUser("*!~ident@address");
    assert(!user.nickname.length, user.nickname);
    assert((user.ident == "~ident"), user.ident);
    assert((user.address == "address"), user.address);
}
{
    immutable user = IRCUser("*!*@*");
    assert(!user.nickname.length, user.nickname);
    assert(!user.ident.length, user.ident);
    assert(!user.address.length, user.address);
}