# HG changeset patch # User unc0rr # Date 1369167135 -14400 # Node ID 279168729cc305a3bc030dcddf687eaddb10283d # Parent b0ed8608303f282f8cd3ce429c497bd44ab60ab5 Allow messages containing word separators in server's additional console commands diff -r b0ed8608303f -r 279168729cc3 gameServer/HWProtoCore.hs --- a/gameServer/HWProtoCore.hs Tue May 21 23:54:28 2013 +0400 +++ b/gameServer/HWProtoCore.hs Wed May 22 00:12:15 2013 +0400 @@ -43,12 +43,12 @@ where h ["DELEGATE", n] = handleCmd ["DELEGATE", n] h ["STATS"] = handleCmd ["STATS"] - h ["PART", msg] = handleCmd ["PART", msg] - h ["QUIT", msg] = handleCmd ["QUIT", msg] - h ["GLOBAL", msg] = do + h ("PART":m:ms) = handleCmd ["PART", B.unwords $ m:ms] + h ("QUIT":m:ms) = handleCmd ["QUIT", B.unwords $ m:ms] + h ("GLOBAL":m:ms) = do rnc <- liftM snd ask let chans = map (sendChan . client rnc) $ allClients rnc - return [AnswerClients chans ["CHAT", "[global notice]", msg]] + return [AnswerClients chans ["CHAT", "[global notice]", B.unwords $ m:ms]] h c = return [Warning . B.concat . L.intersperse " " $ "Unknown cmd" : c] handleCmd cmd = do