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.

vicu's bofh script

Old posts that have not been replied to for several years.
Locked
G
Guest

Post by Guest »

Since Vicu's script has no email address included, I thought the best way is to post some corrections to his script here.
This script was based on another quote script but Vicu did not remove the old syntax reference.

Btw - too all coders: please recode your scripts to latin1 before submitting them, since some bots do have problems with CR/LF.

%snip%

--- bofh.tcl.old Fri Nov 2 13:15:55 2001
+++ bofh.tcl Fri Nov 2 13:16:53 2001
@@ -1,60 +1,15 @@
# BOFH script by vicu made just for fun and based on the quote scipt by stigmata :)
# All is configured, just put this [censored] in your scripts directory and the file bofh.txt in the bot directory.
-# y

#################################################################################
# This script requires alltools.tcl v1.3 (loaded by default on 1.4.x and above.)
-# This script requires mc.moretools, 1.2 was used.
##### Designed to operate with Eggdrop 1.6.x && TCL 8.2+ ####

-
-### DEFAULT COMMANDS AND INFO ######################################
-# { all commands are typed in channel }
-#
-# !addquote <quote>
-# ### This adds quotes to the storage file, quotes can contain any type of character.
-# ### Default access: global/channel +o
-#
-# !delquote <num/search> <quote number/exact quote>
-# ### Searches for quote number, or exact match of specified
-# ### quote and deletes it.
-# ### Default access: global/channel +o
-#
-# !selquote <num>
-# ### Prints out the specified quote number.
-# ### Default access: everyone
-#
-# !quotes or !quote
-# ### Prints out a random quote from the storage file.
-# ### Default access: everyone
-#
-# !quotehelp
-# ### Notices the user commands for this script.
-# ### Default access: everyone
-#
-# !getquotes
-# ### Sends the user the quote storage file.
-# ### Default access: Users with global +Q
-#
-# !getscript
-# ### Sends the user the quote script.
-# ### Default access: Users with global +Q
-#
-# Most commands are available via message and dcc chat. Commands are like
-# addquote, getquotes, getscript etc.
-#
-# Notes: Simple quote script, no super advanced features intended.
-# should work with 1.4.x as well.
-#
-####################################################################
-
set bofh(vershort) "1.0"
-set bofh(verlong) "0100000"
-set bofh(script) "scripts/bofh.tcl"

### SETTINGS ########################################################
# Select this to your perferred command prefix, "" is acceptable.
-#set bofh(cmd) "!"
+set bofh(cmd) "!"

# File name of the storage file for BOFH excuses.
set bofh(file) "bofh.txt"
@@ -82,13 +37,11 @@
#### Eggdrop bindings ###############################################

# Random BOFH bindings
-bind pub $bofh(readflag) !bofh bofh_random
-bind pub $bofh(readflag) !bofh bofh_random
-bind dcc $bofh(readflag) bofh bofh_dccrandom
+bind pub $bofh(readflag) [string trim $bofh(cmd)]bofh bofh_random
bind dcc $bofh(readflag) bofh bofh_dccrandom

# Select BOFH bindings
-bind pub $bofh(readflag) !selbofh bofh_sel
+bind pub $bofh(readflag) [string trim $bofh(cmd)]selbofh bofh_sel
bind dcc $bofh(readflag) selbofh bofh_dccsel

%snip%


<font size=-1>[ This Message was edited by: cycomate on 2001-11-02 07:20 ]</font>
Locked