<commit_before>class NickServ
  include Cinch::Plugin

  listen_to :connect, method: :identify
  match /nsregister (.+) (.+)/, method: :register
  match /nsverify (.+)/, method: :verify

  def identify(_m)
    unless CONFIG['nickservpass'].nil? || CONFIG['nickservpass'] == ''
      User('NickServ').send("identify #{CONFIG['nickservpass']}")
    end
  end

  def register(m, pass, email)
    if m.user.host == CONFIG['ownerhost']
      User('NickServ').send("register #{pass} #{email}")
      CONFIG['nickservpass'] = pass.to_s
      File.open('config.yaml', 'w') { |f| f.write CONFIG.to_yaml }
      m.reply 'I sent verification to nickserv. It might need to verify the email. In that case, type `!nsverify [code]` to verify it. Otherwise, the password has been logged into the config and it will auto-authenticate on startup!'
    else
      m.reply 'You are not permitted to do this action!'
    end
  end

  def verify(m, code)
    if m.user.host == CONFIG['ownerhost']
      User('NickServ').send("verify register #{CONFIG['nickname']} #{code}")
      m.reply 'Hey! NickServ verified!'<commit_msg>why is everything all of a sudden on one line<commit_after>class NickServ
  include Cinch::Plugin

  listen_to :connect, method: :identify
  match /nsregister (.+) (.+)/, method: :register
  match /nsverify (.+)/, method: :verify

  def identify(_m)
    User('NickServ').send("identify #{CONFIG['nickservpass']}") unless CONFIG['nickservpass'].nil? || CONFIG['nickservpass'] == ''
  end

  def register(m, pass, email)
    if m.user.host == CONFIG['ownerhost']
      User('NickServ').send("register #{pass} #{email}")
      CONFIG['nickservpass'] = pass.to_s
      File.open('config.yaml', 'w') { |f| f.write CONFIG.to_yaml }
      m.reply 'I sent verification to nickserv. It might need to verify the email. In that case, type `!nsverify [code]` to verify it. Otherwise, the password has been logged into the config and it will auto-authenticate on startup!'
    else
      m.reply 'You are not permitted to do this action!'
    end
  end

  def verify(m, code)
    if m.user.host == CONFIG['ownerhost']
      User('NickServ').send("verify register #{CONFIG['nickname']} #{code}")
      m.reply 'Hey! NickServ verified!'
{'fraction_non_alphanumeric': 0.15017985611510792, 'fraction_numerical': 0.0, 'mean_word_length': 3.723991507430998, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '615172', 'n_tokens_mistral': 693, 'n_tokens_neox': 684, 'n_words': 217}