a few things could be shortend
if (%sl.qra == $null) { msg $chan 10,0Random quote 6# $+ %sl.qr 10 $+ %sl.qra }
Could be
if (!$sl.qra) msg $chan 10,0Random quote 6# $+ %sl.qr 10 $+ %sl.qra
set %sl.qr $rand(1,$lines(quote.txt))
set %sl.qra $read(quote.txt, %sl.qr)
This could be set to the var command so you dont have to unset them after, and when unsetting variables that start the same, unset sl.* works.
And finally
else { halt }
}
no need for the else, just end it off.