mIRC Home    About    Download    Register    News    Help

Print Thread
#99052 28/09/04 06:31 PM
Joined: Dec 2002
Posts: 230
G
greeny Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Dec 2002
Posts: 230
At the moment, there is no simple way to simulate the default mIRC nickname coloring when modifying the on text or on action event, even though there are various identifiers which relate to nickname coloring.

We came to the conclusion in this thread.

The main problem is that $nick($chan,$nick).color returns the "default text" color when a nickname does not match any entry in the colors list. This messes up the "action" color in on action events aswell as highlight colors etc.. If it would just return $null, it would not be a problem.

I hope there will soon be a solution for this, because it really can't be that I can't even have the same nickname coloring in my theme engine than there is in normal mIRC. smirk

#99053 28/09/04 09:42 PM
Joined: Jan 2003
Posts: 56
E
Babel fish
Offline
Babel fish
E
Joined: Jan 2003
Posts: 56
I am currently using this alias :

Code:
alias -l _cnick {
  var %j $cnick(0),%i 0,%p $nick($2,$1).pnick
  while (%i < %j) {
    inc %i
    if ($cnick(%i).method == 2) continue
    if (($cnick(%i) != $null) && ($v1 !iswm $1)) continue
    if ($2) {
      if (($cnick(%i).modes != $null) && (!$regex(%p,$+(^[,$_regfix($v1),]+.*$)))) continue
      if (($cnick(%i).anymode) && (!$cnick(%i).nomode) && (%p == $1)) continue
      if (($cnick(%i).nomode) && (!$cnick(%i).anymode) && (%p != $1)) continue
      ;The Idle-Setting seems to be crap since idle=0 when a new message appears
      ;I will have to think about that option again
      if (($cnick(%i).idle) && ($calc($nick($2,$1).idle / 60) < $v1)) continue
    }
    else return $_ddcolor($iif($cnick(%i).color != $color(normal),$+(,$v1,$1,),$1))
    return $_ddcolor($iif($cnick(%i).color != $color(normal),$+(,$v1),))
  }
  if (!$2) return $1
}
  


Usage : $_cnick(Nick,[#Chan])
It is not the perfect Solution but it works on my theme Engine quite well. You may also look at it @ mirc.net


Ecronika
My mIRC Addons
#99054 28/09/04 10:33 PM
Joined: Dec 2002
Posts: 230
G
greeny Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Dec 2002
Posts: 230
Thanks, this looks pretty slow though smirk

#99055 28/09/04 10:47 PM
Joined: Apr 2004
Posts: 48
L
Ameglian cow
Offline
Ameglian cow
L
Joined: Apr 2004
Posts: 48
there is missing an alias _regfix, isn't?


__________
dark_light @ irc.brasnet.org
#99056 28/09/04 10:52 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
And $_ddcolor


New username: hixxy
#99057 29/09/04 05:58 AM
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
I hate to mention it, but just because, it doesnt work exactly how you think it should, isn't really justification to say 'io! khaled change this cuz it doesnt work like i want it to'.

In addition doing so would most likely kill scripts written in previous mIRC versions, but then nevermind..

Also, the script posted above is 'slow' in terms of, being several milliseconds slower than alternatives, not really noticable unless your a machine.

Eamonn.

#99058 29/09/04 11:13 AM
Joined: Dec 2002
Posts: 230
G
greeny Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Dec 2002
Posts: 230
Coolkill, I don't say the identifier has to work like I want it to. It's merely a suggestion. I suggest you to skip the suggestions forum if you can't bear with that.

I'd just rather have default mIRC nickcolors with one small identifier than 100 lines of code. I also don't care if Khaled makes up a new identifier for this (or a $nick property) if he's worried about breaking older scripts. It should also be really easy to implement, since the code is already there.

Also, if you use the above identifier, I am willing to bet that it IS noticeable if you are on a slow machine or many channels with lots of traffic. Not everyone has a 3GHz machine, and everyone knows that mIRC script isn't the fastest language ever created.
Many people keep mIRC opened while playing 3D games or the like, and processing intensive scripts may cause stutter/hiccups in some situations. That's why I want an easier solution.

No offense.

#99059 29/09/04 08:07 PM
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
I couldn't see it being 100 lines, but i suppose its a point that perhaps there should be a built-in method of determining (sp?) what you want, although saying that, doubt it would be a 'flag' for such a thing, and similiarily i wouldnt have thought it would be a new identifier just for that purpose, suppose its upto Khaled as you said.

Also, 3D games + any other program = yuck - although i suppose it depends on your system, though saying that this is a 1.6Ghz, 512mb machine and i still even kill Explorer before playing games.

Eamonn.

#99060 29/09/04 08:33 PM
Joined: Jan 2003
Posts: 56
E
Babel fish
Offline
Babel fish
E
Joined: Jan 2003
Posts: 56
Sorry, here are the missing aliases :

Code:
alias -l _regfix { return $replacex($1-,.,\.,\,\\,|,\|,$chr(123),$+(\,$chr(123)),$&
    $chr(125),$+(\,$chr(125)),$chr(91),$+(\,$chr(91)),$chr(93),$+(\,$chr(93)))
}
alias -l _ddcolor {
  var %r = /(?<=\x03\d\d,|\x03\d,|\x03)(\d)(?!\d)/g
  !.echo -q $regsub($1,%r,0\1,%r)
  return %r
}  


Ecronika
My mIRC Addons
#99061 29/09/04 08:37 PM
Joined: Jan 2003
Posts: 56
E
Babel fish
Offline
Babel fish
E
Joined: Jan 2003
Posts: 56
Scripts will always be slower than mIRC itself but i tried to optimise it as far as i can. In fact i use it myself using 7 cnick-entrys and it is not noticeable for me (using a 1.2 Ghz Athlon machine on WinXP).


Ecronika
My mIRC Addons
#99062 30/09/04 12:45 AM
Joined: Apr 2003
Posts: 85
K
Babel fish
Offline
Babel fish
K
Joined: Apr 2003
Posts: 85
Completely off topic, but perhaps you should invest in a graphic accelerator card that has more on board memory or more RAM. I usually run 30+ processes including 2-3 copies of IE, mIRC, OutLook Express and several others like Window Blinds, huge wallpaper, Object Dock and a few other apps and all my games run fine .. including Doom 3.

Athlon 2.2Ghz, 1Gig RAM, 128MB Vid RAM
Athlon 1.4Ghz, 1.25Gig RAM, 64MB Vid RAM

XP Pro SP2.


--

katsklaw
Rather experienced Admin
Rather experienced mIRC Scripter
Amateur C Coder
#99063 30/09/04 05:16 PM
Joined: Dec 2002
Posts: 230
G
greeny Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Dec 2002
Posts: 230
In case you were replying to me, I wasn't talking about myself in this case. I also run firefox, mirc, and various other apps while playing and don't experience any problems either.


Link Copied to Clipboard