mIRC Home    About    Download    Register    News    Help

Print Thread
Disable channel names turning red with activity #268602 24/03/21 05:53 AM
Joined: Aug 2019
Posts: 3
I
inkane Offline OP
Self-satisfied door
OP Offline
Self-satisfied door
I
Joined: Aug 2019
Posts: 3
In the channels list each one has its name written in black color if you're caught up, or in RED if there are new messages since you last focused on that channel's window.

How can I disable a channel from turning red with new activity? I want to set some unimportant ones to remain black at all times.

Thx

Re: Disable channel names turning red with activity [Re: inkane] #268604 24/03/21 12:58 PM
Joined: Oct 2017
Posts: 41
D
DooMaster Offline
Ameglian cow
Offline
Ameglian cow
D
Joined: Oct 2017
Posts: 41
Options -> Display -> There is a box called "Message:" , click on this and disable the coloring.

Re: Disable channel names turning red with activity [Re: DooMaster] #268609 25/03/21 05:00 AM
Joined: Jan 2004
Posts: 1,551
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,551
That's not what he's asking for. He's wanting to have this setting be change-able at the channel level, while your solution is to disable it completely for all channels.

The only way I know to do this is to have a script to trap all messages. If it's not in an "unimportant" channel, then it returns without doing anything. But if it is in an "unimportant" channel, then you send an echo with the -n flag in order to prevent any highlighting of the switchbar icon. I've tried several times to post example code of how to do this, but it seems to keep triggering a server crash. When I preview my post with the code, the Preview Post fails, but when i remove the code then preview works just fine. I'll have to try it later.

Re: Disable channel names turning red with activity [Re: maroon] #268613 25/03/21 08:55 PM
Joined: Jan 2004
Posts: 1,551
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,551
The only way I know to do this is to have a script to trap all messages. If it's not in an "unimportant" channel, then it returns without doing anything. But if it is in an "unimportant" channel, then you send an echo with the -n flag in order to prevent any highlighting of the switchbar icon.

It can be complicated to accurately replicate all the message settings except the one you want. Below are 2 different examples of replacing the incoming messages without touching the switchbar, with 1 being more supportive of extra settings such as the server timestamp, and only showing @nick instead of @+nick if the speaker has both op and voice, etc.

It still doesn't have all settings baked into it. For example, it assumes you have enabled the setting to show the @ prefix, and there's probably some others I've not thought of quickly. Note that it will still highlight the switchbar with the event color for other events, so if you want to selectively disable coloring the switchbar for things like Joins, Parts, Quits, Nick changes, etc, you'd need to script a replacement for those events which disables the event color.

Note that /echo doesn't preserve consecutive spaces, so some ASCII ART won't look nice in these channels. All you should need to do is

Edit the list of channels you want this altered behavior in. If it's not on the list, that channel gets the default behavior.
Decide which of these echoes you want to keep, and delete or comment-out the other

This is just quick and dirty code, so your mileage may vary for situations I didn't think to test for

Code
on ^*:TEXT:*:#:{
  if (!$istok(#unimportantchannel1 #unimportantchannel2 ##maroon3,$chan,32)) return
  echo -ti2mnbfl # $+(<,$nick(#,$nick).pnick,>) $parms
  echo $+(-t,$msgstamp,i2mnbfl) # $+(<,$chr(3),$nick(#,$nick).color,$iif($nick(#,$nick).pnick != $nick,$left($v1,1)),$nick,$chr(3),>) $parms
  haltdef
}
on ^*:ACTION:*:#:{
  if (!$istok(#unimportantchannel1 #unimportantchannel2 ##maroon3,$chan,32)) return
  echo -ti2mnbflc action # * $nick(#,$nick).pnick $parms
  echo $+(-t,$msgstamp,i2mnbflc) action # * $+($iif($nick(#,$nick).pnick != $nick,$left($v1,1)),$nick) $parms
  haltdef
}


Last edited by Khaled; 26/03/21 08:57 AM.
Re: Disable channel names turning red with activity [Re: maroon] #268627 28/03/21 08:01 AM
Joined: Feb 2003
Posts: 2,742
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,742
Here's a gross but still effective method.

Code
/timer -o 0 1 /window -g0 #foo

Like I said, it's gross. But it won't hurt nuthin.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: Disable channel names turning red with activity [Re: Raccoon] #268628 28/03/21 09:25 PM
Joined: Jan 2004
Posts: 1,551
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,551
Or, if they only care about the red color from the message highlight, after ignoring the "important" channels, the event could send that hack just 1 time for each message. It would blink each channel for just a split second

Code
on ^*:TEXT:*:#:{
  if (!$istok(#unimportantchannel1 #unimportantchannel2 ##maroon3,$chan,32)) return
  timer 1 0 window -g0 $chan
}