diff options
Diffstat (limited to 'examples/dhtd.hs')
-rw-r--r-- | examples/dhtd.hs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/dhtd.hs b/examples/dhtd.hs index ea94b7ce..58a69c6a 100644 --- a/examples/dhtd.hs +++ b/examples/dhtd.hs | |||
@@ -505,8 +505,13 @@ clientSession s@Session{..} sock cnum h = do | |||
505 | Left ej -> if elem '@' s | 505 | Left ej -> if elem '@' s |
506 | then "Error: " ++ ej | 506 | then "Error: " ++ ej |
507 | else "Error: " ++ e | 507 | else "Error: " ++ e |
508 | Right jid -> show jid | 508 | Right jid -> unlines [ show jid |
509 | Right nid -> show nid ++ " nospam:" ++ drop 64 s | 509 | , Tox.noSpamIdToHex jid ] |
510 | Right nid -> let nspam = drop 64 s | ||
511 | jid :: Maybe Tox.NoSpamId | ||
512 | jid = readMaybe $ '0':'x':nspam ++ "@" ++ show nid ++ ".tox" | ||
513 | in unlines [ maybe "" show jid | ||
514 | , show nid ++ " nospam:" ++ nspam ] | ||
510 | Right nid -> show nid | 515 | Right nid -> show nid |
511 | 516 | ||
512 | ("lan", _) -> cmd0 $ do | 517 | ("lan", _) -> cmd0 $ do |