alias readtext {
var %f = $mircdir $+ $1
if ($status !== connected) { echo 4 -a ERROR: You are not connected to a network! | return }
if (!$1) { echo 4 -a ERROR: Specify a file! | return }
if (!$2) { echo 4 -a ERROR: Specify a channel! | return }
if ($me !ison $2) { echo 4 -a ERROR: You are not into the $qt($2) channel! | return }
if (!$isfile(%f)) { echo 4 -a ERROR: The $qt(%f) file does not exists! | return }
if (!$lines(%f)) { echo 4 -a ERROR: The $qt(%f) file is empty! | return }
var %l = $iif($3 && $3 isnum,$3,1)
var %r = $read(%f,nt,%l)
if (%r) { .msg $2 %r }
if (%l) && (%l == $lines(%f)) { return }
.timer[READ_ $+ $2 $+ ] -m 1 500 readtext $1 $2 $calc(%l +1)
}