What you have is the function
OnEvent_Initialize(MessengerStart) where your script is in. You can add more event functions which will execute on a specific event, like when you send a message or change your status.
For all available events, please read the Events Reference in the Scripting Documentation.