diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-04-09 00:28:49 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-04-09 01:30:47 +0200 |
commit | 1bb149baa203f8c647fbe6647b329fd1635add0d (patch) | |
tree | d29a8879d7b8a4bc1ef935a239f282e3d71a9854 | |
parent | 3220c8e65e723790dfd69e05c012ad78badfbb45 (diff) |
message: force Irc color to be specificed with 2 digits
-rw-r--r-- | lib/rbot/message.rb | 6 |
1 files 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 |