Removes user mode data that's no longer needed.

@param \Phergie\Irc\Event\EventInterface $event
@param \Phergie\Irc\Bot\React\EventQueueInterface $queue
350769
public function removeUser(UserEventInterface $event, EventQueueInterface $queue)
    {
        $logger = $this->getLogger();
        $logger->debug('Removing user from all channels');
        $connectionMask = $this->getConnectionMask($event->getConnection());
        if (isset($this->modes[$connectionMask])) {
            $this->removeUserData(
                $connectionMask,
                array_keys($this->modes[$connectionMask]),
                $event->getNick()
            );
        }
    }
917320
public function forget(Event $event)
    {
        $this->cache->store($this->store)->forget($event->mutexName());
    }
448207
@Inject
    public void setQueue(EventQueue queue) {
        if (epi == null) {
            MessageToEventMapper mapper = new MessageToEventMapper();
            mapper.setMaxContentLength(maxContentLength);

            epi = new EventProducerInterceptor(mapper, queue);
        }
    }
740403
public function deleteImage(EventInterface $event) {
        $request = $event->getRequest();
        $event->getStorage()->delete($request->getUser(), $request->getImageIdentifier());
    }
625799
public function onPartChannels(UserEventInterface $event, EventQueueInterface $queue)
    {
        $this->joinOnMatch($event->getNick(), $event, $queue);
    }
17777
public function onKickChannels(UserEventInterface $event, EventQueueInterface $queue)
    {
        $this->joinOnMatch($event->getParams()['user'], $event, $queue);
    }
1276405
private void purgeQueue(String queueName, Session session) throws JMSException {
        purgeDestination(getDestination(session, queueName), session, queueName);
    }
968793
public function handleNoticeCommand(Event $event, Queue $queue)
    {
        $params = $event->getCustomParams();
        if (count($params) < 2) {
            $this->handleNoticeHelp($event, $queue);
        } else {
            $channels = array_shift($params);
            $queue->ircNotice($channels, implode(' ', $params));
        }
    }
1268146
public function helpCommand(CommandEventInterface $event, EventQueueInterface $queue)
    {
        $command = strpos($event->getCustomCommand(), '.help') !== false
            ? substr($event->getCustomCommand(), 0, -5)
            : $event->getCustomParams()[0];
        $this->helpMessages([ $queue, 'irc'.$event->getCommand() ], $event->getSource(), $command);
    }
479086
public function deleteReserved($queue, $id)
    {
        $this->database->trans_begin();

        if ($this->getQueryBuilder()->from($this->table)->lockForUpdate()->find($id)) {
            $this->getQueryBuilder()->from($this->table)->where('id', $id)->delete();
        }

        $this->database->trans_commit();
    }
482165
public function handleGhost(ServerEvent $event, Queue $queue)
    {
        if ($this->ghostNick === null) {
            return;
        }

        // Attempt to kill the ghost connection
        $queue->ircPrivmsg($this->botNick, 'GHOST ' . $this->ghostNick . ' ' . $this->password);
    }
54848
void cleanupQueue(SubscriptionImpl subscription, Queue<Object> queue) {
        final Throwable cause = ClosedPublisherException.get();
        for (;;) {
            final Object e = queue.poll();
            if (e == null) {
                break;
            }

            try {
                if (e instanceof CloseEvent) {
                    notifySubscriberOfCloseEvent(subscription, (CloseEvent) e);
                    continue;
                }

                if (e instanceof CompletableFuture) {
                    ((CompletableFuture<?>) e).completeExceptionally(cause);
                }

                @SuppressWarnings("unchecked")
                final T obj = (T) e;
                onRemoval(obj);
            } finally {
                ReferenceCountUtil.safeRelease(e);
            }
        }
    }
1248271
public function removeEventListener($event, $listener){
     if (!$this->events[$event]) return $this;
   

    $indexOf = 0;
    foreach ($this->Iterator('Array') as $EventListener) {
       if($EventListener === $listener)	{
         array_splice($this->events[$event], $indexOf, 1);	   	
         $indexOf--;
	   }
         $indexOf++;
    }
    return $this; 	
  }
546746
public function deleteReserved($queue, $job)
	{
		$this->redis->zrem($this->getQueue($queue).':reserved', $job);
	}
756298
private void purgeQueue(Queue queue, Session session) throws JMSException {
        purgeDestination(queue, session, queue.getQueueName());
    }
821996
public function remove(EventInterface $event)
    {
        foreach ($this->events as $key => $internalEvent) {
            if ($event->getUid() === $internalEvent->getUid()) {
                unset($this->events[$key]);
            }
        }
    }
259590
public static function busy(&$queue){

        self::$_busy_event_buffer_counter ++;
        self::$_last_busy_ts = time();

        self::_buffer($queue);
    }