diff options
-rw-r--r-- | ControlWindow.hs | 1 | ||||
-rw-r--r-- | Role/Developer.hs | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/ControlWindow.hs b/ControlWindow.hs index 74514be..fea6351 100644 --- a/ControlWindow.hs +++ b/ControlWindow.hs @@ -133,6 +133,7 @@ askToAllow ochan promptchan responsechan k@(GpgSigned pk _) = do ControlOutputAction $ SessionKeyRejected pk let accept = do putStrLn "Accepting their connection. They can now enter commands in this debug-me session." + putStrLn "(And, you can type in this window to chat with them.)" atomically $ writeTMChan ochan $ ControlOutputAction $ SessionKeyAccepted pk case v of diff --git a/Role/Developer.hs b/Role/Developer.hs index d05710e..960a204 100644 --- a/Role/Developer.hs +++ b/Role/Developer.hs @@ -195,7 +195,12 @@ sendTtyOutput ochan devstate controlinput logger = go go forwardcontrol msg = case msg of User (ControlMessage c) -> fwd c - Developer (ControlMessage c) -> fwd c + Developer (ControlMessage c) -> case control c of + Rejected _ -> return () + SessionKey _ -> return () + SessionKeyAccepted _ -> return () + SessionKeyRejected _ -> return () + ChatMessage _ _ -> fwd c _ -> return () fwd = atomically . writeTMChan controlinput . ControlInputAction . control |