lizmat / IRC-Client

Raku module for building IRC (Internet Relay Chat) clients
Artistic License 2.0
14 stars 7 forks source link

Fix irc-addressed false positives #62

Closed taboege closed 5 years ago

taboege commented 5 years ago

Commit 3e585499 replaced a subst-mutate with a .= subst as a result of a v6.d deprecation. The surrounding code relied on the return value being falsy when no substitution took place. This was true for subst-mutate but isn't for subst which always returns the resulting string. In this case, this caused every PRIVMSG to fire an irc-addressed event.

This is fixed by using s///, which mutates but returns the Match (or Nil).

AlexDaniel commented 5 years ago

Makes sense. Thank you!