Difference between revisions of "Logon"
Line 5: | Line 5: | ||
If a module wants to use notifies to user logging in via this module it has to register it in the constructor. To do this it has to call | If a module wants to use notifies to user logging in via this module it has to register it in the constructor. To do this it has to call | ||
+ | |||
$this → bot → logon_notifies → register($this) | $this → bot → logon_notifies → register($this) | ||
− | + | ||
+ | Every time a buddy logs in the module gets now notified via it's notify() function after the defined delay. | ||
Function notify($name) | Function notify($name) | ||
Any module using the central notifies has to implement the function notify($name). $name is the name of the newly logged in character. Any further actions for the character have to be taken here. | Any module using the central notifies has to implement the function notify($name). $name is the name of the newly logged in character. Any further actions for the character have to be taken here. |
Revision as of 18:17, 21 September 2021
Introduction
The Logon Notifies core module offers a central place to handle logon notifies for guests or members on the buddy list. To prevent instant spamming it offers a custom-definable delay to the notifications to the modules. How to register for notifies
If a module wants to use notifies to user logging in via this module it has to register it in the constructor. To do this it has to call
$this → bot → logon_notifies → register($this)
Every time a buddy logs in the module gets now notified via it's notify() function after the defined delay. Function notify($name)
Any module using the central notifies has to implement the function notify($name). $name is the name of the newly logged in character. Any further actions for the character have to be taken here.