Intro

It's been a while since I've posted, but that's the way of blogs is it not? This should be a short one.

Anyway, why am I here today? Because asshats live on the internet :(

Despite having things in place in InspIRCd like dnsbl and various other configurations to reduce trolls and botnets, people still find ways to ruin things for everyone else.

Some script kiddy decided to use a number of connections from various asian hosts -- many of which were yet to be included on the ip blacklists -- and started spamming.

On to the point

All of this led me to wanting to make the connection/quitting IRC server notices a bit easier to parse. Bringing us to WeeChat's triggers and some simple RegEx again.

The Triggers

Here I came up with four triggers to:

  • Highlight the connect msgs and the nick
  • Highlight if the connect class is "Main" (Inspircd)
    • Makes it easy to see that a user is on an external connection
  • Highlight the quit msgs and the nick
  • Highlight xline msgs
    • Makes it quick to see when dnsbl catches connections

And the triggers:

/trigger addreplace ircd_notice_con modifier weechat_print "${tg_tags} =~ irc_notice" "/(CONNECT:)(.*: )([^ !]+)(!.*)/${color:02}${re:1}${color:reset}${re:2}${color:14}${re:3}${color:reset}${re:4}/" ""
/trigger addreplace ircd_notice_con_main modifier weechat_print "${tg_tags} =~ irc_notice" "/(CONNECT:)(.*class )(main)(.*)/${re:1}${re:2}${color:01}${re:3}${color:reset}${re:4}/" ""
/trigger addreplace ircd_notice_quit modifier weechat_print "${tg_tags} =~ irc_notice" "/(QUIT:)(.*: )([^ !]+)(!.*)/${color:03}${re:1}${color:reset}${re:2}${color:06}${re:3}${color:reset}${re:4}/" ""
/trigger addreplace ircd_notice_xline modifier weechat_print "${tg_tags} =~ irc_notice" "/(XLINE:)(.*)/${color:01}${re:1}${color:reset}${re:2}/" ""

The Pudding

For your convenience, here is a screenshot. (With redactions) weechat server notice trigger

InspIRCd
dnsbl
WeeChat
triggers
again

- demure