[][src]Function hexchat::add_raw_server_event_listener

pub fn add_raw_server_event_listener(
    event: &str,
    priority: Priority,
    function: impl Fn(&[String], DateTime<Utc>) -> EatMode + 'static
) -> RawServerEventListener

Adds a listener for raw server events, i.e. commands coming straight from the server.

Returns a corresponding object suitable for passing to remove_raw_server_event_listener.

Callback

The callback's signature is a slice of all the event's arguments, followed by the time this event was sent. If you intend to get event arguments, you probably should start at 2, since argument 0 is the sender and argument 1 is the event name. The callback should return who the event should be hidden from.