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
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
Internal handler for CHANNEL_DELETE