summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/message.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/message.cc')
-rw-r--r--crawl-ref/source/message.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc
index a7a117febe..d7d3757626 100644
--- a/crawl-ref/source/message.cc
+++ b/crawl-ref/source/message.cc
@@ -31,7 +31,8 @@
#include "stuff.h"
#include "travel.h"
#include "view.h"
-
+#include "notes.h"
+#include "stash.h"
// circular buffer for keeping past messages
message_item Store_Message[ NUM_STORED_MESSAGES ]; // buffer of old messages
@@ -266,6 +267,16 @@ void mpr(const char *inf, int channel, int param)
if (colour == MSGCOL_MUTED)
return;
+ std::string imsg = inf;
+
+ for (unsigned i = 0; i < Options.note_messages.size(); ++i) {
+ if (Options.note_messages[i].matches(imsg)) {
+ take_note(Note(NOTE_MESSAGE, channel, param, inf,
+ prep_branch_level_name().c_str()));
+ break;
+ }
+ }
+
interrupt_activity( AI_MESSAGE, channel_to_str(channel) + ":" + inf );
// If you're travelling, only certain user-specified messages can break