From d8f47b0899f9ba055735250e91ac861e8adde447 Mon Sep 17 00:00:00 2001 From: Tom Gilbert Date: Tue, 2 Aug 2005 23:32:05 +0000 Subject: Wed Aug 03 00:31:41 BST 2005 Tom Gilbert * Added Rakefile, tweaked gemspec --- ChangeLog | 4 ++++ INSTALL | 14 +++++++------- README | 44 ++++++++++++++++++++++++++++++++++++++++++++ REQUIREMENTS | 9 +-------- Rakefile | 37 +++++++++++++++++++++++++++++++++++++ TODO | 3 --- bin/rbot | 2 +- lib/rbot/ircbot.rb | 25 ++----------------------- rbot.gemspec | 40 ---------------------------------------- 9 files changed, 96 insertions(+), 82 deletions(-) create mode 100644 README create mode 100644 Rakefile delete mode 100644 rbot.gemspec diff --git a/ChangeLog b/ChangeLog index 78d551bf..614e20e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Aug 03 00:31:41 BST 2005 Tom Gilbert + + * Added Rakefile, tweaked gemspec + Tue Aug 02 16:27:36 BST 2005 Tom Gilbert * Fixed the new http.proxy* settings, they work! diff --git a/INSTALL b/INSTALL index 0ae1bdd1..3885f2dc 100644 --- a/INSTALL +++ b/INSTALL @@ -1,8 +1,8 @@ -Just stick the directory somewhere for now, edit rbotconf/conf.rbot and run -./rbot.rb. +Just run rbot, it'll ask you for any core information it needs before it can +start, after that you can configure everything else online using the config +module. -You can maintain multiple configurations at once, start rbot with the -location you want it to store runtime data in. By default, running ./rbot.rb -uses the rbotconf subdirectory which contains a sample configuration. If you -run ./rbot.rb ~/.rbot, then the configuration will be stored and read from -there instead. +You can maintain multiple configurations at once. Start rbot with the +location you want it to store runtime data in. By default, running rbot +uses the ~/.rbot config directory. If you run 'rbot /path/to/foo', then the +configuration will be stored to and read from there instead. diff --git a/README b/README new file mode 100644 index 00000000..38792edb --- /dev/null +++ b/README @@ -0,0 +1,44 @@ +rbot README +=========== + +rbot is a ruby IRC bot. Think of him as a ruby bot framework with a highly +modular design based around plugins. + +rbot features +============= + +* Runtime configuration via irc chat +* User authentication and access levels for using different bot features +* Built in infobot-style keywords. See example session below. +* Support for underlying fact database (infobot fact files), which can + be overridden or supplemented by runtime keyword controls +* Multi-language support - comes with english, dutch and german definitions + so far - more translations welcome +* Powerful plugin architecture, comes with plugins for: + o DNS queries + o Babelfish translation + o Google searching + o Excuse generation + o Insult generation + o Karma + o Checking the weather + o Querying slashdot + o Doing Math + o Per-channel quote storage, searching and retrieval + o Reminders + o rot13 translation + o Check the spelling of a word + o Webserver Server: header examination + o RPG dice rolling + o larting people + o conversation stats + o more... + +Thanks are owed to the infobot developers - several of rbot's features are +inspired by infobot and so are some of the default plugins. Thanks are also +owed to RADKade1, as rbot's quote plugin is a direct reimplementation of his +"quotesaq" - simply because it's a great quote interface. + +Mainly, rbot's fun to play with, although the plugin architecture can be used +to write very useful modules + diff --git a/REQUIREMENTS b/REQUIREMENTS index 068c1b9a..7b347341 100644 --- a/REQUIREMENTS +++ b/REQUIREMENTS @@ -16,14 +16,7 @@ function) babelfish, wserver: net/http 1.2+ - -excuse,insult: - net/telnet - -nslookup: - resolv-replace (optional) - -slashdot: +slashdot, freshmeat, rss: REXML External programs needed for rbot diff --git a/Rakefile b/Rakefile new file mode 100644 index 00000000..18c66a06 --- /dev/null +++ b/Rakefile @@ -0,0 +1,37 @@ +require 'rubygems' +require 'rake' +require 'rake/gempackagetask' + +task :default => [:package] + +spec = Gem::Specification.new do |s| + s.name = 'rbot' + s.version = '0.9.9' + s.summary = <<-EOF + A modular ruby IRC bot. + EOF + s.description = <<-EOF + A modular ruby IRC bot specifically designed for ease of extension via plugins. + EOF + s.requirements << 'Ruby, version 1.8.0 (or newer)' + + # s.files = Dir.glob("**/*").delete_if { |item| item.include?(".svn") } + s.files = FileList['lib/**/*.rb', 'bin/*', 'data/**/*', 'AUTHORS', 'COPYING', 'README', 'REQUIREMENTS', 'TODO', 'ChangeLog', 'INSTALL', 'rbot.gemspec', 'Usage_en.txt', 'setup.rb'].to_a + s.executables << 'rbot' + + s.autorequire = 'rbot/ircbot' + s.has_rdoc = true + s.rdoc_options = ['--exclude', '(post-config.rb|rbotconfig.rb)', + '--title', 'rbot API Documentation', '--main', 'README', 'README'] + + s.author = 'Tom Gilbert' + s.email = 'tom@linuxbrit.co.uk' + s.homepage = 'http://linuxbrit.co.uk/rbot/' + s.rubyforge_project = 'rbot' +end + +Rake::GemPackageTask.new(spec) do |pkg| + pkg.need_zip = true + pkg.need_tar = true +end + diff --git a/TODO b/TODO index 6c9bae1f..ff120780 100644 --- a/TODO +++ b/TODO @@ -1,8 +1,5 @@ -o runtime language changing -o maybe runtime language configuration? o freeze/thaw factoids (make them readonly) at higher auth o respond to insults o feed back errors from plugins (optional) o Allow users to leave messages to named users. o wtf plugin (bsdgames) -o weather plugin C->F conversion is wrong? diff --git a/bin/rbot b/bin/rbot index 38cf7e49..886f820a 100755 --- a/bin/rbot +++ b/bin/rbot @@ -36,7 +36,7 @@ rescue LoadError => e end $debug = false -$version="0.9.8" +$version="0.9.9" $opts = Hash.new # print +message+ if debugging is enabled diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 2dcede3e..5f051290 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -1,24 +1,3 @@ -# Copyright (C) 2002 Tom Gilbert. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies of the Software and its documentation and acknowledgment shall be -# given in the documentation and software packages that this Software was -# used. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - require 'thread' require 'etc' require 'fileutils' @@ -43,8 +22,8 @@ require 'rbot/httputil' module Irc -# Main bot class, which receives messages, handles them or passes them to -# plugins, and stores runtime data +# Main bot class, which manages the various components, receives messages, +# handles them or passes them to plugins, and contains core functionality. class IrcBot # the bot's current nickname attr_reader :nick diff --git a/rbot.gemspec b/rbot.gemspec deleted file mode 100644 index c63f3836..00000000 --- a/rbot.gemspec +++ /dev/null @@ -1,40 +0,0 @@ -require 'rubygems' - -spec = Gem::Specification.new do |s| - - #### Basic information. - - s.name = 'rbot' - s.version = '0.9.9' - s.summary = <<-EOF - A modular ruby IRC bot. - EOF - s.description = <<-EOF - A modular ruby IRC bot specifically designed for ease of extension via plugins. - EOF - - s.requirements << 'Ruby, version 1.8.0 (or newer)' - - #### Which files are to be included in this gem? Everything! (Except .svn directories.) - - s.files = Dir.glob("**/*").delete_if { |item| item.include?(".svn") } - - #### C code extensions. - - # s.require_path = '.' # is this correct? - # s.extensions << "extconf.rb" - - #### Load-time details: library and application (you will need one or both). - s.autorequire = 'rbot/ircbot' - s.has_rdoc = true - s.rdoc_options = ['--include', 'lib', '--exclude', - '(post-config.rb|rbotconfig.rb)', '--title', 'rbot API Documentation', - '--main', 'lib/rbot/ircbot.rb', 'lib', 'bin/rbot'] - - #### Author and project details. - - s.author = 'Tom Gilbert' - s.email = 'tom@linuxbrit.co.uk' - s.homepage = 'http://linuxbrit.co.uk/rbot/' - s.rubyforge_project = 'rbot' -end -- cgit v1.2.3