Fix protocol implementation to conform documentation
authorunc0rr
Wed, 08 Oct 2008 18:29:16 +0000
changeset 1322 c624b04699fb
parent 1321 d7dc4e86201e
child 1323 d166f9069c2b
Fix protocol implementation to conform documentation
QTfrontend/newnetclient.cpp
doc/Protocol.odt
netserver/HWProto.hs
--- a/QTfrontend/newnetclient.cpp	Wed Oct 08 18:25:08 2008 +0000
+++ b/QTfrontend/newnetclient.cpp	Wed Oct 08 18:29:16 2008 +0000
@@ -460,7 +460,7 @@
 void HWNewNet::chatLineToNet(const QString& str)
 {
   if(str!="") {
-    RawSendNet(QString("CHAT_STRING")+delimeter+mynick+delimeter+str);
+    RawSendNet(QString("CHAT_STRING")+delimeter+str);
     emit(chatStringFromNet(QStringList(mynick) << str));
   }
 }
Binary file doc/Protocol.odt has changed
--- a/netserver/HWProto.hs	Wed Oct 08 18:25:08 2008 +0000
+++ b/netserver/HWProto.hs	Wed Oct 08 18:29:16 2008 +0000
@@ -112,18 +112,17 @@
 
 -- 'inRoom' clients state command handlers
 handleCmd_inRoom :: CmdHandler
-handleCmd_inRoom client _ _ ["CHAT_STRING", _, msg] =
+handleCmd_inRoom client _ _ ["CHAT_STRING", msg] =
 	(noChangeClients, noChangeRooms, answerChatString (nick client) msg)
 
 handleCmd_inRoom client _ rooms ("CONFIG_PARAM":paramName:paramStrs) =
 	if isMaster client then
-		(noChangeClients, modifyRoom clRoom{params = Map.insert paramName paramStrs (params room)}, answerConfigParam paramName paramStrs)
+		(noChangeClients, modifyRoom clRoom{params = Map.insert paramName paramStrs (params clRoom)}, answerConfigParam paramName paramStrs)
 	else
 		(noChangeClients, noChangeRooms, answerNotMaster)
 	where
 		clRoom = roomByName (room client) rooms
 
-
 handleCmd_inRoom client _ _ ("ADDTEAM" : name : color : grave : fort : difStr : hhsInfo)
 	| length hhsInfo == 16 = (noChangeClients, noChangeRooms, answerBadCmd)