# HG changeset patch
# User unc0rr
# Date 1294673383 -10800
# Node ID 2c43cd7d5ce65a7bc4436cc739dae4c455f0b12c
# Parent  4eb51a884f118a89e285c2eceea897be9e73e4b5
Even less craziness

diff -r 4eb51a884f11 -r 2c43cd7d5ce6 gameServer/HWProtoNEState.hs
--- a/gameServer/HWProtoNEState.hs	Mon Jan 10 18:28:39 2011 +0300
+++ b/gameServer/HWProtoNEState.hs	Mon Jan 10 18:29:43 2011 +0300
@@ -20,7 +20,7 @@
     let cl = irnc `client` ci
     if not . B.null $ nick cl then return [ProtocolError "Nickname already chosen"]
         else
-        if haveSameNick irnc (nick cl) then return [AnswerClients [sendChan cl] ["WARNING", "Nickname already in use"], ByeClient ""]
+        if haveSameNick irnc then return [AnswerClients [sendChan cl] ["WARNING", "Nickname already in use"], ByeClient ""]
             else
             if illegalName newNick then return [ByeClient "Illegal nickname"]
                 else
@@ -29,7 +29,7 @@
                     AnswerClients [sendChan cl] ["NICK", newNick] :
                     [CheckRegistered | clientProto cl /= 0]
     where
-    haveSameNick irnc clNick = isJust $ find (\cl -> newNick == cl) $ map (nick . client irnc) $ allClients irnc
+    haveSameNick irnc = isJust . find (== newNick) . map (nick . client irnc) $ allClients irnc
 
 handleCmd_NotEntered ["PROTO", protoNum] = do
     (ci, irnc) <- ask