IRCEvent.Channel

Represents a channel in terms of name and, if version TwitchSupport is declared, also a string ID.

Members

Functions

opAssign
deprecated void opAssign(string name)

Assigns the name of the channel.

opEquals
deprecated auto opEquals(Channel that)

Compares two Channels by name.

opEquals
deprecated auto opEquals(string name)

Compares the name of the channel to a string.

toString
deprecated auto toString()

Returns the name of the channel.

Variables

id
ulong id;

The Twitch ID of this channel.

name
string name;

The name of the channel.

Examples

import std.format : format;

Channel c;
c = "#test";
assert((c.toString() == "#test"), c.name);

Channel c2;
c2.name = "#test2";
assert(c != c2);

c2.name = c.name;
assert(c == c2.name);

version(TwitchSupport)
{
    c.id = 12345L;
    assert(c != c2);
}

immutable s = format("%s", c2);
assert((s == c2.name), s);

See Also