mIRC Home    About    Download    Register    News    Help

Print Thread
#14643 09/03/03 05:50 AM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline OP
Hoopy frood
OP Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
Code:
alias make.co {
  set -u0 %i 1
  while (%i <= $chan(0)) {
    set -u0 %j 1
    while (%j <= $nick($chan(%i),0)) {
      if ($nick($chan(%i),%j) isreg $chan(%i)) { cline %cnl.reg $chan(%i) $nick($chan(%i),%j)) }
      if ($nick($chan(%i),%j) isvo $chan(%i)) { cline -m %cnl.voice $chan(%i) $nick($chan(%i),%j)) }
      if ($nick($chan(%i),%j) ishelp $chan(%i)) { cline -m %cnl.help $chan(%i) $nick($chan(%i),%j)) }
      if ($nick($chan(%i),%j) isop $chan(%i)) { cline -m %cnl.op $chan(%i) $nick($chan(%i),%j)) }
      if ($nick($chan(%i),%j) == $me) { cline -m %cnl.me $chan(%i) $nick($chan(%i),%j)) }
      if ($nick($chan(%i),%j) isnotify) { cline %cnl.notify $chan(%i) $nick($chan(%i),%j)) }
      if ($nick($chan(%i),%j) $+ !*@* isignore) { cline %cnl.ignore $chan(%i) $nick($chan(%i),%j)) }
      if $istok(%specialnicks,$nick($chan,%j),32) == $true {
        cline -m  $+(%,cnlcolor.,$nick($chan,%j)) $chan(%i) $nick($chan(%i),%j)) 
      }
      inc %j
    }
    inc %i
  }
}

all of the things work but that last one ..... im trying to get it to change with the cline command and it just keeps them thier regular colorskinda giving me a migrain tryin to figure this one out...... i echoed that same command back to me and it shows all the correct variables filled in when i type /make.co but its still not changing the colors ...... i put it last cause i figured that would be the last one it would call to hoping its not resetting things but still no luck .. even commented out all the other if statements and still wont run the cline command right ...... its running an echo when it returns a true result ..... just not the cline command anyhow id really appreciate the help with figuring this lil thing out

EDIT: shortened the long line to better fit the forum.

Last edited by Hammer; 09/03/03 11:27 PM.

D3m0nnet.com
#14644 09/03/03 08:32 AM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline OP
Hoopy frood
OP Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
ok ive actually got it to work now and it seems it needs a pause for the variables to set because its processing the script to fast .... i set a timer in it and it is now working exactly as i want ..... but ..... im wondering if its a decent way to solve that problem

this is what i have now and it does work

Code:
alias make.co {
  set -u0 %i 1
  while (%i <= $chan(0)) {
    set -u0 %j 1
    while (%j <= $nick($chan(%i),0)) {
      if ($nick($chan(%i),%j) isreg $chan(%i)) { cline %cnl.reg $chan(%i) $nick($chan(%i),%j)) }
      if ($nick($chan(%i),%j) isvo $chan(%i)) { cline -m %cnl.voice $chan(%i) $nick($chan(%i),%j)) }
      if ($nick($chan(%i),%j) ishelp $chan(%i)) { cline -m %cnl.help $chan(%i) $nick($chan(%i),%j)) }
      if ($nick($chan(%i),%j) isop $chan(%i)) { cline -m %cnl.op $chan(%i) $nick($chan(%i),%j)) }
      if ($nick($chan(%i),%j) == $me) { cline -m %cnl.me $chan(%i) $nick($chan(%i),%j)) }
      if ($nick($chan(%i),%j) isnotify) { cline %cnl.notify $chan(%i) $nick($chan(%i),%j)) }
      if ($nick($chan(%i),%j) $+ !*@* isignore) { cline %cnl.ignore $chan(%i) $nick($chan(%i),%j)) }
      if $istok(%specialnicks,$nick($chan(%i),%j),32) == $true {
        .timer 1 0 cline -m $+(%,cnlcolor.,$nick($chan(%i),%j)) $chan(%i) $nick($chan(%i),%j)) 
      }
      inc %j
    }
    inc %i
  }
}

any ideas might be helpful

EDIT: shortened the long line to better fit the forum.

Last edited by Hammer; 09/03/03 11:26 PM.

D3m0nnet.com
#14645 09/03/03 09:20 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Why not use the /cnick command? it's way faster, and very flexible. see /help /cnick, and if you need help with specific syntax post a reply here.

#14646 09/03/03 02:46 PM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline OP
Hoopy frood
OP Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
again the same problem would arise whether or not i used cnick cline aline or whatever possible thing u could think of ...... its not setting the variable inside the loop unless there is a pause in the time it takes to process the loop set the variables and then trigger the command im issuing otherwise it doesnt return the %cnlcolor.NICK variable in time for it to issue the command correctly


D3m0nnet.com

Link Copied to Clipboard