]> git.99rst.org Git - irssi-scripts.irssi.org.git/commit
trigger.pl: default address to empty in mask match
authorDoug Freed <redacted>
Sun, 9 Apr 2017 06:21:53 +0000 (02:21 -0400)
committerGitHub <redacted>
Sun, 9 Apr 2017 06:21:53 +0000 (02:21 -0400)
commitcb811cf51b39e6aa6cd01e46186490042b0085fe
tree2f7d0bb0d4c02eae46e522e9349de80499b02e19
parentf44aca0d07b424499976cfe0888f3b5e40f5b5e1
trigger.pl: default address to empty in mask match

Server notices are included in the privnotices type, but their address
parameter is undefined, because the prefix of the message is just the
server name.  By defaulting address to an empty string in the masks
match, we can match server notices easily with `-privnotices -masks
'<servername>!'` instead of a really messy rawin + regexp.  (Irssi
merges the nick and address passed into masks_match with a `%s!%s`
format string, so there'll be a trailing "!" when address is an empty
string.)
scripts/trigger.pl
git clone https://git.99rst.org/PROJECT