Open ZarTek-Creole opened 4 years ago
To summarize what the user is asking, they are interested in a Tcl command that sends a file from one bot to another, and a bind to detect when that transfer starts (and/or finishes).
Things to consider (and discuss) should this be implemented, is this going to be a raw socket transfer (requiring a new port to be opened on the opposite bot and the subsequent network configuration required to support that), or could it be sent "in-line" using the already-established bot link socket (kinda like putbot)?
Precisely, the idea is the second solution :
using the already-established bot link socket (kinda like putbot)?
Otherwise it is useless. It can be done natively by TCL.
sends a file from one bot to another
More exactly, the content of the file by a channel.
channel that gives access to the content of the open resource.
-bind file - update_file update:file:from:botnet +bind file - "update_systeme *" update:file:from:botnet
Precisely, the idea is the second solution :
using the already-established bot link socket (kinda like putbot)?
Something similar to the userfile sharing method in src/mod/transfer.mod/transfer.c
eggdrop user file sharing uses transfer.mod, but it uses the first method, opening another socket. i would rather like to change userfile sharing to use the main botlink instead of opening yet another socket. if we can do a botlink file transfer with this PR, we could change the userfile sharing to also switch to using that new method.
like with user file sharing, we could add optional compression via compress.mod.
Pastebin example
}
on the leaf
bind FILE
triggered by a file coming from another bot in the botnet. The first word is the command and the rest becomes the text argument; flags are ignored.
Syntaxe: bind file
proc: proc-name
Module: core
bind file - update_file update:file:from:botnet proc update:file:from:botnet { bot cmd arg fileid } {
}`