diff options
Diffstat (limited to 'examples/dhtd.hs')
-rw-r--r-- | examples/dhtd.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/dhtd.hs b/examples/dhtd.hs index eaf908f8..f713b926 100644 --- a/examples/dhtd.hs +++ b/examples/dhtd.hs | |||
@@ -572,7 +572,11 @@ clientSession s@Session{..} sock cnum h = do | |||
572 | Left e -> | 572 | Left e -> |
573 | -- HACK: split nospam from hex toxid | 573 | -- HACK: split nospam from hex toxid |
574 | case dhtParseId (take 64 s) of | 574 | case dhtParseId (take 64 s) of |
575 | Left e -> "Error: " ++ e | 575 | Left e -> case Tox.parseNoSpamId $ T.pack s of |
576 | Left ej -> if elem '@' s | ||
577 | then "Error: " ++ ej | ||
578 | else "Error: " ++ e | ||
579 | Right jid -> show jid | ||
576 | Right nid -> show nid ++ " nospam:" ++ drop 64 s | 580 | Right nid -> show nid ++ " nospam:" ++ drop 64 s |
577 | Right nid -> show nid | 581 | Right nid -> show nid |
578 | 582 | ||