Sha256: 04d737aecd2a740c262e965614304621e0b8f343753b08c6c3e3efc2bae5715f
Contents?: true
Size: 396 Bytes
Versions: 1
Compression:
Stored size: 396 Bytes
Contents
# A simple plugin that replies with "pong" when messaged with ping class Robut::Plugin::Ping include Robut::Plugin def usage "#{at_nick} ping - responds 'pong'" end # 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
robut-0.3.0 | lib/robut/plugin/ping.rb |