part

Leaves a channel.

void
part
(,
const string channel
,
const string reason = 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 leave.

reason string

Optionally, reason behind leaving.

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;
state.mainThread = thisTid;

part(state, "#channel", "reason");

receive(
    (Message m)
    {
        with (m.event)
        {
            assert((type == IRCEvent.Type.PART), Enum!(IRCEvent.Type).toString(type));
            assert((channel == "#channel"), channel);
            assert((content == "reason"), content);
            assert(m.properties == Message.Property.init);
        }
    }
);

Meta