240 |
set hostname [lindex [fconfigure $sock -peername] 1] |
set hostname [lindex [fconfigure $sock -peername] 1] |
241 |
::tcldrop::idx::ChInfo $idx [list idx $idx sock $sock handle * ident {-telnet} hostname $hostname ip $ip remote -telnet@$hostname port $port type TELNET_ID other {t-in waited 1s} timestamp [unixtime] traffictype misc] |
::tcldrop::idx::ChInfo $idx [list idx $idx sock $sock handle * ident {-telnet} hostname $hostname ip $ip remote -telnet@$hostname port $port type TELNET_ID other {t-in waited 1s} timestamp [unixtime] traffictype misc] |
242 |
::ident::ident -sock $sock -timeout [expr { ${::ident-timeout} * 1000 }] -command [list ::tcldrop::dcc::Ident $idx] |
::ident::ident -sock $sock -timeout [expr { ${::ident-timeout} * 1000 }] -command [list ::tcldrop::dcc::Ident $idx] |
243 |
|
putloglev d * "net: connect! idx $idx (socket $sock)" |
244 |
} |
} |
245 |
|
|
246 |
proc ::tcldrop::dcc::Write {idx} { |
proc ::tcldrop::dcc::Write {idx} { |
737 |
|
|
738 |
bind dcc nmto save ::tcldrop::dcc::SAVE |
bind dcc nmto save ::tcldrop::dcc::SAVE |
739 |
proc ::tcldrop::dcc::SAVE {handle idx text} { |
proc ::tcldrop::dcc::SAVE {handle idx text} { |
740 |
save |
callevent save |
741 |
putcmdlog "#$handle# save $text" |
putcmdlog "#$handle# save $text" |
742 |
putdcc $idx {Saving user file...} |
putdcc $idx {Saving...} |
743 |
} |
} |
744 |
|
|
745 |
bind dcc nmtof uptime ::tcldrop::dcc::UPTIME |
bind dcc nmtof uptime ::tcldrop::dcc::UPTIME |
809 |
foreach {a d} [::tcldrop::idx::Info] { |
foreach {a d} [::tcldrop::idx::Info] { |
810 |
array unset idxinfo |
array unset idxinfo |
811 |
array set idxinfo $d |
array set idxinfo $d |
812 |
putdcc $idx "[format {%-3.3s %-6.6s %-5.5s %-9.9s %-32.32s %-4.4s} $a $idxinfo(sock) $idxinfo(port) $idxinfo(handle) $idxinfo(hostname) $idxinfo(other)]" |
putdcc $idx "[format {%-3.3s %-6.6s %-5.5s %-9.9s %-32.32s %-4.4s} $a $idxinfo(sock) $idxinfo(port) $idxinfo(handle) $idxinfo(remote) $idxinfo(other)]" |
813 |
} |
} |
814 |
} |
} |
815 |
|
|