gameServer/HWProtoLobbyState.hs
changeset 5426 109e9b5761c2
parent 5209 f7a610e2ef5f
child 5573 cc409ee3ad2e
equal deleted inserted replaced
5423:48b7823ec7e4 5426:109e9b5761c2
   152 handleCmd_lobby ["BAN", banNick, reason] = do
   152 handleCmd_lobby ["BAN", banNick, reason] = do
   153     (ci, _) <- ask
   153     (ci, _) <- ask
   154     cl <- thisClient
   154     cl <- thisClient
   155     banId <- clientByNick banNick
   155     banId <- clientByNick banNick
   156     return [BanClient 60 reason (fromJust banId) | isAdministrator cl && isJust banId && fromJust banId /= ci]
   156     return [BanClient 60 reason (fromJust banId) | isAdministrator cl && isJust banId && fromJust banId /= ci]
       
   157     
       
   158 handleCmd_lobby ["BANIP", ip, reason, duration] = do
       
   159     (ci, _) <- ask
       
   160     cl <- thisClient
       
   161     return [BanIP ip (readInt_ duration) reason | isAdministrator cl]
       
   162     
       
   163 handleCmd_lobby ["BANLIST"] = do
       
   164     (ci, _) <- ask
       
   165     cl <- thisClient
       
   166     return [BanList | isAdministrator cl]
   157 
   167 
   158 
   168 
   159 handleCmd_lobby ["SET_SERVER_VAR", "MOTD_NEW", newMessage] = do
   169 handleCmd_lobby ["SET_SERVER_VAR", "MOTD_NEW", newMessage] = do
   160     cl <- thisClient
   170     cl <- thisClient
   161     return [ModifyServerInfo (\si -> si{serverMessage = newMessage}) | isAdministrator cl]
   171     return [ModifyServerInfo (\si -> si{serverMessage = newMessage}) | isAdministrator cl]