mIRC Home    About    Download    Register    News    Help

Print Thread
#147444 18/04/06 07:44 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
i dont understand

in help file it says for /updatenl

"Usually the channel nicknames list and IAL in a kick/part/quit script event are updated after the script finishes, this command updates them immediately."

but it does not, i have this command executed in clone scan
and it doesnt update ial addresses nor nothing

and if i understood correctly it should

so when i join channel with clones, script doesnt find them
until users (clones) do some action (like rejoin)

so is this bug or i'm missing something?

Last edited by raZOR; 18/04/06 07:45 PM.

IceCapped
#147445 18/04/06 08:48 PM
Joined: Dec 2004
Posts: 66
B
Babel fish
Offline
Babel fish
B
Joined: Dec 2004
Posts: 66
When you join have a script do a /who, that will initialize the IAL for that channel. I’ve never used /updatenl, it seems specifically for use in On *:kick/part/quit: events, not general initialization of the IAL.

#147446 18/04/06 09:00 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
By 'updating the ial and nicklist' he means that the users nick
isn't removed from the nicklist and removed from the ial when
they quit, part or are kicked from the channel until after the
script finishes processing. /updatenl doesn't fill the ial, the IAL
is added to one nick/address at a time as they speak or join
or some kind of action on the channel, from mirc.hlp...

A user's address is added to the list either when they
join the channel, send a message to a channel, or make
a mode change.


The only way to fill the IAL when you join a channel is
to perform a /who on the channel when you join...

on ME:*:JOIN:#: {
$+(.timerWho.,$network,.,#) 1 $chan(0) if ( # ischan) who #
}

#147447 18/04/06 10:41 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
well look at this script:
green colored is added by me (additional)
and it still dont work altho i use /who $chan


Code:
 
;made by hixxy
;usage /clonescan

alias clones {
  [color:green].ial on [/color] 
 [color:green] .who $chan[/color] 
  if (!$chan($1).ial) updatenl
  var %clones, %i = 1
  while ($ialchan($address($2,2),$1,%i).nick) {
    if ($v1 != $2) || ($prop == ionick) %clones = %clones $ialchan($address($2,2),$1,%i).nick
    inc %i
  }
  return %clones
}

alias clonescan {
  if ($1 == $null) tokenize 32 $chan
  var %clones, %clonesdone, %i = 1
  echo $color(info) -abfilrt * Scanning for clones...
  while ($nick($1,%i)) {
    if (!$istok(%clonesdone,$v1,32)) {
      %clones = $clones($1,$nick($1,%i))
      if (%clones != $null) { 
        %clonesdone = $addtok(%clonesdone,%clones,32)
        echo $color(info) -abfilrt * Clones for $nick($1,%i) $+ : %clones ( $+ $address($nick($1,%i),2) $+ )
      }
    }
    inc %i
  }
  echo $color(info) -abfilrt * End of scan.
}

 


IceCapped
#147448 19/04/06 03:42 AM
Joined: Dec 2004
Posts: 66
B
Babel fish
Offline
Babel fish
B
Joined: Dec 2004
Posts: 66
I think that use of $chan is only for use in a remote event such as On *:Join:..., and you are using it in aliases. You might call the alias with the name of the channel you want or if you are only going to call the alias with the channel the active mirc window you can use /who $active.

The /who needs to finish initializing the IAL before clonescan is called.

#147449 19/04/06 04:00 AM
Joined: Dec 2004
Posts: 66
B
Babel fish
Offline
Babel fish
B
Joined: Dec 2004
Posts: 66
Hmm, I’m too sleepy... I just saw that you are calling the alias clones from a loop in the alias clonescan, and clones always does a /who. You only need to use /who to initialize the IAL when You join a channel. After that mirc will update the IAL as needed as long as you are in the channel.
Code:
on *:join:#: {
  if ($nick == $me) .who $chan
}  

#147450 19/04/06 11:26 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
well if i do that i will get choked since i join over 15 channels at once with god knows how many users :P

whould it be good if i make another alias that first calls /who $active and then /clonescan ?

~edit~
i use this

alias scanclones { .who $active | .timerclones 1 5 .clonescan }
and now it does WHO but wont run clonescan :P

Last edited by raZOR; 19/04/06 11:37 AM.

IceCapped
#147451 19/04/06 12:49 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
That's because $chan doesn't exist as the alias is called from a timer. Try .timerclones 1 5 clonescan $active

#147452 19/04/06 12:57 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
hellou

alias scanclones { .who $active | .timerclones 1 5 clonescan $active }

on some weird way, it wont even run clonescan :tongue:


IceCapped
#147453 19/04/06 01:27 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
Code:
alias scanclones {
  .ial on
  if ($eval($+(%,clonescan.,$active,.,$cid),2)) return
  set -eu[color:red]10[/color] $+(%,clonescan.,$active,.,$cid) $true
  who $active
}
raw 352:*:if ($eval($+(%,clonescan.,$2,.,$cid),2)) haltdef
raw 315:*: {
  if ((!$eval($+(%,clonescan.,$2,.,$cid),2)) || ($2 !ischan)) return
  haltdef
  unset $+(%,clonescan.,$2,.,$cid)
  clonescan $2
}


You may need to raise this, depending on your network lag.

#147454 19/04/06 02:48 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
wow, this works great !

thanks =)

thanks to hixxy for code and mIRCManiac for help =D


IceCapped
#147455 19/04/06 05:13 PM
Joined: Dec 2004
Posts: 66
B
Babel fish
Offline
Babel fish
B
Joined: Dec 2004
Posts: 66
I don’t know how you use the clone scan, if you use it more than once without rejoining the channel the IAL is already initialized so you don’t need to do /who the channel again.

You can use the “Window Identifiers” version of $chan to see if the IAL contains addresses of all users on the channel. You can add a test to mIRCManiac’s code like this:

Code:
alias scanclones {

  if ($chan($active).ial) clonescan $active

  else {

    .ial on

    if ($eval($+(%,clonescan.,$active,.,$cid),2)) return

    set -eu10 $+(%,clonescan.,$active,.,$cid) $true

    who $active

  }
}  

I didn’t test the alias. My situation is different, I’m an IRCop on a small server, typically 2 channels and a total of 100ish chatters at one time, so I just /who the whole thing when I join.

#147456 19/04/06 05:32 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
cool, thats nice coz who kinda floods much =)
thanks for additional code =D

and yes it works !


IceCapped
#147457 19/04/06 06:02 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
but then again, does this gets updated after someone joins parts ? in which case /who actually always updates ial


IceCapped
#147458 19/04/06 06:13 PM
Joined: Dec 2004
Posts: 66
B
Babel fish
Offline
Babel fish
B
Joined: Dec 2004
Posts: 66
From /help IAL
Quote:
A user's address is added to the list either when they join the channel, send a message to a channel, or make a mode change.

A user's address is removed from the list when they are no longer on any of the channels which you are currently on.

So you need the /who to inialize the IAL for people that were in the channel before you and haven't said anything since you got there.

#147459 19/04/06 06:26 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
oh. well i never used this ial stuff so i dont know =)
thanks.


IceCapped

Link Copied to Clipboard