From 1bb149baa203f8c647fbe6647b329fd1635add0d Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 9 Apr 2008 00:28:49 +0200 Subject: message: force Irc color to be specificed with 2 digits --- lib/rbot/message.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rbot/message.rb b/lib/rbot/message.rb index bd3f85f1..918425d9 100644 --- a/lib/rbot/message.rb +++ b/lib/rbot/message.rb @@ -70,7 +70,7 @@ module Irc # Convert a String or Symbol into a color number def Irc.find_color(data) - if Integer === data + "%02d" % if Integer === data data else f = if String === data @@ -91,10 +91,10 @@ module Irc def Irc.color(fg=nil,bg=nil) str = Color.dup if fg - str << Irc.find_color(fg).to_s + str << Irc.find_color(fg) end if bg - str << "," << Irc.find_color(bg).to_s + str << "," << Irc.find_color(bg) end return str end -- cgit v1.2.3