Code: Select all
set dccsend [join [list [dcclist SEND]]]
Tcl: {8 {BOTSNAME} SYS@268AFA0.com SEND {send (361945012)/734447616
Tcl: Filename: file1.zip
Tcl: } 1081837810}
How to send all 3 lines to another bot please ?
Code: Select all
set dccsend [join [list [dcclist SEND]]]
Code: Select all
proc dcc:sends {} {
set dccsend [join [list [dcclist SEND]]]
set send2 ""
foreach send $dccsend {
append send2 "$send"
}
putlog "$send2"
}
Your code should be like that:regsub -all "\{" $dccsend "" dccsend
regsub -all "\}" $dccsend "" dccsend
Code: Select all
proc dcc:sends {} {
set dccsend [join [list [dcclist SEND]]]
set send2 ""
regsub -all "\{" $dccsend "" dccsend
regsub -all "\}" $dccsend "" dccsend
foreach send $dccsend {
append send2 "$send"
}
putlog "$send2"
}
Code: Select all
regsub -all "\}|\{|send|SEND" $conn "" conn
Code: Select all
regsub -all "\}|\{|send|SEND|\(|\)" $conn "" conn
Code: Select all
regsub -all "\(" $conn "" conn
regsub -all "\)" $conn "" conn
Code: Select all
regsub -all "(" $conn "" conn
regsub -all ")" $conn "" conn
same error :Xpert wrote:I think you can remove the "/" in "(,)".
try:Code: Select all
regsub -all "(" $conn "" conn regsub -all ")" $conn "" conn
dcclist ?type?
Returns: a list of active connections, each item in the list is a
sublist containing six elements:
{<idx> <handle> <hostname> <type> {<other>} <timestamp>}.
The types are: chat, bot, files, file_receiving, file_sending,
file_send_pending, script, socket (these are connections that have
not yet been put under 'control'), telnet, and server. The timestamp
is in unixtime format.
Module: core
Code: Select all
proc dcc:sends {} {
set dccsend [dcclist SEND]
foreach send $dccsend {
putlog "[join $send]"
}
}
Code: Select all
proc rcv_cmd {from comm com} {
global linkbot dccstat
if {[lindex $com 0] == "STATUS" } {
set dccstat [dcclist SEND]
if {$dccstat == ""} {
putbot $linkbot "REL DCC status: Nothing in transfer queue"
return 0
}
foreach conn $dccstat {
regsub -all "\}|\{|send|SEND" $conn "" conn
regsub -all "\n" $conn {} conn
set from [lindex $conn 1]
set file [lindex $conn 5]
set progres [split [lindex $conn 3] / ]
regsub -all -- {[^ A-Za-z0-9]} [lindex $progres 0] "" down
set all [expr [lindex $progres 1]/1048576]
set down [expr $down/1048576]
set progres "[expr ($down *100) / $all]%"
putbot $linkbot "REL DCC status: $from:\0034 $file $progres ($down MB/$all MB)"
}
}
}