Code Monkey home page Code Monkey logo

pcommandbot's Introduction

PCommandBot

PCommandBot is a highly configurable and extensible bot for responding to commands sent through IRC. These commands can be used to provide information, play games, or do random stuff.

Usage

PCommandBot requires Java 6 or later to run.

In the simplest case, you can set up PCommandBot to reply to commands with a fixed message:

java -jar PCommandBot.jar [configfile]

For more information on the configuration file, please read CONFIGURING.txt.

For other tasks, you will need to use the PCommandBot class and load the configuration in your own application. More information is available in the Javadoc.

Interaction

A command consists of a command prefix, a command string, whitespace, and a possible argument. By default, the argument is read until the end of the message, but PCommandBot may be configured with an argument terminator that signals the end. (This allows for multiple commands in a single message.) All fields except the command string are case-sensitive.

By default, the command prefix is !, so !help invokes a command with the string help.

Administration

A special command called the core command is used to access core functionality of the bot. By default the core command is p.

The first part of the argument (before whitespace) is the subcommand, which determines the action to be taken. The remainder of the argument is the subargument, which is passed to the subcommand.

Currently, the recognized subcommands are:

  • auth: Authenticate with the bot to perform sensitive actions. The subargument is the configured password.
  • quit: Quit the application. (This calls System.exit(), so this is not recommended for multi-bot applications.) Requires authentication.
  • join: Join a channel. The subargument is the channel to join. Requires authentication.
  • part: Part a channel. The subargument is the channel to part. Requires authentication.
  • time: Get the time in UTC.
  • echo: Reply with the subargument.

Building From Source

Source code is available at http://github.com/jack126guy/pcommandbot.

The sources.txt and manifest.txt files are provided in the source distribution to enable building with just the JDK:

cd [source dir]
javac -d [outside dir] @sources.txt
cd [outside directory]
jar cmf [source dir]/manifest.txt PCommandBot.jar *

Other Information

The latest version is 1.0.3.

PCommandBot is available under the GNU General Public License, version 3 or later. Different parts of the application are available under different terms; refer to LICENSE.txt for details.

PCommandBot is based on the PircBot framework and uses JSON-Simple for configuration processing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.