gameServer/ServerCore.hs
changeset 1833 e901ec5644b4
parent 1804 4e78ad846fb6
child 1839 5dd4cb7fd7e5
equal deleted inserted replaced
1832:1fb61a53a2c2 1833:e901ec5644b4
    11 import CoreTypes
    11 import CoreTypes
    12 import NetRoutines
    12 import NetRoutines
    13 import Utils
    13 import Utils
    14 import HWProtoCore
    14 import HWProtoCore
    15 import Actions
    15 import Actions
       
    16 import OfficialServer.DBInteraction
    16 
    17 
    17 reactCmd :: ServerInfo -> Int -> [String] -> Clients -> Rooms -> IO (ServerInfo, Clients, Rooms)
    18 reactCmd :: ServerInfo -> Int -> [String] -> Clients -> Rooms -> IO (ServerInfo, Clients, Rooms)
    18 reactCmd serverInfo clID cmd clients rooms = do
    19 reactCmd serverInfo clID cmd clients rooms = do
    19 	(_ , serverInfo, clients, rooms) <-
    20 	(_ , serverInfo, clients, rooms) <-
    20 		foldM processAction (clID, serverInfo, clients, rooms) $ handleCmd clID clients rooms cmd
    21 		foldM processAction (clID, serverInfo, clients, rooms) $ handleCmd clID clients rooms cmd
    62 	return ()
    63 	return ()
    63 	
    64 	
    64 {-	forkIO $ messagesLoop messagesChan
    65 {-	forkIO $ messagesLoop messagesChan
    65 	forkIO $ timerLoop messagesChan-}
    66 	forkIO $ timerLoop messagesChan-}
    66 
    67 
    67 --	startDBConnection $ dbQueries serverInfo
    68 	startDBConnection $ serverInfo
    68 
    69 
    69 	mainLoop coreChan serverInfo IntMap.empty (IntMap.singleton 0 newRoom)
    70 	mainLoop coreChan serverInfo IntMap.empty (IntMap.singleton 0 newRoom)
    70 
    71 
    71 
    72 
    72 
    73