github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

brettstimmerman / jabber-bot

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 36
    • 4
  • Source
  • Commits
  • Network (4)
  • Issues (0)
  • Downloads (3)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (3)
    • release_1.1.1
    • release_1.0.1
    • release_1.0.0
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Easily create simple regex powered Jabber bots. — Read more

  cancel

http://socket7.net/software/jabber-bot

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

missed a rename 
brettstimmerman (author)
Fri Feb 27 21:55:28 -0800 2009
commit  2a6f9b489abeb1062f7dfa6661c638829654c025
tree    462de003757b7742c6a2fd186aae9288b0baa069
parent  94f10ef9db17294d0b6fbb2a071e7b3fa862a549
jabber-bot /
name age
history
message
file HISTORY Fri Feb 27 21:32:33 -0800 2009 add the 1.1.1 changes that were missing [brettstimmerman]
file LICENSE Fri Feb 27 21:37:35 -0800 2009 bump (c) date, version; other random tweaks [brettstimmerman]
file README.rdoc Fri Feb 27 21:37:35 -0800 2009 bump (c) date, version; other random tweaks [brettstimmerman]
file Rakefile Fri Feb 27 21:37:35 -0800 2009 bump (c) date, version; other random tweaks [brettstimmerman]
file jabber-bot.gemspec Fri Feb 27 21:55:28 -0800 2009 missed a rename [brettstimmerman]
directory lib/ Fri Feb 27 21:37:35 -0800 2009 bump (c) date, version; other random tweaks [brettstimmerman]
directory sample/ Fri Feb 27 21:37:35 -0800 2009 bump (c) date, version; other random tweaks [brettstimmerman]
README.rdoc

Jabber::Bot

Easily create simple regex powered Jabber bots.

Jabber::Bot makes it simple to create and command your own Jabber bot. Bots are created by defining commands powered by regular expressions and Ruby.

Author:Brett Stimmerman (brettstimmerman@gmail.com)
Version:1.1.1
Copyright:Copyright © 2009 Brett Stimmerman. All rights reserved.
License:New BSD License (opensource.org/licenses/bsd-license.php)
Website:github.com/brettstimmerman/jabber-bot

Requires

  • RubyGems
  • Jabber::Simple 0.8.7+

Usage

  # Create a public Jabber::Bot
  config = {
    :name      => 'SampleBot'
    :jabber_id => 'bot@example.com',
    :password  => 'secret',
    :master    => 'master@example.com',
    :is_public => true
  }

  bot = Jabber::Bot.new(config)

  # Give your bot a private command, 'rand'
  bot.add_command(
    :syntax      => 'rand',
    :description => 'Produce a random number from 0 to 10',
    :regex       => /^rand$/
  ) { rand(10).to_s }

  # Give your bot a public command, 'puts <string>' with an alias 'p <string>'
  bot.add_command(
    :syntax      => 'puts <string>',
    :description => 'Write something to $stdout',
    :regex       => /^puts\s+.+$/,
    :alias       => [ :alias => 'p <string>', :regex => /^p\s+.+$/ ],
    :is_public   => true
  ) do |sender, message|
    puts "#{sender} says '#{message'"
    "'#{message}' written to $stdout"
  end

  # Bring your new bot to life
  bot.connect
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server