]> git.lizzy.rs Git - luairc.git/commitdiff
don't color debug messages unless we are writing to stdout
authorjluehrs2 <jluehrs2@uiuc.edu>
Mon, 3 Sep 2007 00:59:29 +0000 (19:59 -0500)
committerjluehrs2 <jluehrs2@uiuc.edu>
Mon, 3 Sep 2007 00:59:29 +0000 (19:59 -0500)
src/irc/debug.lua

index d60e38ff27fabdab19ca7cac951788e7f6cbace0..cdafd0f991e07a3efd3c93efffe8feba02c841c4 100644 (file)
@@ -46,7 +46,6 @@ end
 -- }}}
 
 -- message {{{
--- TODO: disable color when we are writing to a file
 --
 -- Output a debug message.
 -- @param msg_type Arbitrary string corresponding to the type of message
@@ -56,7 +55,7 @@ end
 function message(msg_type, msg, color)
     if ON then
         local endcolor = ""
-        if COLOR then
+        if COLOR and out_file == io.stdout then
             color = color or "\027[1;30m"
             endcolor = "\027[0m"
         else