aboutsummaryrefslogtreecommitdiffstats
path: root/src/Reaktor/Plugins/System
diff options
context:
space:
mode:
Diffstat (limited to 'src/Reaktor/Plugins/System')
-rw-r--r--src/Reaktor/Plugins/System/Internal.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Reaktor/Plugins/System/Internal.hs b/src/Reaktor/Plugins/System/Internal.hs
index ac707ae..9b1b8de 100644
--- a/src/Reaktor/Plugins/System/Internal.hs
+++ b/src/Reaktor/Plugins/System/Internal.hs
@@ -18,6 +18,7 @@ instance FromJSON a => FromJSON (CaptureOr a) where
-- TODO query means via direct privmsg and <nick>:
data Activate = Always | Match | Query
+ deriving Show
instance FromJSON Activate where
parseJSON = \case
@@ -28,8 +29,9 @@ instance FromJSON Activate where
data Config = Config
{ cWorkDir :: Maybe FilePath
- , cHooks :: HashMap ByteString [Hook]
+ , cHooks :: HashMap Text [Hook]
}
+ deriving Show
instance Default Config where
def = Config Nothing mempty
@@ -46,10 +48,11 @@ data Hook = Hook
{ hActivate :: Activate
, hPattern :: Maybe ByteString
, hCommand :: CaptureOr Command
- , hArguments :: [CaptureOr ByteString]
+ , hArguments :: [CaptureOr Text]
, hWorkDir :: Maybe FilePath
- , hCommands :: HashMap ByteString Command
+ , hCommands :: HashMap Text Command
}
+ deriving Show
instance FromJSON Hook where
parseJSON = \case