gameServer/HWProtoNEState.hs
changeset 2150 45b695f3a7b9
parent 1879 bb114339eb4e
child 2155 d897222d3339
--- a/gameServer/HWProtoNEState.hs	Sat Jun 06 12:42:35 2009 +0000
+++ b/gameServer/HWProtoNEState.hs	Sun Jun 07 07:42:40 2009 +0000
@@ -13,10 +13,12 @@
 
 handleCmd_NotEntered clID clients _ ["NICK", newNick] =
 	if not . null $ nick client then
-		[ProtocolError "Nick already chosen"]
+		[ProtocolError "Nickname already chosen"]
 	else if haveSameNick then
-		[AnswerThisClient ["WARNING", "Nick collision"]]
+		[AnswerThisClient ["WARNING", "Nickname collision"]]
 		++ [ByeClient ""]
+	else if illegalName newNick then
+		[ByeClient "Illegal nickname"]
 	else
 		[ModifyClient (\c -> c{nick = newNick}),
 		AnswerThisClient ["NICK", newNick]]