diff options
Diffstat (limited to 'main/Main.hs')
-rw-r--r-- | main/Main.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/Main.hs b/main/Main.hs index f52e22a..0eb414c 100644 --- a/main/Main.hs +++ b/main/Main.hs @@ -418,6 +418,7 @@ commands = [ ("history", cmdHistory) , ("peers", cmdPeers) , ("peer-add", cmdPeerAdd) + , ("peer-add-public", cmdPeerAddPublic) , ("peer-drop", cmdPeerDrop) , ("send", cmdSend) , ("update-identity", cmdUpdateIdentity) @@ -472,6 +473,12 @@ cmdPeerAdd = void $ do addr:_ <- liftIO $ getAddrInfo (Just $ defaultHints { addrSocketType = Datagram }) (Just hostname) (Just port) liftIO $ serverPeer server (addrAddress addr) +cmdPeerAddPublic :: Command +cmdPeerAddPublic = do + server <- asks ciServer + addr:_ <- liftIO $ getAddrInfo (Just $ defaultHints { addrSocketType = Datagram }) (Just "discovery1.erebosprotocol.net") (Just (show discoveryPort)) + void $ liftIO $ serverPeer server (addrAddress addr) + cmdPeerDrop :: Command cmdPeerDrop = do dropPeer =<< getSelectedPeer |