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

Diff of /tcldrop/modules/dcc.tcl

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

revision 1.23 by fireegl, Wed Nov 19 05:19:26 2003 UTC revision 1.24 by fireegl, Wed Nov 19 22:52:22 2003 UTC
# Line 40  namespace eval ::tcldrop::dcc { Line 40  namespace eval ::tcldrop::dcc {
40          ::tcldrop::SetDefault console-autosave 1          ::tcldrop::SetDefault console-autosave 1
41          ::tcldrop::SetDefault force-channel 0          ::tcldrop::SetDefault force-channel 0
42          ::tcldrop::SetDefault info-party 0          ::tcldrop::SetDefault info-party 0
43            ::tcldrop::SetDefault connect-timeout 27
44            ::tcldrop::SetDefault ident-timeout 13
45          variable Levels          variable Levels
46          # Define the log levels, and the user-flags that are required to see logs sent to that level:          # Define the log levels, and the user-flags that are required to see logs sent to that level:
47          array set Levels {          array set Levels {
# Line 822  proc ::tcldrop::dcc::STATUS {handle idx Line 824  proc ::tcldrop::dcc::STATUS {handle idx
824          putdcc $idx "OS: $tcl_platform(os) $tcl_platform(osVersion)"          putdcc $idx "OS: $tcl_platform(os) $tcl_platform(osVersion)"
825  }  }
826    
   
827  bind time - {* * * * *} ::tcldrop::dcc::AutoLinkBots  bind time - {* * * * *} ::tcldrop::dcc::AutoLinkBots
828  proc ::tcldrop::dcc::AutoLinkBots {minute hour day month year} {  proc ::tcldrop::dcc::AutoLinkBots {minute hour day month year} {
829          foreach b [userlist b] {          foreach b [userlist b] {
# Line 876  proc ::tcldrop::dcc::link {viabot {bot { Line 877  proc ::tcldrop::dcc::link {viabot {bot {
877          set botaddr [getuser $bot BOTADDR]          set botaddr [getuser $bot BOTADDR]
878          set host [lindex $botaddr 0]          set host [lindex $botaddr 0]
879          set port [lindex $botaddr 1]          set port [lindex $botaddr 1]
880          set fail [catch { connect $host $port -timeout 99 -myaddr ${::my-ip} -control ::tcldrop::dcc::Read -writable ::tcldrop::dcc::BOTWrite -errors ::tcldrop::dcc::BOTConnectErrors } idx]          set fail [catch { connect $host $port -timeout ${::connect-timeout} -myaddr ${::my-ip} -control ::tcldrop::dcc::Read -writable ::tcldrop::dcc::BOTWrite -errors ::tcldrop::dcc::BOTConnectErrors } idx]
881          if {!$fail} {          if {!$fail} {
882                  ::tcldrop::idx::ChInfo $idx [list handle $bot remote $host hostname $host port $port type FORK_BOT other {conn  bot} timestamp [set timestamp [unixtime]]]                  ::tcldrop::idx::ChInfo $idx [list handle $bot remote $host hostname $host port $port type FORK_BOT other {conn  bot} timestamp [set timestamp [unixtime]]]
883                  #set TimerID [utimer 99 [list ::tcldrop::dcc::BOTConnectTimeout $idx]]                  #set TimerID [utimer 99 [list ::tcldrop::dcc::BOTConnectTimeout $idx]]
884          }          }
885          if {!$fail} { return 1 } else { return 0 }          if {!$fail} { return 1 } else { return 0 }
886  }  }

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

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