Ah, right. Forgot about the 'n' switch. Thanks for pointing that out.
You can't use $replace like that because you might be replacing <> from the text itself, you should only replace in the first word in the line.
That's how I intended it to work. The issue is that on Twitch whenever you post something like "<text" it completely eats the message. It's basically an open bracket followed by any character, except a space. So I'm just replacing the brackets with parentheses to remedy this.
And thanks. That sounds logical. Although it's currently not returning any results at all with the following code:
on *:text:!quote find *:#: {
window -h @results
filter -fw quotes.txt @results <?*> $3- ~ Added by & at &
if ($filtered == 0) msg $chan $nick -> No result found.
else {
var %line $line(@results,$r(1,$v1))
%line = $replace($gettok(%line,1,32),<,$chr(40),>,$chr(41)) $gettok(%line,2-,32)
msg $chan %line
}
;window -c @results
}
I'm probably overlooking something really small.