Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make channel sidebar not be notified by chat relay join/part/quit messages? #2555

Open
DynV opened this issue Aug 15, 2023 · 3 comments

Comments

@DynV
Copy link

DynV commented Aug 15, 2023

I'm sorry to be asking a support request here but I can't seem to be able to join the mailing-list to ask it there and I've been waiting on Libera.chat for a couple days without a reply.

There's a chat relay in a channel I'm keeping an eye on when I'm on IRC and I'd rather not get a channel sidebar notification (change of color) when the relay send join/part/quit messages, which is the--vast--majority of its posts, ie

[timestamp] <bot_nick> [...] has left #[...]

, is there a way to do so? If scripting is necessary, do you have a template for it, could make me one, or could you give me enough hints for a beginner? Also, if possible those posts be changed to colors closer to the background, possibly the same as "real" join/part/quit messages.

If you're going to close this without helping me here and you'd like to help otherwise, I'm on Libera with the same nickname and Memoserv is linked to my email.

Thank you kindly for your help and sorry again

@ctrlaltca
Copy link
Contributor

Hi, first sorry if nobody replied to your question before, I guess everybody is enjoying holidays in these days.
Afaik what you ask cannot be achieved just configuring some options, but it will require some scripting.

KVIrc has an option to avoid highlighting the channel name in the windows list when an user joins/parts, but that's for all users and can't be restricted to a single nickname/channel (see Settings -> Configure KVIrc -> IRC -> Tools -> Alert/Highlight -> Window List Alert tab).

Using scripting, you can add a new handler for the OnJoin/OnPart events. You'll get the nickname in the $0 parameter and the channel name in the $target parameter. Something like this could work, but please not that I didn't actually test it:

if ($0 == "bot_nick" && $target == "#bot_chan") {
  # output a line in a debug window just to track join/part events for the bot
  echo -d "the spammy bot joined/parted"
  # halt normal processing of the join/part
  halt;
} 

@DynV
Copy link
Author

DynV commented Aug 17, 2023

I'm sorry if relay bots aren't well-know, otherwise I would have explained more. A relay bot has at least 1 other instance of it in another channel and spread the activity of all other channels of its instance. For example (NT for network) :

NT1 #potato Carl456 has joined
NT2 #carrot <BeepBoop> Carl456 has joined #potato on NT1
NT3 #turnip <BloopTss> Carl456 has joined #potato on NT1
NT2 #carrot <John987> How was last week meetup?
NT1 #potato <BzzBop> From NT2 #carrot : <John987> How was last week meetup?
NT3 #turnip <BloopTss> From NT2 #carrot : <John987> How was last week meetup?

So what the bot post has to be filtered to only de-emphasize join/part/quit messages.

@ctrlaltca
Copy link
Contributor

Sorry if i misunderstood you initial question. The answer is still the same, the only way this can be achieved is by adding an event handler. The involved event is "OnChannelMessage" and you can use these parameters:

$0 = Source nickname
$1 = Source username
$2 = Source hostname
$3 = Message
$4 = Target mode prefixes
$5 = Was encrypted
$6 = Message tags

You can use $str.contains() or $str.match() to check if $3 contains a message you want to filtered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants