diff options
author | joe <joe@jerkface.net> | 2018-05-18 23:16:46 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2018-05-18 23:16:46 -0400 |
commit | ea3c97cea6cb2a690afca743fa8fecfbb533d69b (patch) | |
tree | 463c0ad5176f9978c8f1732069dfdb82f610e937 /Presence/Presence.hs | |
parent | 6eefc1e5112753a9f01396e6ba54dca0b7f56c04 (diff) |
Daemon options to enable or disable XMPP.
Diffstat (limited to 'Presence/Presence.hs')
-rw-r--r-- | Presence/Presence.hs | 7 |
1 files changed, 4 insertions, 3 deletions
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 | |||
13 | import Control.Monad.Trans.Resource (runResourceT) | 13 | import Control.Monad.Trans.Resource (runResourceT) |
14 | import Control.Monad.Trans | 14 | import Control.Monad.Trans |
15 | import Control.Monad.IO.Class (MonadIO, liftIO) | 15 | import Control.Monad.IO.Class (MonadIO, liftIO) |
16 | import Network.Socket ( SockAddr(..) ) | 16 | import Network.Socket ( SockAddr(..), PortNumber ) |
17 | import System.Endian (fromBE32) | 17 | import System.Endian (fromBE32) |
18 | import Data.List (nub, (\\), intersect, groupBy, sort, sortBy ) | 18 | import Data.List (nub, (\\), intersect, groupBy, sort, sortBy ) |
19 | import Data.Ord (comparing ) | 19 | import Data.Ord (comparing ) |
@@ -124,8 +124,8 @@ newPresenceState cw toxman xmpp = atomically $ do | |||
124 | } | 124 | } |
125 | 125 | ||
126 | 126 | ||
127 | presenceHooks :: PresenceState -> Int -> XMPPServerParameters | 127 | presenceHooks :: PresenceState -> Int -> Maybe PortNumber -> XMPPServerParameters |
128 | presenceHooks state verbosity = XMPPServerParameters | 128 | presenceHooks state verbosity mport = XMPPServerParameters |
129 | { xmppChooseResourceName = chooseResourceName state | 129 | { xmppChooseResourceName = chooseResourceName state |
130 | , xmppTellClientHisName = tellClientHisName state | 130 | , xmppTellClientHisName = tellClientHisName state |
131 | , xmppTellMyNameToClient = textHostName | 131 | , xmppTellMyNameToClient = textHostName |
@@ -148,6 +148,7 @@ presenceHooks state verbosity = XMPPServerParameters | |||
148 | , xmppClientInformSubscription = clientInformSubscription state | 148 | , xmppClientInformSubscription = clientInformSubscription state |
149 | , xmppPeerInformSubscription = peerInformSubscription state | 149 | , xmppPeerInformSubscription = peerInformSubscription state |
150 | , xmppVerbosity = return verbosity | 150 | , xmppVerbosity = return verbosity |
151 | , xmppClientPort = fromMaybe 5222 mport | ||
151 | } | 152 | } |
152 | 153 | ||
153 | 154 | ||