alias log.viewer {
if (!$window(@logviewer)) {
/window -CkSzl18 @LogViewer
var %trash " $+ $findfile($logdir,*.log,@LogViewer,aline -l @LogViewer $gettok($nopath($1-),1,46)) $+ "
}
else { echo -a LogViewer is currently running }
}
menu @LogViewer {
dclick {
clear @LogViewer
.loadbuf @LogViewer " $+ $findfile($logdir,* $+ $sline(@LogViewer,1) $+ *,1) $+ " 0
}
stats {
echo -a 12[!] 4there are currently 12 $+ $findfile($logdir,*.log,0) 4log files
}
}
menu menubar,channel {
Log Viewer:/log.viewer
}
I like it :)
But,it doesnt show ALL the convos i had ,i.e PM with someone, it starts off in the middle of a convo rather than showing the pm convo from the start && in some of the room/pm logs, they dont show anything but the date of the convo :s
Wouldve been better if they showed the whole convo && all.
Professor jaytea is right on the money. He's more experienced in his say based upon many years of his involvement in MSL. I still have lots to learn from him if he doesn't mind to look over me when I make a mistake or misjudgment. I'm sure this will be very helpful to me to learn from mistakes and improve my know-how in MSL in the long run.
indeed Scakk, /filter is much more general than /loadbuf and involves an extra layer of buffering that the latter does not. if you can use /loadbuf, then it should be preferred. there is, however, a new /logview command that is even more specific than /loadbuf - too specific, in fact, to be used here.
Found the issue.
If you change the var %trash line to the below it will find the right log files when you double click them.
var %trash " $+ $findfile($logdir,*.log,@LogViewer,aline -l @LogViewer $nopath($1-)) $+ "
Also you can remove 'clear @LogViewer" and change the loadbuf to have the -r switch which does the same thing.