diff --git a/scripts/commands/broadcast.py b/scripts/commands/broadcast.py new file mode 100644 index 00000000..afcaebef --- /dev/null +++ b/scripts/commands/broadcast.py @@ -0,0 +1,12 @@ +from services.sui import SUIWindow +from services.sui.SUIWindow import Trigger +from java.util import Vector +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + core.chatService.broadcastGalaxy(commandString) + return + diff --git a/src/services/chat/ChatService.java b/src/services/chat/ChatService.java index 356193c9..eb7c5a15 100644 --- a/src/services/chat/ChatService.java +++ b/src/services/chat/ChatService.java @@ -57,6 +57,7 @@ import protocol.swg.ChatOnSendPersistentMessage; import protocol.swg.ChatPersistentMessageToClient; import protocol.swg.ChatPersistentMessageToServer; import protocol.swg.ChatRequestPersistentMessage; +import protocol.swg.ChatSystemMessage; import protocol.swg.ObjControllerMessage; import protocol.swg.objectControllerObjects.PlayerEmote; import protocol.swg.objectControllerObjects.SpatialChat; @@ -586,5 +587,9 @@ public class ChatService implements INetworkDispatch { return mail; } + + public void broadcastGalaxy(String message) { + core.simulationService.notifyAllClients(new ChatSystemMessage(message, (byte) 0).serialize()); + } }