topic

Sets the topic of a channel.

void
topic
(,
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

Name of channel whose topic to change.

content string

Topic body text.

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;

topic(state, "#channel", "content");

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