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.

Logfile with Trigger Start and Stop

Old posts that have not been replied to for several years.
Locked
O
Offset

Logfile with Trigger Start and Stop

Post by Offset »

Hello all,

im the first time here.

I want to start the Eggdrop Logging with the command !startlog
and to stop with !stoplog

Anyone any idea?

Im newbye with TCL Scripting please help me.

Thx.
Offset
O
Offset

The command work only no write file ;( help

Post by Offset »

This is a version of wwwlive i modify the triggers
No write File ;(

HELP, here is the code


set www_lines 0

bind pub -|- !startlog pub:startlog
bind pub -|- !stoplog pub:stoplog

proc pub:startlog {nick uhost hand chan args } {
www_htmlheader
bind pubm * * www_pubm
bind join * * www_join
bind part * * www_part
bind sign * * www_sign
bind topc * * www_topc
bind mode * * www_mode
bind kick * * www_kick
bind nick * * www_nick
putlog "--> Initializing wwwlive"
}

proc pub:stoplog {nick uhost hand chan args } {
unbind pubm * * www_pubm
unbind join * * www_join
unbind part * * www_part
unbind sign * * www_sign
unbind topc * * www_topc
unbind mode * * www_mode
unbind kick * * www_kick
unbind nick * * www_nick
www_htmlheader
global www_file
set fh [open $www_file a]
puts $fh "<h2>LIVE WWW disabled.</h2>"
close $fh
putlog "--> Stopping wwwlive"
}


proc www_pubm {nick uhost hand chan args} {
global www_channel
if { $chan == $www_channel} {
www_newfile
set text [lindex $args 0]
global www_lines www_file
set fh [open $www_file a]
puts $fh "\<$nick> $text<br>"
close $fh
incr www_lines
}
}

and more for join part for the bind´s
Locked