mIRC Home    About    Download    Register    News    Help

Print Thread
#15440 15/03/03 03:29 AM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline OP
Hoopy frood
OP Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
ok ive got a snippet here from my nicklist that just wont work when someone parts yet it works perfectly on any other on join op deop and whatnot i cant seem to figure out why ... i added an echo line into it to status to know infact it is triggering but its not giving me an error

Code:
on *:PART:#: {
  %sn = 1
  if $nick($chan($active),%sn,a) isreg $chan($active) { did -ra _nicklist 1 0 + 1 0 0 $nick($chan($active),%sn,a) }
  if $nick($chan($active),%sn,a) isop $chan($active) { did -ra _nicklist 1 0 + 2 0 0 $nick($chan($active),%sn,a) }
  if $nick($chan($active),%sn,a) ishop $chan($active) { did -ra _nicklist 1 0 + 3 0 0 $nick($chan($active),%sn,a) }
  if $nick($chan($active),%sn,a) isvoice $chan($active) { did -ra _nicklist 1 0 + 4 0 0 $nick($chan($active),%sn,a) }
  if $nick($chan($active),%sn,a) isowner $chan($active) { did -ra _nicklist 1 0 + 5 0 0 $nick($chan($active),%sn,a) }
  %sn = 2
  while ( $nick($chan($active),%sn,a) != $null ) {
    if $nick($chan($active),%sn,a) isreg $chan($active) { did -a _nicklist 1 0 + 1 0 0 $nick($chan($active),%sn,a) }
    if $nick($chan($active),%sn,a) isop $chan($active) { did -a _nicklist 1 0 + 2 0 0 $nick($chan($active),%sn,a) }
    if $nick($chan($active),%sn,a) ishop $chan($active) { did -a _nicklist 1 0 + 3 0 0 $nick($chan($active),%sn,a) }
    if $nick($chan($active),%sn,a) isvoice $chan($active) { did -a _nicklist 1 0 + 4 0 0 $nick($chan($active),%sn,a) }
    if $nick($chan($active),%sn,a) isowner $chan($active) { did -a _nicklist 1 0 + 5 0 0 $nick($chan($active),%sn,a) }
    inc %sn
  }
}


its kinda weird as hell that it just doesnt work on a part yet works perfectly thru join when the help file says its supposed to use the same variables??? anyhow again id appreciate any help in this ..... and ill go thru my scripts to make sure there isnt something else stopping it


D3m0nnet.com
#15441 15/03/03 03:48 AM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline OP
Hoopy frood
OP Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
ok ironically enough i think ive figured this one out ...... another one of them pause mirc needs to execute the script properly ....... so what i did was make that nicklist populater into an alias and called it nicklistfiller then did this

on *:PART:#: { timer 1 0 nicklistfiller }

and it works right that way ..... its odd the more things i get into with mirc the more ive encountered this ...... i guess now i see why everyones been asking for some sort of puase for scripting ...... anyhow i figured it out and decided it would be nice to show others


D3m0nnet.com
#15442 15/03/03 04:27 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Well, it isn't really that mIRC needs a pause here, the problem is that until AFTER the part event, the nick is still on the channel. Using /timer 1 0.. (or /signal without the n switch) delays the execution until after the event has processed. Another way would be to use /updatenl before you do the processing, keeping in mind that this will also impact other scripts that follow this file in the load order.
Code:
on *:part:#:{
  updatenl
  <rest of code here>
}

The same is true for quits. Until after your script has finished processing the event, the nick is still 'live' and on any common channels.

#15443 15/03/03 04:40 AM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline OP
Hoopy frood
OP Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
yeah i found out it applied to the quits as well and i did the same ..... for it and it also works ....... again ty for the help uve given me as of lately nimue i do greatly appreciate it


D3m0nnet.com
#15444 15/03/03 05:35 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
No worries smile


Link Copied to Clipboard