un pti tcl de send
#2
Bonjour

Je n'ai jamais essayer d'utiliser les dcc send avec un eggdrop, chose que je voulais essayer de faire mais par manque de temps et de motivation, je n'ai pas pû faire.

J'ai donc trouver un petit tcl sur la toile, je pense qu'il peut éventuellement t'aider :

tcl
##
# sendfile.tcl v1.3 by (Carl M. Gregory) MC_8 <gregory@worldinter.net>
##                                                ^^ Please report any errors!

##
# History
# v1.3 (01-17-00)
# + fixed "bad option search:" stuff, an anonymous user of the script pointed out the bug, thank you.
#
# v1.2 (12-03-99)
# + Fixed unset bug in proc.
# + Fixed $trigger reply error.
# + Fixed mis-communication error with $arg
#
# v1.1 (11-25-99)
# + Predicted bug's (fixed bugs before they were reported)
# + Trigger can be wildcarded.
#
# v1 - inital release
##

# This is where you set the trigger (can contain wildcards), and what it sends on that trigger.
# IF your trigger contains a space, you must "quote" it, ie: set "mc_sf(*send me bla.txt*)" "files/bla.txt"
# You may set as many as you like, it must be in this syntax:
# set mc_sf(<enter the trigger here>) "<put the full path to file here>"
set mc_sf(!tcl) "doc/tcl-commands.doc"

 
### Do not edit past this part ###
 
bind pubm - * mcsf:send
proc mcsf:send {nick uhost hand chan args} {
 global mc_sf
 if {[string match "* *" $args]} {set args [string range $args 1 [expr [string length $args] -2]]}
 foreach search [array names mc_sf] {
  if {[string match [string tolower $search] [string tolower $args]]} {break} {unset search}
 } ; if {[info exists search]} {
  set file [lindex [split $mc_sf($search) //] [expr [llength [split $mc_sf($search) //]]-1]]
  switch -- [dccsend $mc_sf($search) $nick] {
   0 {puthelp "NOTICE $nick :Sending $file to you."}
   1 {puthelp "NOTICE $nick :dcc table is full (too many connections), try to get $file later."}
   2 {puthelp "NOTICE $nick :can't open a socket for the transfer of $file."}
   3 {puthelp "NOTICE $nick :$file doesn't exist."}
   4 {puthelp "NOTICE $nick :$file was queued for later transfer."}
  }
 }
}
 
putlog "SendFile.tcl v1.3 by MC_8 loaded."



Étrange comme il ressemble a ton code quand même.
Autre chose, la moindre des choses quand l'on poste c'est de dire "Bonjour" ou autre forme de politesse, et d'énoncer clairement le problème / la question ou autre avant de poster une source.
C'est une question d'organisation hein, enfin bref c'est mieux de savoir de quoi tu parles au DÉBUT de ton post, pour ne pas avoir a descendre, lire c'est quoi le soucis, et remonter pour voir la source (petit détail, qui y fait en plus du manque de forme de politesse).
Répondre Avertir


Messages dans ce sujet
un pti tcl de send - par caline012 - 25/03/2008, 00:59
RE: un pti tcl de send - par DaV34 - 25/03/2008, 20:23
RE: un pti tcl de send - par caline012 - 25/03/2008, 20:28
RE: un pti tcl de send - par caline012 - 26/03/2008, 01:50
RE: un pti tcl de send - par DaV34 - 26/03/2008, 07:48
RE: un pti tcl de send - par caline012 - 26/03/2008, 11:48
RE: un pti tcl de send - par CrazyCat - 26/03/2008, 13:26
RE: un pti tcl de send - par caline012 - 26/03/2008, 13:33
RE: un pti tcl de send - par caline012 - 29/03/2008, 16:10
RE: un pti tcl de send - par CrazyCat - 29/03/2008, 18:32
RE: un pti tcl de send - par caline012 - 29/03/2008, 18:40
RE: un pti tcl de send - par CrazyCat - 29/03/2008, 18:55
RE: un pti tcl de send - par caline012 - 29/03/2008, 18:59
RE: un pti tcl de send - par caline012 - 30/03/2008, 01:19
RE: un pti tcl de send - par CrazyCat - 30/03/2008, 01:46
RE: un pti tcl de send - par caline012 - 30/03/2008, 13:32
RE: un pti tcl de send - par CrazyCat - 30/03/2008, 22:30
RE: un pti tcl de send - par caline012 - 03/04/2008, 11:20

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)
Tchat 100% gratuit -Discutez en toute liberté