irssi_quotes.pl is a simple PERL script for the Irssi IRC client that allows users in an IRC Channel to add, view, and delete random quotes from a mysql database, by using simple '!triggers'.
This is more of a novalty item for use in IRC channels when someone says something that is either ridiculous or worthy of quotation.
e.g. <@higherEd> !addquote <publicEd> What's on the other-side of the sun?
This script is Open Source and is released under the GNU/General Public License (GPL).
Current Version: 1.13 (07/04/2007)
Included are 2 different SQL Scripts. The 'irssi_quotes_mysql4.sql' script should work for MySQL4, and the 'irssi_quotes_mysql5.sql' script should work for mysql5. I haven't tested this on mysql3, but the mysql4 script *should* be able to work for mysql3 as well.
You'll want to edit the SQL script (that reflects your version, 4 or 5) by modifying the username and password for the script-specific user account.
This will ensure a limited amount of access to your mysql server by the irssi_quotes.pl script and irc users in general. We DO want to allow them to INSERT, SELECT, and DELETE records from the irssi_quotes.tbl_quotes table only, so in order to do so, you should edit the following query in the sql script that will work with your version of mysql (version 4 or 5).
Note: You should replace 'example_username' and 'example_password' with your desired username and password for the irssi_quotes-specific user account.
After you've edited the SQL Script that is compatible with your version of MySQL Server, you can then run the script to create your database, table, and/or user account.
You'll need to edit the following default settings: (Lines: 52-64)
# mysql server my $mysql_hostname = 'localhost'; # mysql user login/name my $mysql_username = 'example_username'; # mysql user password my $mysql_password = 'example_password'; # mysql database name my $mysql_db = 'irssi_quotes'; # mysql database table name my $mysql_db_table = 'tbl_quotes';
If Irssi is already running in a different terminal, then simply type the following command to your Irssi client interface:
If Irssi is NOT already running, then you can simply run Irssi to load it, as step #7 should make the irssi_quotes script load automatically upon your next start-up.
The irssi_quotes script listens for the following triggers that are sent to an IRC channel:
The '!addquote' trigger allows users in a channel to add quotes to the database.
The '!quote' trigger without a trailing string or integar, returns a random quote.
The '!quote' trigger with a trailing integar, returns a quote that matches a record according to the tbl_quotes.id database column.
The '!quote' trigger with a trailing string, returns a random quote that matches the string.
The '!rmquote' trigger with a (required) trailing integar, removes a quote from the database that matches a record according to the tbl_quotes.id database column.
Sends a list of commands to the user in a private message window.
This script is released under the GNU/General Public License (GPL).