will be muted (duh.) message_colour can now override channel mutings (e.g., if you want to mute the pray channel except for a specific message.) Factored out some common code from {base,formatted}_mpr.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1211 c06c8d41-db1a-0410-9941-cceddc491573
2B4AQJIATJ4E7RFN6OTQITZNDBAPQ2VWWXLBCVYSORAFG2GIIDNQC 6HQB2N6N75R2RGKJFWRUN7WAC2PNGWQFXTII5DTRLTHZ2BOTMTVAC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC GCIZIUXO5TYROKDUYB3HAY7H7MRDTJNM7HR7DGSH7KXDIZC2LCDAC ID2OZJTHFXL74RVUCS3JCMDQEUHAXCQFZU7235VU6IEVAAUWD2FAC 77H4BWWPPGLM3PLZH4QTAJRXIZTSDVNCOKZE223I437FN2UJ34RQC 5RK245FAGZFCDDYG4AZAXSC7JPVIJG4DSAVAKHWWVBUNGICHYNJQC static void base_mpr(const char *inf, int channel, int param)
// Does the work common to base_mpr and formatted_mpr.// Returns the default colour of the message, or MSGCOL_MUTED if// the message should be suppressed.static int prepare_message(const std::string& imsg, int channel, int param)
const message_colour_mapping &m =Options.message_colour_mappings[i];if (m.message.is_filtered(channel, message)){colour = m.colour;break;}
colour = ci->colour;break;
flush_input_buffer( FLUSH_ON_MESSAGE );
if ( colour != MSGCOL_MUTED ){mpr_check_patterns(imsg, channel, param);flush_input_buffer( FLUSH_ON_MESSAGE );const int num_lines = get_message_window_height();if (New_Message_Count == num_lines - 1)more();}return colour;}
flush_input_buffer( FLUSH_ON_MESSAGE );const int num_lines = get_message_window_height();if (New_Message_Count == num_lines - 1)more();