sendMsg :: MIrc
           -> B.ByteString -- ^ Channel
           -> B.ByteString -- ^ Message
           -> IO ()
sendMsg mServ chan msg =
  mapM_ s lins
  where lins = B.lines msg
        s m = do
          now <- getCurrentTime
          stamp <- (getFloodControlTimestamp mServ)
          let latest = addUTCTime 2 $ max now stamp
              diff = diffUTCTime latest now
          setFloodControlTimestamp mServ latest
          when (diff > 10) (threadDelay $ 1000000 * (round diff - 10))
          sendCmd mServ (MPrivmsg chan m)
sendMsg :: MIrc
           -> B.ByteString -- ^ Channel
           -> B.ByteString -- ^ Message
           -> IO ()
sendMsg mServ chan msg =
  mapM_ s lins
  where lins = B.lines msg
        s m = do
          now <- getCurrentTime
          stamp <- (getFloodControlTimestamp mServ)
          let latest = addUTCTime 2 $ max now stamp
              diff = diffUTCTime latest now
          setFloodControlTimestamp mServ latest
          when (diff > 10) (threadDelay $ 1000000 * (round diff - 10))
          sendCmd mServ (MPrivmsg chan m)
sendMsg mServ chan msg =
  mapM_ s lins
  where lins = B.lines msg
        s m = do
          now <- getCurrentTime
          stamp <- (getFloodControlTimestamp mServ)
          let latest = addUTCTime 2 $ max now stamp
              diff = diffUTCTime latest now
          setFloodControlTimestamp mServ latest
          when (diff > 10) (threadDelay $ 1000000 * (round diff - 10))
          sendCmd mServ (MPrivmsg chan m)