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