summaryrefslogtreecommitdiff
path: root/examples/dhtd.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-10-13 15:23:17 -0400
committerjoe <joe@jerkface.net>2017-10-13 15:23:17 -0400
commitb5df42236969b38bbddcc47cb5cbfdc94a7d3393 (patch)
tree5e59d71747ea5496803242e2fd6a5d9daf7c0d54 /examples/dhtd.hs
parentd0666b1beffa2684552ff6e0c1c077f530784ee2 (diff)
Switched toxid format from hexadecimal to base64.
Diffstat (limited to 'examples/dhtd.hs')
-rw-r--r--examples/dhtd.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/dhtd.hs b/examples/dhtd.hs
index 1ab2778a..37f16f02 100644
--- a/examples/dhtd.hs
+++ b/examples/dhtd.hs
@@ -288,13 +288,13 @@ data Session = Session
288 288
289clientSession :: Session -> t1 -> t -> Handle -> IO () 289clientSession :: Session -> t1 -> t -> Handle -> IO ()
290clientSession s@Session{..} sock cnum h = do 290clientSession s@Session{..} sock cnum h = do
291 line <- map toLower . dropWhile isSpace <$> hGetLine h 291 line <- dropWhile isSpace <$> hGetLine h
292 let (c,args) = second (dropWhile isSpace) $ break isSpace line 292 let (c,args) = second (dropWhile isSpace) $ break isSpace line
293 cmd0 :: IO () -> IO () 293 cmd0 :: IO () -> IO ()
294 cmd0 action = action >> clientSession s sock cnum h 294 cmd0 action = action >> clientSession s sock cnum h
295 switchNetwork dest = do hPutClient h ("Network: "++dest) 295 switchNetwork dest = do hPutClient h ("Network: "++dest)
296 clientSession s{netname=dest} sock cnum h 296 clientSession s{netname=dest} sock cnum h
297 case (c,args) of 297 case (map toLower c,args) of
298 ("stop", _) -> do hPutClient h "Terminating DHT Daemon." 298 ("stop", _) -> do hPutClient h "Terminating DHT Daemon."
299 hClose h 299 hClose h
300 putMVar signalQuit () 300 putMVar signalQuit ()