| View previous topic :: View next topic |
| Author |
Message |
inertia Voice
Joined: 19 Nov 2006 Posts: 6
|
Posted: Tue Nov 21, 2006 6:21 am Post subject: Customizing public channel logs |
|
|
Hello
I would like to know if there is a way to exclude timestamps and nicknames and /me's from being logged when logging public channels (p).
Thanks in advance.
Last edited by inertia on Wed Nov 22, 2006 12:07 am; edited 1 time in total |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Tue Nov 21, 2006 10:59 pm Post subject: |
|
|
| Short of hacking the source? I don't believe so... You could always make a little script to basically do a custom log. |
|
| Back to top |
|
 |
inertia Voice
Joined: 19 Nov 2006 Posts: 6
|
Posted: Wed Nov 22, 2006 12:08 am Post subject: |
|
|
yeah if I knew how to make it  |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Wed Nov 22, 2006 10:28 am Post subject: |
|
|
So, what exactly do you want to log? (msgs, notices, parts, joins...etc). _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
inertia Voice
Joined: 19 Nov 2006 Posts: 6
|
Posted: Wed Nov 22, 2006 11:13 am Post subject: |
|
|
| just the public text and absolutely nothing else |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Wed Nov 22, 2006 11:33 am Post subject: |
|
|
| Code: | foreach logchan [channels] {
set logchan [string tolower $logchan]
if {[file exists logs/$logchan.pub.log]} {
set publog($logchan) [split [read [set inf [open logs/$logchan.pub.log]]] "\n"][close $inf]
}
}
setudef flag publog
bind pubm - * logtext
bind time - ?0* savelog
proc logtext {nick uhost hand chan arg} {
global publog
if {[channel get $chan publog]} {
lappend publog([string tolower $chan]) $text
}
}
proc savelog {m h args} {
global publog
foreach c [channels] {
set c [string tolower $chan]
if {[info exists publog($c)] && [channel get $c publog]} {
if {[regexp {03:00} $h:$m]} {
if {[file exists logs/$c.pub.log]} {
set bla [open logs/$c.pub.log.yesterday w]
foreach e $publog($c) {
puts $bla $e
}
close $bla
set publog($c) [list]
}
} {
set bla [open logs/$c.pub.log w]
foreach e $publog($c) {
puts $bla $e
}
close $bla
}
}
}
} |
It will log only channels that have +publog chan setting. And the logs will be saved in the logs/ directory. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
inertia Voice
Joined: 19 Nov 2006 Posts: 6
|
Posted: Thu Nov 23, 2006 12:08 pm Post subject: |
|
|
oh wow! thanks a ton, man! I'll try it soon!
:bowdown: |
|
| Back to top |
|
 |
|