Enum dazeus::EventType [] [src]

pub enum EventType {
    Action,
    ActionMe,
    Command(String),
    Connect,
    Ctcp,
    CtcpMe,
    CtcpReply,
    Disconnect,
    Invite,
    Join,
    Kick,
    Mode,
    Names,
    Nick,
    Notice,
    Numeric,
    Part,
    Pong,
    PrivMsg,
    PrivMsgMe,
    Quit,
    Topic,
    Unknown,
    Whois,
}

The events that could possibly be received from the DaZeus server.

You can use the variants of this enum to start listening for an event of that type. Every event that you receive will also contain its type.

Variants

A CTCP ACTION event (IRC users will know this as /me).

A CTCP ACTION sent by the bot from another plugin.

A command received by DaZeus.

Typically a command can be given to the DaZeus server by using a PRIVMSG where the message is either prefixed by a highlight character or by the name of the bot (in typical IRC highlight style, eg: DaZeus: do something).

The first word after the highlight is used as the command name. For example when the IRC user sends a PRIVMSG DaZeus: start server, then a Command("start".to_string()) variant is sent to the plugin (as long as the plugin has subscribed to such events).

Signalling that the bot has connected to a new network.

A CTCP event was sent.

A CTCP event sent by the bot (from another plugin).

A CTCP_REP event was sent.

Signalling that the bot has disconnected from a network.

An invite was sent to the bot.

A JOIN event: an IRC user joined a channel (this may be the bot itself, or another user).

A KICK event: an IRC user was kicked from a channel (either the bot itself, or another user).

A MODE event: a mode was changed.

A list of users from some channel (will be sent by the IRC server on request).

An event for when the nickname of the bot was changed.

A NOTICE event was sent.

A NUMERIC event was sent (typically contains things such as error messages from the server).

A PART event: an IRC user left a channel (this may be the bot itself, or another user).

An event indicating the response for a ping.

A typical IRC message.

This is either a user sending a direct message to the bot (indicated by the channel being equal to the name of the bot), or a message in a channel that was joined by the bot.

A message send by the bot itself via another plugin.

A QUIT event: an IRC user disconnects from an IRC server.

A TOPIC event: received when joining a channel or when the topic of a channel is changed.

Unknown event types.

A WHOIS event: when requested, this is the response to some WHOIS request.

Trait Implementations

impl Debug for EventType
[src]

Formats the value using the given formatter.

impl Clone for EventType
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for EventType
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl ToString for EventType
[src]

Converts the given value to a String. Read more

impl FromStr for EventType
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more