Communicate early and often.
Introduction
Do your IRC channel participants ever miss important IRC conversations because they can't stay connected 24 hours a day? Do they use this a reason to avoid participating in IRC-based discussions?
DevGuy's IRCBot to the rescue!
The IRCBot is a no-frills, cross-platform IRC "robot" that records public IRC conversations in HTML format. Log files can be viewed via the world wide web.
Using the DevGuy IRCBot, your IRC participants can feel free to log off at any time and catch up on the discussion later. This might encourage your team members to use IRC more often as an effective tool for geographically-distributed collaboration.
Platforms
Windows 98/XP/NT/2000/2003 Workstation and Server versions
Any platform that has a Perl interpreter
License
GNU Public Linense.
Support
Known Issues
The robot will not be able to connect if the specified nick is already in use
Installing on Windows
Download and extract ircbot_*.tar.gz
Run IRCBot.MSI
The installer will also install the Perl source code
Modifying Source Code on Windows Platforms
Install ActivePerl with the Perl Package Manager option
Install Perl modules
ppm install POE-Component-IRC
The source code is installed via the Windows installer. Copy c:\program files\devguy\ircbot\perl_lib\cfgmgmt\*.* to c:\perl\lib\cfgmgmt (c:\perl is only an example -- use the directory where Perl was installed)
Installing on non-Windows Platforms
Download and extract ircbot_source_*.tar.gz
Create the subdirectory Win32 in the perl/lib directory (the location of the perl directory depends on where Perl is installed)
In the Win32 directory, create a file called TieRegistry.pm. The contents of this file should consist of two characters: "1;"
Copy the files in the cfgmgmt directory from the archive into the perl/lib/cfgmgmt directory (the location of the perl directory depends on where Perl is installed)
Set the environment variable devguy_globals to perl/lib/cfgmgmt/globals.xml (the location of the perl directory depends on where Perl is installed)
Install Perl modules
ppm install POE-Component-IRC
Configuring the Web Server
The robot will work with any web server.
Create a directory on your web server, e.g., "irclog"
Users should be able to "list directory contents" on this directory
Copy the file styles.css to this directory
When running the robot, specify the full path of this directory on the command line (followed by Path -- see below)
Usage
The IRCBot is an IRC client and will work with any sort of IRC server. The IRCBot can run on a computer that is completely separate from the IRC server. The robot is designed to "sit" on an IRC channel 24 hours a day logging traffic. If it's disconnected, it reconnects. It "chops up" log files on a daily basis, based on the timezone in which the bot is running. So, for example, Monday and Tuesday's chat threads are stored in separate files.
Run the command-line program dgirclog (.exe / .pl). Pass in name-value pairs on the command line. The name and the value are separated by a space.
Name : bot name (same as Nick)
Server : IRC server name
Port : IRC server port (defaults to 6667)
Channel : IRC channel to monitor
Debug : 1 or 0
Path : Full file path to write to (defaults to the current directory)
Username : optional user name used to connect to the IRC server, for registered nicks (defaults to the Name value)
Password : optional password used to connect to the IRC server, for registered nicks
For convenient launching of this program, you can create a .BAT or .sh/.csh file to run this program with the desired parameters.
Example:
dgirclog.pl Name logbot Server irc.freenode.net Channel #devguy
What Version of the Robot is Installed?
Run the program dgirclogversion (.exe/.pl) to find out.
Communicating with the Robot
Any IRC user can communicate with the IRCBot. Commands start with "!nick" followed by a space. "nick" is the case-insensitive name of the IRC bot.
"!nick help" displays the commands supported by the robot
"!nick exit" causes the robot to terminate
"!nick reconnect" causes the robot to log off and log back on.
What's Missing
It's our hope that developers will find this code useful, enhance it, and provide the enhancements back to us so we can distribute them to other users.
A real web application (e.g., J2EE, PHP)
Search
Commands to pause and resume logging
Use GMT
Command to get the bot's version
The name of the channel should be used as the first directory "level"
The ability to use a different nick if one is already in use
The ability to monitor multiple channels (even on different servers)
Troubleshooting
If the nick is WankerBot and you passed in Name or Nick on the command line, the work-around is to delete the line <IRCMaxNameLength>IRCMaxNameLength</IRCMaxNameLength> from your GlobalsDoc. This will be fixed in the next release.
