613 |
callevent loaded |
callevent loaded |
614 |
} |
} |
615 |
|
|
616 |
|
bind evnt - init ::tcldrop::MakePIDFile |
617 |
|
proc ::tcldrop::MakePIDFile {event} { global pidfile botnet-nick |
618 |
|
if {![info exists pidfile] || $pidfile == {}} { set pidfile "pid.${botnet-nick}" } |
619 |
|
set fid [open $pidfile w] |
620 |
|
puts $fid [pid] |
621 |
|
close $fid |
622 |
|
} |
623 |
|
|
624 |
|
bind evnt - die ::tcldrop::DeletePIDFile |
625 |
|
proc ::tcldrop::DeletePIDFile {event} { catch { file delete -force -- $::pidfile } } |
626 |
|
|
627 |
# And now we set everything into motion... =D |
# And now we set everything into motion... =D |
628 |
if {[catch { restart {start} }]} { |
if {[catch { restart {start} }]} { |
629 |
catch { callevent failed-load } |
catch { callevent failed-load } |