mIRC Homepage

Disable channel names turning red with activity

Posted By: inkane

Disable channel names turning red with activity - 24/03/21 05:53 AM

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
Posted By: DooMaster

Re: Disable channel names turning red with activity - 24/03/21 12:58 PM

Options -> Display -> There is a box called "Message:" , click on this and disable the coloring.
Posted By: maroon

Re: Disable channel names turning red with activity - 25/03/21 05:00 AM

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.
Posted By: maroon

Re: Disable channel names turning red with activity - 25/03/21 08:55 PM

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
}

Posted By: Raccoon

Re: Disable channel names turning red with activity - 28/03/21 08:01 AM

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.
Posted By: maroon

Re: Disable channel names turning red with activity - 28/03/21 09:25 PM

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
}
© 2021 mIRC Discussion Forums