Permalink
Browse files

Reply #end-lag for #lag.

  • Loading branch information...
1 parent eb0e132 commit ffbfcfae51688d8ed450c8a7ea80e24c56c9e38d @napthats committed Aug 14, 2013
Showing with 4 additions and 1 deletion.
  1. +2 −0 PhiVty/Protocol.hs
  2. +1 −0 PhiVty/UI.hs
  3. +1 −1 main.hs
View
@@ -17,6 +17,7 @@ data ServerProtocol =
| PhiList [String]
| SEdit
| Close
+ | Lag
| Unfinished ServerProtocol
| Unknown String
@@ -67,6 +68,7 @@ parse u_mes ('#':protocol) =
_ -> Unknown ""
"s-edit" -> SEdit
"close" -> Close
+ "lag" -> Lag
_ -> Unknown protocol
parse (Just (PhiList list)) mes = Unfinished $ PhiList $ list ++ [phiDecode mes]
parse _ mes =
View
@@ -195,6 +195,7 @@ makeWindowWithChara menu_item c chara_id host_name port_num collection = do
SEdit -> cdo c $ do
setUIState UISEdit
Close -> close soc
+ Lag -> send "#end-lag" soc
Unfinished u -> modifyMVar_ m_u_mes $ const $ return $ Just u
Unknown "" -> return ()
Unknown un_mes -> do
View
@@ -11,7 +11,7 @@ main = do
if length args /= 3 then error "main ip port id" else do
let new_dbdata = initialDB 0
c <- newCdo
- uidata <- initialPhiUI c [("guest4", (args !! 0), (read (args !!1) :: Int)), ((args !! 2), (args !! 0), (read (args !! 1) :: Int))]
+ uidata <- initialPhiUI c [("guest", (args !! 0), (read (args !!1) :: Int)), ((args !! 2), (args !! 0), (read (args !! 1) :: Int))]
_ <- forkIO $ do
let loop dbdata = do
m <- getMonad c

0 comments on commit ffbfcfa

Please sign in to comment.