def create_channel(data)
      channel = Channel.new(data, self)
      server = channel.server

      # Handle normal and private channels separately
      if server
        server.add_channel(channel)
        @channels[channel.id] = channel
      elsif channel.pm?
        @pm_channels[channel.recipient.id] = channel
      elsif channel.group?
        @channels[channel.id] = channel
      end
    end
def create_channel(data)
      channel = Channel.new(data, self)
      server = channel.server

      # Handle normal and private channels separately
      if server
        server.add_channel(channel)
        @channels[channel.id] = channel
      elsif channel.pm?
        @pm_channels[channel.recipient.id] = channel
      elsif channel.group?
        @channels[channel.id] = channel
      end
    end
Internal handler for CHANNEL_CREATE