Sha256: aa1b6be56a9cd868e31088638182bcc9b315cb0cdf54d9c4bc8cf925e88cf2f2

Contents?: true

Size: 305 Bytes

Versions: 2

Compression:

Stored size: 305 Bytes

Contents

class Earthquake < MadChatter::Extension

  def handle(message)
    if message.text == '/earthquake'
      send_status_message "#{message.username} has just caused an earthquake!"
      send_action 'earthquake' # call a javascript function named 'earthquake'
      stop_message_handling
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mad_chatter-0.3.4 templates/extensions/earthquake.rb
mad_chatter-0.3.3 templates/extensions/earthquake.rb