Hello,
I have this line in a script :
%clones = %clones $ialchan(%host_to_search_for,chan,%count).nick
What is this ?
This line is out of a condition statements like if then , while , etc ...
What do this line ?
Thx
This line would be from a loop that iterates through the %count of nicknames with a matching %host_to_search_for address mask. It does this %count times, creating a list of all the matching nicknames together into a the %clones variable.
$ialchan(*!*@*.aol.com,#aol,0) would tell the loop how many times it has to iterate.
$ialchan(*!*@*.aol.com,#aol,1).nick would be the first matching nickname.
$ialchan(*!*@*.aol.com,#aol,2).nick would be the second matching nickname.
%clones = $ialchan($address($nick($1,%count1),2),$1,%count2).nick
this line assigns the result to %clones variable :
$nick($1,%count1) ; extract %count1 number nick_name from $1 channel from IAL ( internal address list)
$address(nick,2) ; extract *!*@domain from given nick_name from IAL
$ialchan(*!*domain,#channel,%count2) ; found *!*@domain string for %count2 element in IAL
The $ialchan(*!*domain,#channel,%count2) function found the string *!*domain in the %count2 element of IAL.
teorically this is a classic example of while or for programming usage.
I don't understand what mean .nick at the end of line.
Thanks
The '.nick' property at the end of '$ialchan()' tells it to return only the nickname instead of the full address.
$ialchan(*ccoo*!*@*,#chan,1) == Raccoon!fuzzy@woodland.critter
$ialchan(*ccoo*!*@*,#chan,1).nick == Raccoon
same as
$gettok($ialchan(*ccoo*!*@*,#chan,1),1,33) == Raccoon