[][src]Function hexchat::add_server_event_listener

pub fn add_server_event_listener<T>(
    priority: Priority,
    function: impl Fn(T, DateTime<Utc>) -> EatMode + 'static
) -> ServerEventListener where
    T: ServerEvent

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

Returns a corresponding object suitable for passing to remove_server_event_listener.

Callback

The callback's signature is the event itself, followed by the time this event was sent. The callback should return who the event should be hidden from.