Clone Detect on Join/Part
Installation: //load -rs c-detect.mrc
Script enviornment: Remotes
Note: Make sure you have IAL turned on. Type /ial on to turn IAL on if you have not yet done so.
#c-detect on
alias -l ident { return $gettok( $gettok($1 , 1 , 64 ) , 2 , 33 ) }
on ^!*:join:#: {
var %_match = [[ $+ $ialchan($address($nick,2),#,0) match $+ $iif($ialchan($address($nick,2),#,0) > 1,es) $+ ]]
var %x = $ialchan($address($nick,2),#,0) , %nicks
if (%x > 1) {
while (%x) { %nicks = %nicks $ialchan($address($nick,2),#,%x).nick | dec %x }
}
%nicks = [[ $+ %nicks $+ ]]
echo $colour(join) $target *** [Join] $nick ( $+ $ident($fulladdress) $+ @ $+ $site $+ ) %_match $iif( $ialchan($address($nick,2),#,0) > 1 , %nicks )
haltdef
}
on ^!*:part:#: {
var %_match = $calc($ialchan($address($nick,2),#,0) - 1) , %nicks , %x
if (%_match < 0) { var %_match = 0 }
if (%_match > 1) {
%x = %_match
while (%x) { %_nicks = %nicks $+ $chr(44) $ialchan($address($nick,2),#,%x).nick | dec %x }
}
%nicks = [[ $+ %nicks $+ ]]
echo $colour(part) $target *** [Part] $nick ( $+ $ident($fulladdress) $+ @ $+ $site $+ ) [[ $+ %_match match $+ $iif(%_match == 0,es,$iif(%_match > 1,es)) $+ ]] $iif($1, $chr(91) $+ $1- $+ $+ $chr(93)) $iif( %match > 1 , %nicks )
haltdef
}
#c-detect end