-
Notifications
You must be signed in to change notification settings - Fork 0
dev:Event
Väinämö Łūmikērø edited this page Feb 2, 2017
·
4 revisions
Events are fired by the server or the client when a specific action happened. Events are handled by Event Listeners.
-
Event.ChannelClosed
Fired when a channel gets closed. -
Event.ChannelCreated
Fired when a channel gets created. -
Event.ClientBalanceChanged
Fired when the balance of a client changes. -
Event.ClientChannelChanged
Fired when a client changes a channel. -
Event.ClientConnect
Fired before a client connects. -
Event.ClientConnected
Fired when a client connected. -
Event.ClientDisconnected
Fired when a client disconnected. -
Event.ClientMessageReceived
Fired when a client sends a message. -
Event.ClientRankChanged
Fired when the rank of a client changes. -
Event.ConnectionEstablished
Fired when the server established a new connection. -
Event.ConsoleInputReceived
Fired when the server registered a console input. -
Event.Dynamic
Fired when external events are invoked. Read more about Dynamic Events. -
Event.PunishmentExceeded
Fired when a punishment exceeded. -
Event.PunishmentRecorded
Fired when a new punishment is recorded. -
Event.ServerStarted
Fired when the server started. -
Event.ServerStopped
Fired when the server stopped.
Events contain additional information about what has happened. This information is submitted to the extension via parameters to the delegate.
In order for your event handler to work correctly, your delegate signature has to be correct.
Event | Delegate Signature | Parameters |
---|---|---|
ChannelClosed |
delegate void OnChannelClosed(string id); |
id: Id of the closed channel. |
ChannelCreated |
delegate void OnChannelCreated(string id); |
id: Id of the created channel. |
ClientBalanceChanged |
delegate void OnClientBalanceChanged(string id, long balance); |
id: Id of the client. balance: Balance of the client. |
ChannelChannelChanged |
delegate void OnClientChannelChanged(string accountId, string channelId); |
accountId: Id of the client. channelId: Id of the channel. |
ClientConnect |
delegate void OnClientConnect(string address, string id, string parameters); |
address: IP address of the client. id: Id of the client. parameters: Connect parameters. |
ClientConnected |
delegate void OnClientConnected(string id); |
id: Id of the client. |
ClientDisconnected |
delegate void OnClientDisconnected(string id); |
id: Id of the client. |
ClientMessageReceived |
delegate void OnClientMessageReceived(string id, string content); |
id: Id of the client. content: Content of the message. |
ClientRankChanged |
delegate void OnClientRankChanged(string accountId, string rankId); |
accountId: Id of the client. rankId: Id of the new rank. |
ConnectionEstablished |
delegate void OnConnectionEstablished(string address, string id, string parameters, string password); |
address: IP address of the client. id: Id of the client. parameters: Connect parameters. password: Encrypted password. |
ConsoleInputReceived |
delegate void OnConsoleInputReceived(string input); |
input: Input from the console. |
Dynamic |
delegate void OnServerDynamicEvent(EventArguments e); delegate void OnClientDynamicEvent(EventArguments e);
|
e: [[Event Arguments |
PunishmentExceeded |
delegate void OnPunishmentExceeded(Punishment punishment); |
punishment: Exceeded punishment. |
PunishmentRecorded |
delegate void OnPunishmentRecorded(Punishment punishment); |
punishment: Recorded punishment. |
ServerStarted |
delegate void OnServerStarted(string address); |
address: IP address and port of the server. |
ServerStopped |
delegate void OnServerStopped(); |
None |