diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-08-04 22:22:40 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-08-05 01:04:58 -0600 |
commit | dd1463241c00f38de5855b9e9869b773f683373f (patch) | |
tree | a5ceea8ccfded6f48214021bc7481a98b81abebc /src/net/manaserv/chathandler.cpp | |
parent | 154ea41225505eee0c77652a04738d845a2e93cd (diff) | |
download | mana-client-dd1463241c00f38de5855b9e9869b773f683373f.tar.gz mana-client-dd1463241c00f38de5855b9e9869b773f683373f.tar.bz2 mana-client-dd1463241c00f38de5855b9e9869b773f683373f.tar.xz mana-client-dd1463241c00f38de5855b9e9869b773f683373f.zip |
Have Being manage speech creation and add permissions to events
The Being and Player Chat events now have the precomuted permissions
for SPEECH_LOG and SPEECH_FLOAT. The Being class now acts on those
events to show speech (if SPEECH_FLOAT is present). ChatWindow now
checks for the SPEECH_LOG permission.
Reviewed-by: Freeyorp
Diffstat (limited to 'src/net/manaserv/chathandler.cpp')
-rw-r--r-- | src/net/manaserv/chathandler.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/net/manaserv/chathandler.cpp b/src/net/manaserv/chathandler.cpp index 9a8f6e34..71e4efde 100644 --- a/src/net/manaserv/chathandler.cpp +++ b/src/net/manaserv/chathandler.cpp @@ -27,6 +27,7 @@ #include "channel.h" #include "channelmanager.h" #include "eventmanager.h" +#include "playerrelations.h" #include "gui/widgets/channeltab.h" @@ -158,7 +159,6 @@ void ChatHandler::handleGameChatMessage(Net::MessageIn &msg) if (being) { mes = being->getName() + " : " + chatMsg; - being->setSpeech(chatMsg, SPEECH_TIME); } else mes = "Unknown : " + chatMsg; @@ -168,6 +168,9 @@ void ChatHandler::handleGameChatMessage(Net::MessageIn &msg) event.setString("text", chatMsg); event.setString("nick", being->getName()); event.setInt("beingId", id); + event.setInt("permissions", player_relations + .checkPermissionSilently(being->getName(), + PlayerRelation::SPEECH_LOG | PlayerRelation::SPEECH_FLOAT)); Mana::EventManager::trigger("Chat", event); } |