type in channel / query to bot:
.view file
to view a text file
alias view {
%file = $1
if ($isfile(%file) == $true) {
%i = 0
%viewtimer = 1
%lines = $lines(%file)
:nextzeile
inc %i
inc %viewtimer 2
if ($read(%file,%i) != $null) { timer 1 %viewtimer msg $nick * $read(%file,%i) }
if ($read(%file,%i) == $null) { timer 1 %viewtimer msg $nick * }
if %i = %lines { goto end }
if %i < %lines { goto nextzeile }
:end
}
else { msg $nick " $+ %file $+ " is no file }
}
on *:text:.view*:*:{ view $2 }
I know its dangerus, but you can easy change the userlevel:
before:
on :text:.view:*:{ view $2 }
after:
on 20:text:.view::{ view $2 }
and.. there is an floodprotection in the script
I\'ve used a timer that add +2 seconds per line
see this:
...
%viewtimer = 1
:nextzeile
inc %viewtimer 2
...
if %i < %lines { goto nextzeile }
...
thats the same :)
@bearruler you can use an $nick identifier in an alias
test it ;)
Please test snippets before posting them
Aliases do not have a $nick identifier
You could have used /play too
on :text:.view :*: play $2 $nick
I believe that does it too
This snippet is very dangerous though
If you have auto-identify preform commands, people could just view your mirc.ini file and get your password
Bear