The jokes have been extracted from Taivo Pungas' joke-dataset GitHub repository and filtered to fit Second Life limits (such as maximal group message length).
The script can be used as it is provided by manually adding jokes or it can be shunted with the provided jokes database.
To shunt the database with the jokes extracted from Tavio's repository, check out the corrade-lsl-templates/eggdrop Subversion respository using an SVN client and locate the corrade-eggdrop-joke.sql
file.
Next, import the jokes database into the group database, for instance, by using the command-line sqlite3
SQLite client:
sqlite3 e269893f-a570-0087-930e-6ba2a0b77f9c.sqlite < corrade-eggdrop-joke.sql
where:
e269893f-a570-0087-930e-6ba2a0b77f9c.sqlite
is a group database located under the Corrade folder at Databases/e269893f-a570-0087-930e-6ba2a0b77f9c.sqlite
.
Finally, the database must be modified in order to change the group name since it is by default set to [Wizardry and Steamworks]:Support
. Open up the database using the command-line SQLite client:
sqlite3 e269893f-a570-0087-930e-6ba2a0b77f9c.sqlite
and issue:
UPDATE "corrade-eggdrop-joke" SET name='YOUR_GROUP_NAME';
where:
YOUR_GROUP_NAME
should be replaced by the group name that the joke module runs for.When the script starts, an attempt is made to create the database if it does not already exist and then jokes are counted in order to speed up retrieval. Jokes can then be requested by typing in group chat:
@joke
which will make the script display a joke along with the avatar name that added the joke and the joke id
.
What do you call a substance that makes people attracted to both genders? A bi-product! [Ectogram Resident/2541]
The joke id
can then be used to remove a joke, for instance, by issuing:
@joke remove 2541
Conversely, new jokes can be added by issuing:
@joke add Why did the chicken cross the road? To get to the other side.
which will return a message indicating the joke ID that can then be used for other operations.
Furthermore, the module allows querying a joke by joke ID, simply by specifying the ID in group chat:
@joke 44532
which will return the joke with ID 44532
.
Unable to display file "http://svn.grimore.org/corrade-lsl-templates/source/eggdrop/joke-database.lsl": It may not exist, or permission may be denied.