join

Joins a channel.

void
join
(,
const string channel
,
const string key = string.init
,,
const string caller = __FUNCTION__
)

Parameters

state IRCPluginState

The current plugin's IRCPluginState, via which to send messages to the server.

channel string

Channel to join.

key string

Channel key to join the channel with, if it's locked.

properties Message.Property

Custom message properties, such as Message.Property.quiet and Message.Property.forced.

caller string

String name of the calling function, or something else that gives context.

Examples

IRCPluginState state;

join(state, "#channel");

immutable m = state.outgoingMessages.data[0];
with (m.event)
{
    assert((type == IRCEvent.Type.JOIN), Enum!(IRCEvent.Type).toString(type));
    assert((channel == "#channel"), channel);
    assert(m.properties == Message.Property.init);
}