TaupeBot
TaupeBot is a GPL IRC bot written in PHP.
Features
As every IRC bot, it has a list of usefull (or not) commands :
- !help
- Online help
- !code
- Sends you the source code by DCC
- !rss
- Parses an RSS file and give information about the channel
- !last
- Returns the last version of the free software entered (use freshmeat.net)
- !valid
- Validates the markup of the page (with the W3C validator)
- !addrss
- Adds a shortcut for a RSS feed (need the MySQL database)
- !carambar
- Returns a Carambar© joke (based on le-carambar.org)
- !def
- Returns a custum def defined with !adddef, or search for a computer science definition (using dicofr.com)
- !adddef
- Adds a custum def to the Bot database (need MySQL)
- !syno
- Returns a synonymous of a word (using the synonymous dictionnary of Caen university)
- !citation
- Returns a famous citation containing a word (using Bribes.org)
- !prov
- Returns a proverb containing a word (using Proverbes.dico1.com)
- !convert
- Converts between money currencies (using FXConverter of OANDA)
- !roll
- Returns a random number
- !heure
- Returns the time and date in a city (using Horlogeparlante.org)
- !signchin
- Returns the chinese astrologic sign (using Signe-chinois.com)
- !anniv
- Register a birthday for a nick (and its aliases) and returns it when asked, or when it's the birthday of a nick
- !php
- Returns information about a PHP function
- !jargon
- Returns a definition of the word in computer science jargon (using JargonF)
- !cctld
- Returns the country associated with the cctld given (using IANA whois)
- !dir
- Search a site on dir.com.
- !mozdex
- Search a site on mozdex.com.
- !aero
- Retrive informations about the airport asked (using QFU).
- !lang
- Retrive informations about the language asked (using a database of the linguistics research centre of the university of Caen).
- !anag
- Returns an annagram of a full name
- !dccmode
- Toggles the
dccmode
- !ignore
- Adds a user to the bot ignore list
- !unignore
- Removes a user from the bot ignore list
- !ignorelist
- Returns the ignore list of the bot for the current chan
- ...
TaupeBot uses a little RSS parser which also exists in a standalone version, and can be tested on line.
TaupeBot can be administrated with a XUL interface (used with its stylesheet)
Requirements
TaupeBot runs on PHP 4.2.2 and above, and uses MySQL.
It can be used without database, but it will lose some features
Configuration
The configuration is divided into 2 parts :
The varco.php file
This file contains the SQL parameters and the IRC password of the bot.
define("SERV",'SQL server URL');
define("LOGIN",'SQL login');
define("DB_TAUPE",'Database to use');
define("MDP" , 'password for this database');
//alternate database
define("SERV0",'SQL server URL');
define("LOGIN0",'SQL login');
define("DB_TAUPE0",'Database to use');
define("MDP0" , 'password for this database');
//other alternate databases follow the same schema (SERV1, SERV2...)
define("PASS_BOT",'IRC password for the bot');
Other parameters
You can put this parameters directly in the bot file, but you can also use an external file, called
tbconfig.php.
(This solution permits to upgrade the bot just replacing the main file. Your config parameters won't be changed)
$server_name='irc.rezosup.org';- Server adress
$port=6667;- Server port
$nick='TaupeBot';- Bot nick
$altnick='Taupe-Bot';- Alternate bot nick
$masterchan='#taupe';- Master chan : you have to be op there to control the bot
$chan_list=array($masterchan,'#iawath','#tb');- List of chans the bot will join at this connection
$reload=60;- Timer to reload the page with javascript when the connection failed (0 to desactivate)
$usermodes='+b';- Mode set on itself by the bot when it connects
$warp=512;- Maximal length of IRC messages accepted by the server.
RFC 1459 indicate 512, but some servers don't respect it...
$reco=1;- When true, the bot will try to reconnect after a time out
$sendURL=1;- Some servers have anti spam protections which kill a user if he sends to much URL.
If you're using such server, you should set $sendURL to false : the bot will avoid sending URL
$timeout=302;- Time before the bot decides to reconnect, suspecting a time out
$prefixop=array('@');- Prefixs of op users, or users with the same power
$prefixvoice=array('+');- Prefixs of voice users, or users with the same power
$floodparano=0;- Indicate if the server has huge and paranoid flood control
$timestamp=1;- Display or not timestamps on the logs
$casemapping='strict-rfc1459';- Default value of CASEMAPPING (overwritten by IRC server message)
$chantypes=array('#','&');- Default chan prefixs (overwritten by IRC server message)
$chanmodes=array('b','k','l','ciLmMnOprRst');- Default chan modes (overwritten by IRC server message)
$db=1;- Type of the database (1 : MySQL, 2 : PgSQL)
To create the SQL tables optionnaly used by Taupebot, you can execute
a small SQL file.
Since version 1.0.96b81, Taupebot can create those tables by itself if they don't exist.
Download
- The last stable version of Taupebot is TaupeBot
- The last development version of Taupebot is TaupeBot
- The last version of the RSS parseur is RSS parseur
Todo
Find a workaround to this PHP bug.
Add PgSQL support
- I18n [Target version : 1.1.0]
- !articles : Allow storing and recovering good articles seen on web
- !wn (search on WordNet Ontologie)
[RSS parser] Full Namespace support and full xml:base support for the RSS parser (use of a kind of Infoset)
- Flood control for some functions
Multiple joins with !join command
- Fix again the !anag command
- [RSS parser] Use HTTP connection to open RSS file (and check for the Content-Type and Content-Location)
- [RSS parser] Extend to RDF support
Create a DOM version witch could be used in XML (like in XHTML with good media type) See Mozilla Bug 230482...
!mozdex (search on mozdex.com)
!php (return info on a PHP function)
Fix !heure function
Fix !last Mysql answer
- Fix !convert function
- Fix !valid function
Changelog
- 1.0.96
-
Add !film function. There are still some bugs, due to dbpedia limitations (see bug 1737041 and bug 1731454)
Fix !heure command
Fix !last Mysql answer
Fix !signchin function (using another web service).
Add flood control (it works, but may need to be more tuned)
Taupebot is now released under the GNU GPL version 3 or above.
- 1.0.96b81
- Add PostgreSQL support.
Fix !last mysql function.
Fix !def function.
Small fix in !syno function.
Add !tcl % line function.
Minor fix in !anniv command.
Small fix in !jargon function.
Add !aero airport function.
Add !lang language function.
- 1.0.96b07
- !prov command.
Adding SeaMonkey to !last command, and other small bugfixs
- 1.0.96a91
- TaupeBot now detects the modes use on chans, and will use bold and underline only if allowed.
Implementation of CHANMODES (ISUPORT).
Other small bugfixs
- 1.0.96a71
- Fix the !anag command, small fix in the !convert command
Implementation of ISUPORT : CHANTYPES, CASEMAPPING and PREFIX
Other bugfixs to be more RFC compliant
- 1.0.96a62
- 2 bugfixs in !calc, and a small one in !anniv.
- 1.0.96a35
- Add !mozdex command.
- 1.0.96a32
- Small bugfix with !php command.
- 1.0.96a31
- Fix 2 regressions, in !addrss and !adddef commands.
- 1.0.96a18
- Small bugfixs in !anniv command, and in various MySQL queries.
- 1.0.95
- Add !anniv command, and fix again the !jargon command.
- 1.0.94b75
- !cctld command, fix !jargon command, flood control for !help, fix an important bug which freezed the bot, and other many small bug fixs
- 1.0.94a63
- Security fixs with !ignore command, and support of prefixs given by the server.
- 1.0.94a42
- TaupeBot can now answer to some commands even after a reconnection.
- 1.0.94a17
- Add !dir command.
- 1.0.94a04
- Small fixes in invite and in !php (Yet another...)
- 1.0.93
- If PHP 4.3.0 or more is available, TaupeBot wil use non blocking socket, which allows him to avoid ping timeout while anwsering to long commands (such as using DCC).
TaupeBot will also reconnect when it suspects a time out.
- 1.0.93b98
- Small fixes in !php, !valid. Add of automatic reconnection after a time out
- 1.0.93b83
- Add !jargon word command
- 1.0.93b79
- Add XChat to the list of software checked by !last (The freshmeat information was too outdated)
- 1.0.93b77
- Small fix in the !php function and the !last mysql commands
- 1.0.93b64
- Add the !php function command
- 1.0.93b53
- Integration of RSS parser 1.0.93.12, and add a config var :
$usermodes with allows the bot to set itself some mode when it connects
- 1.0.93b47
- Multiple chans with join (!join #chan1,#chan2) and fix the bug of the 0-chan
- 1.0.93b43
- Integration of RSS parser 1.0.93.9 with a better management of comments, processing instructions and CDATA
- 1.0.93b42
- Integration of RSS parser 1.0.93.8 with a dirty workaround to avoid PHP segmentation due to Bug 28461
- 1.0.93b41
- Automatik nick change when the nick is registered (that is to said when somebody else change the bot nick)
- 1.0.93b31
- Fix the !syno command (using another web interface)
- 1.0.93b21
- Adapt the !last mysql command to the new MySQL site
- 1.0.93b18
- Adapt the !valid command to the new W3C validator (and check for warnings before claiming that a page is valid !)
- 1.0.93b14
- Integrate RSS parser 1.0.93.6, with full CDATA support (in fact it was totaly buggy before)
- 1.0.93b09
- Integrate RSS parser 1.0.93.5, with full xml:base and namespaces support
- 1.0.93b06
- Add the possibility to use alternate SQL databases when the first or the following are dead
- 1.0.93b03
- Add /notice BotName #chan museau which turn the
dccmode off to this chan
- 1.0.93b02
- Add
de rien
to thx
- 1.0.93b01
- Restrict the
de rien
answer to the actif dccmode
Restrict the error message when the user is ignored for pourquoi ?
et merci
for the actif dccmode too
- 1.0.93a99
- Add an error message when the !syno database can't be used (which occures currently)
- 1.0.93a98
- Add
de rien
to merci
- 1.0.93a97
- Fix the !def command
Page obviously in construction....
Last modification : 18/01/2010