hi
u use if $me isin %var
if your nick is "bam" and we type bamboo u will hightlight??? dont use isin here use $findtok is better
if (%hiservers == on) { aline @highlight 7 $+ $server $nick 14highlighted you at 7 $+ $time 14in 7 $+ $chan }
if (%hiservers == off) { aline @highlight 7 $+ $nick 14highlighted you at 7 $+ $time 14in 7 $+ $chan }
u can replace it by
aline @highlight 7 $+ $iif(%hiservers == on,$server) $nick 14highlighted you at 7 $+ $time 14in 7 $+ #
and u can replace aline by echo i u want
why u put /window -e u dont need edit box no?!!
"if (%highlights == off) { halt }" is unless u can remove it
so u can do this
on *:text:*:#:{
tokenize 32 $strip($1-)
if (%highlights == on) {
if $findtok($1-,$me,32) {
if ($2 == $null) && (%hrep == on) {
msg # $nick $+ ?
aline @highlight 0....14Replied? 7y
}
aline @highlight 7 $+ $iif(%hiservers == on,$server) $nick 14highlighted you at 7 $+ $time 14in 7 $+ #
aline @highlight 0..14With message: 7 $+ $iif($2,$1-,No message)
}
}
}
for alias highlights & alias hrep u can do it like this
alias hrep if ($istok(on.off,$1,46)) set %hrep $1
alias highlights {
if ($istok(on.off,$1,46)) {
set %highlights $1
window $iif($1 == on,-enxz,-c) @highlight
}
elseif ($1 == clear) dline @highlight 1- $+ $line(@highlight,0)
elseif (($1 == servers) && ($istok(on.off,$2,46))) set %hiservers $2
}
better use 1 & 0 for variable then u'll use it like this
if (%var) <==== if %var = 1 the commande will be execute if %var = 0 it's dont
so finaly your code can be like this
on *:LOAD:{
echo -a Highlight script by sloth loaded.
echo -a To turn it on /highlights on
echo -a To turn it off /highlights off
echo -a To clear highlight log /highlights clear
echo -a To set automatic replies on or off
echo -a use /hrep on or /hrep off
echo -a Use /highlights servers on to enable multi-server logging
echo -a Use /highlights servers off to disable multi-server logging
echo -a version 0.4
set %highlights 1
set %hrep 0
set %hiservers 0
}
on *:text:*:#:{
tokenize 32 $strip($1-)
if (%highlights) {
if $findtok($1-,$me,32) {
if ($2 == $null) && (%hrep) {
msg # $nick $+ ?
aline @highlight 0....14Replied? 7y
}
aline @highlight 7 $+ $iif(%hiservers,$server) $nick 14highlighted you at 7 $+ $time 14in 7 $+ #
aline @highlight 0..14With message: 7 $+ $iif($2,$1-,No message)
}
}
}
alias hrep if ($istok(on.off,$1,46)) set %hrep $iif($1 == on,1)
alias highlights {
if ($istok(on.off,$1,46)) {
set %highlights $iif($1 == on,1)
window $iif($1 == on,-enxz,-c) @highlight
}
elseif ($1 == clear) dline @highlight 1- $+ $line(@highlight,0)
elseif (($1 == servers) && ($istok(on.off,$2,46))) set %hiservers $iif($2 == on,1)
}