<commit_before>on :message, /.+/ do |message|
  @bot.localize!
  channel = message.channel
  irc_user = message.user

  if channel && irc_user
    @bot.history[channel.name] ||= FixedQueue.new(20)
    @bot.history[channel.name].add({:date => Time.zone.now, :text => message.message, :nick => irc_user.nick})

    user = Channel.get_user(channel.name, irc_user.nick)
    case message.events
    when [:channel, :message]
      user.add_message(message.message)
    when [:private, :message]
      user.add_message(message.message)
    when [:ctcp, :private, :message]
    when [:ctcp, :channel, :message]
    end
  end
end

on :join do |message|
  Channel.get_user(message.channel.name, message.user.nick)
end

on :quit do |message|
  @bot.localize!
  User.set({:nick => message.user.nick.downcase}, {:last_seen_at => Time.zone.now, :last_quit_message => message.message})
end<commit_msg>keep more lines in the history<commit_after>on :message, /.+/ do |message|
  @bot.localize!
  channel = message.channel
  irc_user = message.user

  if channel && irc_user
    @bot.history[channel.name] ||= FixedQueue.new(50)
    @bot.history[channel.name].add({:date => Time.zone.now, :text => message.message, :nick => irc_user.nick})

    user = Channel.get_user(channel.name, irc_user.nick)
    case message.events
    when [:channel, :message]
      user.add_message(message.message)
    when [:private, :message]
      user.add_message(message.message)
    when [:ctcp, :private, :message]
    when [:ctcp, :channel, :message]
    end
  end
end

on :join do |message|
  Channel.get_user(message.channel.name, message.user.nick)
end

on :quit do |message|
  @bot.localize!
  User.set({:nick => message.user.nick.downcase}, {:last_seen_at => Time.zone.now, :last_quit_message => message.message})
end

{'fraction_non_alphanumeric': 0.15290178571428573, 'fraction_numerical': 0.002232142857142857, 'mean_word_length': 3.9123287671232876, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '3346452', 'n_tokens_mistral': 645, 'n_tokens_neox': 626, 'n_words': 130}