Difference between revisions of "Logon"

From Bebot Wiki 2
Jump to navigationJump to search
 
(One intermediate revision by the same user not shown)
Line 11: Line 11:
 
  notify($name)
 
  notify($name)
 
$name is the name of the newly logged in character. Any further actions for the character have to be taken here.
 
$name is the name of the newly logged in character. Any further actions for the character have to be taken here.
 +
 +
====== Settings ======
 +
You can edit the settings by doing :
 +
!settings Logon_notifies
 +
 +
Enabled: Are notifies on logon enabled or disabled?
 +
 +
Notify_Delay: How many seconds should be waited after logon of a buddy till any notifies are sent to him?
 +
 +
Startup_Delay: How many seconds should be waited after startup before bot starts firing its notifcations?

Latest revision as of 19:40, 1 April 2023

Introduction[edit]

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[edit]

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)[edit]

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.

Settings[edit]

You can edit the settings by doing :

!settings Logon_notifies

Enabled: Are notifies on logon enabled or disabled?

Notify_Delay: How many seconds should be waited after logon of a buddy till any notifies are sent to him?

Startup_Delay: How many seconds should be waited after startup before bot starts firing its notifcations?