summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/dhtd.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/dhtd.hs b/examples/dhtd.hs
index 65498699..56d9544d 100644
--- a/examples/dhtd.hs
+++ b/examples/dhtd.hs
@@ -1394,10 +1394,11 @@ toxman announcer toxbkts tox presence = ToxManager
1394 pub 1394 pub
1395 1395
1396 , setToxConnectionPolicy = \me them p -> do 1396 , setToxConnectionPolicy = \me them p -> do
1397 hPutStrLn stderr $ "toxman ConnectionPolicy " ++ show (me,them,p) 1397 let m = do meid <- readMaybe $ T.unpack $ T.take 43 me
1398 forM_ (do meid <- readMaybe $ T.unpack $ T.take 43 me 1398 themid <- readMaybe $ T.unpack $ T.take 43 them
1399 themid <- readMaybe $ T.unpack $ T.take 43 them 1399 return $ Tox.Key meid themid
1400 return $ Tox.Key meid themid) $ \k -> do 1400 hPutStrLn stderr $ "toxman ConnectionPolicy " ++ show (me,them,p,fmap (const ()) m)
1401 forM_ m $ \k -> do
1401 setPolicy (Tox.toxMgr tox) k p 1402 setPolicy (Tox.toxMgr tox) k p
1402 case p of 1403 case p of
1403 TryingToConnect -> do 1404 TryingToConnect -> do