murgo/IrssiNotifier — pull request #168 by Zannick (2014-08-01 20:23:32+00:00)
Title: Improve initial check for notifiability.

In print_text, instead of checking that $lastMsg is defined and
that $text is in $lastMsg, check that the event in question is a dcc
msg, hilighted public message, or private message. (This was previously
the first check in should_send_notification.) This will prevent us from
triggering on improper print_text events.

Further:
- Each of these events will have $lastMsg defined.
- By not checking that $text is in $lastMsg, we allow for other scripts
and irssi internals (such as -word hilights) to modify the line
between when we record $lastMsg and when $text is passed to print_text
without preventing irssinotifier from sending a notification.
(Arguably we should therefore use $text and not $lastMsg, but there's no difference when the only modifications are color codes which are later stripped out anyway)

This resolves #165.