Method code for $event_handler.hook_events()

[Turn on line numbering]
arg type;
var status, source, event, l, all;

if (events && events.contains(type)) {
    all = events[type];
    events = events.del(type);
    l = .location();
    for event in (all) {
        [event, [status, source]] = event;
        switch (source) {
            case 'location:
                l.hook_into_event(event);
            case 'this:
                .hook_into_event(event);
            default:
                source.hook_into_event(event);
        }
        all = all.add(event, [1, source]);
    }
    events = events.add(type, all);
}

["// Created 16-Dec-1996 as a part of ColdCore, see: @help Credit"]

the Cold Dark