a clones detector
put the code in your remote and look at the menu you will find WorldDMT Clones Detector V1.0 with status
enable it
menu status,nicklist,menubar {
-
WorldDMT Clones Detector V1.0 $iif(%stat.wclone,-[ ON ]-,-[ OFF ]-)
.$iif(%stat.wclone,Desative,Enable) it:set %stat.wclone $iif(%stat.wclone,0,1)
-
}
on *:join:#:{
if $nick == $me {
set %/who $+ # 1
who #
}
else {
if %stat.wclone {
if $ialchan($wildsite,#,0) > 1 {
echo # 7- clones detected $+($chr(3),4,$chr(91),$chr(3)) $regsubex($str(x,$v1),/x/g,$+($chr(3),14,$ialchan($wildsite,#,\n).nick,$chr(3),$chr(32))) $+($chr(3),4,$chr(93),$chr(3))
}
}
}
}
raw *:*:{
if (($numeric == 352) && ($($+(%,/who,$2),2))) haltdef
elseif ($numeric == 315) && ($($+(%,/who,$2),2)) { unset %/who $+ $2 | haltdef }
}
Finally I did it to shorten WordDMT's script to 525 bytes
menu status,nicklist,menubar {
-
WorldDMT Clones Detector V1.0 $iif(%stat.wclone,-[ ON ]-,-[ OFF ]-)
.$iif(%stat.wclone,Dis,En) $+ able it:set %stat.wclone $iif(%stat.wclone,0,1)
-
}
on *:join:#:{
if $nick = $me { set %/who $+ # 1 | who # }
elseif %stat.wclone && $ialchan($wildsite,#,0) > 1 {
while ($ialchan($wildsite,#,$0).nick) tokenize 32 $1- $v1 | echo # 7- Clones Detected 4[ $2- 4]
}
}
raw *:*:{
if (($numeric = 352) && ($($+(%,/who,$2),2))) haltdef
elseif ($numeric = 315) && ($($+(%,/who,$2),2)) unset %/who $+ $2 | haltdef
}
I wasn't bored until slub77 started it. lol But thanks for the suggestion, Ford. This time I tried looking at both the inconsistency, redundancy and went for a different route rather than using the regsubex, which cuts many bytes.
:/ but how could it be bigger? The only thing I touched was the equal signs, the removal of two curly brackets, and your menu switch. The rest is the same. :o > == to > =, { and } in your raw events, and this:
.$iif(%stat.wclone,Dis,En) $+ able it:set %stat.wclone $iif(%stat.wclone,0,1)
That's as compact and small as I can go...:p
How about this one. This has to be a little bit smaller now lol
menu status,nicklist,menubar {
-
WorldDMT Clones Detector V1.0 $iif(%stat.wclone,-[ ON ]-,-[ OFF ]-)
.$iif(%stat.wclone,Dis,En) $+ able it:set %stat.wclone $iif(%stat.wclone,0,1)
-
}
on *:join:#:{
if $nick = $me { set %/who $+ # 1 | who # }
set %/who $+ # 1
who #
}
else {
if %stat.wclone {
if $ialchan($wildsite,#,0) > 1 {
echo # 7- clones detected $+($chr(3),4,$chr(91),$chr(3)) $regsubex($str(x,$v1),/x/g,$+($chr(3),14,$ialchan($wildsite,#,\n).nick,$chr(3),$chr(32))) $+($chr(3),4,$chr(93),$chr(3))
}
}
}
}
raw *:*:{
if (($numeric = 352) && ($($+(%,/who,$2),2))) haltdef
elseif ($numeric = 315) && ($($+(%,/who,$2),2)) unset %/who $+ $2 | haltdef
}
lol :p Well, if you really want to shrink WorldDMT's script a tiny bit further, you can do this:
menu status,nicklist,menubar {
-
WorldDMT Clones Detector V1.0 $iif(%stat.wclone,-[ ON ]-,-[ OFF ]-)
.$iif(%stat.wclone,Dis,En) $+ able it:set %stat.wclone $iif(%stat.wclone,0,1)
-
}
on *:join:#:{
goto $iif($nick = $me,x,y) | :x | set %/who $+ # 1 | who # | halt | :y
if %stat.wclone && $ialchan($wildsite,#,0) > 1 {
echo # 7- clones detected $+($chr(3),4,$chr(91),$chr(3)) $regsubex($str(x,$v1),/x/g,$&
$+($chr(3),14,$ialchan($wildsite,#,\n).nick,$chr(3),$chr(32))) $+($chr(3),4,$chr(93),$chr(3)) | halt
}
}
raw *:*:{
if (($numeric = 352) && ($($+(%,/who,$2),2))) haltdef
elseif ($numeric = 315) && ($($+(%,/who,$2),2)) unset %/who $+ $2 | haltdef
}
I have changed the join event a little, as well as a typo, which to be in French, and made the enable and disable switch a bit smaller. But it's not that much of a difference in size, just a few bytes off. :P
menu status,nicklist,menubar {
-
WorldDMT Clones Detector V1.0 $iif(%stat.wclone,-[ ON ]-,-[ OFF ]-)
.$iif(%stat.wclone,Desative,Enable) it:set %stat.wclone $iif(%stat.wclone,0,1)
-
}
on *:join:#:{
if $nick == $me { set %/who $+ # 1 | who # }
else {
if %stat.wclone {
if $ialchan($wildsite,#,0) > 1 {
echo # 7- clones detected $+($chr(3),4,$chr(91),$chr(3)) $regsubex($str(x,$v1),/x/g,$+($chr(3),14,$ialchan($wildsite,#,\n).nick,$chr(3),$chr(32))) $+($chr(3),4,$chr(93),$chr(3)) } } } }
raw *:*:{
if (($numeric == 352) && ($($+(%,/who,$2),2))) haltdef
elseif ($numeric == 315) && ($($+(%,/who,$2),2)) { unset %/who $+ $2 | haltdef } }
Slub77 runs off