-
Notifications
You must be signed in to change notification settings - Fork 31
Making your own bucket
CO2-Codes edited this page Jan 31, 2022
·
1 revision
- Download the source files from http://github.com/zigdon/xkcd-Bucket/, or using git, mirror the repository from here: http://github.com/zigdon/xkcd-Bucket.git
$ wget http://github.com/zigdon/xkcd-Bucket/raw/master/bucket.pl $ wget http://github.com/zigdon/xkcd-Bucket/raw/master/bucket.sql $ wget http://github.com/zigdon/xkcd-Bucket/raw/master/bucket.yml $ wget http://github.com/zigdon/xkcd-Bucket/raw/master/sample.sql
- Setup a database (MySQL recommended) - for example, on debian or ubuntu:
$ sudo apt-get install mysql-server
- Create the tables described in bucket.sql. Note that for the following commands, you may need to add the arguments "--user=root --password" to the mysql commands or it will complain that you are not authorized.
$ mysqladmin create bucket $ mysql -D bucket < bucket.sql $ mysql -D bucket < sample.sql
- Create a user for bucket, and grant all privs on the bucket database
$ echo 'grant all on bucket.* to bucket identified by "s3kr1tP@ss"' | mysql
- Edit config file (bucket.yml)
- Install perl modules (this might take a while):
$ sudo cpan POE POE::Component::IRC POE::Component::SimpleDBI Lingua::EN::Conjugate Lingua::EN::Inflect Lingua::EN::Syllable YAML HTML::Entities URI::Escape XML::Simple
- Set bucket.pl executable
$ chmod +x bucket.pl
- Pre-flight checklist
- Register your bucket's nick with NickServ.
- Register your bucket's logging and config channels (if needed), and configure them as private and restricted.
- Add your bucket's nick to the allow list for the logging and config channels.
- Start bucket:
$ ./bucket.pl
- Start adding new factoids.
Name | Type | Meaning | Default Value |
---|---|---|---|
autoload_plugins | string | Space separated list of plugin names to load at startup | quote topic |
band_name | percent | Chance of checking for a good band name. | 5 |
band_var | string | The variable used for band names. | band |
ex_to_sex | percent | Chance of replacing 'ex' with 'sex'. | 1 |
file_input | |||
hide_hostmask | integer | 0 = don't hide hostmask, 1 = hide hostmask. | 0 |
identify_before_autojoin | |||
idle_source | string | Source of idle chatter. Current values: MLIA, IMMD, SMDS, factoid, random | factoid |
increase_mute | integer | How much longer a shut up command will last each time $nick is addressed while shutting up | 60 |
inventory_preload | integer | How many items should be in the inventory when starting up. | 0 |
inventory_size | integer | How many items can we hold. Hard limit is twice that number. | 20 |
lookup_tla | |||
max_sub_length | |||
minimum_length | integer | What is the minimum length factoid that can trigger Bucket | |
nickserv_msg | |||
nickserv_nick | |||
item_drop_rate | integer | How many items should be dropped at once when we're over the soft limit | 3 |
plugin_dir | string | Path to the directory containing all available plugins | plugins |
random_item_cache_size | integer | How many random items should be stored in memory | 20 |
random_wait | integer | How long should the channel be idle before idle chatter is called | 3 |
user_activity_timeout | integer | How long does a user need to be quiet to not be considered for $someone | 360 |
repeated_queries | |||
the_fucking | percent | Chance of the fucking smartassery. | 100 |
timeout | |||
tumblr_name | |||
user_mode | |||
uses_reply | |||
value_cache_limit | |||
var_limit | |||
your_mom_is | percent | Chance of refusing to learn a new factoid, insulting your mother instead | 5 |
www_root | string | Path to directory in which literal[*] output should be saved | empty |
www_url | string | URL to that same directory | empty |
The following configuration variables are available when the appropriate plugin is loaded:
Plugin | Name | Type | Meaning |
---|---|---|---|
bananas | bananas_chance | percent | Chance of randomly saying "bananas" |
quotes | history_size | integer | How many lines should be remembered back for the quoting function |
squirrel | squirrel_chance | integer | Chance of triggering the squirrel sequence |
squirrel | squirrel_shock | integer | Length of the squence |
This version of Bucket has been in channel since January 21, 2009. Bucket's sourcecode is available on github. He's written in perl, by the way.