def parse(message)
      puts "<< #{message.to_s.strip}"
      words = message.split(" ")
      sender = words[0]
      raw = words[1]
      channel = words[2]
      # Handling pings
      if /^PING (.*?)\s$/.match(message)
        response("PONG #{$1}")
      # Handling raws
      elsif /\d+/.match(raw)
        send("handle_#{raw}", message) if raws_to_handle.include?(raw)
      # Privmsgs
      elsif raw == "PRIVMSG"
        message = words[3..-1].clean
        # Parse commands
        if /^!(\w+)\s*(.*)/.match(message) && respond_to?("#{$1}_command")
          try("#{$1}_command", parse_sender(sender), channel, $2)
        # Plain and boring message
        else
          sender = parse_sender(sender)
          method, channel = channel == me ? [:private_message, sender[:nick]]  : [:channel_message, channel]
          try(method, sender, channel, message)
        end
      # Joins
      elsif raw == "JOIN"
        try(:join_event, parse_sender(sender), channel)
      elsif raw == "PART"
        try(:part_event, parse_sender(sender), channel, words[3..-1].clean)
      elsif raw == "QUIT"
        try(:quit_event, parse_sender(sender), words[2..-1].clean)
      elsif raw == "KICK"
        try(:kick_event, parse_sender(sender), channel, words[3], words[4..-1].clean)
        join(channel) if words[3] == me && config[:auto_rejoin]
      elsif raw == "MODE"
        try(:mode_event, parse_sender(sender), channel, words[3], words[4..-1].clean)
      end

    end
def parse(message)
      puts "<< #{message.to_s.strip}"
      words = message.split(" ")
      sender = words[0]
      raw = words[1]
      channel = words[2]
      # Handling pings
      if /^PING (.*?)\s$/.match(message)
        response("PONG #{$1}")
      # Handling raws
      elsif /\d+/.match(raw)
        send("handle_#{raw}", message) if raws_to_handle.include?(raw)
      # Privmsgs
      elsif raw == "PRIVMSG"
        message = words[3..-1].clean
        # Parse commands
        if /^!(\w+)\s*(.*)/.match(message) && respond_to?("#{$1}_command")
          try("#{$1}_command", parse_sender(sender), channel, $2)
        # Plain and boring message
        else
          sender = parse_sender(sender)
          method, channel = channel == me ? [:private_message, sender[:nick]]  : [:channel_message, channel]
          try(method, sender, channel, message)
        end
      # Joins
      elsif raw == "JOIN"
        try(:join_event, parse_sender(sender), channel)
      elsif raw == "PART"
        try(:part_event, parse_sender(sender), channel, words[3..-1].clean)
      elsif raw == "QUIT"
        try(:quit_event, parse_sender(sender), words[2..-1].clean)
      elsif raw == "KICK"
        try(:kick_event, parse_sender(sender), channel, words[3], words[4..-1].clean)
        join(channel) if words[3] == me && config[:auto_rejoin]
      elsif raw == "MODE"
        try(:mode_event, parse_sender(sender), channel, words[3], words[4..-1].clean)
      end

    end
What did they say?