/* BroadcastEvent Server - DMS - February 2003 - by Arkeon & Bob Le Gob */ typeof lClis = [CLIENT r1];; fun cbBroadcastEvent(cli, p)= _DMSevent this cli "output" p nil;; fun cbCliDestroyed(cli)= set lClis = remove_from_list lClis cli; 0;; fun cbActivate (from, cli, action, param, reply)= if !strcmp action "register" then ( set lClis = cli::lClis; 0; ) else if !strcmp action "unregister" then ( set lClis = remove_from_list lClis cli; 0; ) else if !strcmp action "input" then ( apply_on_list lClis @cbBroadcastEvent param; 0; ) else nil;; fun IniDMI (file)= set lClis = nil; _DMSregisterDMI this @cbActivate @cbCliDestroyed nil nil; 0;;