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.

Fserv

Old posts that have not been replied to for several years.
Locked
W
Wizard
Voice
Posts: 10
Joined: Sun Oct 05, 2003 7:34 am

Fserv

Post by Wizard »

hello i finally got my f serv to work but when it make a file list when a user types !list it reads the root dir of eggdrop. i would like it to read and show the contents of /home/server1/eggdrop/Fserv but like i said it shows /home/server1/eggdrop i have chaned everything to pont to the fserv dir as it uploads files there. i am totally stumped and been reading docs all night it has to be a simple line Please Help.

ps. ( i have a feeling its hard codded in the modules to go right to root of eggdrop )
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

check the filesys entrys in eggdrop.conf
W
Wizard
Voice
Posts: 10
Joined: Sun Oct 05, 2003 7:34 am

filesystem settings

Post by Wizard »

#### FILESYSTEM MODULE ####

# This module provides an area within the bot where users can store
# files. With this module, the bot is usable as a file server. The
# transfer module is required for this module to function. Un-comment
# the following line to load the filesys module.
loadmodule filesys

# Set here the 'root' directory for the file system.
set files-path "/home/server1/eggdrop/Fserv"

# If you want to allow uploads, set this to the directory uploads
# should be put into. Set this to "" if you don't want people to
# upload files to your bot.
set incoming-path "/home/server1/eggderop/Fserv"

# If you don't want to have a central incoming directory, but instead
# want uploads to go to the current directory that a user is in, set
# this setting to 1.
set upload-to-pwd 0

# Eggdrop creates a '.filedb' file in each subdirectory of your file area
# to keep track of its own file system information. If you can't do that (for
# example, if the dcc path isn't owned by you, or you just don't want it to do
# that) specify a path here where you'd like all of the database files to be
# stored instead.
set filedb-path "/home/server1/eggdrop/Fserv"

# Set here the maximum number of people that can be in the file area at once.
# Setting this to 0 makes it effectively infinite.
set max-file-users 20

# Set here the maximum allowable file size that will be received (in kb).
# Setting this to 0 makes it effectively infinite.
set max-filesize 1024
W
Wizard
Voice
Posts: 10
Joined: Sun Oct 05, 2003 7:34 am

No one know ?

Post by Wizard »

no one know why this is doing this ? or ami trying to do someting really hard ? here is the code that reading the wrong direcory Sorry this is kinda long

## Settings:
set fhome /home/server1/eggdrop/Fserv
set maxsend 3
set maxget 5

## Temp settings:
set csend 0
set cget 0

#### FILESYS MODULE ####
loadmodule filesys
set files-path $fhome
set incoming-path $fhome
set upload-to-pwd 0
set filedb-path ""
set max-file-users $maxsend
set max-filesize 0

#### TRANSFER MODULE ####
loadmodule transfer
set max-dloads $maxsend
set dcc-block 0
set copy-to-tmp 1
set xfer-timeout 60

bind msg - get getfile
bind msg - help fhelp
bind pub - !list getfiles

proc flist {nick uhost hand argv} {
global getfiles $fhome
foreach chan [channels] {
if [onchan $nick $chan] {
putserv "NOTICE @$chan :Beginning DCC Send to $nick ($argv)"
}
}
dccsend $argv $nick
}

proc getfiles {nick uhost hand chan argv} {
global fhome
set nfiles 0
set lfile [open list.txt w]
foreach files [glob -nocomplain f -directory $fhome *] {
set fsize [file size $files]
set unit Bytes
if {$fsize > 1024} {
set unit Kb
set fsize [expr $fsize / 1024]
}
if {$fsize > 1024} {
set unit Mb
set fsize [expr $fsize / 1024]
}
if {$fsize > 1024} {
set unit Gb
set fsize [expr $fsize / 1024]
}
incr nfiles
puts $lfile "$files ($fsize $unit)"
}
puts $lfile "Total files: $nfiles"
close $lfile
unset nfiles
dccsend list.txt $nick
}
W
Wizard
Voice
Posts: 10
Joined: Sun Oct 05, 2003 7:34 am

Maybe Easier

Post by Wizard »

geez maybe this make it easier all i want is

!list trigger

and have that trigger make up a list.txt of /home/server1/eggdrop/Fsrerv

geez i getting delieriouse allready learning is tough for the first time heheh thanks

stuborn and determind 8)
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Just a guess, find this line:

foreach files [glob -nocomplain f -directory $fhome *] {

and change it to:

foreach files [glob -nocomplain -types f -directory $fhome *] {
W
Wizard
Voice
Posts: 10
Joined: Sun Oct 05, 2003 7:34 am

Fserv

Post by Wizard »

stdragon
Thank you
this line workes perfectly you have done what many could not. but in the 23 + hours i was messing around the get command dont
work it says its getting file but dont send ie: !Wizard! get /home/server1/eggdrop/Fserv/07_-_07_Virginia.mp3

foreach files [glob -nocomplain -types f -directory $fhome *] {
bind msg - get getfile
bind msg - help fhelp
bind pub - !list flist



/home/server1/eggdrop/Fserv/02_-_02_Don't_Let_Him_Know.mp3 (2 Mb)
/home/server1/eggdrop/Fserv/07_-_07_Virginia.mp3 (3 Mb)
Total files: 2
but it dont show me in status window now or it dont send file any idea where to look??

only asking casue i dont wanna sppend another 20 hours reading right now


thanks
B
Bytez
Op
Posts: 168
Joined: Mon Aug 11, 2003 1:42 pm

Post by Bytez »

How can I make the bot send a file automatically when someone types a trigger, like !newlist it will send a file to that user who typed it on the channel? Thanks.
W
Wizard
Voice
Posts: 10
Joined: Sun Oct 05, 2003 7:34 am

Bytez file server

Post by Wizard »

hey look up i posted full code just add -types f like example and it works great
stdragon is MASTER

thanks again

ps if ya nee more help i can send you my compleated script
Locked