Giter Club home page Giter Club logo

nerdobot's Introduction

nerdobot

IRC bot for #mv.nerd built with CoffeeScript + NodeJS.

You can use nerdobot as a configurable bot, as a bot library and as an IRC library (look into the /lib/ folder.)

Usage

Requirements

nerdobot requires NodeJS and NPM (usually installed with Node) to be run. CoffeeScript also needs to be installed. Use npm install -g coffee-script, which will install coffee globally so you can run CoffeeScript code using coffee <file.coffee>.

Installing

$ sudo npm install -g https://github.com/alvaro-cuesta/nerdobot/tarball/master

Create config.coffee under /usr/local/lib/node_modules/nerdobot/ (follow config.EXAMPLE.coffee) to setup your bot configuration (will make this easier as CLI argument/envvar, I promise) and run:

$ nerdobot

Developing

Running your own nerdobot copy

If you did download the code, there's an easy way to update dependencies. Run this under nerdobot's code folder:

$ npm install

And run using:

$ coffee ./bin/nerdobot.coffee
or
$ npm start

You can also install nerdobot globaly issuing this commands:

$ sudo npm install -g

Now you'll be able to run your own copy using nerdobot anywhere in your system.

Contributing

Just fork this repository and start hacking on your own copy. Preferably, make your own branch out of develop (this will be easier for everyone to maintain.) Once you're happy with the results, need comments, or just want to let us know, issue a pull request.

If the code is good enough, we have no problems on accepting pull requests (and you'll be added to the appropriate contributors sections.) If there's something wrong, we'll let you know and guide you to fix it. I hope it's just not TERRIBLY wrong :)

We prefer CoffeeScript code but might pull JavaScript if it's good enough (or maybe migrate it to CoffeeScript.) Ask before doing any work, just in case.

Plugins

Hacking plugins is even easier. You can either follow the same steps for contributing (if the plugin is worthwhile for everyone) or start your own repo (just for your plugin) and start hacking there.

In any case, we're not sure we'll maintain your plugin code if you fork off our repo. If the code falls behind the development code, it might even be pulled off to a old_plugins directory. We might maintain it if we feel it's worthwhile, and you can always maintain it yourself.

Plugins follow this structure:

module.exports = function(bot) {
  /* your code here
   * 'bot' will be your bot instance
   *
   * see 'lib/irc.coffee', 'lib/bot.coffee'
   * and other plugins for API/examples
   */

  return {
    name: 'Plugin long name',
    description: 'This plugin does something... probably',
    version: '0.1',
    authors: [
      'You',
      'Some guy',
      'The internet'
    ]
  };
};
module.exports = (bot) ->
  # your code here
  # 'bot' will be your bot instance
  #
  # see 'lib/irc.coffee', 'lib/bot.coffee'
  # and other plugins for API/examples

  name: 'Plugin long name'
  description: 'This plugin does something... probably'
  version: '0.1'
  authors: [
    'You',
    'Some guy',
    'The internet'
  ]

License

Copyright © 2012 Álvaro Cuesta and other contributors https://github.com/alvaro-cuesta/nerdobot/

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 or substantial portions of the Software.

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 OR COPYRIGHT HOLDERS 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.

nerdobot's People

Contributors

alvaro-cuesta avatar blzkz avatar

Watchers

 avatar  avatar  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.