server event system and event macros