This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
-
inertia
- Voice
- Posts: 6
- Joined: Sun Nov 19, 2006 12:43 pm
Post
by inertia »
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.
-
rosc2112
- Revered One
- Posts: 1454
- Joined: Sun Feb 19, 2006 8:36 pm
- Location: Northeast Pennsylvania
Post
by rosc2112 »
Short of hacking the source? I don't believe so... You could always make a little script to basically do a custom log.
-
inertia
- Voice
- Posts: 6
- Joined: Sun Nov 19, 2006 12:43 pm
Post
by inertia »
yeah if I knew how to make it
-
Sir_Fz
- Revered One
- Posts: 3794
- Joined: Sun Apr 27, 2003 3:10 pm
- Location: Lebanon
-
Contact:
Post
by Sir_Fz »
So, what exactly do you want to log? (msgs, notices, parts, joins...etc).
-
inertia
- Voice
- Posts: 6
- Joined: Sun Nov 19, 2006 12:43 pm
Post
by inertia »
just the public text and absolutely nothing else
-
Sir_Fz
- Revered One
- Posts: 3794
- Joined: Sun Apr 27, 2003 3:10 pm
- Location: Lebanon
-
Contact:
Post
by Sir_Fz »
Code: Select all
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.
-
inertia
- Voice
- Posts: 6
- Joined: Sun Nov 19, 2006 12:43 pm
Post
by inertia »
oh wow!
thanks a ton, man!
I'll try it soon!
:bowdown: