summaryrefslogtreecommitdiff
path: root/src/gui/chat.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-08-04 22:22:40 -0600
committerJared Adams <jaxad0127@gmail.com>2010-08-05 01:04:58 -0600
commitdd1463241c00f38de5855b9e9869b773f683373f (patch)
treea5ceea8ccfded6f48214021bc7481a98b81abebc /src/gui/chat.cpp
parent154ea41225505eee0c77652a04738d845a2e93cd (diff)
downloadMana-dd1463241c00f38de5855b9e9869b773f683373f.tar.gz
Mana-dd1463241c00f38de5855b9e9869b773f683373f.tar.bz2
Mana-dd1463241c00f38de5855b9e9869b773f683373f.tar.xz
Mana-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/gui/chat.cpp')
-rw-r--r--src/gui/chat.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index ba912276..b1d4b131 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -25,6 +25,7 @@
#include "configuration.h"
#include "localplayer.h"
#include "party.h"
+#include "playerrelations.h"
#include "gui/recorder.h"
#include "gui/setup.h"
@@ -439,7 +440,8 @@ void ChatWindow::event(const std::string &channel, const Mana::Event &event)
}
else if (event.getName() == "Being")
{
- localChatTab->chatLog(event.getString("message"), BY_OTHER);
+ if (event.getInt("permissions") & PlayerRelation::SPEECH_LOG)
+ localChatTab->chatLog(event.getString("message"), BY_OTHER);
}
}
}