Sha256: 6a70a24d93c6c20e86671253596a95f0785a2de33ed5a9c4b264c4e594ecda4e
Contents?: true
Size: 338 Bytes
Versions: 2
Compression:
Stored size: 338 Bytes
Contents
# A simple plugin that replies with "pong" when messaged with ping class Robut::Plugin::Ping < Robut::Plugin::Base # Responds "pong" if +message+ is "ping" def handle(time, sender_nick, message) words = words(message) reply("pong") if sent_to_me?(message) && words.length == 1 && words.first.downcase == 'ping' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
robut-0.2.1 | lib/robut/plugin/ping.rb |
robut-0.2.0 | lib/robut/plugin/ping.rb |