]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/bans.rb
weather plugin: refactor HTML cleanup code
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / bans.rb
index 17281d4cc0b83162924303ee61c3a9c516ee36d6..ac5262b780192b2cf98ed6eee76d354bb489b08b 100644 (file)
 #   * fixed regexp usage in requirements for plugin map\r
 #   * add proper auth management\r
 \r
-OnJoinAction = Struct.new("OnJoinAction", :host, :action, :channel, :reason)\r
-BadWordAction = Struct.new("BadWordAction", :regexp, :action, :channel, :timer, :reason)\r
-WhitelistEntry = Struct.new("WhitelistEntry", :host, :channel)\r
-\r
+define_structure :OnJoinAction, :host, :action, :channel, :reason\r
+define_structure :BadWordAction, :regexp, :action, :channel, :timer, :reason\r
+define_structure :WhitelistEntry, :host, :channel\r
 \r
 class BansPlugin < Plugin\r
 \r
@@ -68,7 +67,7 @@ class BansPlugin < Plugin
           action = :kickban\r
         else\r
           # Shouldn't happen\r
-          warn "Unknown action in old data #{ar.inspect} -- entry ignored"\r
+          warning "Unknown action in old data #{ar.inspect} -- entry ignored"\r
           next\r
         end\r
         bans.delete(ar)\r