Show
Ignore:
Timestamp:
04/12/07 14:35:45 (3 years ago)
Author:
Giuseppe Bilotta <giuseppe.bilotta@…>
Children:
5f58c780eea198c68e8b9528c9c07cca0f401257
Parents:
bf03d9f2b695772212abee81d405483c5c374633
git-committer:
Giuseppe Bilotta <giuseppe.bilotta@gmail.com> 1176374145 +0000
Message:

Module\#define_structure method: define a new Struct only if doesn't exist already or if the attribute list changed

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • data/rbot/plugins/bans.rb

    redd1cf7 rac39a3b  
    3333#   * add proper auth management 
    3434 
    35 OnJoinAction = Struct.new("OnJoinAction", :host, :action, :channel, :reason) 
    36 BadWordAction = Struct.new("BadWordAction", :regexp, :action, :channel, :timer, :reason) 
    37 WhitelistEntry = Struct.new("WhitelistEntry", :host, :channel) 
    38  
     35define_structure :OnJoinAction, :host, :action, :channel, :reason 
     36define_structure :BadWordAction, :regexp, :action, :channel, :timer, :reason 
     37define_structure :WhitelistEntry, :host, :channel 
    3938 
    4039class BansPlugin < Plugin