--- a/netserver/HWProto.hs Fri Nov 07 17:02:22 2008 +0000
+++ b/netserver/HWProto.hs Fri Nov 07 22:03:43 2008 +0000
@@ -25,6 +25,7 @@
answerBadCmd = [(clientOnly, ["ERROR", "Bad command, state or incorrect parameter"])]
answerNotMaster = [(clientOnly, ["ERROR", "You cannot configure room parameters"])]
answerBadParam = [(clientOnly, ["ERROR", "Bad parameter"])]
+answerErrorMsg msg = [(clientOnly, ["ERROR", msg])]
answerQuit msg = [(clientOnly, ["BYE", msg])]
answerAbandoned = [(othersInRoom, ["BYE", "Room abandoned"])]
answerQuitInform nick = [(othersInRoom, ["LEFT", nick])]
@@ -93,6 +94,9 @@
handleCmd _ _ _ ["PONG"] =
(noChangeClients, noChangeRooms, [])
+handleCmd _ _ _ ["ERROR", msg] =
+ (noChangeClients, noChangeRooms, answerErrorMsg msg)
+
-- check state and call state-dependent commmand handlers
handleCmd client clients rooms cmd =
if null (nick client) || protocol client == 0 then