anchor.diff:      }
     }
   
  -  List<Event> _batchedEvents = [];
  +  /**
  +   * Registers a method so that it can start receiving events.
  +   *
  +   * A filter can be provided to determine when the [handler] will
  +   * be called. If the [filter] returns true then the [handler] will
  +   * not be called, otherwise it will be called. If no [filter] is
  +   * provided then the [handler] will always be called upon posting an
  +   * event.
  +   *
  +   * A [priority] can be provided which will specify in what order the handler will be called in.
  +   * The higher a priority is, the quicker it will be called in the handler list when an event is posted.
  +   *
  +   * Returns false if [method] is already registered, otherwise true.
  +   */
  +  bool register(EventHandlerFunction handler, {EventFilter filter, int priority}) {
  +    return filter == null ?
  +      dispatcher.register(handler, priority: priority) :
  +      dispatcher.register(handler, filter: filter, priority: priority);
  +  }
  +
  +  /**
  +   * Gets the next event of the specified [type].
  +   */
  +  Future<dynamic> pollEvent(Type type) {
  +    return events.where((it) => it.runtimeType == type).first;
  +  }
  +
  +  /**
  +   * Unregisters a [handler] from receiving events. If the specific [handler]
  +   * has a filter, it should be provided in order to properly unregister the
  +   * listener. If the specific [handler] has a priority, it should be provided as well.
  +   * Returns whether the [handler] was removed or not.
  +   */
  +  bool unregister(EventHandlerFunction handler, {EventFilter filter, int priority}) {
  +    return filter == null ?
  +      dispatcher.unregister(handler, priority: priority) :
  +      dispatcher.unregister(handler, filter: filter, priority: priority);
  +  }
  +
  +    List<Event> _batchedEvents = [];
   
     @override
     void send(String line, {bool now: false}) {
  
positive.code:   Future<String> getChannelTopic(String channel) {
      var completer = new Completer();
  
      register((TopicEvent event) {
        completer.complete(event.topic);
      }, filter: (TopicEvent event) => event.channel.name != channel, once: true);
  
      send("TOPIC ${channel}");
  
  
negative.code:   Future<WhoisEvent> whois(String user,
        {Duration timeout: const Duration(seconds: 2)}) {
      var completer = new Completer();
      onEvent(WhoisEvent).where((it) => it.nickname == user).first.then((e) {
        completer.complete(e);
      });
      send("WHOIS ${user}");
      return completer.future.timeout(timeout, onTimeout: () => throw new UserNotFoundException(user));
    }
  