aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-01-24 21:15:18 +0100
committertv <tv@krebsco.de>2019-01-24 21:16:18 +0100
commit6c629a0cc422872abdfc40f9621ac0c4f6a420a8 (patch)
tree845603713c5351f8699da7da731483c604c9112a
parentd5f66b27b2cd7c36eb7c2e81b0cdca10c5a5ef90 (diff)
Reaktor.Plugins.System: don't send errorsv0.1.3
-rw-r--r--reaktor2.cabal2
-rw-r--r--src/Reaktor/Plugins/System.hs9
2 files changed, 6 insertions, 5 deletions
diff --git a/reaktor2.cabal b/reaktor2.cabal
index d97cad9..f93d918 100644
--- a/reaktor2.cabal
+++ b/reaktor2.cabal
@@ -1,5 +1,5 @@
name: reaktor2
-version: 0.1.2
+version: 0.1.3
license: MIT
author: tv <tv@krebsco.de>
maintainer: tv <tv@krebsco.de>
diff --git a/src/Reaktor/Plugins/System.hs b/src/Reaktor/Plugins/System.hs
index f31f640..6d73e70 100644
--- a/src/Reaktor/Plugins/System.hs
+++ b/src/Reaktor/Plugins/System.hs
@@ -134,13 +134,14 @@ run1 Config{..} Actions{..} Hook{..} prefix msgtarget text = do
onExcept :: SomeException -> IO ()
onExcept e = do
let s0 = T.show e
- s = T.replace (T.pack commandPath) name s0
aLog $ SGR [38,5,235] "! "
<> SGR [31,1] (Plain $ name <> ": " <> s0)
- aSend (privmsg audience (resultPrefix <> [s]))
- -- TODO use differenct colors
- onErrLine s = aSend (privmsg audience [s])
+ onErrLine :: Text -> IO ()
+ onErrLine s0 = do
+ aLog $ SGR [38,5,235] "2 "
+ <> SGR [31,1] (Plain $ name <> ": " <> s0)
+
onOutLine s = aSend (privmsg audience [s])
extraEnv =