summaryrefslogtreecommitdiff
path: root/src/game-server/state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game-server/state.cpp')
-rw-r--r--src/game-server/state.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game-server/state.cpp b/src/game-server/state.cpp
index a42c689f..8202f7ca 100644
--- a/src/game-server/state.cpp
+++ b/src/game-server/state.cpp
@@ -715,3 +715,15 @@ void GameState::sayTo(Object *destination, Object *source, std::string const &te
gameHandler->sendTo(static_cast< Character * >(destination), msg);
}
+
+void GameState::sayToAll(const std::string &text)
+{
+ MessageOut msg(GPMSG_SAY);
+
+ // message will show as from server
+ msg.writeShort(0);
+ msg.writeString(text);
+
+ // sends to everyone connected to the game server
+ gameHandler->sendToEveryone(msg);
+}