<?PHP
/******************************************************************************
 @Author:     Björn Brockmann, Paul Eppner (paul@twomoons.de)
			      Sven Bräutigam, Jürgen Brändle
 @Homepage    http://www.der-dirigent.de
******************************************************************************/

class dedi_event {
	var $events = array();

	function dedi_event($val_ct) {
		$this -> events = $val_ct -> get_by_group('events');
	}

	function fire($event, $args) {
		global $db, $dedi_db, $client, $lang, $perm, $sess, $cfg_client, $cfg_dedi;
        if (is_array($this -> events[$event]['actions'])) {
			foreach($this -> events[$event]['actions'] as $eventvalue) eval($eventvalue);
		} elseif (is_array($this -> events['standard']['actions'])) {
			$standard[] = $event;
            if (is_array($args)) foreach ($args as $key => $val) $standard[] = $val;
            foreach($this -> events['standard']['actions'] as $eventvalue) eval($eventvalue);
		}
	}
}
?>