Eggdrop Tcl Archive

Home | Contact | Forum | Submit a Script

View All Information: Script Id449

Script Name: QuoteBot Version: 2.0 Author: Baerchen Script Date: 06/09/2001 Category: Quote Scripts Downloads: 109 File Name: QuoteBot2.0.tar.gz Short Description: Quote script with special features such as scheduled quoting.

Extended Description File

.
  ___              _       ____        _
 / _ \ _   _  ___ | |_ ___| __ )  ___ | |_
| | | | | | |/ _ \| __/ _ \  _ \ / _ \| __|
| |_| | |_| | (_) | ||  __/ |_) | (_) | |_
 \__\_\\__,_|\___/ \__\___|____/ \___/ \__|
               2.0 by Baerchen, August 2001
             for eggdrop 1.4.x+ & TCL 8.3.3
                  baerchen@germany-chat.net

UPGRADING FROM 1.x
********************************************************************
Many changes. Read sections below !

DESCRIPTION
********************************************************************

Yet another quote script! Anyway, I think it differs in many ways
from the others, so it might be useful for someone out there.

Features:

- Quotes can be toggled as channel-specific.
- All quotes are indexed (therefore accessable via their indices)
- Easy searching for specific quote(s) (No fiddling with *? etc)
- Addition and deletion of quotes in PUB and DCC
- Random quoting
- Scheduled quoting (bot spits a random quote every x minutes)
- Quoting when botname is mentioned in channel
- Logging of additions and deletions
- Overview of recently added quotes without having to wade through
  the .dat file
- Notification of a bot user when new quotes have arrived.
- If channel-specific quotes is enabled, quotes can be copied from
  one channel to another. Also, the quotes for a whole channel can
  be deleted.

A short note on the first feature:

You can make QuoteBot use channel-independent databases. That means,
quotes added in channel #a are not available in channel #b and vice
versa. If so, some special syntax on some DCC comands is need, but
QuoteBot will tell you about that. It doesn't matter when you enable
or disable this feature since from the beginning, QuoteBot will
assign each quote to its specific channel. The difference is,
that if the feature is disabled, it just doesn't tell you. If it is
disabled, quotes added in DCC are assigned to channel #quotebot.
If you decide to enable channel-specific quotes lateron, you can
easily copy the quotes to all desired channels.

COMMANDS:
********************************************************************

addquote <quote>
PUB & DCC -|-
Adds a quote. Checks submitted quote against all quotes in database
and refuses to add if it already exists.

quote [mask|index]
PUB -|-
If no argument is given, the bot returns a random quote.
If mask is given, it returns the first quote matching mask. If mask
returns more than one result, doing another .quote with the same mask
displays the second quote matching mask and so on, starting all over
at 0 matches. Using * and ? as search masks is not necessary.
If index is given, the bot returns the quote with that index.

talk <on|off> [minutes]
PUB m|m
Enables or disables scheduled quoting every [minutes] minutes.
If [minutes] is omitted, 30 minutes is used as default. Spits
a random quote.

delquote <index ?index .. ?|mask>
PUB & DCC n|-
If index (indices, space delimited list) are given, this command
deletes index'ed quote.
If a mask is given, it deletes all quotes matching mask (case
insensitive) Example:
There are two quotes: "cow says mooh!" and "sheep says mooh!"
delquote p says mooh! .. erases "sheep says mooh!" only 
delquote w says mooh! .. erases "cow says mooh!" only
delquote mooh! .. erases both
Use this command carefully.

listquotes <#channel|mask> 
DCC n|-
If #channel is given, this comand lists all quotes #channel.
If mask is given, it lists all quotes matching mask.
If no argument is given, "listquotes" lists each and every quote.
 		  
newquotes
DCC n|-
Shows all quotes that have been added since newquotes was used last
time.

copyquotes <#from> <#to>
DCC n|-
Only needed if channel-specific quotes is enabled.
Copies all quotes from channel #from to channel #to.

delchanquotes <#channel>
DCC n|-
Only needed if channel-specific quotes is enabled.
Deletes all quotes of channel #channel

UPGRADING FROM 1.21 OR EARLIER
********************************************************************

If you upgrade from QuoteBot 1.21 or earlier, you can have QuoteBot
convert your database to the current version.
First off: backup all your old QuoteBot files !
If QuoteBot finds the files quotebot.dat, quotebot.log & quotebot.cfg
during startup in the given workdir, it will convert them.
quotebot.log and quotebot.cfg are renamed, quotebot.dat will be
converted and saved as QuoteBot.dat, the old database renamed to
quotebot.dat.old. All quotes are assigned to channel #quotebot.
If you chose to have channel-specific quotes enabled, you should
now copy the quotes to their channels.

HISTORY
********************************************************************

1.21
- Fixed error "Tcl error [q_deldcc]: can't read 'q_temp2':
  no such variable".
- Fixed error that when deleting in DCC, deleted quotes
  weren't logged.

1.2
- Fixed error "TCL error: list element in quotes followed by ','
  instead of space" when doing .newquotes and one of the quotes
  contained comma(ta).
- Fixed case sensitivity error for .delquote
- Quotes are now indexed in order to make adminstration easier:
  New DCC command "delindex <#> [# .. n]": deletes quotes with
  indices # [# ..n].  Indices can be obtained by .listquotes
  (.newquotes also shows indices)
- Added possibility of having a note sent to someone when new
  quotes are available.

1.1
- So far, logging was mandatory. Now it's an option
- Slightly changed the way data is logged - when updating,
    a .restart is strongly recommended
- Fixed minor bug regarding file operations which occured
    under rare circumstances		  
- Added DCC command "addquote"
- Added DCC command "delquote"
- Added DCC command "listquotes": for administrative purposes only,
    it shows all quotes matching <mask> at once.
- Added DCC command "newquotes": shows all recently added quotes
  since "newquotes" was used last time
- Cosmetic changes to the code
- Added definable trigger character
	
1.01
- From 1.6.4 on, eggdrop correctly displays UTF8 characters no
  regsubbing üöä etc. anymore.  Script checks for $numversion
  and regsubs only if smaller than 1060400.
- Added maximum length of quote.

1.0f
First public release

EOF

Latest News

27 Dec 2018 Eggdrop v1.8.4 Stable Release 22 Dec 2018 Eggdrop v1.8.4 Release Candidate 3 15 Dec 2018 Eggdrop v1.8.4 Release Candidate 2 12 Dec 2018 Eggdrop v1.8.4 Release Candidate 1 04 Feb 2018 Eggdrop v1.8.3 Stable Release 13 Jan 2018 Eggdrop v1.8.3 Release Candidate 2

Resources

Eggdrop Community Forum Download Eggdrop Eggdrop Set-up Using your Eggdrop Enhancing Eggdrop Eggdrop Tcl Commands Eggdrop 1.8.3 Documents Eggdrop Config File Unix Shell Commands
Donate Help TclArchive.org with server costs. By donating, you help keep these scripts available to everyone. PayPal

© 2015 - 2023,  Greenwood Web Design