netserver/HWProto.hs
changeset 1757 3aa7d21baca1
parent 1751 b67a124afe53
child 1784 dfe9bafb4590
--- a/netserver/HWProto.hs	Sun Jan 25 18:54:30 2009 +0000
+++ b/netserver/HWProto.hs	Sun Jan 25 18:54:39 2009 +0000
@@ -302,6 +302,15 @@
 handleCmd_noRoom client _ _ ["CHAT_STRING", msg] =
 	(noChangeClients, noChangeRooms, answerChatString (nick client) msg)
 
+handleCmd_noRoom client _ _ ["GLOBALMSG", password, msg] =
+	(noChangeClients, noChangeRooms, [answer])
+	where
+		answer = \serverInfo ->
+			if (not $ null password) && (adminPassword serverInfo == password) then
+				(allClients, ["CHAT_STRING", nick client, msg])
+			else
+				(clientOnly, ["ERROR", "Wrong password"])
+
 handleCmd_noRoom _ _ _ _ = (noChangeClients, noChangeRooms, answerBadCmd)