Project

ponder

No commit activity in last 3 years
No release in over 3 years
Ponder (Stibbons) is a Domain Specific Language for writing IRC Bots using the EventMachine library.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

>= 0.12.10
 Project Readme

Ponder Gem Version Build Status

Notice

This project is not actively maintained. At this point I suggest giving Cinch a try.

Description

Ponder (Stibbons) is a Domain Specific Language for writing IRC Bots using the EventMachine library.

Requirements

  • Ruby >= 1.9.2
  • EventMachine >= 0.12.10

Wiki

Detailed information about using Ponder can be found in the Project Wiki.

Quick Start

Installation

gem install ponder

Usage

Setting up

require 'ponder'

@thaum = Ponder::Thaum.new do |config|
  config.nick   = 'Ponder'
  config.server = 'chat.freenode.org'
  config.port   = 6667
end

Event handling

# Join a channel when connected
@thaum.on :connect do
  @thaum.join '#ponder'
end

# Echo messages matching /foo/ back to the channel
@thaum.on :channel, /foo/ do |event_data|
  @thaum.message event_data[:channel], 'bar!'
end

# Print the joined user's nickname
@thaum.on :join do |data|
	user = data[:join].user
	puts "User joined #{user.nick}"
end

# Print the parted user's nickname
@thaum.on :part do |data|
	user = data[:part].user
	puts "User parted #{user.nick}"
end

Starting the Thaum

@thaum.connect

Discworld Context

So, why all that silly names? Ponder Stibbons? Thaum? Twoflogger (referring to Twoflower), BlindIo? What's the Mended Drum? Who's the Librarian? Simply put, I freaking enshrine Terry Pratchett's Discworld Novels and there were no better name for this project than Ponder. Ponder Stibbons is the Head of Inadvisably Applied Magic at the Unseen University of Ankh Morpork. He researched the Thaum, like the atom, just for magic. I just love that character, so there we are. If you're a fan too or want to talk about the Discworld, the framework, whatever, don't hesitate to contact me.

License

Copyright (c) 2010, 2011, 2012, 2013 Tobias Bühlmann

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.