diff options
-rw-r--r-- | src/Network/Tox/Crypto/Handlers.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs index f31a62e4..dbfaede6 100644 --- a/src/Network/Tox/Crypto/Handlers.hs +++ b/src/Network/Tox/Crypto/Handlers.hs | |||
@@ -1278,10 +1278,11 @@ defaultCryptoDataHooks | |||
1278 | ] | 1278 | ] |
1279 | 1279 | ||
1280 | defaultKillHook :: NetCryptoSession -> CryptoMessage -> IO (Maybe (CryptoMessage -> CryptoMessage)) | 1280 | defaultKillHook :: NetCryptoSession -> CryptoMessage -> IO (Maybe (CryptoMessage -> CryptoMessage)) |
1281 | defaultKillHook session cm@(OneByte {msgID=KillPacket}) = do | 1281 | defaultKillHook session cm@(msgID -> KillPacket) = do |
1282 | dput XNetCrypto $ "Recieved kill packet (sessionid: " ++ show (ncSessionId session) ++ ") destroying session" | 1282 | dput XNetCrypto $ "Recieved kill packet (sessionid: " ++ show (ncSessionId session) ++ ") destroying session" |
1283 | destroySession session | 1283 | destroySession session |
1284 | return Nothing | 1284 | return (Just $ \m -> m) |
1285 | defaultKillHook _ _ = return (Just $ \cm -> cm) | ||
1285 | 1286 | ||
1286 | defaultUserStatusHook :: NetCryptoSession -> CryptoMessage -> IO (Maybe (CryptoMessage -> CryptoMessage)) | 1287 | defaultUserStatusHook :: NetCryptoSession -> CryptoMessage -> IO (Maybe (CryptoMessage -> CryptoMessage)) |
1287 | defaultUserStatusHook session cm@(TwoByte {msgID=USERSTATUS, msgByte=statusByte}) = do | 1288 | defaultUserStatusHook session cm@(TwoByte {msgID=USERSTATUS, msgByte=statusByte}) = do |