mIRC Home    About    Download    Register    News    Help

Print Thread
#118060 21/04/05 08:54 PM
Joined: Feb 2005
Posts: 194
A
Vogon poet
OP Offline
Vogon poet
A
Joined: Feb 2005
Posts: 194
Yo. What i'm trying to do is make IRCops' nicks show up red in my nicklist. Here is a code that I found that does just that:

http://www.wingedspirit.net/mircscripts/archives/002457.html

However, I dont't use the default mIRC nicklist. I am using the nickLUST.dll. It does allow me to custom color nicks. But i'm having a little trouble making the DLL and the scanner agree. To color a nick in the nickLUST nicklist, you would use this:

Code:
alias nickLUST {
  if ($1 == color) {
    if ($3 == $me) return $rgb(255,0,0)
    return USE_DEFAULT
  }
}

So, what i think I need to do is use some kind of storage (.txt file or hash table) to store the nicks the scanner identifys as IRCops so that they can be retieved using the: if ($3 == "IRCops' nicks"). How can this be done? If anyone knows a an IRCop scanner out there that would better suit me, please let me know. TIA! By the way, I have put the nickLUST.dll help file on the net incase anyone need to consualt it.

http://www.marlenelarson.com/other/nickLUST%20Help.txt

Last edited by alhammer; 21/04/05 08:58 PM.

"God sometimes puts us in the dark for us to see the light"
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I've just tried this. Seems to work for me.

Code:
On *:Join:#: {
  if ($nick == $me) { who $chan }
  who $nick 
}

alias nickLUST {
  if ($1 == color) {
    var %x = $hget(ircops,0).item
    while (%x) {
      if ($3 == $hget(ircops,%x).item) return $rgb(0,255,255)
      dec %x
    }
    return USE_DEFAULT
  }
}

Raw 352:*: {
  if (* isin $7) { 
    hadd -m ircops $6 $6
  }
}

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Most networks support /who 0 o to find all IRCOps so maybe you could capture the output of that /who, store the results and then do a nickname comparison.
This method will only require a single /who per connection.


New username: hixxy
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Not sure if this would work, what we need to do is when someone parts/quits etc to remove their nickname from the hash table providing their not in any more channels with you.

I used the method $calc($comchan($nick,0) - 1) because then they part the channel I did a little snippet to echo the common channels and it still said one. So I did a little $calc() to subtract 1 from the total to see if it was 0.

I could be wrong and there could be more simplistic ways to do it but it works for me thus far.

Code:
On *:Join:#: {
  if ($nick == $me) { who $chan }
  who $nick 
}

On *:Kick:#: {
  if ($hget(ircops,$knick)) {
    if ($calc($comchan($knick,0) - 1) == 0) { hdel ircops $knick }
  }
}

On *:Part:#: {
  if ($hget(ircops,$nick)) {
    if ($calc($comchan($nick,0) - 1) == 0) { hdel ircops $nick }
  }
}

On *:Quit: {
  if ($hget(ircops,$nick)) hdel ircops $nick
}

alias nickLUST {
  if ($1 == color) {
    var %x = $hget(ircops,0).item
    while (%x) {
      if ($3 == $hget(ircops,%x).item) return $rgb(0,255,255)
      dec %x
    }
    return USE_DEFAULT
  }
}

Raw 352:*: {
  if (* isin $7) { 
    hadd -m ircops $6 $6
  }
}

Joined: Feb 2005
Posts: 194
A
Vogon poet
OP Offline
Vogon poet
A
Joined: Feb 2005
Posts: 194
Thanks to both of you. I combined a little of both codes to make one that works well for me. Thanks!


"God sometimes puts us in the dark for us to see the light"

Link Copied to Clipboard