Use the help file: "on connect" , you can also look on "on notice", dont have time to write somthing now, but not that hard to do.