summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/bans.rb
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-04-12 10:35:45 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-04-12 10:35:45 +0000
commitac39a3b330cbf7c4b65ba907783364b63fb109b3 (patch)
treee773d062644ecad55fcd0d48e505a882b0f94a82 /data/rbot/plugins/bans.rb
parentbf03d9f2b695772212abee81d405483c5c374633 (diff)
Module\#define_structure method: define a new Struct only if doesn't exist already or if the attribute list changed
Diffstat (limited to 'data/rbot/plugins/bans.rb')
-rw-r--r--data/rbot/plugins/bans.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/data/rbot/plugins/bans.rb b/data/rbot/plugins/bans.rb
index 17281d4c..73121b7e 100644
--- a/data/rbot/plugins/bans.rb
+++ b/data/rbot/plugins/bans.rb
@@ -32,10 +32,9 @@
# * fixed regexp usage in requirements for plugin map
# * add proper auth management
-OnJoinAction = Struct.new("OnJoinAction", :host, :action, :channel, :reason)
-BadWordAction = Struct.new("BadWordAction", :regexp, :action, :channel, :timer, :reason)
-WhitelistEntry = Struct.new("WhitelistEntry", :host, :channel)
-
+define_structure :OnJoinAction, :host, :action, :channel, :reason
+define_structure :BadWordAction, :regexp, :action, :channel, :timer, :reason
+define_structure :WhitelistEntry, :host, :channel
class BansPlugin < Plugin