Created
August 26, 2010 13:29
-
-
Save HHRy/551382 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :trigger_sign, '!' | |
on :privmsg, :in => :channel, :trigger => 'stuff' do |channel, user, message| | |
channel.message StuffMachine.random_entry | |
end | |
on :privmsg, :in => :channel, :trigger => 'findstuff' do |channel, user, message| | |
user.notice StuffMachine.find(message) | |
end | |
class StuffMachine | |
def self.random_entry | |
'The stuff machine wiggles and a hat falls out' | |
end | |
def self.find(something) | |
"I couldn't find anything" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment