Giter Club home page Giter Club logo

nodebot's Introduction

Nodebot - a node.js IRC bot

Prerequisites

  • node.js: v0.4.8 was used for development and testing of this bot.
  • request and jsdom: used by the googleweather.js lib which is used by the weather.js script, can be installed with npm install request and npm install jsdom
  • translate: used by the translate.js script, can be installed with npm install translate

Configuration

Copy config.js.sample to config.js and then look in the file for all configuration options. You can disable scripts by renaming them to a different extension or deleting/moving them out of the scripts folder.

Running

Just run node main.js. It will load the scripts and connect to the IRC server, at which time the scripts should react to messages on the server (e.g. autojoin.js will autojoin any channels, nickserv.js will identify with NickServ, pong.js will send a PONG reply to every PING).

It also starts a REPL loop, so that you can run commands manually. So for example, you could nodebot.join('#room') to cause the bot to join a room, nodebot.privmsg('#room', 'hi') to make the bot talk in the room, or nodebot.loadScripts() to reload the scripts. Refer to main.js for the available functions in the global.nodebot object, or run require('util').inspect(nodebot).

Scripts

Scripts are still under development, and the framework is such that one is not able to programmatically create a list of the available commands. Thus, the help.js script is rather useless and certainly not what one might expect. So please refer to the top and contents of each script to find out what it does. Each script has a comment at the top clearly explaining what the script does and each command it makes available.

For developing your own scripts, use the existing scripts as examples to make your own.

License

(c) 2011 Richard Carter

This project is licensed under the MIT license; see LICENSE.txt for details.

nodebot's People

Contributors

ricket avatar callumacrae avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar

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.