From 40c5a8aec30538cad0e43027aa6beec2ace8d0fc Mon Sep 17 00:00:00 2001 From: James Crayne Date: Tue, 29 May 2018 03:43:29 +0000 Subject: quiet and verbose commands, feedback and more forgiving parse --- examples/dhtd.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'examples/dhtd.hs') diff --git a/examples/dhtd.hs b/examples/dhtd.hs index ba7b0fca..27e3c4ef 100644 --- a/examples/dhtd.hs +++ b/examples/dhtd.hs @@ -719,14 +719,16 @@ clientSession s@Session{..} sock cnum h = do hPutClient h $ showReport frs ("quiet",s) | s' <- strp s - , Just (tag::DebugTag) <- readMaybe ('X':s') + , Just (tag::DebugTag) <- readMaybe ('X':map toUpper (take 1 s') ++ drop 1 s') -> cmd0 $ do setQuiet tag + hPutClient h $ "Suppressing " ++ show tag ++ " messages." ("verbose",s) | s' <- strp s - , Just (tag::DebugTag) <- readMaybe ('X':s') + , Just (tag::DebugTag) <- readMaybe ('X':map toUpper (take 1 s') ++ drop 1 s') -> cmd0 $ do setVerbose tag + hPutClient h $ "Showing " ++ show tag ++ " messages." -- list information about current netcrypto sesssions ("sessions", s) | "" <- strp s -- cgit v1.2.3