Cathy bot

From SmartCommunity

Jump to: navigation, search

Contents

Installation

Since jdev-3 no REXML patches are needed for Ruby 1.9 anymore.

Prerequisites

Software dependencies:

  • Ruby-1.8.7 and higher (may run on 1.8.6 — not tested) with RubyGems
    • download at Ruby website
    • download Ruby Installer for Windows — this will guide you through the installation process. You can check “associate with .rb files” and “add to PATH” for convenience
    • many Linux distributions have a ruby (and sometimes rubygems separately) packages. Install it via your favorite package manager
  • RubyGems
    • if you are using Windows Installer, RubyGems are preinstalled
    • to check if you did everything right, use gem --version (or YourRubyDir\bin\gem --version on Windows if not added to PATH)

Gem is a Ruby internal package manager. It is not affiliated neither with Windows Installer nor with package managers on Linux. To install a gem (Ruby package), use the following syntax:

gem install package_name

where package_name is the name of a desired package.

Cathy has the only required dependency:

  • xmpp4r (gem install xmpp4r)

and some optional dependencies:

  • unicode (for Unicode case-sensitivity support)
  • calc (for calc command)

Cathy-bot

Download the latest source code via svn:

svn checkout svn://svn.jsmart.web.id/cathy-bot cathy-bot-read-only

If you do not have an svn client, you can install one of your choice. On Windows we recommend Tortoise SVN. After installing right-click on any folder for context menu and choose “SVN Checkout”. Use the path svn://svn.jsmart.web.id/cathy-bot and a folder name cathy-bot (or any other).

After checked out the sources, you can update your bot to the latest version by simply running svn up in your command line or using “update svn” bot command or via the cathy-bot folder context menu entry “SVN Update”.

Config

In a newly created cathy-bot dir you can find a main configuration file autoexec.cfg. Open it with notepad or any other editor and modify connection line starting with connect command. Use your bot JID, password and special domain if needed. Remove the "" domain entry at the end to use SRV record (may be slow). Remove the default access setting and add yours instead. You can also want to remove the default join command and add your own room joins. After configuring the bot it is ready to run. Execute it by starting start.rb