; location "#" was changed for "*" to match both channel- and query messages
on *:text:*:*:{
; if it's in a query theres no chan, so the condition was extended
if (!$chan) || ($nick isreg $chan) {
var %k = 1, %kk = $lines(spam.txt)
while (%k <= %kk) {
if ($+(*,$read(spam.txt,%k),*) iswm $1-) {
if (!$window(@Spams)) { window -mze @Spams }
; the two $iif in the next lines will echo/write the channels name or "[query]" for private messages
echo -t @Spams $fulldate $iif($chan,$v1,[query]) $nick : $1-
write $qt($mircdirlogs\Spams.txt) $fulldate $iif($chan,$v1,[query]) $nick : $1-
break
}
inc %k
}
}
}