This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

can someone help me please with fget.tlc

Support & discussion of released scripts, and announcements of new releases.
Post Reply
d
drfox
Voice
Posts: 26
Joined: Sun Oct 09, 2005 1:51 am

can someone help me please with fget.tlc

Post by drfox »

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: Select all

## 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"
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

load filesys module before the script
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
d
drfox
Voice
Posts: 26
Joined: Sun Oct 09, 2005 1:51 am

Post by drfox »

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
d
drfox
Voice
Posts: 26
Joined: Sun Oct 09, 2005 1:51 am

Post by drfox »

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.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Post the error from your log(s).
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
d
drfox
Voice
Posts: 26
Joined: Sun Oct 09, 2005 1:51 am

Post by drfox »

[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
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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
d
drfox
Voice
Posts: 26
Joined: Sun Oct 09, 2005 1:51 am

Post by drfox »

well its me its sending to and i dont and never have had a prob with sending or reciveing
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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:
#### FILESYSTEM MODULE ####
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
d
drfox
Voice
Posts: 26
Joined: Sun Oct 09, 2005 1:51 am

Post by drfox »

ok good point thanx for ya help
Post Reply