By | fr33domlover |
At | 2015-07-05 |
Title | hack: announcing to #freepost works by JOINing |
Description |
Edit file src/Hpaste/Model/Announcer.hs 33188 → 33188
53 53 hSetBuffering handle LineBuffering
54 54 let send = B.hPutStrLn handle . encodeUtf8
55 55 send $ "PASS " ++ pack announcePass
56 56 send $ "USER " ++ pack announceUser ++ " * * *"
57 57 send $ "NICK " ++ pack announceUser
+ 58 send $ "JOIN " ++ pack "#freepost"
58 59 send $ "WHOIS :" ++ origin
59 60 fix $ \loop -> do
60 61 incoming <- T.hGetLine handle
+ 62 T.putStrLn incoming
61 63 case T.takeWhile isDigit (T.drop 1 (T.dropWhile (/=' ') incoming)) of
62 64 "311" -> send line
63 65 "401" -> return ()
64 66 _ -> loop
65 67 … … … …