Intro
After upgrading my phone's OS to android 11, the stable version of Weechat-Android on google play was acting fairly crappy... Which isn't too surprising considering it was last updated on 2018-10-07 (and at the time of writing it is 2020-10-30).
With some looking, I found that there was a nightly build on google play as well, hurray! After updating, the WeeChat relay app was acting much better, had a number of improvements, and bug fixes.
So, bug fixes, about that
One of these bug fixes was correcting how ircd service notices where kind of ignored by the app's notification system. So, say hello to spammy android notices! At least for those of you who are fellow Opers out there *waves*
Pairing down the spam
Using /debug tags
in WeeChat proper, we can see that a generic connection message has four tags:
12:07:36 ~~~ irc.SERVER.org: *** CONNECT: Client connecting on port 6697 (class main): NICK!IDENT@HOST (127.0.0.1) [REALNAME] [irc_notice,notify_private,nick_irc.SERVER.org,host_irc.SERVER.org,log1]
Trimmed down:
[irc_notice,notify_private,nick_irc.SERVER.org,host_irc.SERVER.org,log1]
One of these tags, the notify_private
, is why we are getting so much spam android notice spam. >_<
So lets see about setting that to a lower message priority.
The Triggers
Here I came up with two triggers:
## Reduce server notice priority on all networks
/trigger addreplace server_notice_priority line "" "${tags} =~ irc_notice" "/notify_private/notify_message/tags"
## Inspircd flavored version to leave XLINE messages (gline/etc) at the higher priority
/trigger addreplace server_notice_priority line "" "${tags} =~ irc_notice && ${message} !~ XLINE:" "/notify_private/notify_message/tags"
Afterword
With the second version of the trigger, I now will still get a privmsg level indicator in my buflist and hotbar in WeeChat proper -- and an android notification if I'm connected to the relay -- when an XLINE event occurs.