Sha256: f1b6ff159d4dea09a3e37fb44b2bc9d47a98ed0e0bc5fca50427268e18dca910
Contents?: true
Size: 497 Bytes
Versions: 2
Compression:
Stored size: 497 Bytes
Contents
# This is a simple plugin the envokes the "say" command on whatever is passed # Example: # # @robut say that was awesome! # # *Requires that the "say" command is installed and in the path # class Robut::Plugin::Say < Robut::Plugin::Base # Pipes +message+ through the +say+ command def handle(time, sender_nick, message) words = words(message) if sent_to_me?(message) && words.first == "say" phrase = words[1..-1].join(' ') system("say #{phrase}") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
robut-0.2.1 | lib/robut/plugin/say.rb |
robut-0.2.0 | lib/robut/plugin/say.rb |