NAME

fserverHandler


DESCRIPTION

the object holding the data concerning a irc fileserver so as all possible actions and interactions with it.


AUTHOR

  Bruno Böttcher <bboett at adlp dot org>
  parts of the code were extracted from leverlada v1 from I. Wronsky http://www.geocities.com/iwronsky/


COPYRIGHT and LICENCE

 Copyright (c) 2002 Bruno Boettcher, Igor Wronsky
 fserverHandler.pm da is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; version 2
 of the License.
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.


Methods of this class

status values
  possible values for status
   NULL == no status
   0    == ready to do DIR
   1    == reading in directory entries
   2    == coming backwards in dirscan
   3    == skip fserve lines on start
   4    == UNUSED
   5    == wanting to send a command
   6    == clear to send a command
   7    == traverseTree to go somewhere
   8    == UNUSED
   9    == UNUSED
   10   == Time to QUIT
   11   == Waiting for file
   12   == Receiving file
   13   == parsing queue command (a bit broken, disabled)
new
constructor for the new fserver handler object

addTarget
add or update an entry in the command queue

getTarget
find in the queue an entry matching that filename modus: 0 = pass through the pattern, 1 = invalidate special chars

getFuzzyTarget
try to find that queue applying some modifications on it, some fservers change the name of the send file...

getTargets
find all queue entrys matching that pattern

getActives
find the requests and transfers and return them

getRequests
find the requests and return them

delQueues
delete all the queues

delQueue
delete one queue invalidating patternactive stuff

delQueueWithPattern
delete one queue

restorequeue
repush the recorded send for a nick to the queue priv func, called only inside leve, no more, called in leve_check_quit

dcc_init
Ran when a dcc chat is activated, this installs the dir stack and the filelist for $nick.

dcc_chat
This function recursively browses through the fserve, collecting its filelist, or sends our command, depending on what we're doing.

parseQueue()
parse the result of the queue command, trying to find the occurences of own reqests

parseStats()
parse the result of the stats command, trying to find the occurences of own reqests

skipIntro
Reading directories, skip info lines given by fserve on start

sendDir
Ask for directory listing of current dir

parseDir
Reading directories, parse dir listing given by fserve

nextdir
Pop the next directory from the nicks dir stack and change into it

sendquit
quit processing of a fserver

skipToCmd
We want to send a command, but must skip still until [\]

sendCmd
We want to send a request, server is ready to accept commands

finalizeCmd
We have sent all the commands we want, time to quit

changeDir
Reading directories, coming backwards

handleUnexpected
parse the incoming line and check for unexpected stuff

linesToSkip
parse the incoming line for stuff to ignore

bannerDetected
a fserve banner was detected, check last activation, command list and decide if to send out a cmd or refetch the dir list

waiting
check if we have stuff queued and if we haven't exceeded the maximum number of queues

print_debug
print out the message into a log file, if the global debug var was set

incrementQueue
seems we filled a queue on a server, increment the queue with out an argument focibly increment the queu

decrementQueue
seems we completed or lost a queue on a server, decrement the queue called without argument frcibly reduce the queue count

showHistory
show the history for this object

clrHistory
show the history for this object

makePattern
try to make a pattern out of a description

addslashes
invalidate special chars

record
record a logging line

dumpSettings
dump the settings of a fserver

checkRequestTmout
reset all requests that did timout

reset
reset this fserver into idle mode

nickchange
nick changes, eventually adjust triggers

traverseTree
cd into the target dir'c

checkTmout
check if this server run out of time return 1 if this server is still busy

cropTriggers
check the supplied triggers if they seemm valid, compile a new trigger vector out of it and return it

issueCommand
check the list of commands and issue a command if we are ready for it...

fetchListDate
fetch the date of the last refresh

prepareParsing
prepare this fserver object for eventual listing reparsing

issueTrigger
on presence of triggers, we need to initiate the fetch if there are triggers left, we need to get their listing

dumpList
dump the list of recorded commands

scedule
check if we need to scedule with the sceduler, otherwise do nothing check if we have to deal with a silent server and this timer driven triggering

isWaiting
perform the tests to check if the incoming line is indeed a waiting trasnfer, and if it belongs into the correct channel, make exeption if there's no channel or a wrong channel def given

invalidateTrigger
perform the tests to check if the incoming line is indeed a waiting trasnfer, and if it belongs into the correct channel, make exeption if there's no channel or a wrong channel def given


THANKS

I. Wronsky came up with this infernal concept and kludged the first 1.x versions together. This gave B. Boettcher the incentive to begin this work, the famous itching paradigm!


SEE ALSO

http://www.geocities.com/iwronsky/