botpop/plugins/say_goodbye.rb
Arthur Poulet 01a398e45b remove plugin chapui_s, create say_goodby plugin
Say goodbye plugin say something relative to someone
2015-06-26 13:34:13 +02:00

21 lines
514 B
Ruby

#encoding: utf-8
module BotpopPlugins
module SayGoodByePlugin
NAME = self.to_s.split(':').last
MATCH = lambda do |parent, plugin|
parent.on :message, /!sg [\w\d_\-\.].+/ do |m| plugin.exec_sg m end
end
HELP = ["!sg src_name"]
CONFIG = Botpop::CONFIG['say_goodbye'] || raise(MissingConfigurationZone, NAME)
ENABLED = CONFIG['enable'].nil? ? true : CONFIG['enable']
def self.exec_sg m
arg = m.message.split.last
m.reply CONFIG[arg].shuffle.first
end
end
end