From ea3c97cea6cb2a690afca743fa8fecfbb533d69b Mon Sep 17 00:00:00 2001 From: joe Date: Fri, 18 May 2018 23:16:46 -0400 Subject: Daemon options to enable or disable XMPP. --- Presence/Presence.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Presence/Presence.hs') diff --git a/Presence/Presence.hs b/Presence/Presence.hs index c556a170..97b9d5b8 100644 --- a/Presence/Presence.hs +++ b/Presence/Presence.hs @@ -13,7 +13,7 @@ import Control.Concurrent.STM.TMVar import Control.Monad.Trans.Resource (runResourceT) import Control.Monad.Trans import Control.Monad.IO.Class (MonadIO, liftIO) -import Network.Socket ( SockAddr(..) ) +import Network.Socket ( SockAddr(..), PortNumber ) import System.Endian (fromBE32) import Data.List (nub, (\\), intersect, groupBy, sort, sortBy ) import Data.Ord (comparing ) @@ -124,8 +124,8 @@ newPresenceState cw toxman xmpp = atomically $ do } -presenceHooks :: PresenceState -> Int -> XMPPServerParameters -presenceHooks state verbosity = XMPPServerParameters +presenceHooks :: PresenceState -> Int -> Maybe PortNumber -> XMPPServerParameters +presenceHooks state verbosity mport = XMPPServerParameters { xmppChooseResourceName = chooseResourceName state , xmppTellClientHisName = tellClientHisName state , xmppTellMyNameToClient = textHostName @@ -148,6 +148,7 @@ presenceHooks state verbosity = XMPPServerParameters , xmppClientInformSubscription = clientInformSubscription state , xmppPeerInformSubscription = peerInformSubscription state , xmppVerbosity = return verbosity + , xmppClientPort = fromMaybe 5222 mport } -- cgit v1.2.3