emote

Sends an ACTION "emote" to the supplied target (nickname or channel).

void
emote
(,
const string emoteTarget
,
const string content
,,
const string caller = __FUNCTION__
)

Parameters

state IRCPluginState

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

emoteTarget string

Target of the emote, either a nickname to be sent as a private message, or a channel.

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

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

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

emote(state, "kameloso", "content");

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

Meta