lib/protonbot/titler/plugin.rb in protonbot-titler-0.1.4 vs lib/protonbot/titler/plugin.rb in protonbot-titler-0.1.5

- old
+ new

@@ -36,13 +36,19 @@ dat.reply(pattern .gsub(':NICK', dat[:nick]) .gsub(':URLNUM', (k+1).to_s) .gsub(':OUT', "%C%GREEN\u200B" + html.title.strip.gsub(/\n/, ' ') + '%N')) else + contenttype = + if res["Content-Type"] + ' %C%GREEN' + res["Content-Type"] + '%N' + else + '' + end dat.reply(pattern .gsub(':NICK', dat[:nick]) .gsub(':URLNUM', (k+1).to_s) - .gsub(':OUT', "%C%ORANGE\u200B#{res.code}%N")) + .gsub(':OUT', "%C%ORANGE\u200B#{res.code}%N#{contenttype}")) end end end end end \ No newline at end of file