| View previous topic :: View next topic |
| Author |
Message |
drfox Voice
Joined: 09 Oct 2005 Posts: 26
|
Posted: Sun Oct 09, 2005 1:55 am Post subject: can someone help me please with fget.tlc |
|
|
hi im new to all this and i have loaded fget on my eggdrop but everytime i try the !get command it says [15:47] Tcl error [GET:pub_get]: invalid command name "dccsend"
| Code: | ## File GET v1.2
## By mamaKIN (mamakin@mailandnews.com)
## Released [12-05-1999]
##
### Important Notes: ############################
##
## You need to have the transfer module loaded for this to work
##
### Installation: ###############################
##
## 1) Put this file in your script directory
## 2) Add the line "source <scripts directory>/fget.tcl" to your bots configuration
## 3) Rehash your bot if it is already running or start it up if it is not
##
### Usage: ######################################
##
## Channel Commands:
## !get <filename> - Sends the first matching file to you
## !send <nickname> <filename> - Sends the first matching file to the nickname
##
#################################################
## SETTINGS #####################################
# Where is your file directory?
set get_dir "/home/dark/eggdrop/helpfiles/"
# Which files/directories should I not search for/in?
set get_nfile "incoming readme.txt"
# Which channels shall the commands work on?
set get_chans "#foxs-triv-and-chat"
###############################################################
## Do not edit below here unless you know what you are doing ##
###############################################################
bind pub - !get GET:pub_get
bind pub +v|+v !send GET:pub_send2
proc filesearch {file dir} {
set file [string tolower $file]
return [searchdat $file $dir]
}
proc searchdat {file dir} {
if {[string range $dir end end] != "/"} {
append dir "/"
}
set r ""
set l [glob -nocomplain $dir*]
foreach f $l {
if {[file isdirectory $f]} {
set r [concat $r [searchdat $file $f]]
} elseif {[file isfile $f]} {
if {[string tolower [file tail $f]] == $file} {
lappend r $f
}
}
}
return $r
}
proc chncheck {chan check} {
foreach c $check {
if {$chan == $c} {
return 1
}
}
return 0
}
proc GET:pub_get {nick host hand chan text} {
global get_dir get_chans get_nfile
if {[chncheck $chan $get_chans]} {
set file [lindex $text 0]
if {![string match "*[string tolower $file]*" "[string tolower [lrange $get_nfile 0 end]]"]} {
set results [filesearch $file $get_dir]
} {
puthelp "NOTICE $nick :Could not send you $file, because the file has been disabled."
return 1
}
if {[llength $results] == 0} {
puthelp "NOTICE $nick :Didn't find any results for $file"
} {
set sent [dccsend [lindex $results 0] $nick]
if {$sent == 0} {
puthelp "NOTICE $nick :Sending you $file"
} elseif {$sent == 1} {
puthelp "NOTICE $nick :DCC Tables are full. Try back in a few minutes."
} elseif {$sent == 2} {
puthelp "NOTICE $nick :For some strange reason the file does not exist."
} elseif {$sent == 4} {
puthelp "NOTICE $nick :Your file was queued for a later transfer."
} else {
puthelp "NOTICE $nick :An undefined error occurred during the transfer."
}
}
}
return 1
}
proc GET:pub_send2 {nick host hand chan text} {
global get_dir get_chans get_nfile
if {[chncheck $chan $get_chans]} {
set g2nick [lindex $text 0]
set file [lindex $text 1]
if {![string match "*[string tolower $file]*" "[string tolower [lrange $get_nfile 0 end]]"]} {
set results [filesearch $file $get_dir]
} {
puthelp "NOTICE $nick :Could not send you $file, because the file has been disabled."
return 1
}
if {[llength $results] == 0} {
puthelp "NOTICE $nick :Didn't find any results for $file"
} else {
set sent [dccsend [lindex $results 0] $g2nick]
puthelp "NOTICE $g2nick :$nick requested for me to send you $file"
if {$sent == 0} {
puthelp "NOTICE $nick :Sending $g2nick $file"
puthelp "NOTICE $g2nick :Sending you $file"
} elseif {$sent == 1} {
puthelp "NOTICE $g2nick :DCC Tables are full. You cannot receive the file."
puthelp "NOTICE $nick :DCC Tables are full. Could not send $g2nick $file"
} elseif {$sent == 2} {
puthelp "NOTICE $g2nick :For some strange reason the file does not exist."
putserv "NOTICE $nick :The file does not exist."
} elseif {$sent == 3} {
puthelp "NOTICE $nick :Had trouble connecting to $g2nick"
} elseif {$sent == 4} {
puthelp "NOTICE $g2nick :Your file was queued for a later transfer."
puthelp "NOTICE $nick :$file was queued and will be transfered later."
} else {
puthelp "PRIVMSG $nick :An undefined error occurred during the transfer."
}
}
}
return 1
}
putlog "Loaded \002File GET v1.2\002 by mamaKIN"
|
|
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Oct 09, 2005 2:56 am Post subject: |
|
|
load filesys module before the script _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
drfox Voice
Joined: 09 Oct 2005 Posts: 26
|
Posted: Sun Oct 09, 2005 5:48 am Post subject: |
|
|
| thanx m8 but where do i get or find this filesys, sorry prob sounds a dumb question but like i said im all new to this |
|
| Back to top |
|
 |
drfox Voice
Joined: 09 Oct 2005 Posts: 26
|
Posted: Sun Oct 09, 2005 6:02 am Post subject: |
|
|
ok found it and loaded it but it trys to send but fails
[11:26am] *Fox-Help* Timeout during transfer, aborting server.setup.txt.
Last edited by drfox on Sun Oct 09, 2005 6:31 am; edited 1 time in total |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sun Oct 09, 2005 6:28 am Post subject: |
|
|
Post the error from your log(s). _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
drfox Voice
Joined: 09 Oct 2005 Posts: 26
|
Posted: Sun Oct 09, 2005 6:32 am Post subject: |
|
|
[11:25am]<Fox-Help> [20:30] Begin DCC send server.setup.txt to DJ-Fox
[11:25am]<Fox-Help> [20:30] <<DJ-Fox>> !Dr-Fox! !get server.setup.txt
[11:26am]<Fox-Help> [20:30] DCC timeout: GET server.setup.txt (DJ-Fox) at 0/3757 |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sun Oct 09, 2005 7:25 am Post subject: |
|
|
This time it could very well be just firewall/router settings. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
drfox Voice
Joined: 09 Oct 2005 Posts: 26
|
Posted: Sun Oct 09, 2005 9:00 am Post subject: |
|
|
| well its me its sending to and i dont and never have had a prob with sending or reciveing |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sun Oct 09, 2005 9:42 am Post subject: |
|
|
But this time you are sending to an eggdrop. Ever thought of the fact that the shell provider has it all firewalled?
Also, read this section of eggdrop.conf:
| Quote: | | #### FILESYSTEM MODULE #### |
_________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
drfox Voice
Joined: 09 Oct 2005 Posts: 26
|
Posted: Sun Oct 09, 2005 1:26 pm Post subject: |
|
|
| ok good point thanx for ya help |
|
| Back to top |
|
 |
|