kick

Kicks a user from a channel.

void
kick
(,
const string channel
,
const string nickname
,
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 from which to kick the user.

nickname string

Nickname of user to kick.

reason string

Optionally the reason behind the kick.

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;

kick(state, "#channel", "kameloso", "content");

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

Meta