-- | Find the requester for the WHOIS\/WHOWAS query, unhook and invoke it.
whoisResponse :: String -> Maybe User -> Bot ()
whoisResponse n userMb = do
    putLogDebug $ "Whois response: " ++ show n ++ " - " ++ show userMb
    cbs <- getGlobal whoisCallbacks
    let shouldRun = [t | t@(u, cb) <- cbs, u == n]
    let shouldKeep = [t | t@(u, cb) <- cbs, u /= n]
    setGlobal whoisCallbacks shouldKeep
    mapM_ (($userMb) . snd) shouldRun
whoisResponse :: String -> Maybe User -> Bot ()
whoisResponse n userMb = do
    putLogDebug $ "Whois response: " ++ show n ++ " - " ++ show userMb
    cbs <- getGlobal whoisCallbacks
    let shouldRun = [t | t@(u, cb) <- cbs, u == n]
    let shouldKeep = [t | t@(u, cb) <- cbs, u /= n]
    setGlobal whoisCallbacks shouldKeep
    mapM_ (($userMb) . snd) shouldRun
whoisResponse n userMb = do
    putLogDebug $ "Whois response: " ++ show n ++ " - " ++ show userMb
    cbs <- getGlobal whoisCallbacks
    let shouldRun = [t | t@(u, cb) <- cbs, u == n]
    let shouldKeep = [t | t@(u, cb) <- cbs, u /= n]
    setGlobal whoisCallbacks shouldKeep
    mapM_ (($userMb) . snd) shouldRun