Write onHandleConnect function for creating a connection to IRC