+ if @message_patterns.any? {|p| m.message =~ p}
+ # if the regexp doesn't contain all parts, the default values get used
+ new_nick = $1 || 'unknown_nick'
+ network = $2 || 'unknown_network'
+ message = $3 || 'unknown_message'
+ # strip any formatting codes in the new_nick. some people configure their linkbots
+ # to embed these codes in nicknames (such as to\B\Bm), to avoid triggering the
+ # person's highlight
+ new_nick.gsub!(/[#{Bold}#{Underline}#{Reverse}#{Italic}#{NormalText}]/, '')