21 lines
401 B
Ruby
21 lines
401 B
Ruby
require 'xmpp4r/message'
|
|
|
|
require_relative '../module_base'
|
|
|
|
module Lain
|
|
module Modules
|
|
class DDate < Base
|
|
def on_message(muc, message)
|
|
return unless /\A!ddate\b/ =~ message.body
|
|
|
|
muc.send(Jabber::Message.new(muc.room, IO.popen("ddate").read.chomp))
|
|
end
|
|
|
|
def commands
|
|
{
|
|
'!ddate' => 'show Discordian date'
|
|
}
|
|
end
|
|
end
|
|
end
|
|
end
|