ok, so for my bot i have flags,
the deflag part of the script is as folows:
if ($1 == !deflag) {
if (Q isincs [ %flags [ $+ [ $nick ] ] ]) || (q isincs [ %flags [ $+ [ $nick ] ] ]) {
if (Q isincs [ %flags [ $+ [ $nick ] ] ]) {
set %n 1
set %d $mid($3,%n,1)
inc %n
:s
if (%n =< $len($3-)) {
set %d %d , $mid($3,%n,1)
inc %n
goto s
}
set %oflags $+ $2 $read(flags.txt,s,$2)
write -ds $+ $2 flags.txt
write flags.txt $2 $removecs([ %oflags [ $+ [ $2 ] ] ],%d)
if ([ %flags [ $+ [ $2 ] ] ] != $null) {
set %flags $+ $2 $read(Flags.txt,s,$2)
}
msg $chan $2 $+ 's flags are now: $read(flags.txt,s,$2)
halt
}
if (q isincs [ %flags [ $+ [ $nick ] ] ]) && (Q !isincs [ %flags [ $+ [ $2 ] ] ]) {
set %oflags $+ $2 $read(flags.txt,s,$2)
write -ds $+ $2 flags.txt
write flags.txt $2 $removecs([ %oflags [ $+ [ $2 ] ] ],[ %d ])
if ([ %flags [ $+ [ $2 ] ] ] != $null) {
set %flags $+ $2 $read(Flags.txt,s,$2)
}
msg $chan $2 $+ 's flags are now: $read(flags.txt,s,$2)
halt
}
}
}
}
so when someone with a flag of Q or q, says !deflag <nick> <flags to take away>
if you go
!deflag u abc
it only takes away the a
can anyone tell me how to fix this problem?