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

Action

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

ActionMe

A CTCP ACTION sent by the bot from another plugin.

Command

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).

Connect

Signalling that the bot has connected to a new network.

Ctcp

A CTCP event was sent.

CtcpMe

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

CtcpReply

A CTCP_REP event was sent.

Disconnect

Signalling that the bot has disconnected from a network.

Invite

An invite was sent to the bot.

Join

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

Kick

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

Mode

A MODE event: a mode was changed.

Names

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

Nick

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

Notice

A NOTICE event was sent.

Numeric

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

Part

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

Pong

An event indicating the response for a ping.

PrivMsg

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.

PrivMsgMe

A message send by the bot itself via another plugin.

Quit

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

Topic

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

Unknown

Unknown event types.

Whois

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

Trait Implementations

impl ToString for EventType

fn to_string(&self) -> String

impl FromStr for EventType

type Err = ParseEventTypeError

fn from_str(s: &str) -> Result<Self, ParseEventTypeError>

Derived Implementations

impl PartialEq for EventType

fn eq(&self, __arg_0: &EventType) -> bool

fn ne(&self, __arg_0: &EventType) -> bool

impl Clone for EventType

fn clone(&self) -> EventType

fn clone_from(&mut self, source: &Self)

impl Debug for EventType

fn fmt(&self, __arg_0: &mut Formatter) -> Result