Removes mode data for a user and list of channels.

@param string $connectionMask
@param array $channels
@param string $nick
971398
protected function removeUserData($connectionMask, array $channels, $nick)
    {
        $logger = $this->getLogger();
        foreach ($channels as $channel) {
            $logger->debug('Removing user mode data', array(
                'connectionMask' => $connectionMask,
                'channel' => $channel,
                'nick' => $nick,
            ));
            unset($this->modes[$connectionMask][$channel][$nick]);
        }
    }
1050162
async def clear_topic_channel(self, channel):
        """"""
        try:
            if self.topicchannel:
                await client.edit_channel(self.topicchannel, topic="")
        except Exception as e:
            logger.exception(e)

        self.topicchannel = None
        logger.debug("Clearing topic channel")

        data = datatools.get_data()
        data["discord"]["servers"][self.server_id][_data.modulename]["topic_id"] = ""
        datatools.write_data(data)

        await client.send_typing(channel)
        embed = ui_embed.topic_update(channel, self.topicchannel)
        await embed.send()
374357
def delete_channel(data)
      channel = Channel.new(data, self)
      server = channel.server

      # Handle normal and private channels separately
      if server
        @channels.delete(channel.id)
        server.delete_channel(channel.id)
      elsif channel.pm?
        @pm_channels.delete(channel.recipient.id)
      elsif channel.group?
        @channels.delete(channel.id)
      end
    end
442723
def _remove_vlan_from_all_service_profiles(self, handle, vlan_id, ucsm_ip):
        """"""
        service_profile_list = []
        for key, value in six.iteritems(self.ucsm_sp_dict):
            if (ucsm_ip in key) and value:
                service_profile_list.append(value)

        if not service_profile_list:
            # Nothing to do
            return

        try:
            handle.StartTransaction()
            for service_profile in service_profile_list:
                virtio_port_list = (
                    CONF.ml2_cisco_ucsm.ucsms[ucsm_ip].ucsm_virtio_eth_ports)
                eth_port_paths = ["%s%s" % (service_profile, ep)
                    for ep in virtio_port_list]

                # 1. From the Service Profile config, access the
                # configuration for its ports.
                # 2. Check if that Vlan has been configured on each port
                # 3. If Vlan config found, remove it.
                obj = handle.GetManagedObject(
                        None,
                        self.ucsmsdk.LsServer.ClassId(),
                        {self.ucsmsdk.LsServer.DN: service_profile})

                if obj:
                    # Check if this vlan_id has been configured on the
                    # ports in this Service profile
                    for eth_port_path in eth_port_paths:
                        eth = handle.GetManagedObject(
                            obj, self.ucsmsdk.VnicEther.ClassId(),
                            {self.ucsmsdk.VnicEther.DN: eth_port_path},
                            True)
                        if eth:
                            vlan_name = self.make_vlan_name(vlan_id)
                            vlan_path = eth_port_path + "/if-" + vlan_name
                            vlan = handle.GetManagedObject(eth,
                                self.ucsmsdk.VnicEtherIf.ClassId(),
                                {self.ucsmsdk.VnicEtherIf.DN: vlan_path})
                            if vlan:
                                # Found vlan config. Now remove it.
                                handle.RemoveManagedObject(vlan)
            handle.CompleteTransaction()

        except Exception as e:
            # Raise a Neutron exception. Include a description of
            # the original  exception.
            raise cexc.UcsmConfigDeleteFailed(config=vlan_id,
                                              ucsm_ip=ucsm_ip,
                                              exc=e)
33339
function removeConnection(conn) {

  this.emit('disconnect');

  conn.removeAllListeners('input');
  conn.removeAllListeners('output');

  // clean channel subscriptions
  if(conn.client.pubsub) {
    // must slice channels ref
    this._pubsub.unsubscribe(
      conn, conn.client.pubsub.channels.slice(0));
  }

  // clean pattern subscriptions
  // client.pubsub can be null after
  // removing channel subscriptions
  if(conn.client.pubsub) {
    // must slice patterns ref
    this._pubsub.punsubscribe(
      conn, conn.client.pubsub.patterns.slice(0));
  }

  var ind = this._conn.indexOf(conn);
  // remove the connection reference
  // the server disconnect listener is once
  // so we should always have a valid
  // index into the array
  this._conn.splice(ind, 1);
}
425226
private void purgeChannel(MessageChannel channel) {
        if (channel instanceof QueueChannel) {
            List<Message<?>> messages = ((QueueChannel)channel).purge(messageSelector);
            
            if (log.isDebugEnabled()) {
                log.debug("Purged channel " + ((QueueChannel)channel).getComponentName() + " - removed " + messages.size() + " messages");
            }
        }
    }
