<commit_before>class ValidateMinecraftLoginAndNotHackedValidator < ActiveModel::EachValidator
  def validate_each(record, attribute, value)
    if !value.nil?
      # Check using minecraft's server stuff
      # http://www.minecraft.net/haspaid.jsp?user=#{USERNAME}
      require "open-uri"
      begin
        haspaid = open("http://www.minecraft.net/haspaid.jsp?user=#{value}").read
        if haspaid != "true"
          record.errors[attribute] << "Apparently the user '#{value}' doesn't have paid his minecraft copy, sorry."
        end
      rescue
        record.errors[attribute] << "Can't get response from minecraft.net, contact NuxWS admin"
      end
    end
  end
end<commit_msg>no more www, wtf mojang<commit_after>class ValidateMinecraftLoginAndNotHackedValidator < ActiveModel::EachValidator
  def validate_each(record, attribute, value)
    if !value.nil?
      # Check using minecraft's server stuff
      # http://www.minecraft.net/haspaid.jsp?user=#{USERNAME}
      require "open-uri"
      begin
        haspaid = open("http://minecraft.net/haspaid.jsp?user=#{value}").read
        if haspaid != "true"
          record.errors[attribute] << "Apparently the user '#{value}' doesn't have paid his minecraft copy, sorry."
        end
      rescue
        record.errors[attribute] << "Can't get response from minecraft.net, contact NuxWS admin"
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.11239193083573487, 'fraction_numerical': 0.0, 'mean_word_length': 3.158682634730539, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '139040', 'n_tokens_mistral': 407, 'n_tokens_neox': 406, 'n_words': 103}