]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/salut.rb
ircbot: do not use debug in sendmsg() because it breaks script. script plugin: handle...
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / salut.rb
index e4295a06655c84323fe9d6fb52a886701a5cfd75..feff2dd63c9efe880d5acf0b3f2d0129cf143e99 100644 (file)
@@ -1,19 +1,17 @@
-# vim: set sw=2 et:\r
+#-- vim:sw=2:et\r
+#++\r
+#\r
+# :title: Salutations plugin for rbot\r
+#\r
+# Author:: Giuseppe "Oblomov" Bilotta <giuseppe.bilotta@gmail.com>\r
+# Copyright:: (C) 2006-2007 Giuseppe Bilotta\r
+# License:: GPL v2\r
+#\r
 # Salutations plugin: respond to salutations\r
-# TODO allow online editing of salutations\r
-# TODO *REMEMBER* to set @changed to true after edit\r
-# TODO or changes won't be saved\r
-\r
-unless Array.new.respond_to?(:pick_one)\r
-  debug "Defining the pick_one method for Array"\r
-  class ::Array\r
-    def pick_one\r
-      return nil if self.empty?\r
-      self[rand(self.length)]\r
-    end\r
-  end\r
-end\r
-\r
+#\r
+# TODO:: allow online editing of salutations\r
+#\r
+# TODO:: *REMEMBER* to set @changed to true after edit or changes won't be saved\r
 \r
 class SalutPlugin < Plugin\r
   BotConfig.register BotConfigBooleanValue.new('salut.all_languages',\r