SBot v0.1.3 ~~~~~~~~~~~ Whom: Steve Mertz Date: 2005.06.17 Why: To 1) Learn Perl 2) Get a simple bot out there that works well and is easily modifiable ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Development Platform: Slackware 9.1.0 Perl: v5.8.7 POE::Component::IRC: 4.62 And everything that is required to make POE::Component::IRC work. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tested Platforms: Slackware 9.1.0 OpenBSD 3.1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SBot stands for Simple Bot. It's my first fully functional IRC bot written in Perl. Created to learn more about Perl and how it works, and to have a simple IRC bot that just worked. SBot is written in an attempt to use Perl's OO capabilities. Each Object gets its own file. There are a couple files that are not Object related at all, simply contain message strings, etc. Here is the break down of the files: SBot.pl - main program file sbot/Config.pm - configuration file sbot/Help.pm - All Help for the bot goes in this file. Help for the commands and such sbot/Messages.pm - All the messages that are not Help, go in this file. This is to help out should someone want to change it's messages or translate to another language. All the messages are in one place. sbot/SBot.pm - Main guts for SBot. sbot/SCommands.pm - There is where the commands are. sbot/SUser.pm - User information. SBot has a 8 builtin commands: setup -- Setup the bot for the initial admin op -- OP one's self. access -- Show one's access die -- Tell bot to shut down save -- Save the user list users -- list users and their access. chpass -- Change a users password adduser -- Add a user rmuser -- Delete a user help -- Simple help for Simple Bot. Including cmd list, etc. Currently SBot only knows one channel. But it has a simple user list. Simple being the keyword. Right now it only handles one user@host per user. And '~' matters! The user can be either an OP or ADMIN (or both) Yeah, Yeah, Yeah, Let me Start It Up! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 01) Edit sbot/Config.pm so that the choices meet your needs. 02) Run ./SBot.pl 03) Join IRC and /msg botnick setup 04) Change your password! 05) Enjoy! That Simple! There are no command line options. Everything configurable is in the Config.pm Licensing ~~~~~~~~~ Copyright (c) 2005, Steve Mertz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of SBot nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. TODO ~~~~ - Fix chk_args() - Setup a login system so you don't have to repeatedly enter password for commands. - Add public commands for use with login system. - multiple channel support - server list support - ban list - Add some more debugging capabilities - Add command line options.