chan

Sends a channel message.

void
chan
(,
const string channelName
,
const string content
,,
const string caller = __FUNCTION__
)

Parameters

state IRCPluginState

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

channelName string

Channel in which to send the message.

content string

Message body content to send.

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;

enum properties = (Message.Property.quiet | Message.Property.background);
chan(state, "#channel", "content", properties);

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