aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2007-09-02 19:59:29 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2007-09-02 19:59:29 -0500
commitd645810692095159b10af4118a9aa932b382c39a (patch)
tree255fa2ee91cb32ae9483989fbd7f6fdcfc436620 /src
parent66a30f539e2b4941c552e7a3e7de414c9cba5738 (diff)
downloadluairc-d645810692095159b10af4118a9aa932b382c39a.tar.gz
luairc-d645810692095159b10af4118a9aa932b382c39a.zip
don't color debug messages unless we are writing to stdout
Diffstat (limited to 'src')
-rw-r--r--src/irc/debug.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/irc/debug.lua b/src/irc/debug.lua
index d60e38f..cdafd0f 100644
--- a/src/irc/debug.lua
+++ b/src/irc/debug.lua
@@ -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