From 0142f6859f0192bd9bd1d7808f1822cda6d3f516 Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Thu, 19 Oct 2017 16:29:35 +0700 Subject: [PATCH] nick fix --- questbook.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]