summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmppServer.hs46
1 files changed, 7 insertions, 39 deletions
diff --git a/xmppServer.hs b/xmppServer.hs
index 01246f64..b0a53e8b 100644
--- a/xmppServer.hs
+++ b/xmppServer.hs
@@ -1,50 +1,18 @@
1{-# LANGUAGE OverloadedStrings #-} 1{-# LANGUAGE OverloadedStrings #-}
2{-# LANGUAGE TupleSections #-} 2{-# LANGUAGE TupleSections #-}
3{-# LANGUAGE LambdaCase #-} 3{-# LANGUAGE LambdaCase #-}
4import System.Environment 4import Control.Concurrent
5import System.Posix.Signals
6import Control.Concurrent (threadDelay,forkIO,forkOS,killThread,throwTo)
7import Control.Concurrent.STM 5import Control.Concurrent.STM
8import Control.Concurrent.STM.TMVar
9import Control.Monad.Trans.Resource (runResourceT)
10import Control.Monad.Trans
11import Control.Monad.IO.Class (MonadIO, liftIO)
12import Network.Socket ( SockAddr(..) )
13import System.Endian (fromBE32)
14import Data.List (nub, (\\), intersect, groupBy, sort, sortBy )
15import Data.Ord (comparing )
16import Data.Monoid ( (<>), Sum(..), getSum )
17import qualified Data.Text as Text
18import qualified Data.Text.IO as Text
19import qualified Data.Text.Encoding as Text
20import Control.Monad
21import Control.Monad.Fix 6import Control.Monad.Fix
22import qualified Network.BSD as BSD 7import Control.Monad.IO.Class
23import qualified Data.Text as Text 8import Control.Monad.Trans.Resource (runResourceT)
24import Data.Text (Text) 9import Data.Monoid
25import qualified Data.Map as Map 10import System.Environment
26import Data.Map (Map) 11import System.Posix.Signals
27import Control.Exception ({-evaluate,-}handle,SomeException(..),bracketOnError,ErrorCall(..))
28import System.IO.Error (isDoesNotExistError)
29import System.Posix.User (getUserEntryForID,userName)
30import qualified Data.ByteString.Lazy.Char8 as L
31import qualified ConfigFiles
32import Data.Maybe (maybeToList,listToMaybe,mapMaybe)
33import Data.Bits
34import Data.Int (Int8)
35import Data.XML.Types (Event)
36import System.Posix.Types (UserID,CPid)
37import Control.Applicative
38 12
39import LockedChan (LockedChan)
40import TraversableT
41import UTmp (ProcessID,users)
42import LocalPeerCred
43import XMPPServer
44import PeerResolve
45import ConsoleWriter 13import ConsoleWriter
46import ClientState
47import Presence 14import Presence
15import XMPPServer
48 16
49main :: IO () 17main :: IO ()
50main = runResourceT $ do 18main = runResourceT $ do