<commit_before>require 'cinch'
require 'hipchat'

unless ENV.has_key?('HIPCHAT_API_TOKEN')
  abort 'Set HIPCHAT_API_TOKEN environment variable with your HipChat API Token: https://hipchat.com/account/api'
end

$hc_room = 'AppNetaIRCLog'
$hipchat_cli = HipChat::Client.new(ENV['HIPCHAT_API_TOKEN'], :api_version => 'v2')

bot = Cinch::Bot.new do
  configure do |c|
    c.nick     = 'irc2hipchat'
    c.server   = 'irc.freenode.org'
    c.channels = ["#appneta"]
  end

  # Only log channel messages
  on :channel do |m|
    msg = "<b>#{m.user.nick}</b>: #{m.message}"
    $hipchat_cli[$hc_room].send('irc2hipchat', msg, { :notify => true, :color => 'green', :message_format => 'html' })
  end
end

bot.start
<commit_msg>Use <em> instead of <b> since it's 2014.<commit_after>require 'cinch'
require 'hipchat'

unless ENV.has_key?('HIPCHAT_API_TOKEN')
  abort 'Set HIPCHAT_API_TOKEN environment variable with your HipChat API Token: https://hipchat.com/account/api'
end

$hc_room = 'AppNetaIRCLog'
$hipchat_cli = HipChat::Client.new(ENV['HIPCHAT_API_TOKEN'], :api_version => 'v2')

bot = Cinch::Bot.new do
  configure do |c|
    c.nick     = 'irc2hipchat'
    c.server   = 'irc.freenode.org'
    c.channels = ["#appneta"]
  end

  # Only log channel messages
  on :channel do |m|
    msg = "<em>#{m.user.nick}</em>: #{m.message}"
    $hipchat_cli[$hc_room].send('irc2hipchat', msg, { :notify => true, :color => 'green', :message_format => 'html' })
  end
end

bot.start

{'fraction_non_alphanumeric': 0.16359918200409, 'fraction_numerical': 0.006816632583503749, 'mean_word_length': 4.261648745519714, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, 'https://': 2, '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': '3340314', 'n_tokens_mistral': 582, 'n_tokens_neox': 572, 'n_words': 125}