diff --git a/questbook.rb b/questbook.rb index 90c3487..efdb98b 100644 --- a/questbook.rb +++ b/questbook.rb @@ -45,11 +45,11 @@ class QuestBook if msg[1] != '' then print = true end + color = Digest::MD5.hexdigest(msg[1]).to_i(16) % 14 + 2 + who = "[\x03#{color}#{msg[1]}\x0f]" msg = msg[2] a = Nokogiri::HTML.parse msg msg = a.text - color = Digest::MD5.hexdigest(msg[1]).to_i(16) % 14 + 2 - who = "[\x03#{color}#{msg[1]}\x0f]" if msg[2] != @last and print then Channel('#questbook').send("#{who}: #{msg}") @last = msg[2]