mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2008
Posts: 3
T
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Nov 2008
Posts: 3
Hello

I`m looking for a script, an option or a light client who has the following feature :

The text colours in a channel must be different for every user, automaticly (similar to text colours for OP,Voice or normal) but for every user.

Example : i`ll see the 1`st user text in blue, 2 - red, 3 black, 4 blue etc. Regardless if they are OP/voice.

Thanks,

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
While this could be done, you would probably end up with colours or colour combinations that are difficult to impossible to read.

Also, if you were in a channel with a lot of chatters, you would run out of colours/colour combinations without repeating.

Joined: Nov 2008
Posts: 3
T
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Nov 2008
Posts: 3
I know how this will like.
6-10 colours are enough.
In a big channel this option will have nasty effect, reading will be difficult,

but the script will be used by newbies in IRC, on a small channel. The IRC talk style may be confusign for some.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Colouring the chat isn't going to make it any less confusing, if anything, I think it would make it more confusing, as they may get used to seeing the colours for certain people, then they'll probably end up going to other channels and/or networks, and, suddenly the colours are going to be with different nicks.

Here's a quick code that will generate a different colour for each person based on the order of the nick in the nicklist.
NOTE: There is nothing to prevent hard to read colours from being used, including, but not limited to, the same colour that the user has set for a background colour.
Code:
on ^*:text:*:#:{
  .echo $nick($chan,$nick) -t $chan $+(<,$nick,>) $1-
  haltdef
}

Joined: Nov 2008
Posts: 3
T
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Nov 2008
Posts: 3
Thanks Russel,
i managed to upgrade the code from you
It got stuck with user number > 15 (it get white color)
but i fixed that and remove the bad readeable colours (on a white background).

Php Code:
on ^*:text:*:#:{
  %color = $round( $calc($nick($chan,$nick) % 15),0)
  %color = $calc(%color + 1 )
  if ($color == 0 || %color == 8 || %color == 9 || %color == 11 || %color==12 || %color==15) { %color = 1 }
  .echo %color -t $chan $+([,$asctime(hh:nn),]<,$nick,>) $1-
  haltdef
}
 


Now why the Time isn`t added when I write something ?

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
The -t switch already does the job in displaying the timestampt.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
A small re-write of your alteration of my code.
Code:
on ^*:text:*:#:{
  var %color = $calc($int($calc($nick($chan,$nick) % 15)) + 1 )
  %color =  $iif($istok(0 8 9 11 12 15,%color,32),1,%color)
  .echo %color -t $chan $+([,$asctime(hh:nn),]<,$nick,>) $1-
  haltdef
}


With this alteration, you could have the color go to the next 'readable' color, rather than having it fall back to 1 each time.
Code:
on ^*:text:*:#:{
  var %color = $int($calc($nick($chan,$nick) % 15))
  while $istok(0 8 9 11 12 15,%color,32) {    inc %color  }
  .echo %color -t $chan $+([,$asctime(hh:nn),]<,$nick,>) $1-
  haltdef
}


As noted, the -t switch already gives you the timestamp if you have timestamping active, so the usage of $asctime(hh:nn) is a duplication, but still isn't part of the message.


Link Copied to Clipboard