Gives the user extended configuration of how private logs are saved and most importantly sent back to the user when attaching. Made as a sister-script to log.tcl by doomie.
The main feature is that you, when attaching, get the queries as if your client were connected all along. Note that this requires not only this sBNC script, but also some handling in your client end to display the messages optimally.
| Software | Version | Details |
|---|---|---|
| sBNC (w/TCL module) | 1.1 | Developed and tested on 1.2-885. |
| Date | Version | Download |
|---|---|---|
| 2007-03-07 | 0.2 | .tcl (13.5kB) .zip (3.1kB) |
privlog.tcl in scripts/source scripts/privlog.tcl to sbnc.tcl/sbnc read : Read logs according to settings. /sbnc erase : Erase logs /sbnc privlog : Show overview of unique sources and lines from each.
You can set up the default user settings, and a few global settings near the top of privlog.tcl.
The user default array define the ones listed under settings below, while the settings array determines the global settings.
logdir "~/sbnc/users/"
There are several settings each user can change, all through /sbnc set
/sbnc set privlog.automated <0|1>
0 = Manual. You need to use ”/sbnc read” to read the logs.1 = Automated. Logs are automatically sent to you when attaching./sbnc set privlog.reply <0|1|101>
0 = Send messages from '-sBNC' (old '/sbnc read' style).1 = Separate query windows.101 = Send as RAW numeric for the client to display as it wish. See the mIRC example script./sbnc set privlog.autoerase <0|1>
0 = Do not erase.1 = Erase when read./sbnc set privlog.threshold <number>
number = If privlog.automated above is 1 and there are more unique queries than number; a warning will be displayed instead of automatically sending the logs. The logs are still available with ”/sbnc read ” and the other commands./sbnc set privlog.timestamp <format>
format = Format the timestamp should be displayed as. Example: ”(%H:%M:%S)”. You can find the available variables on http://www.tcl.tk/man/tcl8.4/TclCmd/clock.htm#M6.
If you have set privlog.reply to a value other than 0 or 1, the script will send the logs to your client as a RAW numeric. This is an example of how mIRC can intercept that RAW message and display it as if your client was online all along.
101 in privlog.reply.raw sbnc:101 *:{ ; Format: ; :<server> sbnc <reply> <yournick> <ctime> <type> <nick!user@host> :<message> ; $1 $2 $3 $4 $5 $6- if ($4 == PRIVMSG) { var %nick = $gettok($5,1,33) if (!$query(%nick)) { query -n %nick } echo -lmc Normal %nick $asctime($3,$timestampfmt) < $+ %nick $+ > $6- } elseif ($4 == NOTICE) { var %nick = $gettok($5,1,33) echo -lmca Notice $asctime($3,$timestampfmt) - $+ %nick $+ - $6- } haltdef }
Changes followed by
may need attention when updating from an older build/version.