]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/salut.rb
lart plugin: replace "me" with sourcenick
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / salut.rb
index b0bf67e7769fd47d0cc5ecf80d75bc93161e6383..abcb17443b4fc7af4d9ecdf8b2d8620d22d7148f 100644 (file)
@@ -1,16 +1,25 @@
-# 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
+# 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
+  Config.register Config::BooleanValue.new('salut.all_languages',\r
     :default => true, \r
     :desc => "Check for a salutation in all languages and not just in the one defined by core.language",\r
     :on_change => Proc.new {|bot, v| bot.plugins['salut'].reload}\r
   )\r
-  BotConfig.register BotConfigBooleanValue.new('salut.address_only',\r
+  Config.register Config::BooleanValue.new('salut.address_only',\r
     :default => true, \r
     :desc => "When set to true, the bot will only reply to salutations directed at him",\r
     :on_change => Proc.new {|bot, v| bot.plugins['salut'].reload}\r
@@ -82,7 +91,7 @@ class SalutPlugin < Plugin
     @match_langs.uniq!\r
   end\r
 \r
-  def listen(m)\r
+  def unreplied(m)\r
     return if @match.empty?\r
     return unless m.kind_of?(PrivMessage)\r
     return if m.address? and m.plugin == 'config'\r