X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fsalut.rb;h=feff2dd63c9efe880d5acf0b3f2d0129cf143e99;hb=42045b5df29519cb4307ac433c6fd0d4ba5f157b;hp=e4295a06655c84323fe9d6fb52a886701a5cfd75;hpb=a96db3722879210c77e6d67dd8100b60e2452947;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/salut.rb b/data/rbot/plugins/salut.rb index e4295a06..feff2dd6 100644 --- a/data/rbot/plugins/salut.rb +++ b/data/rbot/plugins/salut.rb @@ -1,19 +1,17 @@ -# vim: set sw=2 et: +#-- vim:sw=2:et +#++ +# +# :title: Salutations plugin for rbot +# +# Author:: Giuseppe "Oblomov" Bilotta +# Copyright:: (C) 2006-2007 Giuseppe Bilotta +# License:: GPL v2 +# # Salutations plugin: respond to salutations -# TODO allow online editing of salutations -# TODO *REMEMBER* to set @changed to true after edit -# TODO or changes won't be saved - -unless Array.new.respond_to?(:pick_one) - debug "Defining the pick_one method for Array" - class ::Array - def pick_one - return nil if self.empty? - self[rand(self.length)] - end - end -end - +# +# TODO:: allow online editing of salutations +# +# TODO:: *REMEMBER* to set @changed to true after edit or changes won't be saved class SalutPlugin < Plugin BotConfig.register BotConfigBooleanValue.new('salut.all_languages',