]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
Suppress the warnings for Struct redefinition on rescan
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 24 Jul 2006 06:50:20 +0000 (06:50 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 24 Jul 2006 06:50:20 +0000 (06:50 +0000)
data/rbot/plugins/quotes.rb
data/rbot/plugins/roulette.rb
data/rbot/plugins/seen.rb
data/rbot/plugins/url.rb

index 917c6901461f9f464f269a1582c8ac869b679a7d..4695fa100472e30bf83e0bbd9879350bb133ab9f 100644 (file)
@@ -1,6 +1,6 @@
 # GB: Ok, we *really* need to switch to db for this plugin too
 
-Quote = Struct.new("Quote", "num", "date", "source", "quote")
+Quote = Struct.new("Quote", :num, :date, :source, :quote) unless defined?(Quote)
 
 class QuotePlugin < Plugin
   def initialize
index e3bb25f6c46ad90b6582617d0114804208863fa9..852484813e5f807180019f2a4e33f0a46d988482 100644 (file)
@@ -1,4 +1,4 @@
-RouletteHistory = Struct.new("RouletteHistory", :games, :shots, :deaths, :misses, :wins)
+RouletteHistory = Struct.new("RouletteHistory", :games, :shots, :deaths, :misses, :wins) unless defined?(RouletteHistory)
 
 class RoulettePlugin < Plugin
   def initialize
index aec5a064fa8ebbd7c990119a71ad87a17ccbecb9..094a9b3db66149d29f436eae33279f474566aafc 100644 (file)
@@ -1,4 +1,4 @@
-Saw = Struct.new("Saw", :nick, :time, :type, :where, :message)
+Saw = Struct.new("Saw", :nick, :time, :type, :where, :message) unless defined?(Saw)
 
 class SeenPlugin < Plugin
   def help(plugin, topic="")
index b04beb871be52588c98d45145b030eb1fe8d915d..65d75eabd098fffa4bbd51c922b5c665e0efa8d0 100644 (file)
@@ -2,7 +2,7 @@ require 'net/http'
 require 'uri'
 require 'cgi'
 
-Url = Struct.new("Url", :channel, :nick, :time, :url)
+Url = Struct.new("Url", :channel, :nick, :time, :url) unless defined?(Url)
 TITLE_RE = /<\s*?title\s*?>(.+?)<\s*?\/title\s*?>/im
 
 UNESCAPE_TABLE = {