Skip to content
This repository was archived by the owner on Aug 13, 2023. It is now read-only.

Events list

NanoSector edited this page May 20, 2017 · 5 revisions

Events

Below is a list of events you may listen on.

General notes:

  • User refers to an instance of \WildPHP\Core\Users\User
  • Channel refers to an instance of \WildPHP\Core\Channels\Channel
  • Queue refers to an instance of \WildPHP\Core\Connection\Queue
  • Any IRC message has the respective class in \WildPHP\Core\Connection\IRCMessages.

This list is sorted alphabetically based on the class they are emitted in.

WildPHP\Core\Channels\ChannelStateManager

user.join

Introduced in: WildPHP 3.0 Beta 1

Parameters passed:

  1. User $user
  2. Channel $channel
  3. Queue $queue

Emits when a User joins the specified Channel.

WildPHP\Core\Commands\CommandHandler

irc.command

Introduced in: WildPHP 3.0 Beta 1

Parameters passed:

  1. string $command
  2. Channel $source
  3. User $user
  4. array $args
  5. ComponentContainer $container

Emits when a command is called by a user. This event does NOT mean that a command was executed, just that one was found.

WildPHP\Core\Connection\CapabilityHandler

irc.cap.acknowledged

Introduced in: WildPHP 3.0 Beta 1

Parameters passed:

  1. array $acknowledgedCapabilities
  2. Queue $queue

Emits when one or more capabilities have been acknowledged by the server.

irc.cap.end

Introduced in: WildPHP 3.0 Beta 1

Parameters passed: none

Called when capability negotiation has ended (CAP END was sent).

irc.cap.ls

**Introduced in:_ WildPHP 3.0 Beta 1

Parameters passed:

  1. array $capabilities
  2. Queue $queue

Emits when the list of available capabilities has been received from the server.

irc.cap.ls.after

**Introduced in:_ WildPHP 3.0 Beta 1

Parameters passed: 2. Queue $queue

Emits after the list of available capabilities has been updated.

irc.cap.notAcknowledged

Introduced in: WildPHP 3.0 Beta 1

Parameters passed:

  1. array $notAcknowledgedCapabilities
  2. Queue $queue

Emits after one or more capabilities have NOT been acknowledged by the server.

WildPHP\Core\Connection\IrcConnection

irc.line.out

Introduced in: WildPHP 3.0 Beta 1

Parameters passed:

  1. QueueItem $item
  2. ComponentContainer $container

Emits after the QueueItem is added to the Queue (e.g. a message is sent)

stream.line.in

Introduced in: WildPHP 3.0 Beta 1

Parameters passed:

  1. string $line

Emits after a full (and probably consumable) line of data is received. This event MUST NOT be used to listen for incoming IRC data (use irc.line.in instead).

stream.created

Introduced in: WildPHP 3.0 Beta 1

Parameters passed:

  1. Queue $queue

Emits after the connection is set up.

stream.data.in

Introduced in: WildPHP 3.0 Beta 1

Parameters passed:

  1. string $data

Emits after data has been received from the socket. This event MUST NOT be used to listen for incoming IRC data (use irc.line.in instead).

stream.data.out

Introduced in: WildPHP 3.0 Beta 1

Parameters passed:

  1. string $data

Emits after data has been sent to the socket.

stream.closed

Introduced in: WildPHP 3.0 Beta 1

Parameters passed: none

Emits after the socket has been closed.

WildPHP\Core\Connection\Parser

irc.line.in

Introduced in: WildPHP 3.0 Beta 1

Parameters passed:

  1. IncomingIrcMessage $ircMessage
  2. Queue $queue

Emits after data has been received and parsed into an instance of IncomingIrcMessage.

irc.line.in.{message verb}

Introduced in: WildPHP 3.0 Beta 1

Parameters passed:

  1. {message verb} $ircMessage
  2. Queue $queue

Emits after data has been received and parsed, but emits only on a specific verb. For example, when listening for PRIVMSG messages, one can listen to irc.line.in.privmsg.

When a specialized message class cannot be found in WildPHP\Core\Connection\IRCMessages, this event carries an instance of IncomingIrcMessage instead.

WildPHP\Core\Connection\PingPongHandler

irc.force.close

Introduced in: WildPHP 3.0 Beta 1

Parameters passed: none

Emits after the connection timeout has been reached and the connection should be forcibly closed.

WildPHP\Core\Connection\SASL

irc.sasl.complete

Introduced in: WildPHP 3.0 Beta 1

Parameters passed:

  1. array $array
  2. Queue $queue

The first parameter is an array to maintain compatibility with the CapabilityHandler class.

Emits after SASL authentication has passed and authentication was successful.

irc.sasl.error

Introduced in: WildPHP 3.0 Beta 1

Parameters passed: none

Emits after SASL authentication was NOT successful (an error occurred).

WildPHP\Core\Users\UserStateManager

user.account.changed

Introduced in: WildPHP 3.0 Beta 1

Parameters passed:

  1. User $user
  2. Queue $queue

Emits when the user details have been updated for the specified user.

user.host

Introduced in: WildPHP 3.0 Beta 1

Parameters passed:

  1. User $user
  2. string $newUsername
  3. string $newHostname
  4. Queue $queue

user.mode

Introduced in: WildPHP 3.0 Beta 1

Parameters passed: 2. string $mode 3. User $user 4. Queue $queue

Emits when the mode is changed for a user.

user.mode.channel

Introduced in: WildPHP 3.0 Beta 1

Parameters passed:

  1. Channel $channel
  2. string $mode
  3. User $user
  4. Queue $queue

Emits when the mode is changed for a user in a channel.

user.nick

Introduced in: WildPHP 3.0 Beta 1

Parameters passed:

  1. User $user
  2. string $oldNickname
  3. string $newNickname
  4. Queue $queue

Emits when the nickname has been changed from $oldNickname to $newNickname for the specified user.

user.quit

Introduced in: WildPHP 3.0 Beta 1

Parameters passed:

  1. User $user
  2. Queue $queue

Emits when the specified user has quit from the server.

Clone this wiki locally