]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/bans.rb
Module\#define_structure method: define a new Struct only if doesn't exist already...
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / bans.rb
index 17281d4cc0b83162924303ee61c3a9c516ee36d6..73121b7ef505abd4883d014f21f7b8f5235d78ba 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