equal
deleted
inserted
replaced
4 import qualified Data.IntMap as IntMap |
4 import qualified Data.IntMap as IntMap |
5 import qualified Data.Map as Map |
5 import qualified Data.Map as Map |
6 import Data.Sequence(Seq, (|>), (><), fromList, empty) |
6 import Data.Sequence(Seq, (|>), (><), fromList, empty) |
7 import Data.List |
7 import Data.List |
8 import Maybe |
8 import Maybe |
9 import qualified Codec.Binary.UTF8.String as UTF8 |
|
10 -------------------------------------- |
9 -------------------------------------- |
11 import CoreTypes |
10 import CoreTypes |
12 import Actions |
11 import Actions |
13 import Utils |
12 import Utils |
14 |
13 |
200 [AnswerSameClan ["EM", engineMsg]] |
199 [AnswerSameClan ["EM", engineMsg]] |
201 else |
200 else |
202 [] |
201 [] |
203 where |
202 where |
204 client = clients IntMap.! clID |
203 client = clients IntMap.! clID |
205 -- FIXME: why are those decoded* function used? |
204 engineMsg = toEngineMsg $ 'b' : ((nick client) ++ "(team): " ++ msg ++ "\x20\x20") |
206 -- it would be better to use ByteString instead of String |
|
207 engineMsg = toEngineMsg $ 'b' : (decodedNick ++ "(team): " ++ decodedMsg ++ "\x20\x20") |
|
208 decodedMsg = UTF8.decodeString msg |
|
209 decodedNick = UTF8.decodeString $ nick client |
|
210 |
205 |
211 handleCmd_inRoom clID _ _ _ = [ProtocolError "Incorrect command (state: in room)"] |
206 handleCmd_inRoom clID _ _ _ = [ProtocolError "Incorrect command (state: in room)"] |