1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
alias clones {
var %x = 1, %clones = 0
while (%x <= $nick($1,0)) {
if (!%clone [ $+ [ $address($nick($1,%x),2) ] ]) && ($ialchan($address($nick($1,%x),2),$1,0) > 1) {
var %clone $+ $address($nick($1,%x),2) = true
var %y = 1
if ($v1 >= $clones($1).limit) {
while (%y <= $ialchan($address($nick($1,%x),2),$1,0)) {
$clones($1).action $1 $ialchan($address($nick($1,%x),2),$1,%y).nick
inc %y
}
}
}
inc %x
}
}
on *:TEXT:$clones*:#:{
if ($2 == limit) {
if ($3) { notice $nick Set clone limit to $3 | hadd -m settings $+($chan,$chr(230),clonelimit) $3 }
elseif (!$3) { notice nick The clone limit $iif($clones($chan).limit,is NOT set,is $v1) }
}
elseif ($2 == action) {
if ($3) { notice $nick Set clone action to $3 | hadd -m settings $+($chan,$chr(230),clonelimit) $3 }
elseif (!$3) { notice nick The clone action is $iif($clones($chan).action,is NOT set,$iif(ban isin $v1,ban the clones, kick the clones)) }
}
}
|