114624
function unsubscribe(conn, channels) {
  return this.doUnsubscribe(
    PUBSUB.UNSUBSCRIBE,
    PUBSUB.CHANNELS,
    this._channels, conn, channels);
}
285099
public function removeChannel(\CampaignChain\CoreBundle\Entity\Channel $channels)
    {
        $this->channels->removeElement($channels);
    }
77845
def channels_delete(self, room_id=None, channel=None, **kwargs):
        """"""
        if room_id:
            return self.__call_api_post('channels.delete', roomId=room_id, kwargs=kwargs)
        elif channel:
            return self.__call_api_post('channels.delete', roomName=channel, kwargs=kwargs)
        else:
            raise RocketMissingParamException('roomId or channel required')
586282
def part(self, channel):
        
        
        if channel in self.channels:
            channel.users.remove(self.nick)
            self.channels.remove(channel)
587272
private void freeChannels() {
        for (ChannelInfo info : channels.values()) {
            freePacket(info.getReadPacket());
            freePacket(info.getWritePacket());
        }
        channels.clear();
    }
716279
protected function updateUser($nick, $ident, $host)
    {
        $collator   = $this->connection->getCollator();
        $normNick   = $collator->normalizeNick($nick);
        $key        = array_search($normNick, $this->nicks);
        if ($key === false) {
            $key = $this->sequence++;
            $this->nicks[$key] = $normNick;
        }

        if (isset($this->ial[$key]['TIMER'])) {
            $this->removeTimer($this->ial[$key]['TIMER']);
        }

        if (!isset($this->ial[$key]) || $this->ial[$key]['ident'] === null) {
            $this->ial[$key] = array(
                'nick'  => $nick,
                'ident' => $ident,
                'host'  => $host,
                'ison'  => true,
                'TIMER' => null,
            );
            return;
        }

        if ($ident !== null) {
            if ($this->ial[$key]['ident'] != $ident ||
                $this->ial[$key]['host'] != $host) {
                unset($this->nicks[$key]);
                unset($this->ial[$key]);
                $key = $this->sequence++;
                $this->nicks[$key] = $normNick;
            }

            $this->ial[$key] = array(
                'nick'  => $nick,
                'ident' => $ident,
                'host'  => $host,
                'ison'  => true,
                'TIMER' => null,
            );
        }
    }
493094
def quit(self):
        
        
        for c in self.channels:
            c.users.remove(self.nick)
        self.channels = []
870887
private function releaseToChannel(ConnectionInterface $connection)
    {
        $stats     = $this->channel->stats();
        $maxActive = $this->poolConfig->getMaxActive();
        if ($stats['queue_num'] < $maxActive) {
            $this->channel->push($connection);
        }
    }
476982
public function removeConnection(Connection $connection): void
    {
        $socket = $connection->getSocket();

        if ($socket->getResource()) {
            $index = $socket->getResourceId();
        } else {
            $index = array_search($connection, $this->connections);
        }

        if (!$index) {
            $this->logger->warning('Could not remove connection: not found');
        }

        unset($this->connections[$index]);
        unset($this->resources[$index]);

        $this->server->notify(
            Server::EVENT_SOCKET_DISCONNECT,
            [$connection->getSocket(), $connection]
        );
    }
990032
public function removeById($connectionID)
    {
        if (isset($this->pool[$connectionID])) {
            unset(
                $this->pool[$connectionID],
                $this->slotsMap
            );

            return true;
        }

        return false;
    }
50464
def _remove(client)
      return unless @clients.include? client
      channel = @clients.delete(client)
      debug { "Removing #{client} from #{channel}." }
      @channels[channel] -= 1
      @channels.delete(channel) if @channels[channel].zero?
    end