Method code for $event_handler.hook_events()

[Turn off line numbering]
  1: arg type;
  2: var status, source, event, l, all;
  3: 
  4: if (events && events.contains(type)) {
  5:     all = events[type];
  6:     events = events.del(type);
  7:     l = .location();
  8:     for event in (all) {
  9:         [event, [status, source]] = event;
 10:         switch (source) {
 11:             case 'location:
 12:                 l.hook_into_event(event);
 13:             case 'this:
 14:                 .hook_into_event(event);
 15:             default:
 16:                 source.hook_into_event(event);
 17:         }
 18:         all = all.add(event, [1, source]);
 19:     }
 20:     events = events.add(type, all);
 21: }

// Created 17-Dec-1996 as a part of ColdCore, see: @help Credit

Tlon