egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

can someone help me please with fget.tlc

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
drfox
Voice


Joined: 09 Oct 2005
Posts: 26

PostPosted: Sun Oct 09, 2005 1:55 am    Post subject: can someone help me please with fget.tlc Reply with quote

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
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Oct 09, 2005 2:56 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
drfox
Voice


Joined: 09 Oct 2005
Posts: 26

PostPosted: Sun Oct 09, 2005 5:48 am    Post subject: Reply with quote

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
View user's profile Send private message
drfox
Voice


Joined: 09 Oct 2005
Posts: 26

PostPosted: Sun Oct 09, 2005 6:02 am    Post subject: Reply with quote

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
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Sun Oct 09, 2005 6:28 am    Post subject: Reply with quote

Post the error from your log(s).
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
drfox
Voice


Joined: 09 Oct 2005
Posts: 26

PostPosted: Sun Oct 09, 2005 6:32 am    Post subject: Reply with quote

[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
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Sun Oct 09, 2005 7:25 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
drfox
Voice


Joined: 09 Oct 2005
Posts: 26

PostPosted: Sun Oct 09, 2005 9:00 am    Post subject: Reply with quote

well its me its sending to and i dont and never have had a prob with sending or reciveing
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Sun Oct 09, 2005 9:42 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
drfox
Voice


Joined: 09 Oct 2005
Posts: 26

PostPosted: Sun Oct 09, 2005 1:26 pm    Post subject: Reply with quote

ok good point thanx for ya help
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber