NAME

LeverLåda


AUTHOR

     by ~g/RRR Sorority Division for xchat 
  LeverLåda by ~g/RRR Sorority Division for xchat 
   (should work begginining v1.8.4 and v.2)

Lots of additional hacking by bboett.

  Bruno Böttcher <bboett at adlp dot org>


COPYRIGHT and LICENCE

 Copyright (c) 2002 Bruno Boettcher
 LeverLå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 types
 NULL == no status
 0    == UNUSED
 1    == reading in directory entries
 2    == coming backwards in dirscan
 3    == skip fserve lines on start
 4    == ready to do DIR
 5    == wanting to send a command
 6    == clear to send a command
 7    == UNUSED
 8    == UNUSED
 9    == UNUSED
 10   == Time to QUIT
 11   == Waiting for file
 12   == Receiving file
 13   == parsing queue command (a bit broken, disabled)
init
initialise, set up and start this thing!

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

print_log
a general log function....

leve_list
This shows the contents of the current queues

leve_clear
This clears the command list.

leve_push
this one repush the actual send on the command stack

leve_help
issue the user help

leve_load
This loads a command file to memory. Its appended to the existing command list, if any.

leve_save
Saves the current command lists

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

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

leve_monitor
Monitor the channel for fserve announcements If we have a command for the announcer, send it. If the announcer is new or the filelist is outdated, fetch filelist.

leve_parsebanner
parse the incoming line and eventually extract the data to access an fserver.

leve_check_quit
If one of ``our'' targets has quit and we are not transferring, we probably lost the queue. Re-add it to our lists. leve_dcc_offer makes sure that once the send has begun, we don't do this anymore.

leve_dcc_offer
If we get dcc recv from one of ``our'' nicks, set that we are transferring from him, and won't requeue again if he quits and comes back again ...

leve_cancel
Remove commands for some particular server from our list

strip_color
Strip mirc color from given string Code adapted to perl from xchat 1.6.4 source

leve_start
let the script stat its job

leve_stop
stop the active stage for this script

leve_nickchange
If one of our targets changes nick, this will change the data structures to heed the new nick.

leve_dccfailure
Logs dcc receive failures and removes active request

leve_dccsuccess
Logs dcc receive success and removes the current request

leve_confail
DCC connection failure? Bloody idiots have probably their zonealarms on again ...

leve_gui
Launches the gui

leve_rehash
schedule a nick to be rescanned

leve_pending
show the pending scans for multi-trigger fserves...

leve_status
This shows the actual status of the script

leve_shutdown
called on shutdown of xchat

leve_crop
crop a line, remove beginning and trailing whitespace

leve_dcc_list
sub Wrapper::dcc_list This will return an array containing hash references which contain information about the status of all current DCC connections. The advantage to using this is that it makes the code you write a lot easier for other people to read, debug, and possibly improve upon. The amount of time this routine takes to run is next to nothing.
   Example:
     my (@dcc_list) = Wrapper::dcc_list();
     $first_nick = $dcc_list[0]->{nick};
   MUCH simpler to read.

leve_parsedcclist
parse the actual dcc transfers and try to match them with the actual list

leve_shell
Own command parser, used instead of the function handler

leve_version
Manage the different settings for this script

leve_set
Manage the different settings for this script

leve_delQueue
remove a queue from an fserve

leve_addQueue
add manually a queue to an fserver

leve_editQueue
change manually a queue to an fserver

leve_search
schedule search for a new target, first look through allready ssceduled ones, then parse the lst files and if still not found, set it up in central search base, to be consulted by dirscan.

leve_fsfactory
fetch the correct fserver, if undef create one

leve_findfs
fetch the correct fserver, return undef if not found

leve_cleanfromsize
clean a file definition from trailing garbage

leve_queuesearch
search through the queues in all servers

leve_filesearch
search through the list files

leve_listwishes
list the wishes

leve_series
list/add series

leve_delwish
delete pattern no

leve_parsenotice
parse notice messages

leve_triggerlist
clean the list list and sed out the !list cmd

leve_showlist
print out the result of the !list cmd run

leve_history
show the transaction history of an object

leve_clrhist
show the transaction history of an object

leve_showmatch
show the matches of a search cmd

leve_selmatch
select out of the search matches some targets fetch all if no argument is given

leve_match2pattern
compare the incoming filename to the pattern list, and return the pattern on success, the modus tells us if we are in dirscan modus or file transfer success modus, in the latter case we remove or update the pattern info

leve_loadserverpresets
load a file with settings for fservers of the form: <server name=``aname''> maxqueues 2 </server>

leve_saveserverpresets
save a file with settings for fservers that have no default settings

leve_loadConfiguration
load script settings from a configuration file

leve_saveConfiguration
save script settings from aconfiguration file

leve_elimitateoldservers
check for old fsesrvers and purge the infos about them

leve_compAge
format the number given by -AC or M filetest into something readable

leve_setser
server settings, without any argument, it shows all settings of all modifyed servers, with a server name it shows the settings of a single server, with a server name and argument value pair, it sets a value for this server``,

leve_trigger
don't wait for a banner trigger the given fserver immediately and execute the next command in the list

leve_dumpSettings
dump all settings of this script

leve_patternrevision
switch patter active chars to perlish and non greedy patterns

leve_loadWishes
loading the wishes database

leve_loadSeries
load a file first col is the series pattern, rest are maxto fetch, min-fetched, and allready fetched numbers, if max is set to 0 fetching is unlimited, beware no spaces in the pattern!

leve_saveSeries
Save the list of series!

leve_setHandler
set the appropriated filelist handler

leve_activeservers
issue the number and names of the active servers

leve_loadserver
issue the number and names of the active servers

leve_delseries
delete the series given as parameter, cut and paste from the series listing

leve_addepisode
in case you fetched an episode by other means, adjust the filter of the script to drop fetching of that particular episode(s)``,

leve_seriesAdvance
check series boundaries and adjust them if needed

leve_delepisode
in case a fetched episode reveals itself as somehow inappropriated, adjust the filter of the script to restart fetching of that particular episode(s)``,

leve_seriesRescedule
check series boundaries and adjust them if needed

leve_modseries
set the importance you give to a given series, mostly determinant for the request banner generation``,

addActive
add an active process to the active count

rmActive
remove an active process of the active count

leve_request
issue the actual request banner on the ad-channels

name
issue the name of this script

version
issue the name of this script

debug
return debug status of the script

getCmds
return the listing of supported commands

print
print to the channel of the actual scope on the actual server

print_with_channel
print to the specified channel on the actual server

get_info
retrieve some system info

dcc_list
retrieve the list of actual DCC transfers

command
send a line to the server, channel

command_with_server
send a line to a submitted server, channel

addJob
add a command to be exectued at a given time, or following actual # possibilities

leve_chgchan
don't wait for a banner trigger the given fserver immediately and execute the next command in the list

leve_addlistchan
don't wait for a banner trigger the given fserver immediately and execute the next command in the list

leve_rmlistchan
remove a channel from !list processing

leve_pingTmouted
extract the fserver handlers that are expired, and check if they need to be tmouted

leve_disconnected
extract the fserver handlers that are expired, and check if they need to be tmouted

leve_elimitateServer
remove an fserverdefinition we can't use

leve_ignoredServer
Check for unrechable servers and purge them


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/