gameServer/Actions.hs
changeset 1834 71cb978dc85f
parent 1827 3bb5e22b7f9a
child 1839 5dd4cb7fd7e5
--- a/gameServer/Actions.hs	Mon Feb 23 20:25:07 2009 +0000
+++ b/gameServer/Actions.hs	Mon Feb 23 20:34:29 2009 +0000
@@ -28,6 +28,7 @@
 	| ModifyClient (ClientInfo -> ClientInfo)
 	| ModifyRoom (RoomInfo -> RoomInfo)
 	| AddRoom String String
+	| CheckRegistered
 	| Dump
 
 type CmdHandler = Int -> Clients -> Rooms -> [String] -> [Action]
@@ -241,6 +242,12 @@
 		rmTeamMsg = toEngineMsg $ 'F' : teamName
 
 
+processAction (clID, serverInfo, clients, rooms) (CheckRegistered) = do
+	writeChan (dbQueries serverInfo) $ HasRegistered $ nick client
+	return (clID, serverInfo, clients, rooms)
+	where
+		client = clients ! clID
+
 processAction (clID, serverInfo, clients, rooms) (Dump) = do
 	writeChan (sendChan $ clients ! clID) ["DUMP", show serverInfo, showTree clients, showTree rooms]
 	return (clID, serverInfo, clients, rooms)