/[tcldrop]/tcldrop/modules/core.tcl
ViewVC logotype

Diff of /tcldrop/modules/core.tcl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by fireegl, Sun Nov 16 02:53:24 2003 UTC revision 1.18 by fireegl, Wed Nov 19 01:27:49 2003 UTC
# Line 613  proc restart {{type {restart}}} { Line 613  proc restart {{type {restart}}} {
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 }

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26